summaryrefslogtreecommitdiff
path: root/dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-13 17:49:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-13 17:49:31 +0100
commit36ac65103bf5503e5bad1ecc7e8cb9e7643f6840 (patch)
treed9d1fbc20509d4c90f57fb2d9e1459bc8034c831 /dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild
parenta1392efe64137262023d92492396ca9156d22396 (diff)
Revert "gentoo resync : 13.09.2019"
This reverts commit a1392efe64137262023d92492396ca9156d22396.
Diffstat (limited to 'dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild')
-rw-r--r--dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild116
1 files changed, 116 insertions, 0 deletions
diff --git a/dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild b/dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild
new file mode 100644
index 000000000000..7ccfabeb38f0
--- /dev/null
+++ b/dev-libs/xerces-c/xerces-c-3.1.4-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools prefix
+
+DESCRIPTION="A validating XML parser written in a portable subset of C++"
+HOMEPAGE="https://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 arm ~arm64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+
+IUSE="cpu_flags_x86_sse2 curl doc elibc_Darwin elibc_FreeBSD examples iconv icu static-libs test threads"
+
+RDEPEND="icu? ( dev-libs/icu:0= )
+ curl? ( net-misc/curl )
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? ( dev-lang/perl )"
+
+DOCS=( CREDITS KEYS NOTICE README version.incl )
+PATCHES=( "${FILESDIR}/${PN}-3.1.4-fix-build-system.patch" )
+
+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 takes precedence."
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local msgloader
+ if use icu; then
+ msgloader="icu"
+ elif use iconv; then
+ msgloader="iconv"
+ else
+ msgloader="inmemory"
+ fi
+
+ local transcoder
+ if use icu; then
+ transcoder="icu"
+ elif use elibc_Darwin; then
+ transcoder="macosunicodeconverter"
+ elif use elibc_FreeBSD; then
+ transcoder="iconv"
+ else
+ transcoder="gnuiconv"
+ fi
+ # for interix maybe: transcoder="windows"
+
+ # '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
+ if use curl; then
+ netaccessor="curl"
+ elif use elibc_Darwin; then
+ netaccessor="cfurl"
+ else
+ netaccessor="socket"
+ fi
+
+ econf \
+ --disable-pretty-make \
+ --enable-msgloader-${msgloader} \
+ --enable-transcoder-${transcoder} \
+ --enable-netaccessor-${netaccessor} \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable threads) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ cd doc || die
+ doxygen || die "making docs failed"
+ HTML_DOCS=( doc/html/. )
+ fi
+}
+
+src_install () {
+ default
+
+ # package provides .pc files
+ find "${D}" -name '*.la' -delete || die
+
+ if use examples; then
+ # clean out object files, executables, Makefiles
+ # and the like before installing examples
+ find samples/ \( -type f -executable -o -iname 'runConfigure' -o -iname '*.o' \
+ -o -iname '.libs' -o -iname 'Makefile*' \) -exec rm -rf '{}' + || die
+ docinto examples
+ dodoc -r samples/.
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # To make sure an appropriate NLS msg file is around when using
+ # the iconv msgloader ICU has the messages compiled in.
+ if use iconv && ! use icu; then
+ doenvd "$(prefixify_ro "${FILESDIR}/50xerces-c")"
+ fi
+}