Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/root/
Date: Mon, 03 Oct 2011 00:15:42
Message-Id: b19f6c67c55197d023d33c5f2b4378105b98cfbd.bircoph@gentoo
1 commit: b19f6c67c55197d023d33c5f2b4378105b98cfbd
2 Author: Andrew Savchenko <bircoph <AT> gmail <DOT> com>
3 AuthorDate: Mon Oct 3 00:14:20 2011 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gmail <DOT> com>
5 CommitDate: Mon Oct 3 00:14:20 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b19f6c67
7
8 sci-physics/root: version bump to 5.30.02
9
10 Patch release 5.30.02 is released.
11
12 (Portage version: 2.2.0_alpha60/git/Linux i686, unsigned Manifest commit)
13
14 ---
15 sci-physics/root/ChangeLog | 5 +
16 sci-physics/root/root-5.30.02.ebuild | 339 ++++++++++++++++++++++++++++++++++
17 2 files changed, 344 insertions(+), 0 deletions(-)
18
19 diff --git a/sci-physics/root/ChangeLog b/sci-physics/root/ChangeLog
20 index 14c6a61..77b72ad 100644
21 --- a/sci-physics/root/ChangeLog
22 +++ b/sci-physics/root/ChangeLog
23 @@ -2,6 +2,11 @@
24 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
25 # $Header: $
26
27 +*root-5.30.02 (03 Oct 2011)
28 +
29 + 03 Oct 2011; Andrew Savchenko <bircoph@×××××.com> +root-5.30.02.ebuild:
30 + Version bump for patch release.
31 +
32 *root-5.30.01 (24 Aug 2011)
33
34 24 Aug 2011; Andrew Savchenko <bircoph@×××××.com> +root-5.30.01.ebuild:
35
36 diff --git a/sci-physics/root/root-5.30.02.ebuild b/sci-physics/root/root-5.30.02.ebuild
37 new file mode 100644
38 index 0000000..452c573
39 --- /dev/null
40 +++ b/sci-physics/root/root-5.30.02.ebuild
41 @@ -0,0 +1,339 @@
42 +# Copyright 1999-2011 Gentoo Foundation
43 +# Distributed under the terms of the GNU General Public License v2
44 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/root/root-5.28.00d.ebuild,v 1.3 2011/06/21 14:31:50 jlec Exp $
45 +
46 +EAPI=3
47 +PYTHON_DEPEND="python? 2"
48 +inherit versionator eutils fortran-2 elisp-common fdo-mime python toolchain-funcs flag-o-matic
49 +
50 +#DOC_PV=$(get_major_version)_$(get_version_component_range 2)
51 +DOC_PV=5_26
52 +ROOFIT_DOC_PV=2.91-33
53 +TMVA_DOC_PV=4.03
54 +PATCH_PV=5.28.00b
55 +PATCH_PV2=5.30.00
56 +
57 +DESCRIPTION="C++ data analysis framework and interpreter from CERN"
58 +HOMEPAGE="http://root.cern.ch/"
59 +SRC_URI="ftp://root.cern.ch/${PN}/${PN}_v${PV}.source.tar.gz
60 + doc? ( ftp://root.cern.ch/${PN}/doc/Users_Guide_${DOC_PV}.pdf
61 + math? (
62 + ftp://root.cern.ch/${PN}/doc/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf
63 + http://tmva.sourceforge.net/docu/TMVAUsersGuide.pdf -> TMVAUsersGuide-v${TMVA_DOC_PV}.pdf ) )"
64 +
65 +SLOT="0"
66 +LICENSE="LGPL-2.1"
67 +KEYWORDS="~amd64 ~x86 ~amd64-linux"
68 +IUSE="+X afs avahi clarens doc emacs examples fits fftw graphviz kerberos ldap
69 + llvm +math mpi mysql ncurses odbc +opengl openmp oracle postgres prefix
70 + pythia6 pythia8 python +reflex ruby qt4 ssl xft xml xinetd xrootd"
71 +
72 +CDEPEND="app-arch/xz-utils
73 + >=dev-lang/cfortran-4.4-r2
74 + dev-libs/libpcre
75 + media-libs/freetype
76 + media-libs/giflib
77 + media-libs/libpng
78 + media-libs/tiff
79 + sys-apps/shadow
80 + sys-libs/zlib
81 + virtual/jpeg
82 + X? (
83 + media-libs/ftgl
84 + media-libs/glew
85 + x11-libs/libX11
86 + x11-libs/libXext
87 + x11-libs/libXpm
88 + || ( >=media-libs/libafterimage-1.20 >=x11-wm/afterstep-2.2.11 )
89 + opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps )
90 + qt4? ( x11-libs/qt-gui:4
91 + x11-libs/qt-opengl:4
92 + x11-libs/qt-qt3support:4
93 + x11-libs/qt-svg:4
94 + x11-libs/qt-webkit:4
95 + x11-libs/qt-xmlpatterns:4 )
96 + xft? ( x11-libs/libXft ) )
97 + afs? ( net-fs/openafs )
98 + avahi? ( net-dns/avahi )
99 + clarens? ( dev-libs/xmlrpc-c )
100 + emacs? ( virtual/emacs )
101 + fits? ( sci-libs/cfitsio )
102 + fftw? ( sci-libs/fftw:3.0 )
103 + graphviz? ( media-gfx/graphviz )
104 + kerberos? ( virtual/krb5 )
105 + ldap? ( net-nds/openldap )
106 + llvm? ( sys-devel/llvm )
107 + math? ( sci-libs/gsl sci-mathematics/unuran mpi? ( virtual/mpi ) )
108 + mysql? ( virtual/mysql )
109 + ncurses? ( sys-libs/ncurses )
110 + odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
111 + oracle? ( dev-db/oracle-instantclient-basic )
112 + postgres? ( dev-db/postgresql-base )
113 + pythia6? ( sci-physics/pythia:6 )
114 + pythia8? ( sci-physics/pythia:8 )
115 + ruby? ( dev-lang/ruby
116 + dev-ruby/rubygems )
117 + ssl? ( dev-libs/openssl )
118 + xml? ( dev-libs/libxml2 )"
119 +
120 +DEPEND="${CDEPEND}
121 + dev-util/pkgconfig"
122 +
123 +RDEPEND="
124 + virtual/fortran
125 +${CDEPEND}
126 + reflex? ( dev-cpp/gccxml )
127 + xinetd? ( sys-apps/xinetd )"
128 +
129 +S="${WORKDIR}/${PN}"
130 +
131 +pkg_setup() {
132 + fortran-2_pkg_setup
133 + elog
134 + elog "There are extra options on packages not yet in Gentoo:"
135 + elog "AliEn, castor, Chirp, dCache, gfal, gLite, Globus,"
136 + elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
137 + elog "You can use the env variable EXTRA_ECONF variable for this."
138 + elog "For example, for SRP, you would set: "
139 + elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=/usr/$(get_libdir)\""
140 + elog
141 + enewgroup rootd
142 + enewuser rootd -1 -1 /var/spool/rootd rootd
143 +
144 + if use math; then
145 + if use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp; then
146 + ewarn "You are using gcc and OpenMP is available with gcc >= 4.2"
147 + ewarn "If you want to build this package with OpenMP, abort now,"
148 + ewarn "and set CC to an OpenMP capable compiler"
149 + elif use openmp; then
150 + export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
151 + elif use mpi; then
152 + export USE_MPI=1 USE_PARALLEL_MINUIT2=1
153 + fi
154 + fi
155 +}
156 +
157 +src_prepare() {
158 + epatch \
159 + "${FILESDIR}"/${PN}-${PATCH_PV2}-xrootd-prop-flags.patch \
160 + "${FILESDIR}"/${PN}-${PATCH_PV}-prop-ldflags.patch \
161 + "${FILESDIR}"/${PN}-${PATCH_PV}-asneeded.patch \
162 + "${FILESDIR}"/${PN}-${PATCH_PV2}-nobyte-compile.patch \
163 + "${FILESDIR}"/${PN}-${PATCH_PV}-glibc212.patch \
164 + "${FILESDIR}"/${PN}-${PATCH_PV}-unuran.patch
165 +
166 + # make sure we use system libs and headers
167 + rm montecarlo/eg/inc/cfortran.h README/cfortran.doc
168 + rm -rf graf2d/asimage/src/libAfterImage
169 + rm -rf graf3d/ftgl/{inc,src}
170 + rm -rf graf2d/freetype/src
171 + rm -rf graf3d/glew/{inc,src}
172 + rm -rf core/pcre/src
173 + rm -rf math/unuran/src/unuran-*.tar.gz
174 + find core/zip -type f -name "[a-z]*" | xargs rm
175 + rm -rf core/lzma/src/*.tar.gz
176 + rm graf3d/gl/{inc,src}/gl2ps.*
177 + sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' graf3d/gl/Module.mk
178 +
179 + # TODO: unbundle xrootd as a new package
180 + #rm -rf net/xrootd/src
181 + #sed -i \
182 + # -e 's:-lXrdOuc:-lXrd &:' \
183 + # -e 's:$(XROOTDDIRL)/lib\(Xrd\w*\).a:-l\1:g' \
184 + # proof/proofd/Module.mk || die
185 +
186 + # In Gentoo, libPythia6 is called libpythia6
187 + # libungif is called libgif,
188 + # iodbc is in /usr/include/iodbc
189 + # pg_config.h is checked instead of libpq-fe.h
190 + sed -i \
191 + -e 's:libPythia6:libpythia6:g' \
192 + -e 's:ungif:gif:g' \
193 + -e 's:$ODBCINC:$ODBCINC /usr/include/iodbc:' \
194 + -e 's:libpq-fe.h:pg_config.h:' \
195 + configure || die "adjusting configure for Gentoo failed"
196 +
197 + # prefixify the configure script
198 + sed -i \
199 + -e 's:/usr:${EPREFIX}/usr:g' \
200 + configure || die "prefixify configure failed"
201 +
202 + # QTDIR only used for qt3 in gentoo, and configure looks for it.
203 + unset QTDIR
204 +}
205 +
206 +src_configure() {
207 + # the configure script is not the standard autotools
208 + ./configure \
209 + --prefix="${EPREFIX}"/usr \
210 + --etcdir="${EPREFIX}"/etc/root \
211 + --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN} \
212 + --docdir="${EPREFIX}"/usr/share/doc/${PF} \
213 + --tutdir="${EPREFIX}"/usr/share/doc/${PF}/examples/tutorials \
214 + --testdir="${EPREFIX}"/usr/share/doc/${PF}/examples/tests \
215 + --with-cc=$(tc-getCC) \
216 + --with-cxx=$(tc-getCXX) \
217 + --with-f77=$(tc-getFC) \
218 + --with-sys-iconpath="${EPREFIX}"/usr/share/pixmaps \
219 + --disable-builtin-afterimage \
220 + --disable-builtin-freetype \
221 + --disable-builtin-ftgl \
222 + --disable-builtin-glew \
223 + --disable-builtin-pcre \
224 + --disable-builtin-zlib \
225 + --disable-builtin-lzma \
226 + --enable-astiff \
227 + --enable-exceptions \
228 + --enable-explicitlink \
229 + --enable-gdml \
230 + --enable-memstat \
231 + --enable-shadowpw \
232 + --enable-shared \
233 + --enable-soversion \
234 + --enable-table \
235 + --fail-on-missing \
236 + --with-afs-shared=yes \
237 + $(use_enable X x11) \
238 + $(use_enable X asimage) \
239 + $(use_enable afs) \
240 + $(use_enable avahi bonjour) \
241 + $(use_enable clarens) \
242 + $(use_enable clarens peac) \
243 + $(use_enable ncurses editline) \
244 + $(use_enable fits fitsio) \
245 + $(use_enable fftw fftw3) \
246 + $(use_enable graphviz gviz) \
247 + $(use_enable kerberos krb5) \
248 + $(use_enable ldap) \
249 + $(use_enable llvm cling) \
250 + $(use_enable math gsl-shared) \
251 + $(use_enable math genvector) \
252 + $(use_enable math mathmore) \
253 + $(use_enable math minuit2) \
254 + $(use_enable math roofit) \
255 + $(use_enable math tmva) \
256 + $(use_enable math unuran) \
257 + $(use_enable mysql) \
258 + $(use_enable odbc) \
259 + $(use_enable opengl) \
260 + $(use_enable postgres pgsql) \
261 + $(use_enable prefix rpath) \
262 + $(use_enable pythia6) \
263 + $(use_enable pythia8) \
264 + $(use_enable python) \
265 + $(use_enable qt4 qt) \
266 + $(use_enable qt4 qtgsi) \
267 + $(use_enable reflex cintex) \
268 + $(use_enable reflex) \
269 + $(use_enable ruby) \
270 + $(use_enable ssl) \
271 + $(use_enable xft) \
272 + $(use_enable xml) \
273 + $(use_enable xrootd) \
274 + ${EXTRA_ECONF} \
275 + || die "configure failed"
276 +}
277 +
278 +src_compile() {
279 + emake OPT="${CFLAGS}" F77OPT="${FFLAGS}" || die "emake failed"
280 + if use emacs; then
281 + elisp-compile build/misc/*.el || die "elisp-compile failed"
282 + fi
283 +}
284 +
285 +doc_install() {
286 + cd "${S}"
287 + if use doc; then
288 + einfo "Installing user's guides"
289 + dodoc "${DISTDIR}"/Users_Guide_${DOC_PV}.pdf
290 + use math && dodoc \
291 + "${DISTDIR}"/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf \
292 + "${DISTDIR}"/TMVAUsersGuide-v${TMVA_DOC_PV}.pdf
293 + fi
294 +
295 + if use examples; then
296 + # these should really be taken care of by the root make install
297 + insinto /usr/share/doc/${PF}/examples/tutorials/tmva
298 + doins -r tmva/test
299 + else
300 + rm -rf "${ED}"/usr/share/doc/${PF}/examples
301 + fi
302 +}
303 +
304 +daemon_install() {
305 + cd "${S}"
306 + local daemons="rootd proofd"
307 + dodir /var/spool/rootd
308 + fowners rootd:rootd /var/spool/rootd
309 + dodir /var/spool/rootd/{pub,tmp}
310 + fperms 1777 /var/spool/rootd/{pub,tmp}
311 +
312 + use xrootd && daemons="${daemons} xrootd olbd"
313 + for i in ${daemons}; do
314 + newinitd "${FILESDIR}"/${i}.initd ${i}
315 + newconfd "${FILESDIR}"/${i}.confd ${i}
316 + done
317 + if use xinetd; then
318 + insinto /etc/xinetd
319 + doins etc/daemons/{rootd,proofd}.xinetd
320 + fi
321 +}
322 +
323 +desktop_install() {
324 + cd "${S}"
325 + sed -e 's,@prefix@,/usr,' \
326 + build/package/debian/root-system-bin.desktop.in > root.desktop
327 + domenu root.desktop
328 + doicon "${S}"/build/package/debian/root-system-bin.png
329 +
330 + insinto /usr/share/icons/hicolor/48x48/mimetypes
331 + doins build/package/debian/application-x-root.png
332 +
333 + insinto /usr/share/icons/hicolor/48x48/apps
334 + doicon build/package/debian/root-system-bin.xpm
335 +}
336 +
337 +src_install() {
338 + emake DESTDIR="${D}" install || die "emake install failed"
339 +
340 + echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/root" > 99root
341 + use pythia8 && echo "PYTHIA8=${EPREFIX}/usr" >> 99root
342 + use python && echo "PYTHONPATH=${EPREFIX}/usr/$(get_libdir)/root" >> 99root
343 + use ruby && echo "RUBYLIB=${EPREFIX}/usr/$(get_libdir)/root" >> 99root
344 + doenvd 99root || die "doenvd failed"
345 +
346 + # The build system installs Emacs support unconditionally and in the wrong
347 + # directory. Remove it and call elisp-install in case of USE=emacs.
348 + rm -rf "${ED}"/usr/share/emacs
349 + if use emacs; then
350 + elisp-install ${PN} build/misc/*.{el,elc} || die "elisp-install failed"
351 + fi
352 +
353 + doc_install
354 + daemon_install
355 + desktop_install
356 +
357 + # Cleanup of files either already distributed or unused on Gentoo
358 + rm "${ED}"usr/share/doc/${PF}/{INSTALL,LICENSE,COPYING.CINT}
359 + rm "${ED}"usr/share/root/fonts/LICENSE
360 + pushd "${ED}"usr/$(get_libdir)/root/cint/cint/lib > /dev/null
361 + rm -f posix/mktypes dll_stl/setup \
362 + G__* dll_stl/G__* dll_stl/rootcint_* posix/exten.o
363 + rm -f "${ED}"usr/$(get_libdir)/root/cint/cint/include/makehpib
364 + rm -f "${ED}"/etc/root/proof/*.sample
365 + rm -rf "${ED}"/etc/root/daemons
366 + popd > /dev/null
367 + # these should be in PATH
368 + mv "${ED}"usr/share/root/proof/utils/pq2/pq2* \
369 + "${ED}"usr/bin
370 +}
371 +
372 +pkg_postinst() {
373 + fdo-mime_desktop_database_update
374 + use python && python_mod_optimize /usr/$(get_libdir)/root
375 +}
376 +
377 +pkg_postrm() {
378 + fdo-mime_desktop_database_update
379 + use python && python_mod_cleanup /usr/$(get_libdir)/root
380 +}