summaryrefslogtreecommitdiffstats
path: root/debian/patches/fix-configure-libxml2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fix-configure-libxml2.patch')
-rw-r--r--debian/patches/fix-configure-libxml2.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/fix-configure-libxml2.patch b/debian/patches/fix-configure-libxml2.patch
new file mode 100644
index 0000000..1d52c75
--- /dev/null
+++ b/debian/patches/fix-configure-libxml2.patch
@@ -0,0 +1,37 @@
+Description: Use pkgconfig to configure libxml-2.0
+ xml2-config to be removed from Debian packaging
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2020-02-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure.ac
++++ b/configure.ac
+@@ -516,7 +516,6 @@
+ AC_PATH_PROGS(MAILCMD, mailx mail)
+ AC_PATH_PROGS(EGREP, egrep)
+ AC_PATH_PROGS(PKGCONFIG, pkg-config)
+-AC_PATH_PROGS(XML2CONFIG, xml2-config)
+
+ AC_ARG_ENABLE([doc],
+ AS_HELP_STRING([--enable-doc], [build documentation (default is yes)]),
+@@ -726,16 +725,11 @@
+ dnl AC_CHECK_HEADERS(netinet/ip_icmp.h)
+
+ AC_MSG_CHECKING(for special libxml2 includes)
+-if test "x$XML2CONFIG" = "x"; then
+- AC_MSG_ERROR(libxml2 config not found)
+-else
+- XML2HEAD="`$XML2CONFIG --cflags`"
+- AC_MSG_RESULT($XML2HEAD)
+- AC_CHECK_LIB(xml2, xmlReadMemory)
+-fi
+-
+-CPPFLAGS="$CPPFLAGS $XML2HEAD"
++PKG_CHECK_MODULES(XML, [libxml-2.0])
++CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
++LIBS="$LIBS $XML_LIBS"
+
++AC_CHECK_LIB(xml2, xmlReadMemory)
+ AC_CHECK_HEADERS(libxml/xpath.h)
+ if test "$ac_cv_header_libxml_xpath_h" != "yes"; then
+ AC_MSG_ERROR(The libxml developement headers were not found)