1 |
commit: a1c3b313be5be9716a761a762ea3651070ed9e43 |
2 |
Author: Andrew Savchenko <bircoph <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Jul 2 13:29:12 2014 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Jul 2 13:29:12 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a1c3b313 |
7 |
|
8 |
sci-physics/root: fix Cling library load |
9 |
|
10 |
It was broken for prefix builds (that's how ROOT is installed in |
11 |
Gentoo. See bug https://sft.its.cern.ch/jira/browse/ROOT-6410. |
12 |
|
13 |
--- |
14 |
sci-physics/root/ChangeLog | 7 + |
15 |
sci-physics/root/files/root-6.00.01-cling.patch | 19 + |
16 |
...{root-6.00.01.ebuild => root-6.00.01-r1.ebuild} | 10 +- |
17 |
sci-physics/root/root-9999.ebuild | 434 ++++++++++++++++++++- |
18 |
4 files changed, 461 insertions(+), 9 deletions(-) |
19 |
|
20 |
diff --git a/sci-physics/root/ChangeLog b/sci-physics/root/ChangeLog |
21 |
index 678d621..98e1940 100644 |
22 |
--- a/sci-physics/root/ChangeLog |
23 |
+++ b/sci-physics/root/ChangeLog |
24 |
@@ -2,6 +2,13 @@ |
25 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
26 |
# $Header: /var/cvsroot/gentoo-x86/sci-physics/root/ChangeLog,v 1.96 2012/03/29 18:21:49 bicatali Exp $ |
27 |
|
28 |
+*root-6.00.01-r1 (02 Jul 2014) |
29 |
+ |
30 |
+ 02 Jul 2014; Andrew Savchenko <bircoph@×××××.com> -root-6.00.01.ebuild, |
31 |
+ +root-6.00.01-r1.ebuild, +files/root-6.00.01-cling.patch: |
32 |
+ Fix Cling when prefix setup is used (see bug ROOT-6410). |
33 |
+ Remove warning message because with bug fixed it is meaningless. |
34 |
+ |
35 |
*root-6.00.01 (29 Jun 2014) |
36 |
|
37 |
29 Jun 2014; Andrew Savchenko <bircoph@×××××.com> +root-6.00.01.ebuild, |
38 |
|
39 |
diff --git a/sci-physics/root/files/root-6.00.01-cling.patch b/sci-physics/root/files/root-6.00.01-cling.patch |
40 |
new file mode 100644 |
41 |
index 0000000..146e89f |
42 |
--- /dev/null |
43 |
+++ b/sci-physics/root/files/root-6.00.01-cling.patch |
44 |
@@ -0,0 +1,19 @@ |
45 |
+commit eea9517c17bd86beda895a5a8b3ffe59af18596f |
46 |
+Author: Axel Naumann <Axel.Naumann@××××.ch> |
47 |
+Date: Tue Jul 1 17:45:20 2014 +0200 |
48 |
+ |
49 |
+ From Pere: go via TSystem to use prefix if defined (ROOT-6410). |
50 |
+ |
51 |
+diff --git a/core/meta/src/TCling.cxx b/core/meta/src/TCling.cxx |
52 |
+index baec571..4976d4e 100644 |
53 |
+--- a/core/meta/src/TCling.cxx |
54 |
++++ b/core/meta/src/TCling.cxx |
55 |
+@@ -4703,7 +4703,7 @@ void* TCling::LazyFunctionCreatorAutoload(const std::string& mangled_name) { |
56 |
+ TString lib; |
57 |
+ Ssiz_t posLib = 0; |
58 |
+ while (libs.Tokenize(lib, posLib)) { |
59 |
+- if (Load(lib, kFALSE /*system*/) < 0) { |
60 |
++ if (gSystem->Load(lib, "", kFALSE /*system*/) < 0) { |
61 |
+ // The library load failed, all done. |
62 |
+ //fprintf(stderr, "load failed: %s\n", errmsg.c_str()); |
63 |
+ return 0; |
64 |
|
65 |
diff --git a/sci-physics/root/root-6.00.01.ebuild b/sci-physics/root/root-6.00.01-r1.ebuild |
66 |
similarity index 96% |
67 |
rename from sci-physics/root/root-6.00.01.ebuild |
68 |
rename to sci-physics/root/root-6.00.01-r1.ebuild |
69 |
index 440bd32..bfb8e40 100644 |
70 |
--- a/sci-physics/root/root-6.00.01.ebuild |
71 |
+++ b/sci-physics/root/root-6.00.01-r1.ebuild |
72 |
@@ -200,7 +200,8 @@ src_prepare() { |
73 |
"${FILESDIR}"/${PN}-6.00.01-nobyte-compile.patch \ |
74 |
"${FILESDIR}"/${PN}-6.00.01-prop-flags.patch \ |
75 |
"${FILESDIR}"/${PN}-6.00.01-llvm.patch \ |
76 |
- "${FILESDIR}"/${PN}-6.00.01-geocad.patch |
77 |
+ "${FILESDIR}"/${PN}-6.00.01-geocad.patch \ |
78 |
+ "${FILESDIR}"/${PN}-6.00.01-cling.patch |
79 |
|
80 |
# make sure we use system libs and headers |
81 |
rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die |
82 |
@@ -426,13 +427,6 @@ src_install() { |
83 |
|
84 |
pkg_postinst() { |
85 |
fdo-mime_desktop_database_update |
86 |
- if [[ -z ${REPLACING_VERSIONS} || |
87 |
- $(get_major_version ${REPLACING_VERSIONS}) -lt 6 ]]; then |
88 |
- ewarn "ROOT-6 uses Cling instead of CINT. Cling follows the C++ standard much more" |
89 |
- ewarn "strictly than CINT, in particular in requires headers to be included and" |
90 |
- ewarn "libraries to be properly loaded. Please carefully follow a migration guide:" |
91 |
- ewarn "http://root.cern.ch/root/htmldoc/notes/release-notes.html#cling-vs-cint" |
92 |
- fi |
93 |
} |
94 |
|
95 |
pkg_postrm() { |
96 |
|
97 |
diff --git a/sci-physics/root/root-9999.ebuild b/sci-physics/root/root-9999.ebuild |
98 |
deleted file mode 120000 |
99 |
index b46789a..0000000 |
100 |
--- a/sci-physics/root/root-9999.ebuild |
101 |
+++ /dev/null |
102 |
@@ -1 +0,0 @@ |
103 |
-root-6.00.01.ebuild |
104 |
\ No newline at end of file |
105 |
|
106 |
diff --git a/sci-physics/root/root-9999.ebuild b/sci-physics/root/root-9999.ebuild |
107 |
new file mode 100644 |
108 |
index 0000000..26f1dd1 |
109 |
--- /dev/null |
110 |
+++ b/sci-physics/root/root-9999.ebuild |
111 |
@@ -0,0 +1,433 @@ |
112 |
+# Copyright 1999-2014 Gentoo Foundation |
113 |
+# Distributed under the terms of the GNU General Public License v2 |
114 |
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/root/root-5.34.18-r1.ebuild,v 1.3 2014/03/27 18:51:54 bicatali Exp $ |
115 |
+ |
116 |
+EAPI=5 |
117 |
+ |
118 |
+if [[ ${PV} == "9999" ]] ; then |
119 |
+ inherit git-r3 |
120 |
+ EGIT_REPO_URI="http://root.cern.ch/git/root.git" |
121 |
+ KEYWORDS="" |
122 |
+else |
123 |
+ SRC_URI="ftp://root.cern.ch/${PN}/${PN}_v${PV}.source.tar.gz" |
124 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
125 |
+ S="${WORKDIR}/${PN}" |
126 |
+fi |
127 |
+ |
128 |
+PYTHON_COMPAT=( python2_{6,7} ) |
129 |
+ |
130 |
+inherit elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \ |
131 |
+ toolchain-funcs user versionator |
132 |
+ |
133 |
+DESCRIPTION="C++ data analysis framework and interpreter from CERN" |
134 |
+HOMEPAGE="http://root.cern.ch/" |
135 |
+DOC_URI="ftp://root.cern.ch/${PN}/doc" |
136 |
+ |
137 |
+SLOT="0/$(get_version_component_range 1-3 ${PV})" |
138 |
+LICENSE="LGPL-2.1 freedist GPL-2 MSttfEULA LGPL-3 libpng UoI-NCSA" |
139 |
+IUSE="+X afs avahi doc emacs examples fits fftw geocad graphviz |
140 |
+ http kerberos ldap +math minimal mpi mysql odbc +opengl openmp |
141 |
+ oracle postgres prefix pythia6 pythia8 python qt4 sqlite ssl |
142 |
+ xinetd xml xrootd" |
143 |
+ |
144 |
+# TODO: add support for: davix |
145 |
+# TODO: ROOT-6 supports x32 ABI, but half of its dependencies doesn't |
146 |
+# TODO: unbundle: cling, vdt |
147 |
+ |
148 |
+REQUIRED_USE=" |
149 |
+ mpi? ( math !openmp ) |
150 |
+ opengl? ( X ) |
151 |
+ openmp? ( math !mpi ) |
152 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
153 |
+ qt4? ( X ) |
154 |
+" |
155 |
+ |
156 |
+CDEPEND=" |
157 |
+ app-arch/xz-utils:0= |
158 |
+ >=dev-lang/cfortran-4.4-r2 |
159 |
+ dev-libs/libpcre:3= |
160 |
+ media-fonts/dejavu |
161 |
+ media-libs/freetype:2= |
162 |
+ media-libs/giflib:0= |
163 |
+ media-libs/libpng:0= |
164 |
+ media-libs/tiff:0= |
165 |
+ >=sys-devel/clang-3.4 |
166 |
+ sys-libs/zlib:0= |
167 |
+ virtual/jpeg:0 |
168 |
+ virtual/shadow |
169 |
+ X? ( |
170 |
+ media-libs/ftgl:0= |
171 |
+ media-libs/glew:0= |
172 |
+ x11-libs/libX11:0= |
173 |
+ x11-libs/libXext:0= |
174 |
+ x11-libs/libXpm:0= |
175 |
+ !minimal? ( |
176 |
+ opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= ) |
177 |
+ qt4? ( |
178 |
+ dev-qt/qtgui:4= |
179 |
+ dev-qt/qtopengl:4= |
180 |
+ dev-qt/qt3support:4= |
181 |
+ dev-qt/qtsvg:4= |
182 |
+ dev-qt/qtwebkit:4= |
183 |
+ dev-qt/qtxmlpatterns:4= |
184 |
+ ) |
185 |
+ x11-libs/libXft:0= |
186 |
+ ) |
187 |
+ ) |
188 |
+ !minimal? ( |
189 |
+ afs? ( net-fs/openafs ) |
190 |
+ avahi? ( net-dns/avahi:0= ) |
191 |
+ emacs? ( virtual/emacs ) |
192 |
+ fits? ( sci-libs/cfitsio:0= ) |
193 |
+ fftw? ( sci-libs/fftw:3.0= ) |
194 |
+ geocad? ( sci-libs/opencascade:= ) |
195 |
+ graphviz? ( media-gfx/graphviz:0= ) |
196 |
+ http? ( dev-libs/fcgi:0= ) |
197 |
+ kerberos? ( virtual/krb5 ) |
198 |
+ ldap? ( net-nds/openldap:0= ) |
199 |
+ math? ( |
200 |
+ sci-libs/gsl:0= |
201 |
+ sci-mathematics/unuran:0= |
202 |
+ mpi? ( virtual/mpi ) |
203 |
+ ) |
204 |
+ mysql? ( virtual/mysql ) |
205 |
+ odbc? ( || ( dev-db/libiodbc:0= dev-db/unixODBC:0= ) ) |
206 |
+ oracle? ( dev-db/oracle-instantclient-basic:0= ) |
207 |
+ postgres? ( dev-db/postgresql-base:= ) |
208 |
+ pythia6? ( sci-physics/pythia:6= ) |
209 |
+ pythia8? ( >=sci-physics/pythia-8.1.80:8= ) |
210 |
+ python? ( ${PYTHON_DEPS} ) |
211 |
+ sqlite? ( dev-db/sqlite:3= ) |
212 |
+ ssl? ( dev-libs/openssl:0= ) |
213 |
+ xml? ( dev-libs/libxml2:2= ) |
214 |
+ xrootd? ( >=net-libs/xrootd-3.3.5:0= ) |
215 |
+ )" |
216 |
+ |
217 |
+# TODO: ruby is not yet ported to ROOT-6, reenable when (if?) ready |
218 |
+# ruby? ( |
219 |
+# dev-lang/ruby |
220 |
+# dev-ruby/rubygems |
221 |
+# ) |
222 |
+# |
223 |
+# TODO: root-6.00.01 crashes with system libafterimage |
224 |
+# || ( |
225 |
+# media-libs/libafterimage:0=[gif,jpeg,png,tiff] |
226 |
+# >=x11-wm/afterstep-2.2.11:0=[gif,jpeg,png,tiff] |
227 |
+# ) |
228 |
+# --disable-builtin-afterimage |
229 |
+ |
230 |
+DEPEND="${CDEPEND} |
231 |
+ virtual/pkgconfig" |
232 |
+ |
233 |
+RDEPEND="${CDEPEND} |
234 |
+ xinetd? ( sys-apps/xinetd )" |
235 |
+ |
236 |
+PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )" |
237 |
+ |
238 |
+# install stuff in ${P} and not ${PF} for easier tracking in root-docs |
239 |
+DOC_DIR="/usr/share/doc/${P}" |
240 |
+ |
241 |
+die_compiler() { |
242 |
+ die "Need one of the following C++11 capable compilers:" |
243 |
+ die " >=sys-devel/gcc[cxx]-4.8" |
244 |
+ die " >=sys-devel/clang-3.4" |
245 |
+ die " >=dev-lang/icc-13" |
246 |
+} |
247 |
+ |
248 |
+pkg_setup() { |
249 |
+ fortran-2_pkg_setup |
250 |
+ use python && python-single-r1_pkg_setup |
251 |
+ echo |
252 |
+ elog "There are extra options on packages not yet in Gentoo:" |
253 |
+ elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite," |
254 |
+ elog "HDFS, Monalisa, MaxDB/SapDB, SRP." |
255 |
+ elog "You can use the env variable EXTRA_ECONF variable for this." |
256 |
+ elog "For example, for SRP, you would set: " |
257 |
+ elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\"" |
258 |
+ echo |
259 |
+ |
260 |
+ enewgroup rootd |
261 |
+ enewuser rootd -1 -1 /var/spool/rootd rootd |
262 |
+ |
263 |
+ use minimal && return |
264 |
+ |
265 |
+ if use math; then |
266 |
+ if use openmp; then |
267 |
+ if [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp; then |
268 |
+ ewarn "You are using a g++ without OpenMP capabilities" |
269 |
+ die "Need an OpenMP capable compiler" |
270 |
+ else |
271 |
+ export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1 |
272 |
+ fi |
273 |
+ elif use mpi; then |
274 |
+ export USE_MPI=1 USE_PARALLEL_MINUIT2=1 |
275 |
+ fi |
276 |
+ fi |
277 |
+ |
278 |
+ # check for supported compilers |
279 |
+ case $(tc-getCXX) in |
280 |
+ *g++*) |
281 |
+ if ! version_is_at_least "4.8" "$(gcc-version)"; then |
282 |
+ eerror "You are using a g++ without C++11 capabilities" |
283 |
+ die_compiler |
284 |
+ fi |
285 |
+ ;; |
286 |
+ *clang++*) |
287 |
+ # >=clang-3.4 is already in DEPEND |
288 |
+ ;; |
289 |
+ *icc*|*icpc*) |
290 |
+ if ! version_is_at_least "13" "$(has_version dev-lang/icc)"; then |
291 |
+ eerror "You are using an icc without C++11 capabilities" |
292 |
+ die_compiler |
293 |
+ fi |
294 |
+ ;; |
295 |
+ *) |
296 |
+ ewarn "You are using an unsupported compiler." |
297 |
+ ewarn "Please report any issues upstream." |
298 |
+ ;; |
299 |
+ esac |
300 |
+} |
301 |
+ |
302 |
+src_prepare() { |
303 |
+ epatch \ |
304 |
+ "${FILESDIR}"/${PN}-5.28.00b-glibc212.patch \ |
305 |
+ "${FILESDIR}"/${PN}-5.32.00-afs.patch \ |
306 |
+ "${FILESDIR}"/${PN}-5.32.00-cfitsio.patch \ |
307 |
+ "${FILESDIR}"/${PN}-5.32.00-chklib64.patch \ |
308 |
+ "${FILESDIR}"/${PN}-5.34.13-unuran.patch \ |
309 |
+ "${FILESDIR}"/${PN}-5.34.13-desktop.patch \ |
310 |
+ "${FILESDIR}"/${PN}-6.00.01-dotfont.patch \ |
311 |
+ "${FILESDIR}"/${PN}-6.00.01-nobyte-compile.patch \ |
312 |
+ "${FILESDIR}"/${PN}-6.00.01-prop-flags.patch \ |
313 |
+ "${FILESDIR}"/${PN}-6.00.01-llvm.patch \ |
314 |
+ "${FILESDIR}"/${PN}-6.00.01-geocad.patch |
315 |
+ |
316 |
+ # make sure we use system libs and headers |
317 |
+ rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die |
318 |
+ #rm -r graf2d/asimage/src/libAfterImage || die |
319 |
+ rm -r graf3d/ftgl/{inc,src} || die |
320 |
+ rm -r graf2d/freetype/src || die |
321 |
+ rm -r graf3d/glew/{inc,src} || die |
322 |
+ rm -r core/pcre/src || die |
323 |
+ rm -r math/unuran/src/unuran-*.tar.gz || die |
324 |
+ LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \ |
325 |
+ xargs -0 rm || die |
326 |
+ rm -r core/lzma/src/*.tar.gz || die |
327 |
+ rm graf3d/gl/{inc,src}/gl2ps.* || die |
328 |
+ sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \ |
329 |
+ graf3d/gl/Module.mk || die |
330 |
+ |
331 |
+ # In Gentoo, libPythia6 is called libpythia6 |
332 |
+ # iodbc is in /usr/include/iodbc |
333 |
+ # pg_config.h is checked instead of libpq-fe.h |
334 |
+ sed -i \ |
335 |
+ -e 's:libPythia6:libpythia6:g' \ |
336 |
+ -e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \ |
337 |
+ -e 's:libpq-fe.h:pg_config.h:' \ |
338 |
+ configure || die "adjusting configure for Gentoo failed" |
339 |
+ |
340 |
+ # prefixify the configure script |
341 |
+ sed -i \ |
342 |
+ -e 's:/usr:${EPREFIX}/usr:g' \ |
343 |
+ configure || die "prefixify configure failed" |
344 |
+ |
345 |
+ # CSS should use local images |
346 |
+ sed -i -e 's,http://.*/images/,,' etc/html/ROOT.css || die "html sed failed" |
347 |
+} |
348 |
+ |
349 |
+# NB: ROOT uses bundled LLVM, because it is patched and API-incompatible with |
350 |
+# system LLVM. |
351 |
+# NB: As of 6.00.0.1 cmake is not ready as it can't fully replace configure, |
352 |
+# e.g. for afs and geocad. |
353 |
+ |
354 |
+src_configure() { |
355 |
+ local -a myconf |
356 |
+ # Some compilers need special care |
357 |
+ case $(tc-getCXX) in |
358 |
+ *clang++*) |
359 |
+ myconf=( |
360 |
+ --with-clang |
361 |
+ --with-f77="$(tc-getFC)" |
362 |
+ ) |
363 |
+ ;; |
364 |
+ *icc*|*icpc*) |
365 |
+ # For icc we need to provide architecture manually |
366 |
+ # and not to tamper with tc-get* |
367 |
+ use x86 && myconf=( linuxicc ) |
368 |
+ use amd64 && myconf=( linuxx8664icc ) |
369 |
+ ;; |
370 |
+ *) # gcc goes here too |
371 |
+ myconf=( |
372 |
+ --with-cc="$(tc-getCC)" |
373 |
+ --with-cxx="$(tc-getCXX)" |
374 |
+ --with-f77="$(tc-getFC)" |
375 |
+ --with-ld="$(tc-getCXX)" |
376 |
+ ) |
377 |
+ ;; |
378 |
+ esac |
379 |
+ |
380 |
+ # the configure script is not the standard autotools |
381 |
+ myconf+=( |
382 |
+ --prefix="${EPREFIX}/usr" |
383 |
+ --etcdir="${EPREFIX}/etc/root" |
384 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${PN}" |
385 |
+ --docdir="${EPREFIX}${DOC_DIR}" |
386 |
+ --tutdir="${EPREFIX}${DOC_DIR}/examples/tutorials" |
387 |
+ --testdir="${EPREFIX}${DOC_DIR}/examples/tests" |
388 |
+ --disable-werror |
389 |
+ --nohowto |
390 |
+ ) |
391 |
+ |
392 |
+ if use minimal; then |
393 |
+ myconf+=( $(usex X --gminimal --minimal) ) |
394 |
+ else |
395 |
+ myconf+=( |
396 |
+ --with-afs-shared=yes |
397 |
+ --with-sys-iconpath="${EPREFIX}/usr/share/pixmaps" |
398 |
+ --disable-builtin-ftgl |
399 |
+ --disable-builtin-freetype |
400 |
+ --disable-builtin-glew |
401 |
+ --disable-builtin-pcre |
402 |
+ --disable-builtin-zlib |
403 |
+ --disable-builtin-lzma |
404 |
+ --enable-astiff |
405 |
+ --enable-explicitlink |
406 |
+ --enable-gdml |
407 |
+ --enable-memstat |
408 |
+ --enable-shadowpw |
409 |
+ --enable-shared |
410 |
+ --enable-soversion |
411 |
+ --enable-table |
412 |
+ --fail-on-missing |
413 |
+ $(use_enable X x11) |
414 |
+ $(use_enable X asimage) |
415 |
+ $(use_enable X xft) |
416 |
+ $(use_enable afs) |
417 |
+ $(use_enable avahi bonjour) |
418 |
+ $(use_enable fits fitsio) |
419 |
+ $(use_enable fftw fftw3) |
420 |
+ $(use_enable geocad) |
421 |
+ $(use_enable graphviz gviz) |
422 |
+ $(use_enable kerberos krb5) |
423 |
+ $(use_enable ldap) |
424 |
+ $(use_enable math genvector) |
425 |
+ $(use_enable math gsl-shared) |
426 |
+ $(use_enable math mathmore) |
427 |
+ $(use_enable math minuit2) |
428 |
+ $(use_enable math roofit) |
429 |
+ $(use_enable math tmva) |
430 |
+ $(use_enable math vc) |
431 |
+ $(use_enable math vdt) |
432 |
+ $(use_enable math unuran) |
433 |
+ $(use_enable mysql) |
434 |
+ $(use_enable odbc) |
435 |
+ $(use_enable opengl) |
436 |
+ $(use_enable oracle) |
437 |
+ $(use_enable postgres pgsql) |
438 |
+ $(usex postgres \ |
439 |
+ "--with-pgsql-incdir=$(pg_config --includedir)" "") |
440 |
+ $(use_enable prefix rpath) |
441 |
+ $(use_enable pythia6) |
442 |
+ $(use_enable pythia8) |
443 |
+ $(use_enable python) |
444 |
+ $(use_enable qt4 qt) |
445 |
+ $(use_enable qt4 qtgsi) |
446 |
+ $(use_enable sqlite) |
447 |
+ $(use_enable ssl) |
448 |
+ $(use_enable xml) |
449 |
+ $(use_enable xrootd) |
450 |
+ ${EXTRA_ECONF} |
451 |
+ ) |
452 |
+ fi |
453 |
+ |
454 |
+ ./configure ${myconf[@]} || die "configure failed" |
455 |
+} |
456 |
+ |
457 |
+src_compile() { |
458 |
+ emake \ |
459 |
+ OPT="${CXXFLAGS}" \ |
460 |
+ F77OPT="${FFLAGS}" \ |
461 |
+ ROOTSYS="${S}" \ |
462 |
+ LD_LIBRARY_PATH="${S}/lib" |
463 |
+ use emacs && ! use minimal && elisp-compile build/misc/*.el |
464 |
+} |
465 |
+ |
466 |
+daemon_install() { |
467 |
+ local daemons="rootd proofd" |
468 |
+ dodir /var/spool/rootd |
469 |
+ fowners rootd:rootd /var/spool/rootd |
470 |
+ dodir /var/spool/rootd/{pub,tmp} |
471 |
+ fperms 1777 /var/spool/rootd/{pub,tmp} |
472 |
+ |
473 |
+ for i in ${daemons}; do |
474 |
+ newinitd "${FILESDIR}"/${i}.initd ${i} |
475 |
+ newconfd "${FILESDIR}"/${i}.confd ${i} |
476 |
+ done |
477 |
+ if use xinetd; then |
478 |
+ insinto /etc/xinetd |
479 |
+ doins "${S}"/etc/daemons/{rootd,proofd}.xinetd |
480 |
+ fi |
481 |
+} |
482 |
+ |
483 |
+desktop_install() { |
484 |
+ cd "${S}" |
485 |
+ echo "Icon=root-system-bin" >> etc/root.desktop |
486 |
+ domenu etc/root.desktop |
487 |
+ doicon build/package/debian/root-system-bin.png |
488 |
+ |
489 |
+ insinto /usr/share/icons/hicolor/48x48/mimetypes |
490 |
+ doins build/package/debian/application-x-root.png |
491 |
+ |
492 |
+ insinto /usr/share/icons/hicolor/48x48/apps |
493 |
+ doicon build/package/debian/root-system-bin.xpm |
494 |
+} |
495 |
+ |
496 |
+cleanup_install() { |
497 |
+ # Cleanup of files either already distributed or unused on Gentoo |
498 |
+ pushd "${ED}" > /dev/null |
499 |
+ rm usr/share/root/fonts/LICENSE || die |
500 |
+ rm etc/root/proof/*.sample || die |
501 |
+ rm -r etc/root/daemons || die |
502 |
+ # these should be in PATH |
503 |
+ mv etc/root/proof/utils/pq2/pq2* usr/bin/ || die |
504 |
+ rm ${DOC_DIR#/}/{INSTALL,LICENSE} || die |
505 |
+ use examples || rm -r ${DOC_DIR#/}/examples || die |
506 |
+} |
507 |
+ |
508 |
+src_install() { |
509 |
+ emake DESTDIR="${D}" install |
510 |
+ dodoc README.md |
511 |
+ |
512 |
+ echo "LDPATH=${EPREFIX%/}/usr/$(get_libdir)/root" > 99root |
513 |
+ |
514 |
+ if ! use minimal; then |
515 |
+ use pythia8 && echo "PYTHIA8=${EPREFIX%/}/usr" >> 99root |
516 |
+ if use python; then |
517 |
+ echo "PYTHONPATH=${EPREFIX%/}/usr/$(get_libdir)/root" >> 99root |
518 |
+ python_optimize "${D}/usr/$(get_libdir)/root" |
519 |
+ fi |
520 |
+ use emacs && elisp-install ${PN} build/misc/*.{el,elc} |
521 |
+ if use examples; then |
522 |
+ # these should really be taken care of by the root make install |
523 |
+ insinto ${DOC_DIR}/examples/tutorials/tmva |
524 |
+ doins -r tmva/test |
525 |
+ fi |
526 |
+ fi |
527 |
+ doenvd 99root |
528 |
+ |
529 |
+ # The build system installs Emacs support unconditionally in the wrong |
530 |
+ # directory. Remove it and call elisp-install in case of USE=emacs. |
531 |
+ rm -r "${ED}"/usr/share/emacs || die |
532 |
+ |
533 |
+ daemon_install |
534 |
+ desktop_install |
535 |
+ cleanup_install |
536 |
+} |
537 |
+ |
538 |
+pkg_postinst() { |
539 |
+ fdo-mime_desktop_database_update |
540 |
+} |
541 |
+ |
542 |
+pkg_postrm() { |
543 |
+ fdo-mime_desktop_database_update |
544 |
+} |