Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/Ice/
Date: Sun, 06 Jun 2021 07:21:29
Message-Id: 1622964081.ab7d5bc5fb39fa9fdea905af5b3df37817dc3085.graaff@gentoo
1 commit: ab7d5bc5fb39fa9fdea905af5b3df37817dc3085
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 6 07:20:30 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 6 07:21:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab7d5bc5
7
8 dev-libs/Ice: cleanup of ruby25-only ebuild
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.2
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-libs/Ice/Ice-3.6.5.ebuild | 335 ------------------------------------------
14 1 file changed, 335 deletions(-)
15
16 diff --git a/dev-libs/Ice/Ice-3.6.5.ebuild b/dev-libs/Ice/Ice-3.6.5.ebuild
17 deleted file mode 100644
18 index e9232fc67c0..00000000000
19 --- a/dev-libs/Ice/Ice-3.6.5.ebuild
20 +++ /dev/null
21 @@ -1,335 +0,0 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -PYTHON_COMPAT=( python3_{7..9} )
28 -
29 -RUBY_OPTIONAL="yes"
30 -USE_RUBY="ruby25"
31 -
32 -PHP_EXT_NAME="IcePHP"
33 -PHP_EXT_INI="yes"
34 -PHP_EXT_ZENDEXT="no"
35 -
36 -PHP_EXT_OPTIONAL_USE=php
37 -
38 -USE_PHP="php7-4"
39 -
40 -# This variable does not belong to any eclass. It is solely used in this ebuild
41 -BERKDB_SLOTS=( 6.2 6.1 5.3 5.1 4.8 )
42 -
43 -inherit db-use mono-env php-ext-source-r3 python-r1 ruby-ng toolchain-funcs
44 -
45 -DESCRIPTION="ICE middleware C++ library and generator tools"
46 -HOMEPAGE="https://zeroc.com/products/ice"
47 -SRC_URI="https://github.com/zeroc-ice/ice/archive/v${PV}.tar.gz -> ${P}.tar.gz
48 - doc? ( https://download.zeroc.com/Ice/$(ver_cut 1-2)/${PN}-3.6.4.pdf )"
49 -LICENSE="GPL-2"
50 -SLOT="0/36"
51 -KEYWORDS="amd64 ~arm x86"
52 -IUSE="debug doc examples +readline mono php python ruby test"
53 -RESTRICT="test"
54 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
55 -
56 -RDEPEND=">=dev-libs/expat-2.0.1
57 - >=app-arch/bzip2-1.0.5
58 - dev-libs/openssl:0=
59 - || (
60 - $(for slot in ${BERKDB_SLOTS[@]} ; do printf '%s\n' "sys-libs/db:${slot}[cxx]" ; done)
61 - )
62 - dev-cpp/libmcpp
63 - python? ( ${PYTHON_DEPS} )
64 - ruby? ( $(ruby_implementation_depend ruby25) )
65 - mono? ( dev-lang/mono )"
66 -DEPEND="${RDEPEND}
67 - readline? ( sys-libs/readline:0= )
68 - test? (
69 - ${PYTHON_DEPS}
70 - dev-python/passlib[${PYTHON_USEDEP}]
71 - )"
72 -
73 -# Maintainer notes:
74 -# TODO: java bindings
75 -
76 -S="${WORKDIR}/${P,}"
77 -PHP_EXT_S="${S}/php"
78 -
79 -PATCHES=(
80 - "${FILESDIR}/${PN}-3.6.3-no-arch-opts.patch"
81 - "${FILESDIR}/${P}-db6.patch"
82 - "${FILESDIR}/${P}-csharp.patch"
83 -)
84 -
85 -pkg_setup() {
86 - # prevent ruby-ng.eclass from messing with pkg_setup
87 - return
88 -}
89 -
90 -src_unpack() {
91 - # prevent ruby-ng.eclass from messing with src_unpack
92 - default
93 -}
94 -
95 -src_prepare() {
96 - default
97 -
98 - sed -i \
99 - -e 's|-L\$\(libdir\)||' \
100 - cpp/config/Make.rules || die
101 -
102 - sed -i \
103 - -e 's|-O2 ||g' \
104 - -e 's|-Werror ||g' \
105 - cpp/config/Make.rules.Linux || die
106 -
107 - sed -i \
108 - -e 's|install-common||' \
109 - {cpp,csharp,php,python,ruby}/Makefile || die
110 -
111 - sed -i \
112 - -e 's|-f -root|-f -gacdir $(GAC_DIR) -root|' \
113 - csharp/config/Make.rules.cs || die
114 -
115 - # skip mono tests, bug #498484
116 - sed -i \
117 - -e '/SUBDIRS/s|\ test||' \
118 - csharp/Makefile || die
119 -
120 - # skip udp test due to multicast
121 - # skip IceGrid/admin bug #649850
122 - # skip IceSSL tests due to requirement of internet connection
123 - # skip IceStorm/single bug #636834
124 - # IceUtil/stacktrace and IceStorm/stress fail with USE=debug
125 - # Glacier2/staticFiltering requires network access
126 - sed -i \
127 - -e 's|allTests.py|allTests.py --rfilter=udp --rfilter=IceGrid\/admin --rfilter=IceSSL --rfilter=IceStorm\/single --rfilter=IceStorm\/stress --rfilter=IceUtil\/stacktrace --rfilter=Glacier2\/staticFiltering|' \
128 - cpp/Makefile || die
129 -
130 - # fails even on unicode locale
131 - sed -i \
132 - -e 's|allTests.py|allTests.py --rfilter=Slice\/unicodePaths|' \
133 - ruby/Makefile || die
134 -
135 - # fix for x86 IceBox test
136 - sed -i \
137 - -e 's|"32"|""|' \
138 - scripts/TestUtil.py || die
139 -}
140 -
141 -src_configure() {
142 - suitable_db_version() {
143 - local ver
144 - for ver in "${BERKDB_SLOTS[@]}"; do
145 - if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
146 - echo "${ver}"
147 - return 0
148 - fi
149 - done
150 - die "No suitable BerkDB versions found, aborting"
151 - }
152 -
153 - MAKE_RULES=(
154 - "prefix=\"${ED}/usr\""
155 - "install_docdir=\"${ED}/usr/share/doc/${PF}\""
156 - "install_configdir=\"${ED}/usr/share/${P}/config\""
157 - "install_mandir=\"${ED}/usr/share/man/man1\""
158 - "embedded_runpath_prefix=\"${EPREFIX}/usr\""
159 - "LP64=yes"
160 - "new_dtags=yes"
161 - "NOTEST=$(usex !test)"
162 - "USE_READLINE=$(usex readline)"
163 - "OPTIMIZE=$(usex !debug)"
164 - )
165 -
166 - local BERKDB_VERSION="$(suitable_db_version)"
167 - MAKE_RULES+=("DB_FLAGS=-I$(db_includedir ${BERKDB_VERSION})")
168 - sed -i \
169 - -e "s|g++|$(tc-getCXX)|" \
170 - -e "s|\(CFLAGS[[:space:]]*=\)|\1 ${CFLAGS}|" \
171 - -e "s|\(CXXFLAGS[[:space:]]*=\)|\1 ${CXXFLAGS}|" \
172 - -e "s|\(LDFLAGS[[:space:]]*=\)|\1 ${LDFLAGS}|" \
173 - -e "s|\(DB_LIBS[[:space:]]*=\) \-ldb_cxx|\1 -ldb_cxx-$(db_findver sys-libs/db:${BERKDB_VERSION})|" \
174 - cpp/config/Make.rules{,.Linux} python/config/Make.rules || die
175 -
176 - if use python; then
177 - local S="${S}/python"
178 - python_copy_sources
179 - fi
180 -
181 - if use ruby; then
182 - SITERUBY="$(ruby25 -r rbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')"
183 - SITERUBYARCH="$(ruby25 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
184 - MAKE_RULES_RUBY=(
185 - "install_rubydir=\"${ED}/${SITERUBY}\""
186 - "install_libdir=\"${ED}/${SITERUBYARCH}\""
187 - )
188 -
189 - # make it use ruby25 only
190 - sed -i \
191 - -e 's|RUBY = ruby|\025|' \
192 - ruby/config/Make.rules || die
193 - sed -i \
194 - -e 's|env ruby|\025|' \
195 - ruby/config/s2rb.rb || die
196 - sed -i \
197 - -e 's|env ruby|\025|' \
198 - ruby/scripts/slice2rb || die
199 - sed -i \
200 - -e 's|output.write("ruby|\025|' \
201 - scripts/TestUtil.py || die
202 - fi
203 -
204 - MAKE_RULES_MONO=(
205 - "GACINSTALL=yes"
206 - "GAC_ROOT=\"${ED}/usr/$(get_libdir)\""
207 - "GAC_DIR=\"${EPREFIX}/usr/$(get_libdir)\""
208 - "install_libdir=\"${ED}/usr/$(get_libdir)\""
209 - "install_pkgconfigdir=\"${ED}/usr/$(get_libdir)/pkgconfig\""
210 - )
211 -
212 - if has_version ">dev-lang/mono-4"; then
213 - MAKE_RULES_MONO+=("MCS=mcs")
214 - fi
215 -
216 - use test && python_setup
217 -}
218 -
219 -src_compile() {
220 - # Do not remove this export or build will break!
221 - tc-export CXX
222 -
223 - emake -C cpp "${MAKE_RULES[@]}"
224 -
225 - if use php; then
226 - local i
227 - for i in $(php_get_slots); do
228 - mkdir -p "${WORKDIR}/${i}" || die
229 - cp -r "${PHP_EXT_S}" "${WORKDIR}/${i}/" || die "Failed to copy source ${PHP_EXT_S} to PHP target directory"
230 -
231 - pushd "${WORKDIR}/${i}" >/dev/null || die
232 - ln -s "${S}/cpp" || die
233 - ln -s "${S}/config" || die
234 - ln -s "${S}/slice" || die
235 - ln -s "${S}/Makefile" || die
236 -
237 - emake -C php "${MAKE_RULES[@]}" USE_NAMESPACES=yes "PHP_CONFIG=\"${EPREFIX}/usr/$(get_libdir)/${i}/bin/php-config\""
238 - popd >/dev/null || die
239 - done
240 - fi
241 -
242 - if use python; then
243 - building() {
244 - emake -C "${BUILD_DIR}" "${MAKE_RULES[@]}" PYTHON="${EPYTHON}"
245 - }
246 - local S="${S}/python"
247 - python_foreach_impl building
248 - fi
249 -
250 - if use ruby; then
251 - emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}"
252 - fi
253 -
254 - if use mono; then
255 - emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}"
256 - fi
257 -}
258 -
259 -src_test() {
260 - local -x LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
261 - emake -C cpp "${MAKE_RULES[@]}" test
262 -
263 - # php tests require the extension loaded and are therefore skipped
264 -
265 - if use python; then
266 - testing() {
267 - PYTHONPATH="${BUILD_DIR}"/python emake -C "${BUILD_DIR}" \
268 - "${MAKE_RULES[@]}" \
269 - PYTHON="${EPYTHON}" \
270 - install_pythondir="\"${D}/$(python_get_sitedir)\"" \
271 - install_libdir="\"${D}/$(python_get_sitedir)\"" test
272 - }
273 - local S="${S}/python"
274 - python_foreach_impl testing
275 - fi
276 -
277 - if use ruby; then
278 - emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" test
279 - fi
280 -
281 - if use mono; then
282 - # skip mono tests, bug #498484
283 - ewarn "Tests for C# are currently disabled."
284 - #emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" test
285 - fi
286 -}
287 -
288 -src_install() {
289 - local DOCS=( CHANGELOG*.md README.md )
290 - use doc && DOCS+=( "${DISTDIR}/${PN}-3.6.4.pdf" )
291 - einstalldocs
292 -
293 - insinto /usr/share/${P}
294 - doins -r slice
295 -
296 - emake -C cpp "${MAKE_RULES[@]}" install
297 -
298 - if use examples; then
299 - docinto examples-cpp
300 - dodoc cpp/config/*.cfg
301 - docompress -x /usr/share/doc/${PF}/examples-cpp
302 - fi
303 -
304 - if use php; then
305 - insinto "/usr/share/php/${PN}"
306 -
307 - local i
308 - while IFS="" read -d $'\0' -r i; do
309 - doins "${i}"
310 - done < <(find "${S}/php/lib/" -name '*.php' -print0)
311 -
312 - pushd "${ED}/usr/share/${P}/slice" >/dev/null || die
313 -
314 - local -x LD_LIBRARY_PATH="${ED}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
315 - for i in *; do
316 - mkdir -p "${ED}/usr/share/php/${i}" || die
317 - "${ED}"/usr/bin/slice2php \
318 - -I"${ED}/usr/share/${P}/slice/" --all \
319 - --output-dir "${ED}/usr/share/php/${i}" \
320 - --ice "${ED}/usr/share/${P}/slice/${i}"/*
321 - done
322 -
323 - for i in $(php_get_slots); do
324 - php_init_slot_env "${i}"
325 - insinto "${EXT_DIR}"
326 - newins "php/lib/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so"
327 - done
328 - php-ext-source-r3_createinifiles
329 -
330 - popd >/dev/null || die
331 - fi
332 -
333 - if use python; then
334 - installation() {
335 - mkdir -p "${D}/$(python_get_sitedir)" || die
336 -
337 - emake -C "${BUILD_DIR}" \
338 - "${MAKE_RULES[@]}" \
339 - install_pythondir="\"${D}/$(python_get_sitedir)\"" \
340 - install_libdir="\"${D}/$(python_get_sitedir)\"" \
341 - install
342 - python_optimize
343 - }
344 - local S="${S}/python"
345 - python_foreach_impl installation
346 - fi
347 -
348 - if use ruby; then
349 - dodir "${SITERUBY}"
350 - emake -C ruby "${MAKE_RULES[@]}" "${MAKE_RULES_RUBY[@]}" install
351 - fi
352 -
353 - if use mono; then
354 - emake -C csharp "${MAKE_RULES[@]}" "${MAKE_RULES_MONO[@]}" install
355 - fi
356 -}