public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/, dev-libs/libxslt/files/
Date: Sat, 28 Oct 2017 20:31:18 +0000 (UTC)	[thread overview]
Message-ID: <1509222669.22feb6cfb4d502a668287e6cada18bf52d418776.dilfridge@gentoo> (raw)

commit:     22feb6cfb4d502a668287e6cada18bf52d418776
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 20:30:51 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 20:31:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22feb6cf

dev-libs/libxslt: Fix glibc-2.26 compatibility. Patch by Quentin Minster.

This patch is much less intrusive than the upstream solution, so using
it for now. Revision bump since the current version unconditionally includes
in public headers xlocale.h ...

Closes: https://bugs.gentoo.org/632214
Package-Manager: Portage-2.3.13, Repoman-2.3.4

 .../libxslt/files/libxslt-1.1.30-glibc226.patch    |  32 +++++
 dev-libs/libxslt/libxslt-1.1.30-r2.ebuild          | 136 +++++++++++++++++++++
 2 files changed, 168 insertions(+)

diff --git a/dev-libs/libxslt/files/libxslt-1.1.30-glibc226.patch b/dev-libs/libxslt/files/libxslt-1.1.30-glibc226.patch
new file mode 100644
index 00000000000..e1e97229d60
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.30-glibc226.patch
@@ -0,0 +1,32 @@
+diff --git a/configure.in b/configure.in
+index d6aa366..20aafb8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -165,11 +165,11 @@ XSLT_LOCALE_XLOCALE=0
+ XSLT_LOCALE_WINAPI=0
+ 
+ AC_CHECK_HEADERS([locale.h xlocale.h])
+-if test $ac_cv_header_xlocale_h = yes; then
++if test $ac_cv_header_locale_h = yes; then
+ dnl
+ dnl Check for generic locale_t declaration
+ dnl
+-AC_MSG_CHECKING([if xlocale program link])
++AC_MSG_CHECKING([if locale program link])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #ifdef HAVE_LOCALE_H
+ #include <locale.h>
+diff --git a/libxslt/xsltlocale.h b/libxslt/xsltlocale.h
+index 8a9ca15..2f64424 100644
+--- a/libxslt/xsltlocale.h
++++ b/libxslt/xsltlocale.h
+@@ -17,7 +17,9 @@
+ #ifdef XSLT_LOCALE_XLOCALE
+ 
+ #include <locale.h>
++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 26
+ #include <xlocale.h>
++#endif
+ 
+ #ifdef __GLIBC__
+ /*locale_t is defined only if _GNU_SOURCE is defined*/

diff --git a/dev-libs/libxslt/libxslt-1.1.30-r2.ebuild b/dev-libs/libxslt/libxslt-1.1.30-r2.ebuild
new file mode 100644
index 00000000000..8e852aaf2c5
--- /dev/null
+++ b/dev-libs/libxslt/libxslt-1.1.30-r2.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit autotools ltprune 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 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~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
+	# https://bugzilla.gnome.org/show_bug.cgi?id=758095
+	eapply "${FILESDIR}"/${PN}-1.1.30-simplify-python.patch
+	eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
+
+	# Fix xslt-config
+	# https://bugs.gentoo.org/630784
+	eapply "${FILESDIR}"/1.1.30-unbreak-xslt-config.patch
+
+	# Fix build and headers with glibc-2.26, bug 632214
+	eapply "${FILESDIR}"/${PN}-1.1.30-glibc226.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}" "$@"
+}


             reply	other threads:[~2017-10-28 20:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 20:31 Andreas Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-02  5:14 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/, dev-libs/libxslt/files/ Sam James
2021-10-29 15:28 Sam James
2020-11-08  0:32 Michał Górny
2018-09-16 23:29 Mart Raudsepp
2018-04-21 12:34 Mart Raudsepp
2017-09-05  6:58 Gilles Dartiguelongue
2017-03-29  0:02 Michael Weber
2016-12-22 10:32 Fabian Groffen
2015-11-11 21:35 Gilles Dartiguelongue
2015-09-25  7:11 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509222669.22feb6cfb4d502a668287e6cada18bf52d418776.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox