Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/xerces-c/
Date: Fri, 07 Dec 2018 19:48:44
Message-Id: 1544212099.a0c57f5d30b12c8257ca793be51eb708cc27f3c8.candrews@gentoo
1 commit: a0c57f5d30b12c8257ca793be51eb708cc27f3c8
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 7 19:48:19 2018 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 7 19:48:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0c57f5d
7
8 dev-libs/xerces-c: Add -9999 live version
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
12
13 dev-libs/xerces-c/xerces-c-9999.ebuild | 118 +++++++++++++++++++++++++++++++++
14 1 file changed, 118 insertions(+)
15
16 diff --git a/dev-libs/xerces-c/xerces-c-9999.ebuild b/dev-libs/xerces-c/xerces-c-9999.ebuild
17 new file mode 100644
18 index 00000000000..8b3066ca6f1
19 --- /dev/null
20 +++ b/dev-libs/xerces-c/xerces-c-9999.ebuild
21 @@ -0,0 +1,118 @@
22 +# Copyright 1999-2018 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
27 +
28 +inherit cmake-utils prefix
29 +
30 +DESCRIPTION="A validating XML parser written in a portable subset of C++"
31 +HOMEPAGE="https://xerces.apache.org/xerces-c/"
32 +
33 +if [[ ${PV} == *9999 ]] ; then
34 + ESVN_REPO_URI="https://svn.apache.org/repos/asf/xerces/c/trunk"
35 + inherit subversion
36 +else
37 + SRC_URI="mirror://apache/xerces/c/3/sources/${P}.tar.gz"
38 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
39 +fi
40 +
41 +LICENSE="Apache-2.0"
42 +SLOT="0"
43 +
44 +IUSE="cpu_flags_x86_sse2 curl doc elibc_Darwin elibc_FreeBSD examples iconv icu static-libs test threads"
45 +
46 +RDEPEND="icu? ( dev-libs/icu:0= )
47 + curl? ( net-misc/curl )
48 + virtual/libiconv"
49 +DEPEND="${RDEPEND}
50 + doc? ( app-doc/doxygen )
51 + test? ( dev-lang/perl )"
52 +
53 +DOCS=( CREDITS KEYS NOTICE README )
54 +
55 +pkg_setup() {
56 + export ICUROOT="${EPREFIX}/usr"
57 +
58 + if use iconv && use icu; then
59 + ewarn "This package can use iconv or icu for loading messages"
60 + ewarn "and transcoding, but not both. ICU takes precedence."
61 + fi
62 +}
63 +
64 +src_configure() {
65 + # 'cfurl' is only available on OSX and 'socket' isn't supposed to work.
66 + # But the docs aren't clear about it, so we would need some testing...
67 + local netaccessor
68 + if use curl; then
69 + netaccessor="curl"
70 + elif use elibc_Darwin; then
71 + netaccessor="cfurl"
72 + else
73 + netaccessor="socket"
74 + fi
75 +
76 + local msgloader
77 + if use icu; then
78 + msgloader="icu"
79 + elif use iconv; then
80 + msgloader="iconv"
81 + else
82 + msgloader="inmemory"
83 + fi
84 +
85 + local transcoder
86 + if use icu; then
87 + transcoder="icu"
88 + elif use elibc_Darwin; then
89 + transcoder="macosunicodeconverter"
90 + elif use elibc_FreeBSD; then
91 + transcoder="iconv"
92 + else
93 + transcoder="gnuiconv"
94 + fi
95 + # for interix maybe: transcoder="windows"
96 +
97 + local mycmakeargs=(
98 + -Dnetwork-accessor="${netaccessor}"
99 + -Dmessage-loader="${msgloader}"
100 + -Dtranscoder="${transcoder}"
101 + -Dthreads:BOOL="$(usex threads)"
102 + -Dsse2:BOOL="$(usex cpu_flags_x86_sse2)"
103 + )
104 +
105 + cmake-utils_src_configure
106 +}
107 +
108 +src_compile() {
109 + cmake-utils_src_compile
110 +
111 + if use doc; then
112 + cd doc || die
113 + doxygen || die "making docs failed"
114 + HTML_DOCS=( doc/html/. )
115 + fi
116 +}
117 +
118 +src_install () {
119 + cmake-utils_src_install
120 +
121 + # package provides .pc files
122 + find "${D}" -name '*.la' -delete || die
123 +
124 + if use examples; then
125 + # clean out object files, executables, Makefiles
126 + # and the like before installing examples
127 + find samples/ \( -type f -executable -o -iname 'runConfigure' -o -iname '*.o' \
128 + -o -iname '.libs' -o -iname 'Makefile*' \) -exec rm -rf '{}' + || die
129 + docinto examples
130 + dodoc -r samples/.
131 + docompress -x /usr/share/doc/${PF}/examples
132 + fi
133 +
134 + # To make sure an appropriate NLS msg file is around when using
135 + # the iconv msgloader ICU has the messages compiled in.
136 + if use iconv && ! use icu; then
137 + doenvd "$(prefixify_ro "${FILESDIR}/50xerces-c")"
138 + fi
139 +}