USE=static-libs support, bug 378249
authorNirbheek Chauhan <nirbheek@gentoo.org>
Sun, 14 Aug 2011 04:45:52 +0000 (04:45 +0000)
committerNirbheek Chauhan <nirbheek@gentoo.org>
Sun, 14 Aug 2011 04:45:52 +0000 (04:45 +0000)
Package-Manager: portage-2.2.0_alpha39_p14/cvs/Linux x86_64

dev-libs/gobject-introspection/Manifest
dev-libs/libxml2/ChangeLog
dev-libs/libxml2/Manifest
dev-libs/libxml2/libxml2-2.7.8-r2.ebuild [new file with mode: 0644]

index a468269df74370b8f1f1d7cec44263ddb8056d92..c8ddc204b3d876b42a71e5d03a937cf12eb5eca6 100644 (file)
@@ -1,4 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 DIST gobject-introspection-0.10.8.tar.bz2 1024874 RMD160 f542f75920ee95c067563f14215127c3ff95f304 SHA1 410268f5fd16cf0e219038c7dfe393249161b446 SHA256 5b1387ff37f03db880a2b1cbd6c6b6dfb923a29468d4d8367c458abf7704c61e
-EBUILD gobject-introspection-0.10.8.ebuild 1646 RMD160 6b9375d51ca48b10c858787b35f45fde46e9ef9b SHA1 5cc3286bb3538ac4872c3fe52e8afcc73ca89c67 SHA256 304d224c81151c1e310b3d18aac47854ff7055caa08d04926086530816a5d6a4
-MISC ChangeLog 7218 RMD160 47fe11f2efe13f5f22b78cd24c30917561c2b890 SHA1 4088e7e06fa70e99b040cc07f170298700ad95cd SHA256 88f830faa63fdf7ffaf62bc2048ec612dbd57160d0244764dc2f685b2c9ce54f
+EBUILD gobject-introspection-0.10.8.ebuild 1660 RMD160 6dd5962fe6bd83120661076cc55c1fd3a6602bda SHA1 dabf4b0be73a998e5d5b52241eab8be1eb01eb02 SHA256 8409aec53c27b183d449af75ddb64b604dd6c720126c9c97e21a9c0fa65bd1f8
+MISC ChangeLog 7392 RMD160 e7f06750c441d6c355e33c1e6a90f077bc5a542b SHA1 30addd68f9ba12fa62583db515673a2b2648f4cc SHA256 68921e391299cbcee3ddcd9f394a4f9e16ceac778c96032850e53b5285c2f2e3
 MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iQIcBAEBAgAGBQJOR1NEAAoJEO/kOhxWD91kKe8QAK0g4rDiCOqL5kt/trIAANLe
+j3WLWL2/K3zzY8e3HZwYO+Ir7ygn0Wnkd+WdySSzvBXpdDZDerWESJ8y9RjPDnXy
+Js5MUYZYOFwg7ElV3DtjAAGss8cn4tzsZI43e21W4caLssTcv5IV3TkwovhQt482
+FBVHWQSCL0mKAzq12a9+MyepoM5ysz06MYPFvP4IgB0OgOx1/VIsebooxlh/YPhj
+4WaV4gMij2jORL1LnxTuuYohOOv97DAsWCBBX77hIbM/53cA7HUN6PjHXnGiZ+M4
+8huUDaocnF1AGc2ZR20F5kH0R0JEf/S3ZrOhNTu94f3jBr5TuDzEKMxqlk/W6pQb
+Zp3WosWqiXbTDjpk4ruxJIBsJnXA8WbjV07mOpAVROaclyv+iHy9g1LE1YInikDK
+vRoNZpXqS4PUmGMKE/J38w7JfK1uTUGycf+EAXvp060ZdPADKA4fxNaU/71sfGRa
+YJX8f8k09yS0hikdzBG4GDc95rItgVh8N4N7hCk5mbNKsdffoeZMPa9chNoj/4af
+KV7aWkeh0mpto/yIqhJz6fcSBu++zKkM4eAK3TwbDFKB3zyAklK2oTa701g7Zwrm
+/ysQiFWaqULUf5s/K/71qxTNCtDvOgLuQErbem0DBo8I7wPX6XvdVQrp/O0Jg0Ki
+OzpqTeV+K0J32FRErUD/
+=pRrl
+-----END PGP SIGNATURE-----
index c6dc33803c6b189d33e010a8cb05f4ce2b3d880c..a49c71035a0b1669bd18e0ccc9fdd95a64131b63 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-libs/libxml2
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.311 2011/07/03 11:19:19 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.312 2011/08/14 04:45:52 nirbheek Exp $
+
+*libxml2-2.7.8-r2 (14 Aug 2011)
+
+  14 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org> +libxml2-2.7.8-r2.ebuild:
+  USE=static-libs support, bug 378249
 
   03 Jul 2011; Kacper Kowalik <xarthisius@gentoo.org> libxml2-2.7.8-r1.ebuild:
   ppc64 stable wrt #370715
