Skip to content
Commits on Source (2)
......@@ -3,6 +3,9 @@ postgis (3.0.0+dfsg-7) UNRELEASED; urgency=medium
* Don't hardcode test exit status for failures.
* Don't bother with autopkgtest on problematic architectures.
(closes: #949026)
* Update update metadata for move to git.
* Add patch to use pkg-config for libxml2.
(closes: #949426)
-- Bas Couwenberg <sebastic@debian.org> Thu, 16 Jan 2020 10:16:23 +0100
......
Description: Use pkg-config for libxml2.
Author: Bas Couwenberg <sebastic@debian.org>
Bug: https://trac.osgeo.org/postgis/ticket/4626
Bug-Debian: https://bugs.debian.org/949426
Forwarded: https://trac.osgeo.org/postgis/attachment/ticket/4626/libxml2.patch
--- a/configure.ac
+++ b/configure.ac
@@ -308,6 +308,16 @@ fi
AC_SUBST([MATHML2_DTD])
dnl ===========================================================================
+dnl Detect if pkg-config installed
+dnl ===========================================================================
+# check for pkg-config
+PKG_PROG_PKG_CONFIG
+if test -z "$PKG_CONFIG"; then
+ AC_MSG_WARN([Cannot find pkg-config, make sure it is installed in your PATH])
+fi
+
+
+dnl ===========================================================================
dnl Detect CUnit if it is installed (used for unit testing)
dnl
dnl Note that we pass any specified CPPFLAGS and LDFLAGS into the Makefile
@@ -584,13 +594,32 @@ AC_ARG_WITH([xml2config],
[AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])],
[XML2CONFIG="$withval"], [XML2CONFIG=""])
+XML2_LDFLAGS=""
+XML2_CPPFLAGS=""
+
if test "x$XML2CONFIG" = "x"; then
dnl XML2CONFIG was not specified, so search within the current path
AC_PATH_PROG([XML2CONFIG], [xml2-config])
- dnl If we couldn't find xml2-config, display a warning
+ dnl If we couldn't find xml2-config, display a warning if pkg-config fails too
if test "x$XML2CONFIG" = "x"; then
- AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.])
+ if test ! -z "$PKG_CONFIG"; then
+ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [
+ XML2_CPPFLAGS="$LIBXML2_CFLAGS"
+ XML2_LDFLAGS="$LIBXML2_LIBS"
+ HAVE_LIBXML2="1"
+ POSTGIS_LIBXML2_VERSION=`$PKG_CONFIG libxml-2.0 --modversion`
+ ], [])
+ else
+ AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.])
+ fi
+ else
+ dnl Extract the linker and include flags
+ XML2_LDFLAGS=`$XML2CONFIG --libs`
+ XML2_CPPFLAGS=`$XML2CONFIG --cflags`
+
+ dnl Extract the version
+ POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
fi
else
dnl XML2CONFIG was specified; display a message to the user
@@ -599,6 +628,13 @@ else
else
if test -f $XML2CONFIG; then
AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG])
+
+ dnl Extract the linker and include flags
+ XML2_LDFLAGS=`$XML2CONFIG --libs`
+ XML2_CPPFLAGS=`$XML2CONFIG --cflags`
+
+ dnl Extract the version
+ POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
else
AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist])
fi
@@ -606,11 +642,6 @@ else
fi
-dnl Extract the linker and include flags
-XML2_LDFLAGS=`$XML2CONFIG --libs`
-XML2_CPPFLAGS=`$XML2CONFIG --cflags`
-
-
dnl
dnl XCode in 10.12 supplies bad flags in xml2config resulting
dnl in compile errors. For that one version, we force the prefix
@@ -633,10 +664,6 @@ case $host_os in
;;
esac
-
-dnl Extract the version
-POSTGIS_LIBXML2_VERSION=`$XML2CONFIG --version`
-
dnl Check headers file
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$XML2_CPPFLAGS"
@@ -825,16 +852,6 @@ CFLAGS="$CFLAGS_SAVE"
dnl ===========================================================================
-dnl Detect if pkg-config installed
-dnl ===========================================================================
-# check for pkg-config
-PKG_PROG_PKG_CONFIG
-if test -z "$PKG_CONFIG"; then
- AC_MSG_WARN([Cannot find pkg-config, make sure it is installed in your PATH])
-fi
-
-
-dnl ===========================================================================
dnl Detect the version of PROJ.4 installed
dnl ===========================================================================
relax-test-timing-constraints.patch
chaikin
libxml2.patch
......@@ -3,5 +3,5 @@ Bug-Database: http://trac.osgeo.org/postgis/report
#Bug-Submit: http://trac.osgeo.org/postgis/newticket
Contact: PostGIS Developers <postgis-devel@lists.osgeo.org>
Registration: https://www.osgeo.org/cgi-bin/ldap_create_user.py
Repository: https://svn.osgeo.org/postgis/
Repository-Browse: http://trac.osgeo.org/postgis/browser
Repository: https://git.osgeo.org/gitea/postgis/postgis.git
Repository-Browse: https://git.osgeo.org/gitea/postgis/postgis