Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/
Date: Thu, 19 Oct 2017 15:05:49
Message-Id: 1508425529.1972d63748714bf1ee871563e3a991b2815f200a.floppym@gentoo
1 commit: 1972d63748714bf1ee871563e3a991b2815f200a
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 19 15:05:29 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 19 15:05:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1972d637
7
8 dev-libs/libxml2: bump to 2.9.6
9
10 Closes: https://bugs.gentoo.org/634496
11 Package-Manager: Portage-2.3.11_p4, Repoman-2.3.3_p62
12
13 dev-libs/libxml2/Manifest | 1 +
14 dev-libs/libxml2/libxml2-2.9.6.ebuild | 208 ++++++++++++++++++++++++++++++++++
15 2 files changed, 209 insertions(+)
16
17 diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest
18 index 1ae6e49b2f8..e95b736e000 100644
19 --- a/dev-libs/libxml2/Manifest
20 +++ b/dev-libs/libxml2/Manifest
21 @@ -1,5 +1,6 @@
22 DIST libxml2-2.9.4.tar.gz 5374830 SHA256 ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c SHA512 f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9 WHIRLPOOL 268d3364a3d293810dff060b3ab92042c5550e50dbe9038c4d5b54ea6a22ed77f9572575517ae3bacfe518d634047eb9d5345e903b125e56a3d32ad1ba96dabf
23 DIST libxml2-2.9.5.tar.gz 5466888 SHA256 4031c1ecee9ce7ba4f313e91ef6284164885cdb69937a123f6a83bb6a72dcd38 SHA512 197dbd1722e5f90eea43837323352f48d215e198aa6b95685645ef7511e2beba8aadc0dd67e099c945120c5dbe7f8c9da5f376b22f447059e9ffa941c1bfd175 WHIRLPOOL 14cfeaa1c18af4e64131505010484b2e64d83d617984c6321b77c4263901b16b24c945eb9af17763fe63048c3910111fdc498fe9183c04ecea9182ea8f9214fa
24 +DIST libxml2-2.9.6.tar.gz 5469624 SHA256 8b9038cca7240e881d462ea391882092dfdc6d4f483f72683e817be08df5ebbc SHA512 5ef80f895374bd5dd3bcd5f00c715795f026bf45d998f8f762c0cdb739b8755e01de40cf853d98a3826eacef95c4adebe4777db11020e8d98d0bda921f55a0ed WHIRLPOOL 1fa2b10f8715f3718863957e6a5173400b42c6587c4602f52c0ae9103fafd7a515c28158c9bc928c532139cd73274f070015c64677434a0a6fa83f0a9e8425ff
25 DIST xmlts20080827.tar.gz 638940 SHA256 96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d WHIRLPOOL 50835380c3ea208df0bf9ce032ed2df69c4c6cb5a53ffdd39a08fb4f1d166f311b2ef2fe0d9911ae1ebff92aeb42f6ea55e727dfe0b7a3b95e6c7240315b3eda
26 DIST xsts-2002-01-16.tar.gz 6894439 SHA256 55e5c08db29946a91ea8e70e8f2418d3fd30d8b6777941dfba7f54726ffd9914 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288 WHIRLPOOL 84dd51959460a4f8aa582d57ad39229c546ca7fe155012c57c368b59f5d31400d8b940a343a7320058330ca611303139cacdffed514783f96406ac5366026b11
27 DIST xsts-2004-01-14.tar.gz 2761085 SHA256 09bdf9f81f381ebf9bc158a9472e498e896f7a02eb7461146e9abe1b9493ca17 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe WHIRLPOOL c46a3bf7d6dd771757f4304995cc177cf51c6cdd0e9778851fc13d3809c7b984690b4f273b3e075abe018110968eb7fc78f5b83170d3e18bacf00a4ed64b213d
28
29 diff --git a/dev-libs/libxml2/libxml2-2.9.6.ebuild b/dev-libs/libxml2/libxml2-2.9.6.ebuild
30 new file mode 100644
31 index 00000000000..dc7fa4d365c
32 --- /dev/null
33 +++ b/dev-libs/libxml2/libxml2-2.9.6.ebuild
34 @@ -0,0 +1,208 @@
35 +# Copyright 1999-2017 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
40 +PYTHON_REQ_USE="xml"
41 +
42 +inherit libtool flag-o-matic ltprune python-r1 autotools prefix multilib-minimal
43 +
44 +DESCRIPTION="Version 2 of the library to manipulate XML files"
45 +HOMEPAGE="http://www.xmlsoft.org/"
46 +
47 +LICENSE="MIT"
48 +SLOT="2"
49 +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 ~x86-winnt"
50 +IUSE="debug examples icu ipv6 lzma python readline static-libs test"
51 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
52 +
53 +XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
54 +XSTS_NAME_1="xmlschema2002-01-16"
55 +XSTS_NAME_2="xmlschema2004-01-14"
56 +XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
57 +XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
58 +XMLCONF_TARBALL="xmlts20080827.tar.gz"
59 +
60 +SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
61 + test? (
62 + ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
63 + ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
64 + http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )"
65 +
66 +RDEPEND="
67 + >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
68 + icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
69 + lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
70 + python? ( ${PYTHON_DEPS} )
71 + readline? ( sys-libs/readline:= )
72 +"
73 +DEPEND="${RDEPEND}
74 + dev-util/gtk-doc-am
75 + virtual/pkgconfig
76 + hppa? ( >=sys-devel/binutils-2.15.92.0.2 )
77 +"
78 +
79 +S="${WORKDIR}/${PN}-${PV%_rc*}"
80 +
81 +MULTILIB_CHOST_TOOLS=(
82 + /usr/bin/xml2-config
83 +)
84 +
85 +src_unpack() {
86 + # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
87 + # as they are needed as tarballs in ${S}/xstc instead and not unpacked
88 + unpack ${P/_rc/-rc}.tar.gz
89 + cd "${S}" || die
90 +
91 + if use test; then
92 + cp "${DISTDIR}/${XSTS_TARBALL_1}" \
93 + "${DISTDIR}/${XSTS_TARBALL_2}" \
94 + "${S}"/xstc/ \
95 + || die "Failed to install test tarballs"
96 + unpack ${XMLCONF_TARBALL}
97 + fi
98 +}
99 +
100 +src_prepare() {
101 + default
102 +
103 + DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
104 +
105 + # Patches needed for prefix support
106 + eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
107 +
108 + eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
109 +
110 + # Fix build for Windows platform
111 + # https://bugzilla.gnome.org/show_bug.cgi?id=760456
112 + eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
113 +
114 + # Fix python detection, bug #567066
115 + # https://bugzilla.gnome.org/show_bug.cgi?id=760458
116 + eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch
117 +
118 + # Avoid final linking arguments for python modules
119 + if [[ ${CHOST} == *-darwin* ]] ; then
120 + sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die
121 + fi
122 +
123 + # Please do not remove, as else we get references to PORTAGE_TMPDIR
124 + # in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
125 + # We now need to run eautoreconf at the end to prevent maintainer mode.
126 +# elibtoolize
127 +# epunt_cxx # if we don't eautoreconf
128 +
129 + eautoreconf
130 +}
131 +
132 +multilib_src_configure() {
133 + # filter seemingly problematic CFLAGS (#26320)
134 + filter-flags -fprefetch-loop-arrays -funroll-loops
135 +
136 + # USE zlib support breaks gnome2
137 + # (libgnomeprint for instance fails to compile with
138 + # fresh install, and existing) - <azarah@g.o> (22 Dec 2002).
139 +
140 + # The meaning of the 'debug' USE flag does not apply to the --with-debug
141 + # switch (enabling the libxml2 debug module). See bug #100898.
142 +
143 + # --with-mem-debug causes unusual segmentation faults (bug #105120).
144 +
145 + libxml2_configure() {
146 + ECONF_SOURCE="${S}" econf \
147 + --with-html-subdir=${PF}/html \
148 + $(use_with debug run-debug) \
149 + $(use_with icu) \
150 + $(use_with lzma) \
151 + $(use_enable ipv6) \
152 + $(use_enable static-libs static) \
153 + $(multilib_native_use_with readline) \
154 + $(multilib_native_use_with readline history) \
155 + "$@"
156 + }
157 +
158 + libxml2_py_configure() {
159 + mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
160 + run_in_build_dir libxml2_configure "--with-python=${ROOT%/}${PYTHON}" # odd build system, also see bug #582130
161 + }
162 +
163 + libxml2_configure --without-python # build python bindings separately
164 +
165 + if multilib_is_native_abi && use python; then
166 + python_foreach_impl libxml2_py_configure
167 + fi
168 +}
169 +
170 +multilib_src_compile() {
171 + default
172 + if multilib_is_native_abi && use python; then
173 + local native_builddir=${BUILD_DIR}
174 + python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all
175 + fi
176 +}
177 +
178 +multilib_src_test() {
179 + emake check
180 + multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
181 +}
182 +
183 +multilib_src_install() {
184 + emake DESTDIR="${D}" \
185 + EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
186 +
187 + if multilib_is_native_abi && use python; then
188 + python_foreach_impl libxml2_py_emake \
189 + DESTDIR="${D}" \
190 + docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
191 + exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
192 + install
193 + python_foreach_impl python_optimize
194 + fi
195 +}
196 +
197 +multilib_src_install_all() {
198 + # on windows, xmllint is installed by interix libxml2 in parent prefix.
199 + # this is the version to use. the native winnt version does not support
200 + # symlinks, which makes repoman fail if the portage tree is linked in
201 + # from another location (which is my default). -- mduft
202 + if [[ ${CHOST} == *-winnt* ]]; then
203 + rm -rf "${ED}"/usr/bin/xmllint
204 + rm -rf "${ED}"/usr/bin/xmlcatalog
205 + fi
206 +
207 + rm -rf "${ED}"/usr/share/doc/${P}
208 + einstalldocs
209 +
210 + if ! use examples; then
211 + rm -rf "${ED}"/usr/share/doc/${PF}/examples
212 + rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
213 + fi
214 +
215 + prune_libtool_files --modules
216 +}
217 +
218 +pkg_postinst() {
219 + # We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
220 + # be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
221 + if [[ "${ROOT}" != "/" ]]; then
222 + elog "Skipping XML catalog creation for stage building (bug #208887)."
223 + else
224 + # need an XML catalog, so no-one writes to a non-existent one
225 + CATALOG="${EROOT}etc/xml/catalog"
226 +
227 + # we dont want to clobber an existing catalog though,
228 + # only ensure that one is there
229 + # <obz@g.o>
230 + if [[ ! -e ${CATALOG} ]]; then
231 + [[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml"
232 + "${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
233 + einfo "Created XML catalog in ${CATALOG}"
234 + fi
235 + fi
236 +}
237 +
238 +libxml2_py_emake() {
239 + pushd "${BUILD_DIR}/python" > /dev/null || die
240 + emake "$@"
241 + popd > /dev/null
242 +}