index 067430417ca2d20ca30813b9796c39b2641b7392..69db59e549bfb28ec4ad481a4121db8a6f7839c1 100644 (file)
@@ -1,5 +1,5 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA1
 
 AUX libxml2-2.7.1-catalog_path.patch 2209 RMD160 0306a8611cde6a7b78f5fd43c93ebbfddc6607e7 SHA1 bec0ee91757e2fa093c89d6eba1821f40878f002 SHA256 b3343f0611f9cb6e55bf62047a988653e3e9cc50f194b18adbc330b455236290
 AUX libxml2-2.7.2-winnt.patch 2120 RMD160 943293107d0c8313a525c2516f06861c013d9777 SHA1 4e68c44fe1b932c7d61b06bffb4d634701e29e0a SHA256 63cb134dbef1b7be1b9dc400da8aef1816436a193a2f97db0028cdd70e3e4cf0
@@ -13,15 +13,24 @@ DIST libxml2-2.7.8.tar.gz 4881808 RMD160 30709622cfe3e2175e73d6701b7e19a25ab5ac4
 DIST xsts-2002-01-16.tar.gz 6894439 RMD160 e8905fe1451a1c367b0104af24edca73bad1db08 SHA1 ca6344e6c47f8c28231f5b213d0c8deb0311a409 SHA256 55e5c08db29946a91ea8e70e8f2418d3fd30d8b6777941dfba7f54726ffd9914
 DIST xsts-2004-01-14.tar.gz 2761085 RMD160 faff2d7826e47ae9968564bc83dab1b54c5e4bf6 SHA1 5896c2aa2cda464246306c5cf0577ed506eefaab SHA256 09bdf9f81f381ebf9bc158a9472e498e896f7a02eb7461146e9abe1b9493ca17
 EBUILD libxml2-2.7.8-r1.ebuild 6317 RMD160 6e2aed484b333ad7960ab6f304220f708f52cbbb SHA1 014a4188e33b80bb2e5964c24cf2b802050e099b SHA256 a2411881d85278bbfd779982c9afa2fac70d06ce21665b379e3c075a72ae0877
+EBUILD libxml2-2.7.8-r2.ebuild 6512 RMD160 6b9a568ac80381647a2da3cfa8d387a6930168ef SHA1 5d5a8b151c96ac4e7c0bb69eeaea6ceb9722da19 SHA256 05893b1a85991c21e7f953290092904a6aeb429cb0d33f2d0445021a7eb0ff99
 EBUILD libxml2-2.7.8.ebuild 6200 RMD160 0f12eaa8761ed413c1b117520af99cf37ccaa494 SHA1 a788a2c0789c667d9240510268bb87eaf9048457 SHA256 13bbb131d0d3f0a1c58b5a77353aa48817e679c7645ea20a1208b4f6b2f3921f
-MISC ChangeLog 42299 RMD160 6e57edbf9136276cb8d9a7a853cf15b20474bb04 SHA1 8973e9a65aa2c85f0ba3485dcf04ca63a07f59cf SHA256 be169471c5cb9b18da914da3308ca0e51bb4892324b787a7ba9146edf2622043
+MISC ChangeLog 42449 RMD160 cad690cabc68d30582680aca63da0aeb2fc43529 SHA1 35702f1a325e369328ccd5af85ef4940095c7e21 SHA256 80957aa493c1ebdbbd1ecd4c5fb84e69b409cc819157c955535272bdc008194a
 MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iJwEAQEIAAYFAk4QUEEACgkQIiMqcbOVdxSiqgP/ZSQbExf2I5a6Z6nye9uEJmdP
