From a128c138c5d21da69c3b403f0b8e64857e61cad1 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 10 Mar 2021 11:38:52 +0100 Subject: [PATCH] Add postgis_proj8.patch --- postgis.spec | 9 ++++++++- postgis_proj8.patch | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 postgis_proj8.patch diff --git a/postgis.spec b/postgis.spec index d125683..01cb682 100644 --- a/postgis.spec +++ b/postgis.spec @@ -1,9 +1,10 @@ %{!?javabuild:%global javabuild 0} %{!?utils:%global utils 1} %{!?gcj_support:%global gcj_support 0} -%{!?upgrade:%global upgrade 1} +%{!?upgrade:%global upgrade 0} %{!?runselftest:%global runselftest 1} +# Re-enable upgrade packages on next major version bump! %global majorversion 3.1 %global soversion 3 %global prevmajorversion 2.5 @@ -27,6 +28,8 @@ Source3: http://download.osgeo.org/%{name}/source/%{name}-%{prevversion}.t # From debian # This should increase chances of tests passing even on busy or slow systems. Patch0: relax-test-timing-constraints.patch +# Fix proj8 detection +Patch1: postgis_proj8.patch BuildRequires: make BuildRequires: autoconf @@ -147,6 +150,8 @@ The client package provides shp2pgsql, raster2pgsql and pgsql2shp for PostGIS. %prep %autosetup -p1 -n %{name}-%{version} -a 3 +# For patch1 +./autogen.sh %if %upgrade # postgis-upgrade @@ -157,6 +162,7 @@ cd %{name}-%{prevversion} tar xf %{SOURCE0} ( cd %{name}-%{version} +%patch1 -p1 ./autogen.sh ) @@ -393,6 +399,7 @@ fi %changelog * Sun Mar 07 2021 Sandro Mani - 3.1.1-6 - Rebuild (proj) +- Disable upgrade packages for now (not compatible with proj8) * Mon Feb 22 2021 Michael Scherer - 3.1.1-5 - split various utilities subpackages, to not pull gtk in the main rpm diff --git a/postgis_proj8.patch b/postgis_proj8.patch new file mode 100644 index 0000000..3584af5 --- /dev/null +++ b/postgis_proj8.patch @@ -0,0 +1,12 @@ +diff -rupN postgis-3.1.1/configure.ac postgis-3.1.1-new/configure.ac +--- postgis-3.1.1/configure.ac 2021-01-28 20:10:31.000000000 +0100 ++++ postgis-3.1.1-new/configure.ac 2021-03-08 16:36:09.677099539 +0100 +@@ -902,7 +902,7 @@ AC_SUBST([PROJ_LDFLAGS]) + dnl Ensure we can link against libproj + LIBS_SAVE="$LIBS" + LIBS="$PROJ_LDFLAGS" +-AC_CHECK_LIB([proj], [pj_get_release], ++AC_CHECK_LIB([proj], [proj_info], + [], + [AC_MSG_ERROR([could not find libproj - you may need to specify the directory of a PROJ installation using --with-projdir])], + [])