Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/, dev-libs/libxslt/files/
Date: Sat, 28 Oct 2017 20:31:22
Message-Id: 1509222669.22feb6cfb4d502a668287e6cada18bf52d418776.dilfridge@gentoo
1 commit: 22feb6cfb4d502a668287e6cada18bf52d418776
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 28 20:30:51 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 28 20:31:09 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22feb6cf
7
8 dev-libs/libxslt: Fix glibc-2.26 compatibility. Patch by Quentin Minster.
9
10 This patch is much less intrusive than the upstream solution, so using
11 it for now. Revision bump since the current version unconditionally includes
12 in public headers xlocale.h ...
13
14 Closes: https://bugs.gentoo.org/632214
15 Package-Manager: Portage-2.3.13, Repoman-2.3.4
16
17 .../libxslt/files/libxslt-1.1.30-glibc226.patch | 32 +++++
18 dev-libs/libxslt/libxslt-1.1.30-r2.ebuild | 136 +++++++++++++++++++++
19 2 files changed, 168 insertions(+)
20
21 diff --git a/dev-libs/libxslt/files/libxslt-1.1.30-glibc226.patch b/dev-libs/libxslt/files/libxslt-1.1.30-glibc226.patch
22 new file mode 100644
23 index 00000000000..e1e97229d60
24 --- /dev/null
25 +++ b/dev-libs/libxslt/files/libxslt-1.1.30-glibc226.patch
26 @@ -0,0 +1,32 @@
27 +diff --git a/configure.in b/configure.in
28 +index d6aa366..20aafb8 100644
29 +--- a/configure.in
30 ++++ b/configure.in
31 +@@ -165,11 +165,11 @@ XSLT_LOCALE_XLOCALE=0
32 + XSLT_LOCALE_WINAPI=0
33 +
34 + AC_CHECK_HEADERS([locale.h xlocale.h])
35 +-if test $ac_cv_header_xlocale_h = yes; then
36 ++if test $ac_cv_header_locale_h = yes; then
37 + dnl
38 + dnl Check for generic locale_t declaration
39 + dnl
40 +-AC_MSG_CHECKING([if xlocale program link])
41 ++AC_MSG_CHECKING([if locale program link])
42 + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
43 + #ifdef HAVE_LOCALE_H
44 + #include <locale.h>
45 +diff --git a/libxslt/xsltlocale.h b/libxslt/xsltlocale.h
46 +index 8a9ca15..2f64424 100644
47 +--- a/libxslt/xsltlocale.h
48 ++++ b/libxslt/xsltlocale.h
49 +@@ -17,7 +17,9 @@
50 + #ifdef XSLT_LOCALE_XLOCALE
51 +
52 + #include <locale.h>
53 ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 26
54 + #include <xlocale.h>
55 ++#endif
56 +
57 + #ifdef __GLIBC__
58 + /*locale_t is defined only if _GNU_SOURCE is defined*/
59
60 diff --git a/dev-libs/libxslt/libxslt-1.1.30-r2.ebuild b/dev-libs/libxslt/libxslt-1.1.30-r2.ebuild
61 new file mode 100644
62 index 00000000000..8e852aaf2c5
63 --- /dev/null
64 +++ b/dev-libs/libxslt/libxslt-1.1.30-r2.ebuild
65 @@ -0,0 +1,136 @@
66 +# Copyright 1999-2017 Gentoo Foundation
67 +# Distributed under the terms of the GNU General Public License v2
68 +
69 +EAPI=6
70 +PYTHON_COMPAT=( python2_7 )
71 +PYTHON_REQ_USE="xml"
72 +
73 +inherit autotools ltprune python-r1 toolchain-funcs multilib-minimal
74 +
75 +DESCRIPTION="XSLT libraries and tools"
76 +HOMEPAGE="http://www.xmlsoft.org/"
77 +SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
78 +
79 +LICENSE="MIT"
80 +SLOT="0"
81 +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"
82 +
83 +IUSE="crypt debug examples python static-libs"
84 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
85 +
86 +RDEPEND="
87 + >=dev-libs/libxml2-2.9.1-r5:2[${MULTILIB_USEDEP}]
88 + crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
89 + python? (
90 + ${PYTHON_DEPS}
91 + dev-libs/libxml2:2[python,${PYTHON_USEDEP}] )
92 +"
93 +DEPEND="${RDEPEND}"
94 +
95 +MULTILIB_CHOST_TOOLS=(
96 + /usr/bin/xslt-config
97 +)
98 +
99 +MULTILIB_WRAPPED_HEADERS=(
100 + /usr/include/libxslt/xsltconfig.h
101 +)
102 +
103 +src_prepare() {
104 + default
105 +
106 + DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
107 +
108 + # https://bugzilla.gnome.org/show_bug.cgi?id=684621
109 + eapply "${FILESDIR}"/${PN}.m4-${PN}-1.1.26.patch
110 +
111 + # Simplify python setup
112 + # https://bugzilla.gnome.org/show_bug.cgi?id=758095
113 + eapply "${FILESDIR}"/${PN}-1.1.30-simplify-python.patch
114 + eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
115 +
116 + # Fix xslt-config
117 + # https://bugs.gentoo.org/630784
118 + eapply "${FILESDIR}"/1.1.30-unbreak-xslt-config.patch
119 +
120 + # Fix build and headers with glibc-2.26, bug 632214
121 + eapply "${FILESDIR}"/${PN}-1.1.30-glibc226.patch
122 +
123 + mv configure.{in,ac} || die
124 +
125 + eautoreconf
126 + # If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
127 + # and it is propably otherwise too if upstream generated with new
128 + # autoconf
129 +# epunt_cxx
130 + # But Prefix always needs elibtoolize if not eautoreconf'd.
131 +# elibtoolize
132 +}
133 +
134 +multilib_src_configure() {
135 + libxslt_configure() {
136 + ECONF_SOURCE="${S}" econf \
137 + --with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
138 + --with-html-subdir=html \
139 + $(use_with crypt crypto) \
140 + $(use_with debug) \
141 + $(use_with debug mem-debug) \
142 + $(use_enable static-libs static) \
143 + "$@"
144 + }
145 +
146 + libxslt_py_configure() {
147 + mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
148 + run_in_build_dir libxslt_configure --with-python
149 + }
150 +
151 + libxslt_configure --without-python # build python bindings separately
152 +
153 + if multilib_is_native_abi && use python; then
154 + python_foreach_impl libxslt_py_configure
155 + fi
156 +}
157 +
158 +multilib_src_compile() {
159 + default
160 + multilib_is_native_abi && use python && libxslt_foreach_py_emake all
161 +}
162 +
163 +multilib_src_test() {
164 + default
165 + multilib_is_native_abi && use python && libxslt_foreach_py_emake test
166 +}
167 +
168 +multilib_src_install() {
169 + # "default" does not work here - docs are installed by multilib_src_install_all
170 + emake DESTDIR="${D}" install
171 +
172 + if multilib_is_native_abi && use python; then
173 + libxslt_foreach_py_emake \
174 + DESTDIR="${D}" \
175 + docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
176 + EXAMPLE_DIR="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
177 + install
178 + python_foreach_impl python_optimize
179 + fi
180 +}
181 +
182 +multilib_src_install_all() {
183 + einstalldocs
184 +
185 + if ! use examples; then
186 + rm -rf "${ED}"/usr/share/doc/${PF}/examples
187 + rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
188 + fi
189 +
190 + prune_libtool_files --modules
191 +}
192 +
193 +libxslt_foreach_py_emake() {
194 + libxslt_py_emake() {
195 + pushd "${BUILD_DIR}/python" > /dev/null || die
196 + emake "$@"
197 + popd > /dev/null
198 + }
199 + local native_builddir=${BUILD_DIR}
200 + python_foreach_impl libxslt_py_emake top_builddir="${native_builddir}" "$@"
201 +}