The following commit has been merged in the master branch: commit dad4abcc3cfc2c674befa47357473eaf5e4f02c1 Author: Markus Wanner <mar...@bluegap.ch> Date: Tue Apr 23 23:20:51 2013 +0200
Add patches/honor-build-flags: properly pass on LDFLAGS and CPPFLAGS. diff --git a/debian/control b/debian/control index c5fe450..8ba3889 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.16.1~), autotools-dev, postgresql-server-dev-9.1 Build-Depends-Indep: libpostgresql-jdbc-java, libsurefire-java, libmaven-clean-plugin-java, libmaven-compiler-plugin-java, - libmaven-jar-plugin-java, maven2 + libmaven-jar-plugin-java, libmaven-resources-plugin-java, maven2 Standards-Version: 3.9.4 Homepage: http://postgis.refractions.net/ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/postgis.git diff --git a/debian/patches/honor-build-flags b/debian/patches/honor-build-flags new file mode 100644 index 0000000..a2b50f4 --- /dev/null +++ b/debian/patches/honor-build-flags @@ -0,0 +1,67 @@ +Description: Better honor build flags during the build process. + Upstream PostGIS 'configure' overrides CPPFLAGS. Various Makefile.in + files don't honor LDFLAGS. This patch fixes that. Note that we are + patching configure directly, so as to save a call to autoconf. A real + patch for upstream would have to patch configure.in, instead. +Author: Markus Wanner <mar...@bluegap.ch> +Last-Update: 2013-04-23 + +--- a/loader/Makefile.in ++++ b/loader/Makefile.in +@@ -97,11 +97,11 @@ + + $(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ +- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ ++ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ + + $(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ +- $(CC) $(CFLAGS) $^ -o $@ $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) ++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) + + shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h + $(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c +@@ -109,7 +109,7 @@ + $(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES) + $(LIBTOOL) --mode=link \ + $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ \ +- $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) ++ $(GTK_LIBS) $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) + + installdir: + @mkdir -p $(DESTDIR)$(bindir) +--- a/liblwgeom/Makefile.in ++++ b/liblwgeom/Makefile.in +@@ -11,6 +11,7 @@ + # ********************************************************************** + + CC = @CC@ ++CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ + LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj + NUMERICFLAGS = @NUMERICFLAGS@ +@@ -147,10 +148,10 @@ + + # Command to build each of the .lo files + $(LT_SA_OBJS): %.lo: %.c +- $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + + $(LT_NM_OBJS): %.lo: %.c +- $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(NUMERICFLAGS) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $(NUMERICFLAGS) -c -o $@ $< + + # Manually generate WKT parser from Flex/Bison inputs + # Bison 2.5, Flex 2.5.35 +--- a/configure ++++ b/configure +@@ -19526,7 +19526,7 @@ + + + +-CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $JSON_CPPFLAGS $XML2_CPPFLAGS" ++CPPFLAGS="$CPPFLAGS $PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $JSON_CPPFLAGS $XML2_CPPFLAGS" + + SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS" + diff --git a/debian/patches/series b/debian/patches/series index f56c492..4769335 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ fix-spelling link-liblwgeom use-debian-maven fix-manpages +honor-build-flags diff --git a/debian/patches/use-debian-maven b/debian/patches/use-debian-maven index 228f800..a004075 100644 --- a/debian/patches/use-debian-maven +++ b/debian/patches/use-debian-maven @@ -21,13 +21,17 @@ Last-Update: 2013-04-14 classpathref="maven-ant-tasks.classpath" /> --- a/java/jdbc/pom.xml +++ b/java/jdbc/pom.xml -@@ -82,10 +82,23 @@ +@@ -82,10 +82,27 @@ </resource> </resources> - <plugins><!-- - + <plugins> ++ <plugin> ++ <groupId>org.apache.maven.plugins</groupId> ++ <artifactId>maven-clean-plugin</artifactId> ++ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> @@ -47,7 +51,7 @@ Last-Update: 2013-04-14 <artifactId>maven-source-plugin</artifactId> <executions> <execution> -@@ -120,6 +133,8 @@ +@@ -120,6 +137,8 @@ <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.1-901.jdbc3</version> @@ -56,4 +60,3 @@ Last-Update: 2013-04-14 </dependency> </dependencies> <reporting> - diff --git a/debian/rules b/debian/rules index 6947d23..bf556f9 100755 --- a/debian/rules +++ b/debian/rules @@ -23,8 +23,8 @@ include /usr/share/dpkg/buildflags.mk DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -# Use maven in offline mode. -MVN = mvn --offline -s/etc/maven2/settings-debian.xml +# Use maven in offline mode and with the local Debian repo +MVN = mvn --offline -Dmaven.repo.local=/usr/share/maven-repo MAJOR_VERSION = $(shell grep POSTGIS_MAJOR_VERSION Version.config|cut -d= -f2) MINOR_VERSION = $(shell grep POSTGIS_MINOR_VERSION Version.config|cut -d= -f2) -- PostGIS for PostgreSQL _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel