pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libxml2-32: Add files from libxml2 package in pkgsrc



Module Name:	pkgsrc-wip
Committed By:	Naveen Narayanan <zerous@nocebo.space>
Pushed By:	zerous
Date:		Sun Jun 30 17:54:04 2019 +0200
Changeset:	94cb7a308846b2c0b4a824bcd596ab6329d877c9

Added Files:
	libxml2-32/Makefile.common
	libxml2-32/PLIST
	libxml2-32/buildlink3.mk
	libxml2-32/distinfo
	libxml2-32/options.mk
	libxml2-32/patches/patch-Makefile.in
	libxml2-32/patches/patch-catalog.c
	libxml2-32/patches/patch-configure
	libxml2-32/patches/patch-doc_examples_Makefile.in
	libxml2-32/patches/patch-encoding.c
	libxml2-32/patches/patch-python_libxml.c
	libxml2-32/patches/patch-python_libxml.py
	libxml2-32/patches/patch-python_libxml2.py
	libxml2-32/patches/patch-python_setup.py
	libxml2-32/patches/patch-xmlcatalog.c

Log Message:
libxml2-32: Add files from libxml2 package in pkgsrc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=94cb7a308846b2c0b4a824bcd596ab6329d877c9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libxml2-32/Makefile.common                        | 15 ++++
 libxml2-32/PLIST                                  | 15 ++++
 libxml2-32/buildlink3.mk                          | 23 ++++++
 libxml2-32/distinfo                               | 16 ++++
 libxml2-32/options.mk                             | 13 ++++
 libxml2-32/patches/patch-Makefile.in              | 15 ++++
 libxml2-32/patches/patch-catalog.c                | 19 +++++
 libxml2-32/patches/patch-configure                | 92 +++++++++++++++++++++++
 libxml2-32/patches/patch-doc_examples_Makefile.in | 15 ++++
 libxml2-32/patches/patch-encoding.c               | 65 ++++++++++++++++
 libxml2-32/patches/patch-python_libxml.c          | 32 ++++++++
 libxml2-32/patches/patch-python_libxml.py         | 13 ++++
 libxml2-32/patches/patch-python_libxml2.py        | 16 ++++
 libxml2-32/patches/patch-python_setup.py          | 34 +++++++++
 libxml2-32/patches/patch-xmlcatalog.c             | 15 ++++
 15 files changed, 398 insertions(+)

