Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/libxml2: libxml2-2.9.1-r5.ebuild ChangeLog
Date: Wed, 03 Sep 2014 09:51:27
Message-Id: 20140903095122.41268497A@oystercatcher.gentoo.org
1 mgorny 14/09/03 09:51:22
2
3 Modified: ChangeLog
4 Added: libxml2-2.9.1-r5.ebuild
5 Log:
6 CHOST-ize xml2-config, for bug #518728.
7
8 (Portage version: 2.2.13_pre1/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.427 dev-libs/libxml2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/ChangeLog?rev=1.427&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/ChangeLog?rev=1.427&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/ChangeLog?r1=1.426&r2=1.427
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v
20 retrieving revision 1.426
21 retrieving revision 1.427
22 diff -u -r1.426 -r1.427
23 --- ChangeLog 24 Jun 2014 19:59:48 -0000 1.426
24 +++ ChangeLog 3 Sep 2014 09:51:22 -0000 1.427
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-libs/libxml2
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.426 2014/06/24 19:59:48 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.427 2014/09/03 09:51:22 mgorny Exp $
30 +
31 +*libxml2-2.9.1-r5 (03 Sep 2014)
32 +
33 + 03 Sep 2014; Michał Górny <mgorny@g.o> +libxml2-2.9.1-r5.ebuild:
34 + CHOST-ize xml2-config, for bug #518728.
35
36 24 Jun 2014; Mike Frysinger <vapier@g.o> libxml2-2.9.1-r4.ebuild:
37 Mark arm64/m68k/s390/sh stable.
38
39
40
41 1.1 dev-libs/libxml2/libxml2-2.9.1-r5.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/libxml2-2.9.1-r5.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/libxml2-2.9.1-r5.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libxml2-2.9.1-r5.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.9.1-r5.ebuild,v 1.1 2014/09/03 09:51:22 mgorny Exp $
51
52 EAPI="5"
53 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
54 PYTHON_REQ_USE="xml"
55
56 inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal
57
58 DESCRIPTION="Version 2 of the library to manipulate XML files"
59 HOMEPAGE="http://www.xmlsoft.org/"
60
61 LICENSE="MIT"
62 SLOT="2"
63 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 ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
64 IUSE="debug examples icu ipv6 lzma python readline static-libs test"
65
66 XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
67 XSTS_NAME_1="xmlschema2002-01-16"
68 XSTS_NAME_2="xmlschema2004-01-14"
69 XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
70 XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
71 XMLCONF_TARBALL="xmlts20080827.tar.gz"
72
73 SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
74 test? (
75 ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
76 ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
77 http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )"
78
79 COMMON_DEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
80 icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
81 lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
82 python? ( ${PYTHON_DEPS} )
83 readline? ( sys-libs/readline:= )
84 "
85 RDEPEND="${COMMON_DEPEND}
86 abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r6
87 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )
88 "
89 DEPEND="${COMMON_DEPEND}
90 dev-util/gtk-doc-am
91 virtual/pkgconfig
92 hppa? ( >=sys-devel/binutils-2.15.92.0.2 )
93 "
94
95 S="${WORKDIR}/${PN}-${PV%_rc*}"
96
97 MULTILIB_CHOST_TOOLS=(
98 /usr/bin/xml2-config
99 )
100
101 src_unpack() {
102 # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
103 # as they are needed as tarballs in ${S}/xstc instead and not unpacked
104 unpack ${P/_rc/-rc}.tar.gz
105 cd "${S}"
106
107 if use test; then
108 cp "${DISTDIR}/${XSTS_TARBALL_1}" \
109 "${DISTDIR}/${XSTS_TARBALL_2}" \
110 "${S}"/xstc/ \
111 || die "Failed to install test tarballs"
112 unpack ${XMLCONF_TARBALL}
113 fi
114 }
115
116 src_prepare() {
117 DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
118
119 # Patches needed for prefix support
120 epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
121 epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
122
123 eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
124
125 # epunt_cxx # if we don't eautoreconf
126
127 # Important patches from 2.9.2
128 epatch "${FILESDIR}/${P}-missing-break.patch" \
129 "${FILESDIR}/${P}-python-2.6.patch" \
130 "${FILESDIR}/${P}-compression-detection.patch" \
131 "${FILESDIR}/${P}-non-ascii-cr-lf.patch" \
132 "${FILESDIR}/${PN}-2.9.1-python3.patch" \
133 "${FILESDIR}/${PN}-2.9.1-python3a.patch"
134
135 # Security fixes from 2.9.2
136 epatch "${FILESDIR}/${P}-external-param-entities.patch"
137
138 # https://bugzilla.gnome.org/show_bug.cgi?id=730290
139 epatch "${FILESDIR}/${PN}-2.9.1-xmllint-postvalid.patch"
140
141 # Please do not remove, as else we get references to PORTAGE_TMPDIR
142 # in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
143 # We now need to run eautoreconf at the end to prevent maintainer mode.
144 # elibtoolize
145
146 # Use pkgconfig to find icu to properly support multilib
147 epatch "${FILESDIR}/${PN}-2.9.1-icu-pkgconfig.patch"
148
149 eautoreconf
150 }
151
152 multilib_src_configure() {
153 # filter seemingly problematic CFLAGS (#26320)
154 filter-flags -fprefetch-loop-arrays -funroll-loops
155
156 # USE zlib support breaks gnome2
157 # (libgnomeprint for instance fails to compile with
158 # fresh install, and existing) - <azarah@g.o> (22 Dec 2002).
159
160 # The meaning of the 'debug' USE flag does not apply to the --with-debug
161 # switch (enabling the libxml2 debug module). See bug #100898.
162
163 # --with-mem-debug causes unusual segmentation faults (bug #105120).
164
165 libxml2_configure() {
166 ECONF_SOURCE="${S}" econf \
167 --with-html-subdir=${PF}/html \
168 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
169 $(use_with debug run-debug) \
170 $(use_with icu) \
171 $(use_with lzma) \
172 $(use_enable ipv6) \
173 $(use_enable static-libs static) \
174 $(multilib_native_use_with readline) \
175 $(multilib_native_use_with readline history) \
176 "$@"
177 }
178
179 libxml2_py_configure() {
180 mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
181 run_in_build_dir libxml2_configure "--with-python=${PYTHON}" # odd build system
182 }
183
184 libxml2_configure --without-python # build python bindings separately
185
186 if multilib_is_native_abi && use python; then
187 python_parallel_foreach_impl libxml2_py_configure
188 fi
189 }
190
191 multilib_src_compile() {
192 default
193 if multilib_is_native_abi && use python; then
194 local native_builddir=${BUILD_DIR}
195 python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all
196 fi
197 }
198
199 multilib_src_test() {
200 default
201 multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
202 }
203
204 multilib_src_install() {
205 emake DESTDIR="${D}" \
206 EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
207
208 if multilib_is_native_abi && use python; then
209 python_foreach_impl libxml2_py_emake DESTDIR="${D}" install
210 python_foreach_impl python_optimize
211 fi
212 }
213
214 multilib_src_install_all() {
215 # on windows, xmllint is installed by interix libxml2 in parent prefix.
216 # this is the version to use. the native winnt version does not support
217 # symlinks, which makes repoman fail if the portage tree is linked in
218 # from another location (which is my default). -- mduft
219 if [[ ${CHOST} == *-winnt* ]]; then
220 rm -rf "${ED}"/usr/bin/xmllint
221 rm -rf "${ED}"/usr/bin/xmlcatalog
222 fi
223
224 rm -rf "${ED}"/usr/share/doc/${P}
225 einstalldocs
226
227 if ! use python; then
228 rm -rf "${ED}"/usr/share/doc/${PF}/python
229 rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV}
230 fi
231
232 if ! use examples; then
233 rm -rf "${ED}/usr/share/doc/${PF}/examples"
234 rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
235 fi
236
237 prune_libtool_files --modules
238 }
239
240 pkg_postinst() {
241 # We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
242 # be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
243 if [[ "${ROOT}" != "/" ]]; then
244 elog "Skipping XML catalog creation for stage building (bug #208887)."
245 else
246 # need an XML catalog, so no-one writes to a non-existent one
247 CATALOG="${EROOT}etc/xml/catalog"
248
249 # we dont want to clobber an existing catalog though,
250 # only ensure that one is there
251 # <obz@g.o>
252 if [[ ! -e ${CATALOG} ]]; then
253 [[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml"
254 "${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
255 einfo "Created XML catalog in ${CATALOG}"
256 fi
257 fi
258 }
259
260 libxml2_py_emake() {
261 pushd "${BUILD_DIR}/python" > /dev/null || die
262 emake "$@"
263 popd > /dev/null
264 }