summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2012-02-22 11:10:17 +0000
committerdrochner <drochner@pkgsrc.org>2012-02-22 11:10:17 +0000
commit4ff4945d4175424a44287f56b1cf6637b02a2b71 (patch)
tree55fd7a39aa35bb13eb60f69f7216f9ccf9748556 /textproc
parent393134720169ff3026c1ef48e277f325106433b6 (diff)
downloadpkgsrc-4ff4945d4175424a44287f56b1cf6637b02a2b71.tar.gz
build the library thread-aware, i.e. use <pthread.h> but do not
link against libpthread. (It doesn't create threads, just uses locking.) This seems to be wanted by some applications, eg vlc issues a warning on startup (with no visible consequences afaict, but anyway). I hope this works for other OSes too. If not, we should probably add support for these cases to mk/pthread.bl3.mk. bump PKGREV
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libxml2/Makefile15
-rw-r--r--textproc/libxml2/distinfo7
-rw-r--r--textproc/libxml2/patches/patch-aa15
-rw-r--r--textproc/libxml2/patches/patch-ab28
-rw-r--r--textproc/libxml2/patches/patch-am13
5 files changed, 66 insertions, 12 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index f1c668bba4d..bf540856825 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.112 2012/01/17 14:43:43 drochner Exp $
+# $NetBSD: Makefile,v 1.113 2012/02/22 11:10:17 drochner Exp $
DISTNAME= libxml2-2.7.8
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= textproc
MASTER_SITES= ftp://xmlsoft.org/libxml2/ \
http://xmlsoft.org/sources/
@@ -27,9 +27,9 @@ CONFIGURE_ARGS+= --without-python
.include "options.mk"
-# Don't use threads - it's not apparent whether it's necessary or not,
-# and this library needs to be usable by non-threaded applications too
-CONFIGURE_ARGS+= --without-threads
+# allow thread-awareness, but make sure the library is not
+# linked against libpthread
+#CONFIGURE_ARGS+= --without-threads
MAKE_ENV+= PAX=${PAX:Q}
@@ -43,6 +43,11 @@ SUBST_FILES.cat= catalog.c xmlcatalog.c
SUBST_SED.cat= -e "s,@@SGML_DEFAULT_CATALOG@@,${SGML_DEFAULT_CATALOG},g"
SUBST_SED.cat+= -e "s,@@XML_DEFAULT_CATALOG@@,${XML_DEFAULT_CATALOG},g"
+# XXX make sure the library is not linked against libpthread
+post-install:
+ test -z "`ldd ${DESTDIR}${PREFIX}/lib/libxml2.so | grep pthread`"
+
+.include "../../mk/pthread.buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../textproc/xmlcatmgr/catalogs.mk"
diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo
index 4c06dea2c51..4ae277638e4 100644
--- a/textproc/libxml2/distinfo
+++ b/textproc/libxml2/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.87 2012/01/23 08:10:56 joerg Exp $
+$NetBSD: distinfo,v 1.88 2012/02/22 11:10:17 drochner Exp $
SHA1 (libxml2-2.7.8.tar.gz) = 859dd535edbb851cc15b64740ee06551a7a17d40
RMD160 (libxml2-2.7.8.tar.gz) = 30709622cfe3e2175e73d6701b7e19a25ab5ac47
Size (libxml2-2.7.8.tar.gz) = 4881808 bytes
-SHA1 (patch-aa) = bf7db00ddf8a36394521baf656cf83d99bd9cbd3
-SHA1 (patch-ab) = e1cb25ae1b2219af91d11f0ccdbb12912d50488a
+SHA1 (patch-aa) = 965bfc2226828b5161a4541cf73f5b5ef9a7e88e
+SHA1 (patch-ab) = d8dfd5bd9632d32c7e32e35e4d4735e510fc438f
SHA1 (patch-ac) = 264c75cf9fff5319105b971c122cdf5fc103c04e
SHA1 (patch-ad) = cd45da492b02cce9983c46762839f68b8b1e0177
SHA1 (patch-ae) = b8d8e0275cab3caafd98275ac22b63951fc4b5fd
@@ -12,6 +12,7 @@ SHA1 (patch-ag) = ab4aeeb8ca696b88285274760ab3ef08800773a0
SHA1 (patch-aj) = 24eb4a08ea4c40be6d75a72cd0bb5280514f73d4
SHA1 (patch-ak) = 5e0e9807d7ae0bc93a5583a61bb88a49ec1751e8
SHA1 (patch-al) = 45f984fef5cf5d04c46e940867707897396a9c9f
+SHA1 (patch-am) = ae7ab69b7bba2271d2d996161cc8b9956d0b06fa
SHA1 (patch-include_libxml_xpath.h) = 3fc74551a7843668cf9ffee19b1f20ccb674e153
SHA1 (patch-testapi.c) = 63a0a34c8ca98d9214c4d3391e97d9a9ca4569f8
SHA1 (patch-xpointer.c) = fa720fd515bab3f99bb11bf56320b3ad8e5fb211
diff --git a/textproc/libxml2/patches/patch-aa b/textproc/libxml2/patches/patch-aa
index 7f31fcf5497..a91cd6a09cd 100644
--- a/textproc/libxml2/patches/patch-aa
+++ b/textproc/libxml2/patches/patch-aa
@@ -1,8 +1,17 @@
-$NetBSD: patch-aa,v 1.23 2008/09/06 14:58:34 wiz Exp $
+$NetBSD: patch-aa,v 1.24 2012/02/22 11:10:18 drochner Exp $
---- Makefile.in.orig 2008-08-30 16:50:47.000000000 +0200
+--- Makefile.in.orig 2010-11-04 17:28:16.000000000 +0000
+++ Makefile.in
-@@ -657,7 +657,7 @@ pkgconfig_DATA = libxml-2.0.pc
+@@ -569,7 +569,7 @@ DIST_SUBDIRS = include . doc example pyt
+ INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
+ bin_SCRIPTS = xml2-config
+ lib_LTLIBRARIES = libxml2.la
+-libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
++libxml2_la_LIBADD = @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
+ @USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT =
+ @USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
+ libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \
+@@ -714,7 +714,7 @@ pkgconfig_DATA = libxml-2.0.pc
#
BASE_DIR = $(datadir)/doc
DOC_MODULE = libxml2-$(VERSION)
diff --git a/textproc/libxml2/patches/patch-ab b/textproc/libxml2/patches/patch-ab
index 3bc264f9330..835abff30fe 100644
--- a/textproc/libxml2/patches/patch-ab
+++ b/textproc/libxml2/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.21 2010/11/26 13:43:25 drochner Exp $
+$NetBSD: patch-ab,v 1.22 2012/02/22 11:10:18 drochner Exp $
--- configure.orig 2010-11-04 17:28:14.000000000 +0000
+++ configure
@@ -20,6 +20,32 @@ $NetBSD: patch-ab,v 1.21 2010/11/26 13:43:25 drochner Exp $
XML_INCLUDEDIR='-I${includedir}/libxml2'
XML_CFLAGS=""
+@@ -13815,13 +13815,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" = x""yes; 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 test "${ac_cv_lib_pthread_pthread_join+set}" = set; 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. */
+
+@@ -13853,7 +13853,7 @@ fi
+ $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; }
+ if test "x$ac_cv_lib_pthread_pthread_join" = x""yes; then :
+
+- THREAD_LIBS="-lpthread"
++ THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
+
+ $as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h
+
@@ -14582,10 +14582,10 @@ $as_echo "#define snprintf _snprintf" >>
$as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
diff --git a/textproc/libxml2/patches/patch-am b/textproc/libxml2/patches/patch-am
new file mode 100644
index 00000000000..c90341a1c2d
--- /dev/null
+++ b/textproc/libxml2/patches/patch-am
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1 2012/02/22 11:10:18 drochner Exp $
+
+--- runtest.c.orig 2010-10-12 06:25:32.000000000 +0000
++++ runtest.c
+@@ -3936,7 +3936,7 @@ thread_specific_data(void *private_data)
+ return ((void *) Okay);
+ }
+
+-#if defined(linux) || defined(__sun) || defined(__APPLE_CC__)
++#if defined(linux) || defined(__sun) || defined(__APPLE_CC__) || defined(__NetBSD__)
+
+ #include <pthread.h>
+