-6jU42Uu6W7xcurtb0j8kM0sxva0W2gd5hoXmYilY8M912jT6/Z0I7anYR9BPrnru
-Tfui4DEVO/06dUkby9kuAWSBJRsigvLvfq/cPTA+NcKv4rh2HV0H4Gww5+rEYgdp
-tfU032i74E/9Wh4UhMs=
-=cTmo
+iQIcBAEBAgAGBQJOR1MFAAoJEO/kOhxWD91kRisQAKICo4ATkOclxeL6q0y9W0Mk
+uviYswEmsUCLAGTehsFawrKz4VoS0WBwHVyMF0mcn+9zpFRjljG6IBT7Dl1wJhq9
+DLMOtxhejCp/BUBMjginuHa9ASVH7Q40uRA+YctpA5bCIeAwKZgO5AfZYWGf1Xfm
+6UVSDnxyb1wKqssOWVpJ3YEX5F0AVMWoZofWeqXBIsGSynfDwZOs67D2oIVP2zcv
+W/ir3oiHDdSh64lrnCwle+tWab7WPXixX3Cdniv3VBxRKHd2k7frkh+SChsEstSl
+NCTktNd/hXsK695aI6qReNC2pKssFzQ8hoxdoRUYxVSGq7iX+/1XNuZ7rpBo2o0u
+mpjFLT09mrExIKKh7UdlsT7ne9Nq/F8UUhRfhJkJcf8pnMG4sB4eKHjOUrqqUcZy
+EzEAJQunZvopxRh4IZMGQsYaKyr12SWrH+2uyEEQPMRUnyF4E3yxW44eLimYD6N8
+0ILwmjpWHvmLRIGe9KDBg+56c9pkldfz6dN5tsV6EfMmLFVGWANIA6f8adg80A3f
+9VDtEGg6N8+GsUHpjfiX55NC/AQdrxJyS8+Ljf7YHOVWTs544lPu9CdBgjso7mJU
+CQJW+KBtxnfpFJ9jnmQTdAyPQ7ZvHnlikYIThp5hhtTSiyqEVG8antgA1kZrhIpB
+SF/I6yJwURUvWwn09FAo
+=Ev/i
 -----END PGP SIGNATURE-----
