public inbox for [email protected]  
help / color / mirror / Atom feed
Packaging PostGIS for F23 / PG95
2+ messages / 2 participants
[nested] [flat]

* Packaging PostGIS for F23 / PG95
@ 2015-11-26 08:24  Oskari Saarenmaa <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Oskari Saarenmaa @ 2015-11-26 08:24 UTC (permalink / raw)
  To: pgsql-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.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Packaging PostGIS for F23 / PG95
@ 2015-11-27 16:49  Devrim GÜNDÜZ <[email protected]>
  parent: Oskari Saarenmaa <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Devrim GÜNDÜZ @ 2015-11-27 16:49 UTC (permalink / raw)
  To: Oskari Saarenmaa <[email protected]>; pgsql-pkg-yum


Hi,

Thanks for the patch! I applied these, and I'm working on the builds
right now.

Regards, Devrim

On Thu, 2015-11-26 at 10:24 +0200, Oskari Saarenmaa wrote:
> 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

-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR




Attachments:

  [application/pgp-signature] signature.asc (819B, 2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-11-27 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-11-26 08:24 Packaging PostGIS for F23 / PG95 Oskari Saarenmaa <[email protected]>
2015-11-27 16:49 ` Devrim GÜNDÜZ <[email protected]>

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