114 lines
2.6 KiB
Bash
114 lines
2.6 KiB
Bash
# Copyright 1999-2013 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.ebuild,v 1.13 2013/03/12 18:07:42 ssuominen Exp $
|
|
|
|
EAPI=5
|
|
|
|
PYTHON_DEPEND="python? 2:2.5"
|
|
SUPPORT_PYTHON_ABIS="1"
|
|
RESTRICT_PYTHON_ABIS="3.* *-jython *-pypy-*"
|
|
|
|
inherit autotools eutils python toolchain-funcs
|
|
|
|
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 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
|
IUSE="crypt debug python static-libs"
|
|
|
|
RDEPEND=">=dev-libs/libxml2-2.8.0
|
|
crypt? ( >=dev-libs/libgcrypt-1.1.42:= )"
|
|
DEPEND="${RDEPEND}"
|
|
|
|
DOCS="AUTHORS ChangeLog FEATURES NEWS README TODO"
|
|
|
|
pkg_setup() {
|
|
use python && python_pkg_setup
|
|
}
|
|
|
|
src_prepare() {
|
|
# 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 python-config, not python2.7-config
|
|
epatch "${FILESDIR}"/${PN}-1.1.27-python-config.patch
|
|
|
|
# Python bindings are built/tested/installed manually.
|
|
sed -i -e 's/$(PYTHON_SUBDIR)//' Makefile.am || die
|
|
|
|
eautoreconf
|
|
# epunt_cxx
|
|
}
|
|
|
|
src_configure() {
|
|
# libgcrypt is missing pkg-config file, so fixing cross-compile
|
|
# here. see bug 267503.
|
|
tc-is-cross-compiler && \
|
|
export LIBGCRYPT_CONFIG="${SYSROOT}"/usr/bin/libgcrypt-config
|
|
|
|
econf \
|
|
$(use_enable static-libs static) \
|
|
--with-html-dir=/usr/share/doc/${PF} \
|
|
--with-html-subdir=html \
|
|
$(use_with crypt crypto) \
|
|
$(use_with python) \
|
|
$(use_with debug) \
|
|
$(use_with debug mem-debug)
|
|
}
|
|
|
|
src_compile() {
|
|
default
|
|
|
|
if use python; then
|
|
python_copy_sources python
|
|
building() {
|
|
emake PYTHON_INCLUDES="$(python_get_includedir)" \
|
|
PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
|
|
PYTHON_VERSION="$(python_get_version)"
|
|
}
|
|
python_execute_function -s --source-dir python building
|
|
fi
|
|
}
|
|
|
|
src_test() {
|
|
default
|
|
|
|
if use python; then
|
|
testing() {
|
|
emake test
|
|
}
|
|
python_execute_function -s --source-dir python testing
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
default
|
|
|
|
if use python; then
|
|
installation() {
|
|
emake DESTDIR="${D}" \
|
|
PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
|
|
install
|
|
}
|
|
python_execute_function -s --source-dir python installation
|
|
|
|
python_clean_installation_image
|
|
|
|
mv "${ED}"/usr/share/doc/${PN}-python-${PV} "${ED}"/usr/share/doc/${PF}/python
|
|
fi
|
|
|
|
prune_libtool_files
|
|
}
|
|
|
|
pkg_postinst() {
|
|
use python && python_mod_optimize ${PN}.py
|
|
}
|
|
|
|
pkg_postrm() {
|
|
use python && python_mod_cleanup ${PN}.py
|
|
}
|