summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-09-03 09:51:38 +0000
committerMichał Górny <mgorny@gentoo.org>2014-09-03 09:51:38 +0000
commite9906d1fe2854674daf2d8bc0f631d048b9ac361 (patch)
tree52ac519245de8b126820c56f236bb496151fcf1b /dev-libs/libxslt
parentCHOST-ize xml2-config, for bug #518728. (diff)
downloadgentoo-2-e9906d1fe2854674daf2d8bc0f631d048b9ac361.tar.gz
gentoo-2-e9906d1fe2854674daf2d8bc0f631d048b9ac361.tar.bz2
gentoo-2-e9906d1fe2854674daf2d8bc0f631d048b9ac361.zip
Use wrapped xml2-config, bug #518728. And CHOST-ize xslt-config too while at it.
(Portage version: 2.2.13_pre1/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'dev-libs/libxslt')
-rw-r--r--dev-libs/libxslt/ChangeLog9
-rw-r--r--dev-libs/libxslt/files/libxslt-1.1.28-AC_PATH_TOOL.patch46
-rw-r--r--dev-libs/libxslt/libxslt-1.1.28-r4.ebuild117
3 files changed, 171 insertions, 1 deletions
diff --git a/dev-libs/libxslt/ChangeLog b/dev-libs/libxslt/ChangeLog
index 96c3df78eaf7..92f00c015fbb 100644
--- a/dev-libs/libxslt/ChangeLog
+++ b/dev-libs/libxslt/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/libxslt
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxslt/ChangeLog,v 1.288 2014/08/25 10:57:17 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxslt/ChangeLog,v 1.289 2014/09/03 09:51:38 mgorny Exp $
+
+*libxslt-1.1.28-r4 (03 Sep 2014)
+
+ 03 Sep 2014; Michał Górny <mgorny@gentoo.org>
+ +files/libxslt-1.1.28-AC_PATH_TOOL.patch, +libxslt-1.1.28-r4.ebuild:
+ Use wrapped xml2-config, bug #518728. And CHOST-ize xslt-config too while at
+ it.
25 Aug 2014; Agostino Sarubbo <ago@gentoo.org> libxslt-1.1.28-r3.ebuild:
Stable for alpha, wrt bug #512012
diff --git a/dev-libs/libxslt/files/libxslt-1.1.28-AC_PATH_TOOL.patch b/dev-libs/libxslt/files/libxslt-1.1.28-AC_PATH_TOOL.patch
new file mode 100644
index 000000000000..bc9ff7fe3594
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.28-AC_PATH_TOOL.patch
@@ -0,0 +1,46 @@
+From 1fc82ea63f16efc0d607b39a162e3032d7c2d602 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 3 Sep 2014 11:21:01 +0200
+Subject: [PATCH] Use AC_PATH_TOOL to find libgcrypt-config and xml2-config
+
+Using AC_PATH_TOOL prefers ${CHOST}-prefixed tools over 'bare' ones,
+therefore improving support for cross-compilation and multilib. This
+is useful for environment where libgcrypt-config and xml2-config
+correspond to the build host environment, while
+${CHOST}-libgcrypt-config and ${CHOST}-xml2-config are installed for
+each supported build targets.
+
+Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=725635
+Fixes: https://bugs.gentoo.org/show_bug.cgi?id=518728
+---
+ configure.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index a861e90..f1639a8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -393,7 +393,7 @@ case $host in
+ CRYPTO_TESTDIR=crypto
+ ;;
+ *)
+- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
++ AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+ if test "$LIBGCRYPT_CONFIG" != "no" ; then
+ LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
+ if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
+@@ -507,9 +507,9 @@ AC_SUBST(LIBXML_REQUIRED_VERSION)
+ AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
+ if test "x$LIBXML_CONFIG_PREFIX" != "x"
+ then
+- XML_CONFIG=${LIBXML_CONFIG_PREFIX}/bin/xml2-config
++ AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false], [${LIBXML_CONFIG_PREFIX}/bin])
+ else
+- XML_CONFIG=xml2-config
++ AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false])
+ fi
+
+ dnl
+--
+2.1.0
+
diff --git a/dev-libs/libxslt/libxslt-1.1.28-r4.ebuild b/dev-libs/libxslt/libxslt-1.1.28-r4.ebuild
new file mode 100644
index 000000000000..cc9bc835995f
--- /dev/null
+++ b/dev-libs/libxslt/libxslt-1.1.28-r4.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxslt/libxslt-1.1.28-r4.ebuild,v 1.1 2014/09/03 09:51:38 mgorny Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE="xml"
+
+inherit autotools eutils python-r1 toolchain-funcs multilib-minimal
+
+DESCRIPTION="XSLT libraries and tools"
+HOMEPAGE="http://www.xmlsoft.org/"
+SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="crypt debug python static-libs"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND=">=dev-libs/libxml2-2.9.1-r5:2[${MULTILIB_USEDEP}]
+ crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
+ python? (
+ ${PYTHON_DEPS}
+ dev-libs/libxml2:2[python,${PYTHON_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r20
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )
+"
+DEPEND="${RDEPEND}"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/xslt-config
+)
+
+src_prepare() {
+ DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=684621
+ epatch "${FILESDIR}"/${PN}.m4-${PN}-1.1.26.patch
+
+ epatch "${FILESDIR}"/${PN}-1.1.26-disable_static_modules.patch
+
+ # use AC_PATH_TOOL for libgcrypt-config for sane cross-compile and multilib support
+ # https://bugzilla.gnome.org/show_bug.cgi?id=725635
+ # same for xml2-config
+ # https://bugs.gentoo.org/show_bug.cgi?id=518728
+ epatch "${FILESDIR}"/${PN}-1.1.28-AC_PATH_TOOL.patch
+
+ eautoreconf
+ # If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
+ # and it is propably otherwise too if upstream generated with new
+ # autoconf
+# epunt_cxx
+ # But Prefix always needs elibtoolize if not eautoreconf'd.
+# elibtoolize
+}
+
+multilib_src_configure() {
+ libxslt_configure() {
+ ECONF_SOURCE=${S} econf \
+ $(use_enable static-libs static) \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-html-subdir=html \
+ $(use_with crypt crypto) \
+ $(use_with debug) \
+ $(use_with debug mem-debug) \
+ "$@"
+ }
+
+ libxslt_py_configure() {
+ mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
+ run_in_build_dir libxslt_configure "--with-python=${PYTHON}" # odd build system
+ }
+
+ libxslt_configure --without-python # build python bindings separately
+
+ if multilib_is_native_abi && use python; then
+ python_parallel_foreach_impl libxslt_py_configure
+ fi
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use python && libxslt_foreach_py_emake all
+}
+
+multilib_src_test() {
+ default
+ multilib_is_native_abi && use python && libxslt_foreach_py_emake test
+}
+
+multilib_src_install() {
+ # "default" does not work here - docs are installed by multilib_src_install_all
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use python; then
+ libxslt_foreach_py_emake DESTDIR="${D}" install
+ python_foreach_impl python_optimize
+ mv "${ED}"/usr/share/doc/${PN}-python-${PV} "${ED}"/usr/share/doc/${PF}/python
+ fi
+
+ prune_libtool_files --modules
+}
+
+libxslt_foreach_py_emake() {
+ libxslt_py_emake() {
+ pushd "${BUILD_DIR}/python" > /dev/null || die
+ emake "$@"
+ popd > /dev/null
+ }
+ local native_builddir=${BUILD_DIR}
+ python_foreach_impl libxslt_py_emake top_builddir="${native_builddir}" "$@"
+}