summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2008-10-25 17:48:58 +0000
committerMark Loeser <halcy0n@gentoo.org>2008-10-25 17:48:58 +0000
commitca453046ae0e67cacd991fdb2cda20d8a3bce6eb (patch)
tree46a7c6e73d224ab7e4f2b296e21a01cd0465a277 /dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild
parentUse db-2.7 if available. Update DEPEND. (diff)
downloadgentoo-2-ca453046ae0e67cacd991fdb2cda20d8a3bce6eb.tar.gz
gentoo-2-ca453046ae0e67cacd991fdb2cda20d8a3bce6eb.tar.bz2
gentoo-2-ca453046ae0e67cacd991fdb2cda20d8a3bce6eb.zip
Fix the SRC_URI for 2.7.0 so it points to our mirrors, add an EAPI=0 version of 3.0.0, and fix the tests; bug #240496, bug #242478, bug #242264
(Portage version: 2.2_rc12/cvs/Linux 2.6.27.1 x86_64)
Diffstat (limited to 'dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild')
-rw-r--r--dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild89
1 files changed, 89 insertions, 0 deletions
diff --git a/dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild b/dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild
new file mode 100644
index 000000000000..89e578d0d72a
--- /dev/null
+++ b/dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/xerces-c/xerces-c-3.0.0-r1.ebuild,v 1.1 2008/10/25 17:48:58 halcy0n Exp $
+
+inherit eutils
+
+DESCRIPTION="A validating XML parser written in a portable subset of C++."
+HOMEPAGE="http://xerces.apache.org/xerces-c/"
+SRC_URI="mirror://apache/xerces/c/3/sources/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="curl debug doc iconv icu libwww threads elibc_Darwin elibc_FreeBSD"
+
+RDEPEND="icu? ( dev-libs/icu )
+ curl? ( net-misc/curl )
+ libwww? ( net-libs/libwww )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+pkg_setup() {
+ export ICUROOT="/usr"
+
+ if use iconv && use icu ; then
+ ewarn "This package can use iconv or icu for loading messages"
+ ewarn "and transcoding, but not both. ICU will precede."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i \
+ -e 's|$(prefix)/msg|$(DESTDIR)/$(prefix)/share/xerces-c/msg|' \
+ src/xercesc/util/MsgLoaders/MsgCatalog/Makefile.in || die "sed failed"
+}
+
+src_compile() {
+ local mloader="inmemory"
+ use iconv && mloader="iconv"
+ use icu && mloader="icu"
+
+ local transcoder="gnuiconv"
+ use elibc_FreeBSD && transcoder="iconv"
+ use elibc_Darwin && transcoder="macosunicodeconverter"
+ use icu && transcoder="icu"
+
+ # 'cfurl' is only available on OSX and 'socket' isn't supposed to work.
+ # But the docs aren't clear about it, so we would need some testing...
+ local netaccessor="socket"
+ use elibc_Darwin && netaccessor="cfurl"
+ use libwww && netaccessor="libwww"
+ use curl && netaccessor="curl"
+
+ econf \
+ $(use_enable debug) \
+ $(use_enable threads) \
+ --enable-msgloader-${mloader} \
+ --enable-netaccessor-${netaccessor} \
+ --enable-transcoder-${transcoder} \
+ || die "econf failed"
+
+ emake || die "emake failed"
+
+ if use doc ; then
+ cd "${S}/doc"
+ doxygen || die "making docs failed"
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake failed"
+
+ cd "${S}"
+ doenvd "${FILESDIR}/50xerces-c"
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ rm -rf samples/config* samples/Makefile* samples/runConfigure samples/install-sh samples/*/Makefile*
+ rm samples/*
+ doins -r samples
+ dohtml -r doc/html/*
+ fi
+
+ dodoc CREDITS KEYS NOTICE README version.incl
+}