forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package-Manager: portage-2.3.0_rc1
- Loading branch information
Showing
2 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST libxslt-1.1.28.tar.gz 3435907 SHA256 5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c SHA512 20b65bdaceaac5bd11d509bf683ce8e344030bc95164639266ae705d41659bcba47b5be1b059d0d67681e6428b0710db675d1749c06aa531bc2212ed3d0511b1 WHIRLPOOL 7f059d7d6b02fc5982c31d3239188ff0a6d211f722635ac3d3cd77bedf54ef9b1a9433ef1c55a9335f353ce618f3dd93a9e1e19c117988358ab31857edff1843 | ||
DIST libxslt-1.1.29.tar.gz 3428524 SHA256 b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce SHA512 a1ce555a74a9dabe65e8f64bb66e27e77760fd76940d88f2d59f58dd63ca73c8ae59f3fcbd8e76c8f92ff992fb0c09328528c20ea38ccac83e63252106bf5f31 WHIRLPOOL 874dca166a147e3928207b0dea720b92a3657406363536be0cc3c904dcea7bad0af48536a722d1570743908a7e730073a13440f41885b8fbaeba919b1e99521b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
PYTHON_COMPAT=( python2_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 examples 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}] ) | ||
" | ||
DEPEND="${RDEPEND}" | ||
|
||
MULTILIB_CHOST_TOOLS=( | ||
/usr/bin/xslt-config | ||
) | ||
|
||
MULTILIB_WRAPPED_HEADERS=( | ||
/usr/include/libxslt/xsltconfig.h | ||
) | ||
|
||
src_prepare() { | ||
default | ||
|
||
DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO ) | ||
|
||
# https://bugzilla.gnome.org/show_bug.cgi?id=684621 | ||
eapply "${FILESDIR}"/${PN}.m4-${PN}-1.1.26.patch | ||
|
||
# Simplify python setup | ||
eapply "${FILESDIR}"/${PN}-1.1.28-simplify-python.patch | ||
eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch | ||
|
||
mv configure.{in,ac} || die | ||
|
||
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 \ | ||
--with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \ | ||
--with-html-subdir=html \ | ||
$(use_with crypt crypto) \ | ||
$(use_with debug) \ | ||
$(use_with debug mem-debug) \ | ||
$(use_enable static-libs static) \ | ||
"$@" | ||
} | ||
|
||
libxslt_py_configure() { | ||
mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist | ||
run_in_build_dir libxslt_configure --with-python | ||
} | ||
|
||
libxslt_configure --without-python # build python bindings separately | ||
|
||
if multilib_is_native_abi && use python; then | ||
python_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}" \ | ||
docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \ | ||
EXAMPLE_DIR="${EPREFIX}"/usr/share/doc/${PF}/python/examples \ | ||
install | ||
python_foreach_impl python_optimize | ||
fi | ||
} | ||
|
||
multilib_src_install_all() { | ||
einstalldocs | ||
|
||
if ! use examples; then | ||
rm -rf "${ED}"/usr/share/doc/${PF}/examples | ||
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples | ||
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}" "$@" | ||
} |