Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/Ice: ChangeLog Ice-3.5.0.ebuild
Date: Wed, 05 Jun 2013 09:20:08
Message-Id: 20130605092005.104882171D@flycatcher.gentoo.org
1 polynomial-c 13/06/05 09:20:04
2
3 Modified: ChangeLog
4 Added: Ice-3.5.0.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.21 dev-libs/Ice/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/Ice/ChangeLog?rev=1.21&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/Ice/ChangeLog?rev=1.21&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/Ice/ChangeLog?r1=1.20&r2=1.21
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/Ice/ChangeLog,v
20 retrieving revision 1.20
21 retrieving revision 1.21
22 diff -u -r1.20 -r1.21
23 --- ChangeLog 10 Dec 2012 07:21:04 -0000 1.20
24 +++ ChangeLog 5 Jun 2013 09:20:04 -0000 1.21
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-libs/Ice
27 -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/Ice/ChangeLog,v 1.20 2012/12/10 07:21:04 polynomial-c Exp $
29 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/Ice/ChangeLog,v 1.21 2013/06/05 09:20:04 polynomial-c Exp $
31 +
32 +*Ice-3.5.0 (05 Jun 2013)
33 +
34 + 05 Jun 2013; Lars Wendler <polynomial-c@g.o> +Ice-3.5.0.ebuild:
35 + Non-maintainer commit: Version bump.
36
37 10 Dec 2012; Lars Wendler <polynomial-c@g.o> Ice-3.4.2-r1.ebuild:
38 Fixed dependency on openssl.
39
40
41
42 1.1 dev-libs/Ice/Ice-3.5.0.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/Ice/Ice-3.5.0.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/Ice/Ice-3.5.0.ebuild?rev=1.1&content-type=text/plain
46
47 Index: Ice-3.5.0.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-libs/Ice/Ice-3.5.0.ebuild,v 1.1 2013/06/05 09:20:04 polynomial-c Exp $
52
53 EAPI="4"
54
55 PYTHON_DEPEND="python? 2"
56 SUPPORT_PYTHON_ABIS="1"
57 RESTRICT_PYTHON_ABIS="3.*"
58 RUBY_OPTIONAL="yes"
59 USE_RUBY="ruby18"
60
61 inherit toolchain-funcs versionator python mono ruby-ng db-use
62
63 DESCRIPTION="ICE middleware C++ library and generator tools"
64 HOMEPAGE="http://www.zeroc.com/"
65 SRC_URI="http://www.zeroc.com/download/Ice/$(get_version_component_range 1-2)/${P}.tar.gz
66 doc? ( http://www.zeroc.com/download/Ice/$(get_version_component_range 1-2)/${P}.pdf )"
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~amd64 ~arm ~ia64 ~x86 ~x64-macos ~x86-linux"
70 IUSE="doc examples +ncurses mono python ruby test debug"
71
72 RDEPEND=">=dev-libs/expat-2.0.1
73 >=app-arch/bzip2-1.0.5
74 >=dev-libs/openssl-0.9.8o:0
75 >=sys-libs/db-4.8.30[cxx]
76 ~dev-cpp/libmcpp-2.7.2
77 ruby? ( $(ruby_implementation_depend ruby18) )
78 mono? ( dev-lang/mono )
79 !dev-python/IcePy
80 !dev-ruby/IceRuby"
81 DEPEND="${RDEPEND}
82 ncurses? ( sys-libs/ncurses sys-libs/readline )
83 test? ( =dev-lang/python-2* )"
84
85 # Maintainer notes:
86 # - yes, we have to do the trickery with the move for the python functions
87 # since the build and test frameworks deduce various settings from the path
88 # and they can't be tricked by a symlink. And we also need
89 # SUPPORT_PYTHON_ABIS=1 otherwise we can't get pyc/pyo anymore the sane way.
90 # TODO: php bindings
91 # TODO: java bindings
92
93 #overwrite ruby-ng.eclass default
94 S="${WORKDIR}/${P}"
95
96 pkg_setup() {
97 if use python || use test; then
98 python_pkg_setup
99 fi
100 }
101
102 src_unpack() {
103 # prevent ruby-ng.eclass from messing with src_unpack
104 default
105 }
106
107 src_prepare() {
108 sed -i \
109 -e 's|\(install_docdir[[:space:]]*\):=|\1?=|' \
110 -e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \
111 cpp/config/Make.rules || die "sed failed"
112
113 sed -i \
114 -e 's|\(install_pythondir[[:space:]]*\):=|\1?=|' \
115 -e 's|\(install_rubydir[[:space:]]*\):=|\1?=|' \
116 -e 's|\(install_libdir[[:space:]]*\):=|\1?=|' \
117 {py,rb}/config/Make.rules || die "sed failed"
118
119 sed -i \
120 -e 's|-O2 ||g' \
121 -e 's|-Werror ||g' \
122 cpp/config/Make.rules.Linux || die "sed failed"
123
124 sed -i \
125 -e 's|install-common||' \
126 -e 's|demo||' \
127 {cpp,cs,php,py,rb}/Makefile || die "sed failed"
128
129 sed -i \
130 -e 's|-f -root|-f -gacdir $(GAC_DIR) -root|' \
131 cs/config/Make.rules.cs || die "sed failed"
132
133 if ! use test ; then
134 sed -i \
135 -e 's|^\(SUBDIRS.*\)test|\1|' \
136 {cpp,cs,php,py,rb}/Makefile || die "sed failed"
137 fi
138 }
139
140 src_configure() {
141 MAKE_RULES="prefix=\"${ED}/usr\"
142 install_docdir=\"${ED}/usr/share/doc/${PF}\"
143 install_configdir=\"${ED}/usr/share/Ice-${PV}/config\"
144 embedded_runpath_prefix=\"${EPREFIX}/usr\"
145 LP64=yes"
146
147 use ncurses && OPTIONS="${MAKE_RULES} USE_READLINE=yes" || MAKE_RULES="${MAKE_RULES} USE_READLINE=no"
148 use debug && OPTIONS"${MAKE_RULES} OPTIMIZE=no" || MAKE_RULES="${MAKE_RULES} OPTIMIZE=yes"
149
150 MAKE_RULES="${MAKE_RULES} DB_FLAGS=-I$(db_includedir)"
151 sed -i \
152 -e "s|c++|$(tc-getCXX)|" \
153 -e "s|\(CFLAGS[[:space:]]*=\)|\1 ${CFLAGS}|" \
154 -e "s|\(CXXFLAGS[[:space:]]*=\)|\1 ${CXXFLAGS}|" \
155 -e "s|\(LDFLAGS[[:space:]]*=\)|\1 ${LDFLAGS}|" \
156 -e "s|\(DB_LIBS[[:space:]]*=\) \-ldb_cxx|\1 -ldb_cxx-$(db_findver sys-libs/db)|" \
157 cpp/config/Make.rules{,.Linux} py/config/Make.rules || die "sed failed"
158
159 if use python ; then
160 python_copy_sources py
161 mv py py.orig
162 fi
163
164 if use ruby ; then
165 SITERUBY="$(ruby18 -r rbconfig -e 'print Config::CONFIG["sitedir"]')"
166 MAKE_RULES_RB="install_rubydir=\"${ED}/${SITERUBY}\"
167 install_libdir=\"${ED}/${SITERUBY}\""
168
169 # make it use ruby18 only
170 sed -i \
171 -e 's|RUBY = ruby|\018|' \
172 rb/config/Make.rules || die "sed failed"
173 fi
174
175 MAKE_RULES_CS="GACINSTALL=yes GAC_ROOT=\"${ED}/usr/$(get_libdir)\" GAC_DIR=${EPREFIX}/usr/$(get_libdir)"
176
177 }
178
179 src_compile() {
180 if tc-is-cross-compiler ; then
181 export CXX="${CHOST}-g++"
182 fi
183
184 emake -C cpp ${MAKE_RULES} || die "emake failed"
185
186 if use doc ; then
187 emake -C cpp/doc || die "building docs failed"
188 fi
189
190 if use python ; then
191 building() {
192 mv py-${PYTHON_ABI} py
193 emake -C py ${MAKE_RULES} || die "emake py failed (for py-${PYTHON_ABI})"
194 mv py py-${PYTHON_ABI}
195 }
196 python_execute_function building
197 fi
198
199 if use ruby ; then
200 emake -C rb ${MAKE_RULES} ${MAKE_RULES_RB} || die "emake rb failed"
201 fi
202
203 if use mono ; then
204 emake -C cs ${MAKE_RULES} ${MAKE_RULES_CS} || die "emake cs failed"
205 fi
206 }
207
208 src_install() {
209 dodoc CHANGES README
210
211 insinto /usr/share/${P}
212 doins -r slice
213
214 emake -C cpp ${MAKE_RULES} install || die "emake install failed"
215
216 docinto cpp
217 dodoc CHANGES README
218
219 if use examples ; then
220 insinto /usr/share/doc/${PF}/examples-cpp
221 doins cpp/config/*.cfg
222 doins -r cpp/demo/*
223 fi
224
225 if use doc ; then
226 dohtml -r cpp/doc/reference/*
227 dodoc "${WORKDIR}/${P}.pdf"
228 fi
229
230 if use python ; then
231 installation() {
232 dodir $(python_get_sitedir)
233 mv py-${PYTHON_ABI} py
234 emake -C py ${MAKE_RULES} install_pythondir="\"${D}/$(python_get_sitedir)\"" install_libdir="\"${D}/$(python_get_sitedir)\"" install || die "emake py install failed (for py-${PYTHON_ABI})"
235 mv py py-${PYTHON_ABI}
236 }
237 python_execute_function installation
238
239 docinto py
240 dodoc py.orig/CHANGES py.orig/README
241
242 if use examples ; then
243 insinto /usr/share/doc/${PF}/examples-py
244 doins -r py.orig/demo/*
245 fi
246
247 cd "${ED}/$(python_get_sitedir -f)"
248 PYTHON_MODULES=(*.py)
249 PYTHON_MODULES+=(IceBox IceGrid IcePatch2 IceStorm)
250 cd "${S}"
251 fi
252
253 if use ruby ; then
254 dodir "${SITERUBY}"
255 emake -C rb ${MAKE_RULES} ${MAKE_RULES_RB} install || die "emake rb install failed"
256
257 docinto rb
258 dodoc rb/CHANGES rb/README
259
260 if use examples ; then
261 insinto /usr/share/doc/${PF}/examples-rb
262 doins -r rb/demo/*
263 fi
264 fi
265
266 if use mono ; then
267 emake -C cs ${MAKE_RULES} ${MAKE_RULES_CS} install || die "emake cs install failed"
268
269 # TODO: anyone has an idea what those are for?
270 rm "${ED}"/usr/bin/*.xml
271
272 docinto cs
273 dodoc cs/CHANGES cs/README
274
275 if use examples ; then
276 insinto /usr/share/doc/${PF}/examples-cs
277 doins -r cs/demo/*
278 fi
279 fi
280 }
281
282 src_test() {
283 emake -C cpp ${MAKE_RULES} test || die "emake test failed"
284
285 if use python ; then
286 testing() {
287 mv py-${PYTHON_ABI} py
288 emake -C py ${MAKE_RULES} test || die "emake py test failed (for py-${PYTHON_ABI})"
289 mv py py-${PYTHON_ABI}
290 }
291 python_execute_function testing
292 fi
293
294 if use ruby ; then
295 emake -C rb ${MAKE_RULES} ${MAKE_RULES_RB} test || die "emake rb test failed"
296 fi
297
298 if use mono ; then
299 # ewarn "Tests for C# are currently disabled."
300 emake -C cs ${MAKE_RULES} ${MAKE_RULES_CS} test || die "emake cs test failed"
301 fi
302 }
303
304 pkg_postinst() {
305 use python && python_mod_optimize "${PYTHON_MODULES[@]}"
306 }
307
308 pkg_postrm() {
309 use python && python_mod_cleanup "${PYTHON_MODULES[@]}"
310 }