Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/root/, sci-physics/root/files/
Date: Thu, 29 Oct 2015 10:44:14
Message-Id: 1446115439.208527d690e4939ef3f6ed5fa1e031672d982cf5.jlec@gentoo
1 commit: 208527d690e4939ef3f6ed5fa1e031672d982cf5
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 29 10:43:47 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 29 10:43:59 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=208527d6
7
8 sci-physics/root: Version Bump
9
10 Package-Manager: portage-2.2.23
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 sci-physics/root/Manifest | 1 +
14 .../root/files/root-6.04.06-prop-flags.patch | 22 +
15 sci-physics/root/metadata.xml | 45 +-
16 sci-physics/root/root-6.04.06.ebuild | 489 +++++++++++++++++++++
17 4 files changed, 535 insertions(+), 22 deletions(-)
18
19 diff --git a/sci-physics/root/Manifest b/sci-physics/root/Manifest
20 index 3bf0acc..2104a38 100644
21 --- a/sci-physics/root/Manifest
22 +++ b/sci-physics/root/Manifest
23 @@ -1,3 +1,4 @@
24 DIST root_v5.34.26.source.tar.gz 75171961 SHA256 c1fd2a249bb7210914b42e35dba4f1262cfa46b79ef7a41f73d7f08f8c54a643 SHA512 f5da5e20d1763608a32d78c48581e574a3f51aef47ecf6987a4064d1fb3234dfc9f626e041a17213f881f52f807ed6a6da60bf1d24951fa7dc2cadd94f8dd8b4 WHIRLPOOL 77b48b815c971642da68b71732a0ea3372648634281be634037b13cb58488f7075ec8bfc9a684e55d85cd9b038f229be29b19a15dfc829f0ce63a5f17241c23c
25 DIST root_v5.34.32.source.tar.gz 75170203 SHA256 939c7592802a54b6cbc593efb6e51699bf52e92baf6d6b20f486aaa08480fc5f SHA512 6485f2bb544947173e1feb2cfb41d6a176020027f1193d9388700a797ba4badbf497022e6129fdc4879e709460bf1efabf3e51c51840f0c781fa12e631419afc WHIRLPOOL 695147a519415b99e73fdad1cd61bb1944e292628236b5a7cbf1835174c950fa9cb068431a8164f24663323163012ea652db84d082f9f1eb1fcae79489575d9e
26 DIST root_v6.02.05.source.tar.gz 99121880 SHA256 7a5d4af171ba3b8a736c462b2041f8f35bd4c1d3b6a22c32a3ebd3ffe144ae60 SHA512 b30bc4aafe294ee069ee4c884ff70c983539a48eda586cd1938d00d4688f10e94a435640965b89c6d100fdd998453a4c1ae2109d5f1427f23865a868c561d684 WHIRLPOOL de363835fa00ffa0ff6e596b3c92b59ed59378bac3a344c066f7603d6104058203f76181d4c15478fd9066aedbe6a514257d5796feedb2d5d0d789b263e92955
27 +DIST root_v6.04.06.source.tar.gz 99180724 SHA256 6deac9cd71fe2d7a48ea2bcbd793639222c4743275dbc946c158295b1e1fe330 SHA512 ac96ac998ed4894587b7d286d79bcbea7b33f15764cc2513ae089e86c584e2dcb064cd135d44a4bfd2bede368eb772ccbffcd6bf426857a1236f5d7e9f5ce6fd WHIRLPOOL 7ffca036917d798ade31e1a22e9518d567e4267af5d1db555ea0e82c1bc2c7a1f665c8cd76d3ce6511507ab7befea4881580259c6142f1e668edafbcbc5e496e
28
29 diff --git a/sci-physics/root/files/root-6.04.06-prop-flags.patch b/sci-physics/root/files/root-6.04.06-prop-flags.patch
30 new file mode 100644
31 index 0000000..90db15e
32 --- /dev/null
33 +++ b/sci-physics/root/files/root-6.04.06-prop-flags.patch
34 @@ -0,0 +1,22 @@
35 + config/Makefile.in | 6 +++---
36 + 1 file changed, 3 insertions(+), 3 deletions(-)
37 +
38 +diff --git a/config/Makefile.in b/config/Makefile.in
39 +index 9243c90..a23a4d2 100644
40 +--- a/config/Makefile.in
41 ++++ b/config/Makefile.in
42 +@@ -64,11 +64,11 @@ HOST := @host@
43 + USECONFIG := @useconfig@
44 + MKLIBOPTIONS := @mkliboption@
45 +
46 +-EXTRA_CFLAGS := -Iinclude @cflags@
47 ++EXTRA_CFLAGS := -Iinclude @cflags@ $(CFLAGS)
48 + USERCONF_CFLAGS:= @usercflags@
49 +-EXTRA_CXXFLAGS := -Iinclude @cflags@
50 ++EXTRA_CXXFLAGS := -Iinclude @cflags@ $(CXXFLAGS)
51 + USERCONF_CXXFLAGS:= @usercxxflags@
52 +-EXTRA_LDFLAGS := @ldflags@
53 ++EXTRA_LDFLAGS := @ldflags@ $(LDFLAGS)
54 + WERROR := @werror@
55 + WINRTDEBUG := @winrtdebug@
56 + CTORSINITARRAY := @ctorsinitarray@
57
58 diff --git a/sci-physics/root/metadata.xml b/sci-physics/root/metadata.xml
59 index 86bcf98..d8e9e6f 100644
60 --- a/sci-physics/root/metadata.xml
61 +++ b/sci-physics/root/metadata.xml
62 @@ -1,12 +1,12 @@
63 <?xml version="1.0" encoding="UTF-8"?>
64 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
65 <pkgmetadata>
66 -<maintainer>
67 - <email>bircoph@g.o</email>
68 - <name>Andrew Savchenko</name>
69 -</maintainer>
70 -<herd>sci-physics</herd>
71 -<longdescription lang="en">
72 + <maintainer>
73 + <email>bircoph@g.o</email>
74 + <name>Andrew Savchenko</name>
75 + </maintainer>
76 + <herd>sci-physics</herd>
77 + <longdescription lang="en">
78 ROOT Object Oriented Technologies is an object oriented data
79 analysis framework written in C++ by the CERN. Widely used in
80 high energy physics, but also in other data analysis applications. It
81 @@ -14,20 +14,21 @@
82 statistics, serialization, optimization, linear algebra, graphics,
83 GUI toolkit, and a complete visualization framework.
84 </longdescription>
85 -<use>
86 - <flag name="c++11"> Build ROOT using the C++11 standard</flag>
87 - <flag name="c++14"> Build ROOT using the C++14 standard</flag>
88 - <flag name="fits">Support for images and data from FITS files with <pkg>sci-libs/cfitsio</pkg></flag>
89 - <flag name="gdml">Enable GDML writer and reader</flag>
90 - <flag name="geocad">Enable ROOT-CAD interface using <pkg>sci-libs/opencascade</pkg></flag>
91 - <flag name="http">Enable http server support including but not limited to fastcgi support</flag>
92 - <flag name="math">Build all math related libraries plugins, needs <pkg>sci-libs/gsl</pkg> </flag>
93 - <flag name="memstat">Build memory statistics library, helps to detect memory leaks</flag>
94 - <flag name="pythia6">Build the interface for <pkg>sci-physics/pythia</pkg> version 6.x </flag>
95 - <flag name="pythia8">Build the interface for <pkg>sci-physics/pythia</pkg> version 8.x </flag>
96 - <flag name="reflex">Build the reflection database for the C++ interpreter</flag>
97 - <flag name="shadow">Enable shadow authentication in rootd and proofd</flag>
98 - <flag name="table">Build libTable contrib library</flag>
99 - <flag name="xrootd">Build the interface for <pkg>net-libs/xrootd</pkg> </flag>
100 -</use>
101 + <use>
102 + <flag name="c++11"> Build ROOT using the C++11 standard</flag>
103 + <flag name="c++14"> Build ROOT using the C++14 standard</flag>
104 + <flag name="fits">Support for images and data from FITS files with <pkg>sci-libs/cfitsio</pkg></flag>
105 + <flag name="gdml">Enable GDML writer and reader</flag>
106 + <flag name="geocad">Enable ROOT-CAD interface using <pkg>sci-libs/opencascade</pkg></flag>
107 + <flag name="http">Enable http server support including but not limited to fastcgi support</flag>
108 + <flag name="math">Build all math related libraries plugins, needs <pkg>sci-libs/gsl</pkg> </flag>
109 + <flag name="memstat">Build memory statistics library, helps to detect memory leaks</flag>
110 + <flag name="pythia6">Build the interface for <pkg>sci-physics/pythia</pkg> version 6.x </flag>
111 + <flag name="pythia8">Build the interface for <pkg>sci-physics/pythia</pkg> version 8.x </flag>
112 + <flag name="reflex">Build the reflection database for the C++ interpreter</flag>
113 + <flag name="shadow">Enable shadow authentication in rootd and proofd</flag>
114 + <flag name="table">Build libTable contrib library</flag>
115 + <flag name="xrootd">Build the interface for <pkg>net-libs/xrootd</pkg> </flag>
116 + <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag>
117 + </use>
118 </pkgmetadata>
119
120 diff --git a/sci-physics/root/root-6.04.06.ebuild b/sci-physics/root/root-6.04.06.ebuild
121 new file mode 100644
122 index 0000000..1ccb466
123 --- /dev/null
124 +++ b/sci-physics/root/root-6.04.06.ebuild
125 @@ -0,0 +1,489 @@
126 +# Copyright 1999-2015 Gentoo Foundation
127 +# Distributed under the terms of the GNU General Public License v2
128 +# $Id$
129 +
130 +EAPI=5
131 +
132 +PYTHON_COMPAT=( python2_7 )
133 +
134 +inherit elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
135 + toolchain-funcs user versionator
136 +
137 +DESCRIPTION="C++ data analysis framework and interpreter from CERN"
138 +HOMEPAGE="http://root.cern.ch/"
139 +SRC_URI="ftp://root.cern.ch/${PN}/${PN}_v${PV}.source.tar.gz"
140 +DOC_URI="ftp://root.cern.ch/${PN}/doc"
141 +
142 +SLOT="0/$(get_version_component_range 1-3 ${PV})"
143 +LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
144 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
145 +IUSE="+X afs avahi doc emacs examples fits fftw gdml geocad
146 + graphviz http kerberos ldap +math +memstat mpi mysql odbc
147 + +opengl openmp oracle postgres prefix pythia6 pythia8
148 + python qt4 R shadow sqlite ssl table +tiff xinetd xml xrootd"
149 +
150 +# TODO: add support for: davix
151 +# TODO: ROOT-6 supports x32 ABI, but half of its dependencies doesn't
152 +# TODO: unbundle: cling, vdt
153 +
154 +REQUIRED_USE="
155 + !X? ( !opengl !qt4 !tiff )
156 + mpi? ( math !openmp )
157 + openmp? ( math !mpi )
158 + python? ( ${PYTHON_REQUIRED_USE} )
159 +"
160 +
161 +CDEPEND="
162 + app-arch/xz-utils:0=
163 + >=dev-lang/cfortran-4.4-r2
164 + dev-libs/libpcre:3=
165 + media-fonts/dejavu
166 + media-libs/freetype:2=
167 + media-libs/libpng:0=
168 + >=sys-devel/clang-3.4:=
169 + sys-libs/ncurses:=
170 + sys-libs/zlib:0=
171 + X? (
172 + media-libs/ftgl:0=
173 + media-libs/glew:0=
174 + x11-libs/libX11:0=
175 + x11-libs/libXext:0=
176 + x11-libs/libXpm:0=
177 + || (
178 + media-libs/libafterimage:0=[gif,jpeg,png,tiff?]
179 + >=x11-wm/afterstep-2.2.11:0=[gif,jpeg,png,tiff?]
180 + )
181 + opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= )
182 + qt4? (
183 + dev-qt/qtgui:4=
184 + dev-qt/qtopengl:4=
185 + dev-qt/qt3support:4=
186 + dev-qt/qtsvg:4=
187 + dev-qt/qtwebkit:4=
188 + dev-qt/qtxmlpatterns:4=
189 + )
190 + x11-libs/libXft:0=
191 + )
192 + afs? ( net-fs/openafs )
193 + avahi? ( net-dns/avahi:0= )
194 + emacs? ( virtual/emacs )
195 + fits? ( sci-libs/cfitsio:0= )
196 + fftw? ( sci-libs/fftw:3.0= )
197 + geocad? ( <sci-libs/opencascade-6.8.0:= )
198 + graphviz? ( media-gfx/graphviz:0= )
199 + http? ( dev-libs/fcgi:0= )
200 + kerberos? ( virtual/krb5 )
201 + ldap? ( net-nds/openldap:0= )
202 + math? (
203 + sci-libs/gsl:0=
204 + sci-mathematics/unuran:0=
205 + mpi? ( virtual/mpi )
206 + )
207 + mysql? ( virtual/mysql )
208 + odbc? ( || ( dev-db/libiodbc:0= dev-db/unixODBC:0= ) )
209 + oracle? ( dev-db/oracle-instantclient-basic:0= )
210 + postgres? ( dev-db/postgresql:= )
211 + pythia6? ( sci-physics/pythia:6= )
212 + pythia8? ( >=sci-physics/pythia-8.1.80:8= )
213 + python? ( ${PYTHON_DEPS} )
214 + R? ( dev-lang/R )
215 + shadow? ( virtual/shadow )
216 + sqlite? ( dev-db/sqlite:3= )
217 + ssl? ( dev-libs/openssl:0= )
218 + xml? ( dev-libs/libxml2:2= )
219 + xrootd? ( >=net-libs/xrootd-3.3.5:0= )
220 +"
221 +
222 +# TODO: ruby is not yet ported to ROOT-6, reenable when (if?) ready
223 +# ruby? (
224 +# dev-lang/ruby:=
225 +# dev-ruby/rubygems:=
226 +# )
227 +
228 +DEPEND="${CDEPEND}
229 + virtual/pkgconfig"
230 +
231 +RDEPEND="${CDEPEND}
232 + xinetd? ( sys-apps/xinetd )"
233 +
234 +PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )"
235 +
236 +# install stuff in ${P} and not ${PF} for easier tracking in root-docs
237 +DOC_DIR="/usr/share/doc/${P}"
238 +
239 +OC_UNSUPPORTED="6.8.0"
240 +
241 +die_compiler() {
242 + eerror "You are using a $(tc-getCXX)-$5 without C++$1 capabilities"
243 + die "Need one of the following C++$1 capable compilers:\n"\
244 + " >=sys-devel/gcc[cxx]-$2\n"\
245 + " >=sys-devel/clang-$3\n"\
246 + " >=dev-lang/icc-$4"
247 +}
248 +
249 +# check compiler to satisfy minimal versions
250 +# $1 - std version
251 +# $2 - g++
252 +# $3 - clang++
253 +# $4 - icc/icpc
254 +check_compiler() {
255 + local ver
256 + case "$(tc-getCXX)" in
257 + *clang++*)
258 + ver="$(best_version sys-devel/clang | sed 's:sys-devel/clang-::')"
259 + ;;
260 + *g++*)
261 + ver="$(gcc-version)"
262 + ;;
263 + *icc*|*icpc*)
264 + ver="$(best_version dev-lang/icc | sed 's:dev-lang/icc-::')"
265 + eerror "ROOT-6 is known not to build with ICC."
266 + eerror "Please report any isuses upstream."
267 + ;;
268 + *)
269 + ewarn "You are using an unsupported compiler."
270 + ewarn "Please report any issues upstream."
271 + return 0
272 + ;;
273 + esac
274 + version_is_at_least "$3" "${ver}" || die_compiler "$1" "$2" "$3" "$4" "${ver}"
275 +}
276 +
277 +pkg_setup() {
278 + fortran-2_pkg_setup
279 + use python && python-single-r1_pkg_setup
280 + echo
281 + elog "There are extra options on packages not yet in Gentoo:"
282 + elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
283 + elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
284 + elog "You can use the env variable EXTRA_ECONF variable for this."
285 + elog "For example, for SRP, you would set: "
286 + elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\""
287 + echo
288 +
289 + enewgroup rootd
290 + enewuser rootd -1 -1 /var/spool/rootd rootd
291 +
292 + if use math; then
293 + if use openmp; then
294 + if [[ "$(tc-getCXX)" == *g++* && "$(tc-getCXX)" != *clang++* ]] && ! tc-has-openmp; then
295 + ewarn "You are using a g++ without OpenMP capabilities"
296 + die "Need an OpenMP capable compiler"
297 + else
298 + export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
299 + fi
300 + elif use mpi; then
301 + export USE_MPI=1 USE_PARALLEL_MINUIT2=1
302 + fi
303 + fi
304 +
305 + # c++11 support is mandatory
306 + check_compiler "11" "4.8" "3.4" "13"
307 +
308 + # Active version of opencascade may be >= $OC_UNSUPPORTED,
309 + # so we need to eselect proper version (it must exist due to DEPEND requirement)
310 + if use geocad; then
311 + oc_current=$(eselect opencascade show)
312 + # Proceed only if active version is unsupported
313 + if version_is_at_least "${OC_UNSUPPORTED}" "${oc_current}"; then
314 + local -a vlist
315 + vlist=( $(version_sort $(eselect opencascade list | awk '/^ / { print $2 }')) )
316 + local i
317 + # search for higehr version < $OC_UNSUPPORTED
318 + # list is sorted acsending, so loop backwards
319 + for (( i=$(( ${#vlist[@]} -1 )); i>=0; i-- )); do
320 + version_is_at_least "${OC_UNSUPPORTED}" "${vlist[i]}" || break
321 + done
322 + [[ $i == "-1" ]] && die "No suitable opencascade eselect slot is available (<${OC_UNSUPPORTED})"
323 +
324 + einfo "Switching opencascade to supported slot: ${oc_current} -> ${vlist[i]}"
325 + eselect opencascade set ${vlist[i]} > /dev/null || die "eselect opencascade set ${vlist[i]} failed!"
326 + else
327 + # forget it, effectively disabling eselect cleanup
328 + unset oc_current
329 + fi
330 + fi
331 +}
332 +
333 +src_prepare() {
334 + # Second version of makepch is required in order to generate
335 + # PCH file appropriate for Gentoo include headers layout.
336 + # This can be done only at install stage, when files are placed
337 + # as appropriate. Premature modification of makepch.sh will
338 + # broke build process, however.
339 + #cp "etc/dictpch/makepch.sh" "etc/dictpch/makepch-gentoo.sh" || die
340 +
341 + epatch \
342 + "${FILESDIR}"/${PN}-5.28.00b-glibc212.patch \
343 + "${FILESDIR}"/${PN}-5.32.00-afs.patch \
344 + "${FILESDIR}"/${PN}-5.32.00-cfitsio.patch \
345 + "${FILESDIR}"/${PN}-5.32.00-chklib64.patch \
346 + "${FILESDIR}"/${PN}-5.34.13-unuran.patch \
347 + "${FILESDIR}"/${PN}-6.00.01-dotfont.patch \
348 + "${FILESDIR}"/${PN}-6.00.01-llvm.patch \
349 + "${FILESDIR}"/${PN}-6.00.01-nobyte-compile.patch \
350 + "${FILESDIR}"/${P}-prop-flags.patch
351 + # "${FILESDIR}"/${PN}-6.02.05-xrootd4.patch
352 + # "${FILESDIR}"/${PN}-6.02.05-dictpch.patch \
353 +
354 + # make sure we use system libs and headers
355 + rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
356 + rm -r graf2d/asimage/src/libAfterImage || die
357 + rm -r graf3d/ftgl/{inc,src} || die
358 + rm -r graf2d/freetype/src || die
359 + rm -r graf3d/glew/{inc,src} || die
360 + rm -r core/pcre/src || die
361 + rm -r math/unuran/src/unuran-*.tar.gz || die
362 + LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \
363 + xargs -0 rm || die
364 + rm -r core/lzma/src/*.tar.gz || die
365 + rm graf3d/gl/{inc,src}/gl2ps.* || die
366 + sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \
367 + graf3d/gl/Module.mk || die
368 +
369 + # In Gentoo, libPythia6 is called libpythia6
370 + # iodbc is in /usr/include/iodbc
371 + # pg_config.h is checked instead of libpq-fe.h
372 + sed -i \
373 + -e 's:libPythia6:libpythia6:g' \
374 + -e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
375 + -e 's:libpq-fe.h:pg_config.h:' \
376 + configure || die "adjusting configure for Gentoo failed"
377 +
378 + # prefixify the configure script
379 + sed -i \
380 + -e 's:/usr:${EPREFIX}/usr:g' \
381 + configure || die "prefixify configure failed"
382 +
383 + # CSS should use local images
384 + sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed"
385 +
386 + # QTDIR only used for qt3 in gentoo, and configure looks for it.
387 + unset QTDIR
388 +}
389 +
390 +# NB: ROOT uses bundled LLVM, because it is patched and API-incompatible with
391 +# system LLVM.
392 +# NB: As of 6.00.0.1 cmake is not ready as it can't fully replace configure,
393 +# e.g. for afs and geocad.
394 +
395 +src_configure() {
396 + local -a myconf
397 + # Some compilers need special care
398 + case "$(tc-getCXX)" in
399 + *clang++*)
400 + myconf=(
401 + --with-clang
402 + --with-f77="$(tc-getFC)"
403 + )
404 + ;;
405 + *icc*|*icpc*)
406 + # For icc we need to provide architecture manually
407 + # and not to tamper with tc-get*
408 + use x86 && myconf=( linuxicc )
409 + use amd64 && myconf=( linuxx8664icc )
410 + ;;
411 + *) # gcc goes here too
412 + myconf=(
413 + --with-cc="$(tc-getCC)"
414 + --with-cxx="$(tc-getCXX)"
415 + --with-f77="$(tc-getFC)"
416 + --with-ld="$(tc-getCXX)"
417 + )
418 + ;;
419 + esac
420 +
421 + # the configure script is not the standard autotools
422 + myconf+=(
423 + --prefix="${EPREFIX}/usr"
424 + --etcdir="${EPREFIX}/etc/root"
425 + --libdir="${EPREFIX}/usr/$(get_libdir)/${PN}"
426 + --docdir="${EPREFIX}${DOC_DIR}"
427 + --tutdir="${EPREFIX}${DOC_DIR}/examples/tutorials"
428 + --testdir="${EPREFIX}${DOC_DIR}/examples/tests"
429 + --disable-builtin-afterimage
430 + --disable-builtin-ftgl
431 + --disable-builtin-freetype
432 + --disable-builtin-glew
433 + --disable-builtin-lzma
434 + --disable-builtin-pcre
435 + --disable-builtin-zlib
436 + --disable-werror
437 + --enable-explicitlink
438 + --enable-shared
439 + --enable-soversion
440 + --fail-on-missing
441 + --nohowto
442 + --with-afs-shared=yes
443 + --with-sys-iconpath="${EPREFIX}/usr/share/pixmaps"
444 + # Invalid option '-mtune=native'. Try ./configure --help
445 + # --cflags=\"${CFLAGS}\"
446 + # --cxxflags=\"${CXXFLAGS}\"
447 + $(use_enable X x11)
448 + $(use_enable X asimage)
449 + $(use_enable X xft)
450 + $(use_enable afs)
451 + $(use_enable avahi bonjour)
452 + $(use_enable fits fitsio)
453 + $(use_enable fftw fftw3)
454 + $(use_enable gdml)
455 + $(use_enable geocad)
456 + $(use_enable graphviz gviz)
457 + $(use_enable http)
458 + $(use_enable kerberos krb5)
459 + $(use_enable ldap)
460 + $(use_enable math genvector)
461 + $(use_enable math gsl-shared)
462 + $(use_enable math mathmore)
463 + $(use_enable math minuit2)
464 + $(use_enable math roofit)
465 + $(use_enable math tmva)
466 + $(use_enable math vc)
467 + $(use_enable math vdt)
468 + $(use_enable math unuran)
469 + $(use_enable memstat)
470 + $(use_enable mysql)
471 + $(usex mysql "--with-mysql-incdir=${EPREFIX}/usr/include/mysql" "")
472 + $(use_enable odbc)
473 + $(use_enable opengl)
474 + $(use_enable oracle)
475 + $(use_enable postgres pgsql)
476 + $(use_enable prefix rpath)
477 + $(use_enable pythia6)
478 + $(use_enable pythia8)
479 + $(use_enable python)
480 + $(use_enable qt4 qt)
481 + $(use_enable qt4 qtgsi)
482 + $(use_enable R r)
483 + $(use_enable shadow shadowpw)
484 + $(use_enable sqlite)
485 + $(use_enable ssl)
486 + $(use_enable table)
487 + $(use_enable tiff astiff)
488 + $(use_enable xml)
489 + $(use_enable xrootd)
490 + ${EXTRA_ECONF}
491 + )
492 +
493 + # usex can't be used here, because pg_config may be not
494 + # installed with USE="-postgres"
495 + use postgres && myconf+=( --with-pgsql-incdir=$(pg_config --includedir) )
496 +
497 + einfo "Configuring with ${myconf[@]}"
498 + ./configure ${myconf[@]} || die "configure failed"
499 +}
500 +
501 +src_compile() {
502 + emake \
503 + OPT="${CXXFLAGS}" \
504 + F77OPT="${FFLAGS}" \
505 + ROOTSYS="${S}" \
506 + LD_LIBRARY_PATH="${S}/lib"
507 + use emacs && elisp-compile build/misc/*.el
508 +}
509 +
510 +daemon_install() {
511 + local daemons="rootd proofd"
512 + dodir /var/spool/rootd
513 + fowners rootd:rootd /var/spool/rootd
514 + dodir /var/spool/rootd/{pub,tmp}
515 + fperms 1777 /var/spool/rootd/{pub,tmp}
516 +
517 + local i
518 + for i in ${daemons}; do
519 + newinitd "${FILESDIR}"/${i}.initd ${i}
520 + newconfd "${FILESDIR}"/${i}.confd ${i}
521 + done
522 + if use xinetd; then
523 + insinto /etc/xinetd
524 + doins "${S}"/etc/daemons/{rootd,proofd}.xinetd
525 + fi
526 +}
527 +
528 +desktop_install() {
529 + cd "${S}"
530 + echo "Icon=root-system-bin" >> etc/root.desktop
531 + domenu etc/root.desktop
532 + doicon build/package/debian/root-system-bin.png
533 +
534 + insinto /usr/share/icons/hicolor/48x48/mimetypes
535 + doins build/package/debian/application-x-root.png
536 +
537 + insinto /usr/share/icons/hicolor/48x48/apps
538 + doicon build/package/debian/root-system-bin.xpm
539 +}
540 +
541 +cleanup_install() {
542 + # Cleanup of files either already distributed or unused on Gentoo
543 + pushd "${ED}" > /dev/null
544 + rm usr/share/root/fonts/LICENSE || die
545 + rm etc/root/proof/*.sample || die
546 + rm -r etc/root/daemons || die
547 + # these should be in PATH
548 + mv etc/root/proof/utils/pq2/pq2* usr/bin/ || die
549 + rm ${DOC_DIR#/}/{INSTALL,LICENSE} || die
550 + use examples || rm -r ${DOC_DIR#/}/examples || die
551 +
552 + # clean hardcoded sandbox paths
553 + #rm etc/root/dictpch/allCppflags.txt.tmp || die
554 + #sed -i "s|${S}/||" etc/root/cling/llvm/Config/llvm-config.h || die
555 + # regenerate pch for Gentoo headers layout
556 + #rm "etc/root/allDict.cxx.pch" || die
557 + #sed -i 's|etc/dictpch|etc/root/dictpch|' etc/root/dictpch/allLinkDefs.h || die
558 + #sed -i 's|etc/cling|etc/root/cling|' etc/root/dictpch/allHeaders.h || die
559 + #sed -i "s|ROOTDIR_TEMPLATE|${ED}|" etc/root/dictpch/makepch-gentoo.sh || die
560 + #etc/root/dictpch/makepch-gentoo.sh etc/root/allDict.cxx.pch || die "PCH generation failed"
561 +}
562 +
563 +src_install() {
564 + ROOTSYS="${S}" emake DESTDIR="${D}" install
565 + insinto "${DOC_DIR}"
566 + doins README.md
567 +
568 + echo "LDPATH=${EPREFIX%/}/usr/$(get_libdir)/root" > 99root
569 + use pythia8 && echo "PYTHIA8=${EPREFIX%/}/usr" >> 99root
570 +
571 + if use python; then
572 + echo "PYTHONPATH=${EPREFIX%/}/usr/$(get_libdir)/root" >> 99root
573 + python_optimize "${D}/usr/$(get_libdir)/root"
574 + fi
575 + use emacs && elisp-install ${PN} build/misc/*.{el,elc}
576 + if use examples; then
577 + # these should really be taken care of by the root make install
578 + insinto ${DOC_DIR}/examples/tutorials/tmva
579 + doins -r tmva/test
580 + fi
581 + doenvd 99root
582 +
583 + # The build system installs Emacs support unconditionally in the wrong
584 + # directory. Remove it and call elisp-install in case of USE=emacs.
585 + rm -r "${ED}"/usr/share/emacs || die
586 +
587 + daemon_install
588 + desktop_install
589 + cleanup_install
590 +
591 + # do not copress files used by ROOT's CLI (.credit, .demo, .license)
592 + docompress -x "${DOC_DIR}"/{CREDITS,examples/tutorials}
593 + # needed for .license command to work
594 + cat > "${DOC_DIR}/LICENSE" <<- EOF
595 + Please visit
596 + https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
597 + for the full license test
598 + EOF
599 +}
600 +
601 +pkg_postinst() {
602 + fdo-mime_desktop_database_update
603 +
604 + # restort opencascade eselect slot
605 + if use geocad && [[ -n ${oc_current} ]]; then
606 + einfo "Switching to user set slot: $(eselect opencascade show) -> ${oc_current}"
607 + eselect opencascade set ${oc_current} > /dev/null || eerror "eselect opencascade set ${vlist[i]} failed!"
608 + unset oc_current
609 + fi
610 +}
611 +
612 +pkg_postrm() {
613 + fdo-mime_desktop_database_update
614 +}