diff --git a/gdal-libproj.patch b/gdal-libproj.patch deleted file mode 100644 index cab8d6a..0000000 --- a/gdal-libproj.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rup a/ogr/ogrct.cpp b/ogr/ogrct.cpp ---- a/ogr/ogrct.cpp 2018-05-04 18:08:49.000000000 +0200 -+++ b/ogr/ogrct.cpp 2018-05-14 09:49:42.824062814 +0200 -@@ -125,6 +125,7 @@ static bool bProjLocaleSafe = false - # define LIBNAME "libproj.dylib" - #else - # define LIBNAME "libproj.so" -+# define LIBNAME "libproj.so.12" - #endif - - #endif // PROJ_VERSION == 4 diff --git a/gdal.changes b/gdal.changes index bb274a4..86743a2 100644 --- a/gdal.changes +++ b/gdal.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jul 31 06:29:53 UTC 2018 - bruno@ioda-net.ch + +- Remove patch gdal-libproj.patch, we can't have hardcoded libproj + soversion. Replaced by dynamic sed formula. + Fix boo#1102889 + ------------------------------------------------------------------- Fri Jul 27 07:08:28 UTC 2018 - guillaume.gardet@opensuse.org diff --git a/gdal.spec b/gdal.spec index 0eb1685..e4e7134 100644 --- a/gdal.spec +++ b/gdal.spec @@ -34,9 +34,6 @@ Source0: http://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{ver Patch0: gdal-perl.patch # Fix occasional parallel build failure Patch1: GDALmake.opt.in.patch -# Fix hard coded name of libproj library -# But libproj.so is valid if libproj-devel is installed ? -Patch2: gdal-libproj.patch # PATCH-FIX-UPSTREAM - gdal-fix_ecw5_detection.patch: fix ECW5 detection in configure Patch3: gdal-fix_ecw5_detection.patch BuildRequires: blas-devel @@ -173,9 +170,12 @@ The GDAL python modules provide support to handle multiple GIS file formats. %setup -q -n %{sourcename}-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 +# Set the right (build) libproj.so version +PROJSOVER=$(ls -1 %_libdir/libproj.so.?? | awk -F '.' '{print $3}') +sed -i "s,# define LIBNAME \"libproj.so\",# define LIBNAME \"libproj.so.${PROJSOVER}\",g" ogr/ogrct.cpp + # Fix mandir sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure