[gdal-grass] 03/03: Replace libpq patch with grass7-configure-postgres by Martin Landa.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Mon Mar 2 22:14:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch experimental
in repository gdal-grass.

commit 9bd6a69ca9ddffe542e904d3f69a79826e8af6f4
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Mar 2 22:54:52 2015 +0100

    Replace libpq patch with grass7-configure-postgres by Martin Landa.
---
 debian/changelog                         |  5 +++-
 debian/control                           |  1 +
 debian/control.in                        |  1 +
 debian/patches/grass7-configure-postgres | 51 ++++++++++++++++++++++++++++++++
 debian/patches/libpq                     | 14 ---------
 debian/patches/series                    |  2 +-
 debian/rules                             |  6 +++-
 7 files changed, 63 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e6ae377..7b88b1f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,10 @@ libgdal-grass (1.11.2-1~exp2) UNRELEASED; urgency=medium
 
   * Bump minimum GRASS version to 7.0.0.
   * Update patches for GRASS 7.0.0.
-  * Add patch by Martin Landa to improve GRASS version detection.
+  * Add patches by Martin Landa:
+    - grass7-configure           improve GRASS version detection
+    - grass7-configure-postgres  add configure support for postgres includes
+      libpq-dev is now a dependency to query the includedir with pq_config
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 20 Feb 2015 22:31:25 +0100
 
diff --git a/debian/control b/debian/control
index 1ac018b..0526d6d 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Build-Depends: debhelper (>= 9),
                grass-dev (>= 7.0.0),
                libgdal-dev (>= 1.11.2-1~),
                libproj-dev,
+               libpq-dev,
                pkg-config
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-grass/gdal-grass.git
diff --git a/debian/control.in b/debian/control.in
index 389acab..481431a 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -11,6 +11,7 @@ Build-Depends: debhelper (>= 9),
                grass-dev (>= 7.0.0),
                libgdal-dev (>= 1.11.2-1~),
                libproj-dev,
+               libpq-dev,
                pkg-config
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-grass/gdal-grass.git
diff --git a/debian/patches/grass7-configure-postgres b/debian/patches/grass7-configure-postgres
new file mode 100644
index 0000000..14a5711
--- /dev/null
+++ b/debian/patches/grass7-configure-postgres
@@ -0,0 +1,51 @@
+Description: Add configure support for postgres includes as used by GRASS 7
+Origin: https://trac.osgeo.org/gdal/attachment/ticket/5852/grass-configure-postgres.patch
+Bug: https://trac.osgeo.org/gdal/ticket/5852
+Author: Marin Landa <landa.martin at gmail.com>
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4,7 +4,7 @@ CXX	=	@CXX@
+ LD	=	@CXX@
+ 
+ CPPFLAGS = -DUSE_CPL -DGRASS_GISBASE=\"@GRASS_GISBASE@\" \
+-	  @GDAL_INC@ @GRASS_INCLUDE@ @CPPFLAGS@
++	  @GDAL_INC@ @GRASS_INCLUDE@ @PQ_INCLUDE@ @CPPFLAGS@
+ CXXFLAGS = @CXX_WFLAGS@ @CXX_PIC@ 
+ CFLAGS   = @CFLAGS@
+ LDFLAGS  = @LDFLAGS@
+--- a/configure.in
++++ b/configure.in
+@@ -91,7 +91,7 @@ AC_SUBST(GDAL_INC,    $GDAL_INC)
+ dnl ---------------------------------------------------------------------------
+ dnl Where to put driver?
+ dnl ---------------------------------------------------------------------------
+-AC_ARG_WITH(autoload,[  --with-autoload[=DIR]      Directory for autoload drivers],,)
++AC_ARG_WITH(autoload,[  --with-autoload[=DIR]     Directory for autoload drivers],,)
+ 
+ if test "$with_autoload" != "" ; then
+   AUTOLOAD_DIR=$with_autoload
+@@ -151,6 +151,23 @@ AC_SUBST(GRASS_GISBASE,$GRASS_GISBASE)
+ 
+ dnl ---------------------------------------------------------------------------
+ 
++dnl ---------------------------------------------------------------------------
++dnl Find PostgreSQL (GRASS optional dependency)
++dnl ---------------------------------------------------------------------------
++
++AC_ARG_WITH(postgres_includes,[  --with-postgres-includes=DIR     use PostgreSQL icnludes in DIR], postgres_includes="$withval", postgres_includes=no)
++
++PQ_INCLUDE=
++if test "x$postgres_includes" != "xno"; then
++# With PostgreSQL includes directory
++PQ_INCLUDE="-I$postgres_includes"
++fi
++
++AC_SUBST(PQ_INCLUDE)
++
++dnl ---------------------------------------------------------------------------
++
++
+ rm -f conftest*
+ 
+ AC_OUTPUT(Makefile)
diff --git a/debian/patches/libpq b/debian/patches/libpq
deleted file mode 100644
index 411c7ed..0000000
--- a/debian/patches/libpq
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Add include for libpq.h.
-Author: Bas Couwenberg <sebastic at xs4all.nl>
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -4,7 +4,7 @@ CXX	=	@CXX@
- LD	=	@CXX@
- 
- CPPFLAGS = -DUSE_CPL -DGRASS_GISBASE=\"@GRASS_GISBASE@\" \
--	  @GDAL_INC@ @GRASS_INCLUDE@ @CPPFLAGS@
-+	  @GDAL_INC@ @GRASS_INCLUDE@ -I/usr/include/postgresql @CPPFLAGS@
- CXXFLAGS = @CXX_WFLAGS@ @CXX_PIC@ 
- CFLAGS   = @CFLAGS@
- LDFLAGS  = @LDFLAGS@
diff --git a/debian/patches/series b/debian/patches/series
index 119047c..67819f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,4 @@ hardening
 environment-typo
 grass7-makefile
 grass7-configure
-libpq
+grass7-configure-postgres
diff --git a/debian/rules b/debian/rules
index 8f6cd6f..5ee208e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -38,7 +38,11 @@ override_dh_auto_configure:
 		sed -e 's/@GRASS_ABI@/$(GRASS_ABI)/' debian/control.in > debian/control; \
 	fi
 
-	dh_auto_configure -- --prefix=/usr --with-grass=/usr/lib/$(GRASS) --with-autoload=/usr/lib/gdalplugins/$(GDAL)
+	dh_auto_configure -- \
+	                  --prefix=/usr \
+	                  --with-autoload=/usr/lib/gdalplugins/$(GDAL) \
+	                  --with-grass=/usr/lib/$(GRASS) \
+	                  --with-postgres-includes=$(shell pg_config --includedir)
 
 override_dh_auto_install:
 	mkdir -p $(CURDIR)/debian/$(PKGNAME)/usr/lib/$(GDAL)/grass

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/gdal-grass.git



More information about the Pkg-grass-devel mailing list