diff --git a/dev-libs/libxml2/libxml2-2.7.8-r2.ebuild b/dev-libs/libxml2/libxml2-2.7.8-r2.ebuild
new file mode 100644 (file)
index 0000000..210b726
--- /dev/null
@@ -0,0 +1,225 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8-r2.ebuild,v 1.1 2011/08/14 04:45:52 nirbheek Exp $
+
+EAPI="3"
+PYTHON_DEPEND="python? 2"
+PYTHON_USE_WITH="-build xml"
+PYTHON_USE_WITH_OPT="python"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit libtool flag-o-matic eutils python autotools prefix
+
+DESCRIPTION="Version 2 of the library to manipulate XML files"
+HOMEPAGE="http://www.xmlsoft.org/"
+
+LICENSE="MIT"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="debug doc examples icu ipv6 python readline static-libs test"
+
+XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
+XSTS_NAME_1="xmlschema2002-01-16"
+XSTS_NAME_2="xmlschema2004-01-14"
+XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
+XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
+
+SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz
+       test? (
+               ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
+               ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )"
+
+RDEPEND="sys-libs/zlib
+       icu? ( dev-libs/icu )
+       readline? ( sys-libs/readline )"
+
+DEPEND="${RDEPEND}
+       hppa? ( >=sys-devel/binutils-2.15.92.0.2 )"
+
+pkg_setup() {
+       if use python; then
+               python_pkg_setup
+       fi
+}
+
+src_unpack() {
+       # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
+       # as they are needed as tarballs in ${S}/xstc instead and not unpacked
+       unpack ${P}.tar.gz
+       cd "${S}"
+
+       if use test; then
+               cp "${DISTDIR}/${XSTS_TARBALL_1}" \
+                       "${DISTDIR}/${XSTS_TARBALL_2}" \
+                       "${S}"/xstc/ \
+                       || die "Failed to install test tarballs"
+       fi
+}
+
+src_prepare() {
+       # Patches needed for prefix support
+       epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
+       epatch "${FILESDIR}"/${PN}-2.7.2-winnt.patch
+
+       eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
+
+       epunt_cxx
+
+       # Reactivate the shared library versionning script
+       epatch "${FILESDIR}/${P}-reactivate-script.patch"
+
+       # Fix a potential memory access error
+       epatch "${FILESDIR}/${P}-xpath-memory.patch"
+
+       # Fix a potential freeing error in XPath
+       epatch "${FILESDIR}/${P}-xpath-freeing.patch"
+       epatch "${FILESDIR}/${P}-xpath-freeing2.patch"
+
+       # Fix some potential problems on reallocation failures
+       epatch "${FILESDIR}/${P}-reallocation-failures.patch"
+
+       epatch "${FILESDIR}/${P}-disable_static_modules.patch"
+
+       # Please do not remove, as else we get references to PORTAGE_TMPDIR
+       # in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
+       # We now need to run eautoreconf at the end to prevent maintainer mode.
+#      elibtoolize
+
+       # Python bindings are built/tested/installed manually.
+       sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed"
+
+       eautoreconf
+}
+
+src_configure() {
+       # USE zlib support breaks gnome2
+       # (libgnomeprint for instance fails to compile with
+       # fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002).
+
+       # The meaning of the 'debug' USE flag does not apply to the --with-debug
+       # switch (enabling the libxml2 debug module). See bug #100898.
+
+       # --with-mem-debug causes unusual segmentation faults (bug #105120).
+
+       local myconf="--with-html-subdir=${PF}/html
+               --docdir=${EPREFIX}/usr/share/doc/${PF}
+               $(use_with debug run-debug)
+               $(use_with icu)
+               $(use_with python)
+               $(use_with readline)
+               $(use_with readline history)
+               $(use_enable ipv6)
+               $(use_enable static-libs static)"
+
+       # filter seemingly problematic CFLAGS (#26320)
+       filter-flags -fprefetch-loop-arrays -funroll-loops
+
+       econf ${myconf}
+}
+
+src_compile() {
+       default
+
+       if use python; then
+               python_copy_sources python
+               building() {
+                       emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \
+                               PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)"
+               }
+               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() {
+       emake DESTDIR="${D}" \
+               EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples \
+               install || die "Installation failed"
+
+       # on windows, xmllint is installed by interix libxml2 in parent prefix.
+       # this is the version to use. the native winnt version does not support
+       # symlinks, which makes repoman fail if the portage tree is linked in
+       # from another location (which is my default). -- mduft
+       if [[ ${CHOST} == *-winnt* ]]; then
+               rm -rf "${ED}"/usr/bin/xmllint
+               rm -rf "${ED}"/usr/bin/xmlcatalog
+       fi
+
+       if use python; then
+               installation() {
+                       emake DESTDIR="${D}" \
+                               PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \
+                               docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
+                               exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
+                               install
+               }
+               python_execute_function -s --source-dir python installation
+
+               python_clean_installation_image
+       fi
+
+       rm -rf "${ED}"/usr/share/doc/${P}
+       dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* || die "dodoc failed"
+
+       if ! use python; then
+               rm -rf "${ED}"/usr/share/doc/${PF}/python
+               rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV}
+       fi
+
+       if ! use doc; then
+               rm -rf "${ED}"/usr/share/gtk-doc
+               rm -rf "${ED}"/usr/share/doc/${PF}/html
+       fi
+
+       if ! use examples; then
+               rm -rf "${ED}/usr/share/doc/${PF}/examples"
+               rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
+       fi
+
+       if ! use static-libs; then
+               # Remove useless .la files
+               find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
+       fi
+}
+
+pkg_postinst() {
+       if use python; then
+               python_mod_optimize drv_libxml2.py libxml2.py
+       fi
+
+       # We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
+       # be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
+       if [ "${ROOT}" != "/" ]
+       then
+               elog "Skipping XML catalog creation for stage building (bug #208887)."
+       else
+               # need an XML catalog, so no-one writes to a non-existent one
+               CATALOG="${EROOT}etc/xml/catalog"
+
+               # we dont want to clobber an existing catalog though,
+               # only ensure that one is there
+               # <obz@gentoo.org>
+               if [ ! -e ${CATALOG} ]; then
+                       [ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml"
+                       "${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG}
+                       einfo "Created XML catalog in ${CATALOG}"
+               fi
+       fi
+}
+
+pkg_postrm() {
+       if use python; then
+               python_mod_cleanup drv_libxml2.py libxml2.py
+       fi
+}