diffs:
diff --git a/libxml2-32/Makefile.common b/libxml2-32/Makefile.common
new file mode 100644
index 0000000000..b719b95e99
--- /dev/null
+++ b/libxml2-32/Makefile.common
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile.common,v 1.12 2019/01/09 19:09:02 adam Exp $
+#
+# used by textproc/libxml2/Makefile
+# used by textproc/py-libxml2/Makefile
+
+DISTNAME=	libxml2-2.9.9
+CATEGORIES=	textproc
+MASTER_SITES=	ftp://xmlsoft.org/libxml2/
+MASTER_SITES+=	http://xmlsoft.org/sources/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://xmlsoft.org/
+
+DISTINFO_FILE=	${.CURDIR}/../../textproc/libxml2/distinfo
+PATCHDIR=	${.CURDIR}/../../textproc/libxml2/patches
diff --git a/libxml2-32/PLIST b/libxml2-32/PLIST
new file mode 100644
index 0000000000..6f8874ac65
--- /dev/null
+++ b/libxml2-32/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD$
+lib/32/cmake/libxml2/libxml2-config.cmake
+lib/32/libxml2.la
+lib/32/pkgconfig/libxml-2.0.pc
+lib/32/xml2Conf.sh
+@pkgdir share/gtk-doc/html/libxml2
+@pkgdir share/examples/libxml2
+@pkgdir share/doc/libxml2/tutorial/images/callouts
+@pkgdir share/doc/libxml2/html
+@pkgdir share/doc/libxml2-${PKGVERSION}
+@pkgdir share/aclocal
+@pkgdir man/man3
+@pkgdir man/man1
+@pkgdir include/libxml2/libxml
+@pkgdir bin
diff --git a/libxml2-32/buildlink3.mk b/libxml2-32/buildlink3.mk
new file mode 100644
index 0000000000..40f431c9c6
--- /dev/null
+++ b/libxml2-32/buildlink3.mk
@@ -0,0 +1,23 @@
+# $NetBSD: buildlink3.mk,v 1.18 2012/06/14 07:39:37 sbd Exp $
+
+BUILDLINK_TREE+=	libxml2
+
+.if !defined(LIBXML2_BUILDLINK3_MK)
+LIBXML2_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libxml2+=	libxml2>=2.6.2
+BUILDLINK_ABI_DEPENDS.libxml2+=	libxml2>=2.8.0nb2
+#BUILDLINK_PKGSRCDIR.libxml2?=	../../textproc/libxml2
+BUILDLINK_PKGSRCDIR.libxml2?=	../libxml2-32/
+BUILDLINK_LIBDIRS.libxml2=	lib/32
+
+BUILDLINK_FILES.libxml2+=	bin/xml2-config
+
+USE_FEATURES+=		glob
+
+.include "../../archivers/xz/buildlink3.mk"
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.endif # LIBXML2_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-libxml2
diff --git a/libxml2-32/distinfo b/libxml2-32/distinfo
new file mode 100644
index 0000000000..3ac758b439
--- /dev/null
+++ b/libxml2-32/distinfo
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.130 2019/01/09 19:09:02 adam Exp $
+
+SHA1 (libxml2-2.9.9.tar.gz) = 96686d1dd9fddf3b35a28b1e2e4bbacac889add3
+RMD160 (libxml2-2.9.9.tar.gz) = a7d5f9ca4a24db329108f4bfb6bd4eed0f61ab21
+SHA512 (libxml2-2.9.9.tar.gz) = cb7784ba4e72e942614e12e4f83f4ceb275f3d738b30e3b5c1f25edf8e9fa6789e854685974eed95b362049dbf6c8e7357e0327d64c681ed390534ac154e6810
+Size (libxml2-2.9.9.tar.gz) = 5476717 bytes
+SHA1 (patch-Makefile.in) = e687eaa9805b855b0c8a944ec5c597bd34954472
+SHA1 (patch-catalog.c) = 34afe787f6012b460a85be993048e133907a1621
+SHA1 (patch-configure) = a0df60b1a8609c185ed7d45a015eafdbfb6d6b41
+SHA1 (patch-doc_examples_Makefile.in) = 4eede9719724f94402e850ee6d6043a74aaf62b2
+SHA1 (patch-encoding.c) = 6cf0a7d421828b9f40a4079ee85adb791c54d096
+SHA1 (patch-python_libxml.c) = cfa07b4f3dfddb501c2ba210bb32b8ee14e3df9d
+SHA1 (patch-python_libxml.py) = 869a72ae5ba2e27e6d46552878890acb22337675
+SHA1 (patch-python_libxml2.py) = 209d105b0f3aedb834091390a7c6819705108e34
+SHA1 (patch-python_setup.py) = 7771fd02ee6779463f1d3321f099d7e6d19cd1b1
+SHA1 (patch-xmlcatalog.c) = d65b7e3be9694147e96ce4bb70a1739e2279ba81
diff --git a/libxml2-32/options.mk b/libxml2-32/options.mk
new file mode 100644
index 0000000000..15c408f639
--- /dev/null
+++ b/libxml2-32/options.mk
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.2 2012/06/12 15:46:03 wiz Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.libxml2
+PKG_SUPPORTED_OPTIONS+=	inet6
+PKG_SUGGESTED_OPTIONS=	inet6
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=	--enable-ipv6
+.else
+CONFIGURE_ARGS+=	--disable-ipv6
+.endif
diff --git a/libxml2-32/patches/patch-Makefile.in b/libxml2-32/patches/patch-Makefile.in
new file mode 100644
index 0000000000..2279fb18b2
--- /dev/null
+++ b/libxml2-32/patches/patch-Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile.in,v 1.1 2019/01/09 19:09:03 adam Exp $
+
+Move EXAMPLES_DIR to fit pkgsrc.
+
+--- Makefile.in.orig	2014-10-16 07:35:13.000000000 +0000
++++ Makefile.in
+@@ -835,7 +835,7 @@ cmake_DATA = libxml2-config.cmake
+ #
+ BASE_DIR = $(datadir)/doc
+ DOC_MODULE = libxml2-$(VERSION)
+-EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples
++EXAMPLES_DIR = $(datadir)/examples/libxml2
+ 
+ #
+ # Coverage support, largely borrowed from libvirt
diff --git a/libxml2-32/patches/patch-catalog.c b/libxml2-32/patches/patch-catalog.c
new file mode 100644
index 0000000000..1f1339f289
--- /dev/null
+++ b/libxml2-32/patches/patch-catalog.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-catalog.c,v 1.1 2019/01/09 19:09:03 adam Exp $
+
+Parametrize XML and SGML catalog directories.
+
+--- catalog.c.orig	2014-10-03 11:28:05.000000000 +0000
++++ catalog.c
+@@ -70,10 +70,10 @@
+ #define XML_URN_PUBID "urn:publicid:"
+ #define XML_CATAL_BREAK ((xmlChar *) -1)
+ #ifndef XML_XML_DEFAULT_CATALOG
+-#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
++#define XML_XML_DEFAULT_CATALOG "file://@@XML_DEFAULT_CATALOG@@"
+ #endif
+ #ifndef XML_SGML_DEFAULT_CATALOG
+-#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
++#define XML_SGML_DEFAULT_CATALOG "file://@@SGML_DEFAULT_CATALOG@@"
+ #endif
+ 
+ #if defined(_WIN32) && defined(_MSC_VER)
diff --git a/libxml2-32/patches/patch-configure b/libxml2-32/patches/patch-configure
new file mode 100644
index 0000000000..a980d819c8
--- /dev/null
+++ b/libxml2-32/patches/patch-configure
@@ -0,0 +1,92 @@
+$NetBSD: patch-configure,v 1.1 2019/01/09 19:09:03 adam Exp $
+
+Various configure fixes:
+ * Add run-path to XML_LIBDIR
+ * Fix handling of pthreads
+ * Add portability to OpenBSD, MirBSD, FreeBSD, NetBSD and DragonFly
+ * Fix test for SAX
+   Submitted as https://bugzilla.gnome.org/show_bug.cgi?id=766859
+
+--- configure.orig	2017-11-02 20:16:48.000000000 +0000
++++ configure
+@@ -15084,7 +15084,7 @@ fi
+ fi
+ 
+ 
+-XML_LIBDIR='-L${libdir}'
++XML_LIBDIR='-Wl,-R${libdir} -L${libdir}'
+ XML_INCLUDEDIR='-I${includedir}/libxml2'
+ 
+ XML_CFLAGS=""
+@@ -15557,13 +15557,13 @@ else
+         if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
+             ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+ if test "x$ac_cv_header_pthread_h" = xyes; then :
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5
+-$as_echo_n "checking for pthread_join in -lpthread... " >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
++$as_echo_n "checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... " >&6; }
+ if ${ac_cv_lib_pthread_pthread_join+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpthread  $LIBS"
++LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}  $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -15595,7 +15595,7 @@ fi
+ $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; }
+ if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then :
+ 
+-                THREAD_LIBS="-lpthread"
++                THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
+ 
+ $as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h
+ 
+@@ -15617,12 +15617,12 @@ fi
+        *beos*) WITH_THREADS="1"
+ 	   THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
+        ;;
+-       *linux*)
++       *linux* | *openbsd* | *mirbsd*)
+            if test "${GCC}" = "yes" ; then
+ 	       GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+ 	       GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
+ 	       GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'`
+-	       if test "${THREAD_LIBS}" = "-lpthread" ; then
++	       if test "${THREAD_LIBS}" = "${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" ; then
+ 	           if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
+ 		   then
+ 		       THREAD_LIBS=""
+@@ -15639,6 +15639,10 @@ fi
+ 	       fi
+ 	   fi
+        ;;
++       *freebsd* | *netbsd* | *dragonfly*)
++	   THREAD_LIBS=""
++	   BASE_THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
++       ;;
+     esac
+     if test "$WITH_THREADS" = "1" ; then
+ 	THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
+@@ -15909,7 +15913,7 @@ else
+     TEST_SAX=SAXtests
+ fi
+ 
+- if test "${WITH_TRIO}" = "1"; then
++ if test "${WITH_SAX1}" = "1"; then
+   WITH_SAX1_SOURCES_TRUE=
+   WITH_SAX1_SOURCES_FALSE='#'
+ else
+@@ -16493,10 +16497,6 @@ case "$host" in
+  CPPFLAGS="$CPPFLAGS -DWIN32"
+  WIN32_EXTRA_LIBADD="-lws2_32"
+  WIN32_EXTRA_LDFLAGS="-no-undefined"
+- if test "${PYTHON}" != ""
+- then
+-   WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
+- fi
+  ;;
+  *-*-cygwin*)
+  CYGWIN_EXTRA_LDFLAGS="-no-undefined"
diff --git a/libxml2-32/patches/patch-doc_examples_Makefile.in b/libxml2-32/patches/patch-doc_examples_Makefile.in
new file mode 100644
index 0000000000..aff40822b8
--- /dev/null
+++ b/libxml2-32/patches/patch-doc_examples_Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-doc_examples_Makefile.in,v 1.1 2019/01/09 19:09:03 adam Exp $
+
+Don't install html files.
+
+--- doc/examples/Makefile.in.orig	2014-10-16 07:35:13.000000000 +0000
++++ doc/examples/Makefile.in
+@@ -916,7 +916,7 @@ uninstall-am:
+ 
+ install-data-local: 
+ 	$(MKDIR_P) $(DESTDIR)$(HTML_DIR)
+-	-$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
++	-$(INSTALL) -m 0644 $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+ 
+ clean-local:
+ 	test -f Makefile.am || rm -f test?.xml
diff --git a/libxml2-32/patches/patch-encoding.c b/libxml2-32/patches/patch-encoding.c
new file mode 100644
index 0000000000..7a8e93409f
--- /dev/null
+++ b/libxml2-32/patches/patch-encoding.c
@@ -0,0 +1,65 @@
+$NetBSD$
+
+Avoid potential undefined behaviour by casting arg to toupper()
+to an appropriate value range.
+https://bugzilla.gnome.org/show_bug.cgi?id=766838
+
+Also, on NetBSD, add CP1141 encoding alias.
+
+--- encoding.c.orig	2016-05-23 07:25:25.000000000 +0000
++++ encoding.c
+@@ -1018,7 +1018,7 @@ xmlGetEncodingAlias(const char *alias) {
+ 	return(NULL);
+ 
+     for (i = 0;i < 99;i++) {
+-        upper[i] = toupper(alias[i]);
++        upper[i] = toupper((unsigned char)alias[i]);
+ 	if (upper[i] == 0) break;
+     }
+     upper[i] = 0;
+@@ -1053,7 +1053,7 @@ xmlAddEncodingAlias(const char *name, co
+ 	return(-1);
+ 
+     for (i = 0;i < 99;i++) {
+-        upper[i] = toupper(alias[i]);
++        upper[i] = toupper((unsigned char)alias[i]);
+ 	if (upper[i] == 0) break;
+     }
+     upper[i] = 0;
+@@ -1155,7 +1155,7 @@ xmlParseCharEncoding(const char* name)
+ 	name = alias;
+ 
+     for (i = 0;i < 499;i++) {
+-        upper[i] = toupper(name[i]);
++        upper[i] = toupper((unsigned char)name[i]);
+ 	if (upper[i] == 0) break;
+     }
+     upper[i] = 0;
+@@ -1331,7 +1331,7 @@ xmlNewCharEncodingHandler(const char *na
+ 	return(NULL);
+     }
+     for (i = 0;i < 499;i++) {
+-        upper[i] = toupper(name[i]);
++        upper[i] = toupper((unsigned char)name[i]);
+ 	if (upper[i] == 0) break;
+     }
+     upper[i] = 0;
+@@ -1433,6 +1433,9 @@ xmlInitCharEncodingHandlers(void) {
+     xmlRegisterCharEncodingHandlersISO8859x ();
+ #endif
+ #endif
++#ifdef __NetBSD__ /* XXX needed by selftest */
++    xmlAddEncodingAlias("CP1141", "IBM-1141");
++#endif
+ 
+ }
+ 
+@@ -1660,7 +1663,7 @@ xmlFindCharEncodingHandler(const char *n
+      * Check first for directly registered encoding names
+      */
+     for (i = 0;i < 99;i++) {
+-        upper[i] = toupper(name[i]);
++        upper[i] = toupper((unsigned char)name[i]);
+ 	if (upper[i] == 0) break;
+     }
+     upper[i] = 0;
diff --git a/libxml2-32/patches/patch-python_libxml.c b/libxml2-32/patches/patch-python_libxml.c
new file mode 100644
index 0000000000..9fdc6f689f
--- /dev/null
+++ b/libxml2-32/patches/patch-python_libxml.c
@@ -0,0 +1,32 @@
+$NetBSD: patch-python_libxml.c,v 1.1 2019/01/09 13:40:50 wiz Exp $
+
+Avoid returning invalid UTF-8 strings to python.
+Based on https://bugzilla.opensuse.org/attachment.cgi?id=746044&action=edit
+Fixes https://github.com/itstool/itstool/issues/22
+
+--- python/libxml.c.orig	2016-06-07 10:04:14.000000000 +0000
++++ python/libxml.c
+@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
+     PyObject *message;
+     PyObject *result;
+     char str[1000];
++    unsigned char *ptr = (unsigned char *)str;
+ 
+ #ifdef DEBUG_ERROR
+     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
+@@ -1636,10 +1637,14 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
+ 	    str[999] = 0;
+         va_end(ap);
+ 
++        /* Ensure the error string doesn't start at UTF8 continuation. */
++        while (*ptr && (*ptr & 0xc0) == 0x80)
++	    ptr++;
++
+         list = PyTuple_New(2);
+         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
+         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
+-        message = libxml_charPtrConstWrap(str);
++        message = libxml_charPtrConstWrap(ptr);
+         PyTuple_SetItem(list, 1, message);
+         result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+         Py_XDECREF(list);
diff --git a/libxml2-32/patches/patch-python_libxml.py b/libxml2-32/patches/patch-python_libxml.py
new file mode 100644
index 0000000000..35ec35e423
--- /dev/null
+++ b/libxml2-32/patches/patch-python_libxml.py
@@ -0,0 +1,13 @@
+$NetBSD: patch-python_libxml.py,v 1.1 2017/10/31 13:15:44 fhajny Exp $
+
+--- python/libxml.py.orig	2004-09-28 05:59:58.000000000 -0500
++++ python/libxml.py
+@@ -281,7 +281,7 @@ class xmlCore:
+     # defined as python2 properties
+     # 
+     import sys
+-    if float(sys.version[0:3]) < 2.2:
++    if float(sys.version[0:3].replace('p', '.')) < 2.2:
+         def __getattr__(self, attr):
+             if attr == "parent":
+                 ret = libxml2mod.parent(self._o)
diff --git a/libxml2-32/patches/patch-python_libxml2.py b/libxml2-32/patches/patch-python_libxml2.py
new file mode 100644
index 0000000000..c53582744b
--- /dev/null
+++ b/libxml2-32/patches/patch-python_libxml2.py
@@ -0,0 +1,16 @@
+$NetBSD: patch-python_libxml2.py,v 1.1 2017/11/08 22:51:54 prlw1 Exp $
+
+name[0:8] will fail if name is None.
+https://bugzilla.gnome.org/show_bug.cgi?id=790071
+
+--- python/libxml2.py.orig	2017-10-30 07:39:09.000000000 +0000
++++ python/libxml2.py
+@@ -573,6 +573,8 @@ class xmlCoreBreadthFirstItertor:
+ def nodeWrap(o):
+     # TODO try to cast to the most appropriate node class
+     name = libxml2mod.type(o)
++    if name is None:
++        return xmlNode(_obj=o)
+     if name == "element" or name == "text":
+         return xmlNode(_obj=o)
+     if name == "attribute":
diff --git a/libxml2-32/patches/patch-python_setup.py b/libxml2-32/patches/patch-python_setup.py
new file mode 100644
index 0000000000..1fce4eb304
--- /dev/null
+++ b/libxml2-32/patches/patch-python_setup.py
@@ -0,0 +1,34 @@
+$NetBSD: patch-python_setup.py,v 1.1 2017/10/31 13:15:44 fhajny Exp $
+
+Trust pkgsrc to know which iconv to use.
+It will be either in the buildlink directory, or in the compiler's
+default search path.
+
+--- python/setup.py.orig	2014-10-16 07:35:21.000000000 +0000
++++ python/setup.py
+@@ -56,11 +56,7 @@ else:
+ # - iconv.h
+ # - libxslt/xsltconfig.h
+ includes_dir = [
+-"/usr/include",
+-"/usr/local/include",
+-"/opt/include",
+-os.path.join(ROOT,'include'),
+-HOME
++os.path.join(ROOT,'include')
+ ];
+ 
+ xml_includes=""
+@@ -73,11 +69,7 @@ if xml_includes == "":
+     print("failed to find headers for libxml2: update includes_dir")
+     sys.exit(1)
+ 
+-iconv_includes=""
+-for dir in includes_dir:
+-    if not missing(dir + "/iconv.h"):
+-        iconv_includes=dir
+-        break;
++iconv_includes=os.path.join(ROOT,'include')
+ 
+ if iconv_includes == "":
+     print("failed to find headers for libiconv: update includes_dir")
diff --git a/libxml2-32/patches/patch-xmlcatalog.c b/libxml2-32/patches/patch-xmlcatalog.c
new file mode 100644
index 0000000000..ad071353a4
--- /dev/null
+++ b/libxml2-32/patches/patch-xmlcatalog.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-xmlcatalog.c,v 1.1 2019/01/09 19:09:03 adam Exp $
+
+Parametrize SGML catalog directory.
+
+--- xmlcatalog.c.orig	2014-10-03 11:28:06.000000000 +0000
++++ xmlcatalog.c
+@@ -43,7 +43,7 @@ static char *filename = NULL;
+ 
+ 
+ #ifndef XML_SGML_DEFAULT_CATALOG
+-#define XML_SGML_DEFAULT_CATALOG "/etc/sgml/catalog"
++#define XML_SGML_DEFAULT_CATALOG "@@SGML_DEFAULT_CATALOG@@"
+ #endif
+ 
+ /************************************************************************


Home | Main Index | Thread Index | Old Index