public inbox for [email protected]  
help / color / mirror / Atom feed
From: Oskari Saarenmaa <[email protected]>
To: [email protected]
Subject: Packaging PostGIS for F23 / PG95
Date: Thu, 26 Nov 2015 10:24:55 +0200
Message-ID: <[email protected]> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-pkg-yum>

Hi,

I noticed PostGIS wasn't available for F23 / PG95 in yum.postgresql.org 
and looked into the issues.  Apparently SFCGAL 1.2.0 didn't build on F23 
due to a change in CGAL, upstream fixed this in release 1.2.2 so I just 
downloaded the latest tag from github and updated the spec to match, 
attached.

After fixing that I ran into issues building PostGIS on F23 wrt linking 
to GDAL.  That required adding a -fPIC flag to configure when linking 
with GDAL as well as removing the LD_LIBRARY_PATH setting in .spec. 
Attached patches for .spec and for PostGIS's configure.

Cheers,
Oskari


-- 
Sent via pgsql-pkg-yum mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum


Attachments:

  [text/x-patch] postgis22-spec-gdal.patch (1.7K, 2-postgis22-spec-gdal.patch)
  download | inline diff:
--- postgis22.spec	2015-11-03 21:48:55.000000000 +0200
+++ postgis22.spec	2015-11-19 11:52:27.506554156 +0200
@@ -10,13 +10,14 @@
 Summary:	Geographic Information Systems Extensions to PostgreSQL
 Name:		%{sname}2_%{pgmajorversion}
 Version:	2.2.0
-Release:	2%{?dist}
+Release:	2.aiven1%{?dist}
 License:	GPLv2+
 Group:		Applications/Databases
 Source0:	http://download.osgeo.org/%{sname}/source/%{sname}-%{version}.tar.gz
 Source1:	http://download.osgeo.org/%{sname}/source/%{sname}-%{postgisprevversion}.tar.gz
 Source2:	http://download.osgeo.org/%{sname}/docs/%{sname}-%{version}.pdf
 Source4:	filter-requires-perl-Pg.sh
+Patch1:		postgis-2.2.0-gdalfpic.patch
 
 URL:		http://www.postgis.net/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -87,9 +88,9 @@
 # Copy .pdf file to top directory before installing.
 cp -p %{SOURCE2} .
 
+%patch1 -p0
+
 %build
-# We need the below for GDAL:
-export LD_LIBRARY_PATH=%{pginstdir}/lib
 
 %configure --with-pgconfig=%{pginstdir}/bin/pg_config \
 %if !%raster
@@ -146,7 +148,7 @@
 %files
 %defattr(-,root,root)
 %doc COPYING CREDITS NEWS TODO README.%{sname} doc/html loader/README.* doc/%{sname}.xml doc/ZMSgeoms.txt
-%{_docdir}/pgsql/extension/README.address_standardizer
+%{pginstdir}/doc/extension/README.address_standardizer
 %{pginstdir}/share/contrib/%{sname}-%{postgismajorversion}/postgis.sql
 %{pginstdir}/share/contrib/%{sname}-%{postgismajorversion}/postgis_comments.sql
 %{pginstdir}/share/contrib/%{sname}-%{postgismajorversion}/postgis_upgrade*.sql
@@ -202,6 +204,9 @@
 %doc %{sname}-%{version}.pdf
 
 %changelog
+* Thu Nov 19 2015 Oskari Saarenmaa <[email protected]> 2.2.0-2.aiven1
+- use -fPIC with gdal
+
 * Fri Oct 30 2015 Devrim GÜNDÜZ <[email protected]> - 2.2.0-2
 - Build with SFCGAL support.
 


  [text/x-patch] postgis-2.2.0-gdalfpic.patch (324B, 3-postgis-2.2.0-gdalfpic.patch)
  download | inline diff:
--- configure	2015-10-07 21:39:56.000000000 +0300
+++ configure	2015-11-19 11:44:15.402542910 +0200
@@ -17119,7 +17119,7 @@
 				LIBGDAL_CFLAGS=`$GDAL_CONFIG --cflags`
 
 		CPPFLAGS_SAVE="$CPPFLAGS"
-		CPPFLAGS="$LIBGDAL_CFLAGS"
+		CPPFLAGS="$LIBGDAL_CFLAGS -fPIC"
 		CFLAGS_SAVE="$CFLAGS"
 		CFLAGS=""
 		LIBS_SAVE="$LIBS"


  [text/x-patch] sfcgal-spec-122.patch (863B, 4-sfcgal-spec-122.patch)
  download | inline diff:
--- sfcgal.spec	2015-11-03 21:48:57.000000000 +0200
+++ sfcgal.spec	2015-11-19 11:26:41.600141480 +0200
@@ -1,10 +1,10 @@
 Summary:	C++ wrapper library around CGAL for PostGIS
 Name:		SFCGAL
-Version:	1.2.0
+Version:	1.2.2
 Release:	1%{?dist}
 License:	GLPLv2
 Group:		System Environment/Libraries
-Source:		https://github.com/Oslandia/%{name}/archive/v%{version}.tar.gz
+Source:		https://github.com/Oslandia/%{name}/archive/%{name}-%{version}.zip
 URL:		http://sfcgal.org/
 BuildRequires:	cmake, CGAL-devel
 BuildRequires:	boost-thread, boost-system, boost-date-time, boost-serialization
@@ -67,5 +67,8 @@
 /usr/lib/libSFCGAL.la
 
 %changelog
+* Thu Nov 19 2015 Oskari Saarenmaa <[email protected]> 1.2.2-1
+- Upgrade to 1.2.2 to support newer CGAL versions
+
 * Fri Oct 30 2015 Devrim GUNDUZ <[email protected]> 1.2.0-1
 - Initial build for PostgreSQL YUM Repository.


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Packaging PostGIS for F23 / PG95
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox