summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2008-09-23 13:02:13 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2008-09-23 13:02:13 +0000
commitfc16c5e487c3718d933cba26481d5e869f492261 (patch)
treed8a42daca987058e628654e173510b25b5f79f01
parentBump to RC2 of OpenOffice.org 3.0 (diff)
downloadgentoo-2-fc16c5e487c3718d933cba26481d5e869f492261.tar.gz
gentoo-2-fc16c5e487c3718d933cba26481d5e869f492261.tar.bz2
gentoo-2-fc16c5e487c3718d933cba26481d5e869f492261.zip
Added a bunch of patches from Benjamin Bannier for Pythia libraries
(bug #230673), ruby name changes (bug #236072), opengl include files (bug #236071), extra documentation (bug #236070). Also added a reflex flag to enable users encountering bug #233698, some emacs changes thanks to ulm. Finally, added some patches from upstream documented in http://root.cern.ch/twiki/bin/view/ROOT/PatchesV5-20-00. (Portage version: 2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 x86_64)
-rw-r--r--sci-physics/root/ChangeLog14
-rw-r--r--sci-physics/root/files/root-5.20.00-include-defines-file.patch7
-rw-r--r--sci-physics/root/files/root-5.20.00-upstream.patch147
-rw-r--r--sci-physics/root/metadata.xml11
-rw-r--r--sci-physics/root/root-5.20.00-r1.ebuild246
5 files changed, 424 insertions, 1 deletions
diff --git a/sci-physics/root/ChangeLog b/sci-physics/root/ChangeLog
index 73d63a5b7f1c..eab6c561c7f4 100644
--- a/sci-physics/root/ChangeLog
+++ b/sci-physics/root/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sci-physics/root
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/root/ChangeLog,v 1.33 2008/07/29 10:43:53 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/root/ChangeLog,v 1.34 2008/09/23 13:02:13 bicatali Exp $
+
+*root-5.20.00-r1 (23 Sep 2008)
+
+ 23 Sep 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/root-5.20.00-include-defines-file.patch,
+ +files/root-5.20.00-upstream.patch, +root-5.20.00-r1.ebuild:
+ Added a bunch of patches from Benjamin Bannier for Pythia libraries (bug
+ #230673), ruby name changes (bug #236072), opengl include files (bug
+ #236071), extra documentation (bug #236070). Also added a reflex flag to
+ enable users encountering bug #233698, some emacs changes thanks to ulm.
+ Finally, added some patches from upstream documented in
+ http://root.cern.ch/twiki/bin/view/ROOT/PatchesV5-20-00.
29 Jul 2008; Sébastien Fabbro <bicatali@gentoo.org> metadata.xml,
root-5.18.00d.ebuild, root-5.20.00.ebuild:
diff --git a/sci-physics/root/files/root-5.20.00-include-defines-file.patch b/sci-physics/root/files/root-5.20.00-include-defines-file.patch
new file mode 100644
index 000000000000..60dfb9bbc373
--- /dev/null
+++ b/sci-physics/root/files/root-5.20.00-include-defines-file.patch
@@ -0,0 +1,7 @@
+--- graf3d/gl/src/TGLFontManager.cxx.orig
++++ graf3d/gl/src/TGLFontManager.cxx
+@@ -1,3 +1,4 @@
++#include "RConfigure.h"
+ #include "TGLFontManager.h"
+
+ #include "TSystem.h"
diff --git a/sci-physics/root/files/root-5.20.00-upstream.patch b/sci-physics/root/files/root-5.20.00-upstream.patch
new file mode 100644
index 000000000000..2abb74e8dcea
--- /dev/null
+++ b/sci-physics/root/files/root-5.20.00-upstream.patch
@@ -0,0 +1,147 @@
+--- root.orig/core/base/src/TSystem.cxx 2008-09-23 10:49:37.231691313 +0100
++++ root/core/base/src/TSystem.cxx 2008-09-23 10:41:11.373018362 +0100
+@@ -49,6 +49,7 @@
+ #include "TUrl.h"
+ #include "TVirtualMutex.h"
+ #include "compiledata.h"
++#include "RConfigure.h"
+
+ const char *gRootDir;
+ const char *gProgName;
+--- root.orig/core/meta/src/TClass.cxx 2008-09-23 10:49:33.755717294 +0100
++++ root/core/meta/src/TClass.cxx 2008-09-23 10:41:09.145105805 +0100
+@@ -3677,14 +3677,14 @@
+
+ Int_t pos = b.Length();
+
+- b.ReadString(s, maxsize);
+- while (strlen(s)==maxsize) {
++ b.ReadString(s, maxsize); // Reads at most maxsize - 1 characters, plus null at end.
++ while (strlen(s) == (maxsize - 1)) {
+ // The classname is too large, try again with a large buffer.
+ b.SetBufferOffset(pos);
+ maxsize = 2*maxsize;
+ delete [] s;
+ s = new char[maxsize];
+- b.ReadString(s, maxsize);
++ b.ReadString(s, maxsize); // Reads at most maxsize - 1 characters, plus null at end.
+ }
+
+ TClass *cl = TClass::GetClass(s, kTRUE);
+--- root.orig/hist/hist/inc/TF1.h 2008-09-23 10:50:43.230340286 +0100
++++ root/hist/hist/inc/TF1.h 2008-09-23 10:42:51.748812440 +0100
+@@ -201,8 +201,8 @@
+ virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const;
+ virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0);
+ // for using TF1 as a callable object (functor)
+- virtual Double_t operator()(Double_t x, Double_t y=0, Double_t z = 0, Double_t t = 0) const { return Eval(x,y,z,t); }
+- virtual Double_t operator()(const Double_t *x, const Double_t *params=0) { return EvalPar(x,params); }
++ virtual Double_t operator()(Double_t x, Double_t y=0, Double_t z = 0, Double_t t = 0) const;
++ virtual Double_t operator()(const Double_t *x, const Double_t *params=0);
+ virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
+ virtual void FixParameter(Int_t ipar, Double_t value);
+ Double_t GetChisquare() const {return fChisquare;}
+@@ -294,6 +294,15 @@
+ ClassDef(TF1,7) //The Parametric 1-D function
+ };
+
++inline Double_t TF1::operator()(Double_t x, Double_t y, Double_t z, Double_t t) const
++ { return Eval(x,y,z,t); }
++inline Double_t TF1::operator()(const Double_t *x, const Double_t *params)
++ {
++ if (fMethodCall) InitArgs(x,params);
++ return EvalPar(x,params);
++ }
++
++
+ inline void TF1::SetRange(Double_t xmin, Double_t, Double_t xmax, Double_t)
+ { TF1::SetRange(xmin, xmax); }
+ inline void TF1::SetRange(Double_t xmin, Double_t, Double_t, Double_t xmax, Double_t, Double_t)
+--- root.orig/tree/tree/src/TBasket.cxx 2008-09-23 10:50:20.366811302 +0100
++++ root/tree/tree/src/TBasket.cxx 2008-09-23 10:42:14.515788582 +0100
+@@ -612,13 +612,10 @@
+ TDirectory::TContext ctxt(0);
+ TFile *file = fBranch->GetFile(kWrite);
+ if (!file) return 0;
+-
+- fBranch->GetDirectory()->cd();
+ if (!file->IsWritable()) {
+ return -1;
+ }
+-
+- fMotherDir = fBranch->GetDirectory();
++ fMotherDir = file; // fBranch->GetDirectory();
+
+ if (fBufferRef->TestBit(TBufferFile::kNotDecompressed)) {
+ // Read the basket information that was saved inside the buffer.
+@@ -632,7 +629,7 @@
+
+ fBuffer = fBufferRef->Buffer();
+
+- Create(nout);
++ Create(nout,file);
+ fBufferRef->SetBufferOffset(0);
+ fHeaderOnly = kTRUE;
+
+@@ -683,7 +680,7 @@
+ nout = fObjlen;
+ delete [] fBuffer;
+ fBuffer = fBufferRef->Buffer();
+- Create(fObjlen);
++ Create(fObjlen,file);
+ fBufferRef->SetBufferOffset(0);
+
+ Streamer(*fBufferRef); //write key itself again
+@@ -699,7 +696,7 @@
+ nzip += kMAXBUF;
+ }
+ nout = noutot;
+- Create(noutot);
++ Create(noutot,file);
+ fBufferRef->SetBufferOffset(0);
+
+ Streamer(*fBufferRef); //write key itself again
+@@ -707,7 +704,7 @@
+ delete fBufferRef; fBufferRef = 0;
+ } else {
+ fBuffer = fBufferRef->Buffer();
+- Create(fObjlen);
++ Create(fObjlen,file);
+ fBufferRef->SetBufferOffset(0);
+
+ Streamer(*fBufferRef); //write key itself again
+--- root.orig/tree/tree/src/TBranch.cxx 2008-09-23 10:50:20.358811302 +0100
++++ root/tree/tree/src/TBranch.cxx 2008-09-23 10:42:14.511788861 +0100
+@@ -2071,7 +2071,8 @@
+ fBasketBytes[where] = basket->GetNbytes();
+ fBasketSeek[where] = basket->GetSeekKey();
+ Int_t addbytes = basket->GetObjlen() + basket->GetKeylen() ;
+- if (fDirectory && (fDirectory != gROOT) && fDirectory->IsWritable()) {
++ if (nout>0) {
++ // The Basket was written so we can now safely drop it.
+ basket->DropBuffers();
+ delete basket;
+ fBaskets[where] = 0;
+--- root.orig/tree/tree/src/TTreeSQL.cxx 2008-09-23 10:50:20.346811581 +0100
++++ root/tree/tree/src/TTreeSQL.cxx 2008-09-23 10:42:14.375798639 +0100
+@@ -180,6 +180,11 @@
+ // Check if the basket is properly setup
+
+ TBasketSQL * basket = (TBasketSQL *)branch->GetBasket(0);
++
++ if (basket==0) {
++ basket = (TBasketSQL*)CreateBasket(branch);
++ branch->GetListOfBaskets()->AddAtAndExpand(basket,0);
++ }
+ TBuffer * buffer = basket->GetBufferRef();
+
+ if(buffer == 0){
+@@ -399,6 +404,8 @@
+
+ br->SetEntries(fEntries);
+
++ br->GetListOfBaskets()->AddAtAndExpand(CreateBasket(br),0);
++
+ prevBranch = branchName;
+ decl = "";
+ }
diff --git a/sci-physics/root/metadata.xml b/sci-physics/root/metadata.xml
index 7726888bd779..f935f0d30a12 100644
--- a/sci-physics/root/metadata.xml
+++ b/sci-physics/root/metadata.xml
@@ -43,6 +43,17 @@
distribution modeling, and the Universal Non-Uniform RANdom number
generators (UNURAN) library.
</flag>
+ <flag name="pythia6">
+ Builds the interface to Pythia-6 (<pkg>sci-physics/pythia</pkg>)
+ high energy physics generation events library.
+ </flag>
+ <flag name="pythia8">
+ Builds the interface to Pythia-8 (<pkg>sci-physics/pythia</pkg>)
+ high energy physics generation events library.
+ </flag>
+ <flag name="reflex">
+ Builds the reflection database for the C++ interpretor.
+ </flag>
<flag name="xrootd">
Build the xrootd low latency file server. For more on the eXtended Request
Daemon (xrd) and associated software, please see
diff --git a/sci-physics/root/root-5.20.00-r1.ebuild b/sci-physics/root/root-5.20.00-r1.ebuild
new file mode 100644
index 000000000000..3ae299c70c0f
--- /dev/null
+++ b/sci-physics/root/root-5.20.00-r1.ebuild
@@ -0,0 +1,246 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/root/root-5.20.00-r1.ebuild,v 1.1 2008/09/23 13:02:13 bicatali Exp $
+
+EAPI=1
+inherit versionator eutils toolchain-funcs qt4 fortran elisp-common
+
+DOC_PV=$(get_major_version)_$(get_version_component_range 2)
+ROOFIT_DOC_PV=2.07-29
+TMVA_DOC_PV=4
+
+DESCRIPTION="C++ data analysis framework and interpreter from CERN"
+SRC_URI="ftp://root.cern.ch/${PN}/${PN}_v${PV}.source.tar.gz
+ doc? ( ftp://root.cern.ch/root/doc/Users_Guide_${DOC_PV}.pdf
+ ftp://root.cern.ch/root/doc/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf
+ http://tmva.sourceforge.net/docu/TMVAUsersGuide_v${TMVA_DOC_PV}.pdf )"
+
+HOMEPAGE="http://root.cern.ch/"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86"
+
+IUSE="afs cern clarens doc emacs fftw geant4 kerberos ldap +math mysql odbc
+ oracle postgres pythia6 pythia8 python +reflex ruby qt4 ssl xml xrootd"
+
+# libafterimage ignored, may be re-install for >=5.20
+# see https://savannah.cern.ch/bugs/?func=detailitem&item_id=30944
+# || ( >=media-libs/libafterimage-1.15 x11-wm/afterstep )
+RDEPEND="sys-apps/shadow
+ dev-libs/libpcre
+ x11-libs/libXpm
+ x11-libs/libXft
+ media-libs/ftgl
+ media-libs/libpng
+ media-libs/jpeg
+ media-libs/giflib
+ media-libs/tiff
+ virtual/opengl
+ virtual/glu
+ afs? ( >=net-fs/openafs-1.4.7 )
+ clarens? ( dev-libs/xmlrpc-c )
+ emacs? ( virtual/emacs )
+ fftw? ( sci-libs/fftw:3.0 )
+ geant4? ( sci-physics/geant:4 )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ math? ( >=sci-libs/gsl-1.8 )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ postgres? ( virtual/postgresql-server )
+ pythia6? ( sci-physics/pythia:6 )
+ pythia8? ( sci-physics/pythia:8 )
+ python? ( dev-lang/python )
+ qt4? ( || ( ( x11-libs/qt-gui:4
+ x11-libs/qt-opengl:4
+ x11-libs/qt-qt3support:4
+ x11-libs/qt-xmlpatterns:4 )
+ =x11-libs/qt-4.3* ) )
+ ruby? ( dev-lang/ruby )
+ ssl? ( dev-libs/openssl )
+ xml? ( dev-libs/libxml2 )"
+
+DEPEND="${RDEPEND}
+ cern? ( dev-lang/cfortran )
+ dev-util/pkgconfig"
+
+S="${WORKDIR}/${PN}"
+
+QT4_BUILT_WITH_USE_CHECK="qt3support opengl"
+
+pkg_setup() {
+ elog
+ elog "You may want to build ROOT with these non Gentoo extra packages:"
+ elog "AliEn, castor, Chirp, gfal, gLite, Globus, Monalisa, SapDB, SRP."
+ elog "You can use the env variable EXTRA_ECONF variable for this."
+ elog "For example, for SRP, you would set: "
+ elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=/usr/$(get_libdir)\""
+ elog
+ epause 3
+ if use cern; then
+ FORTRAN="gfortran g77 ifc"
+ fortran_pkg_setup
+ else
+ FORTRANC=
+ FFLAGS=
+ fi
+ use qt4 && qt4_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-pic.patch
+ # root bug; reported at https://savannah.cern.ch/bugs/?40816, fixed in svn
+ epatch "${FILESDIR}"/${P}-include-defines-file.patch
+ # various patches from upstream branch
+ epatch "${FILESDIR}"/${P}-upstream.patch
+
+ # use system cfortran
+ if use cern; then
+ rm -f include/root/cfortran.h
+ ln -s /usr/include/cfortran.h include/cfortran.h
+ fi
+ # take a more descriptive name for ruby libs
+ sed -i \
+ -e 's/libRuby/libRubyROOT/g' \
+ bindings/ruby/Module.mk bindings/ruby/src/drr.cxx \
+ || die "Ajusting ruby libname failed"
+
+ # libPythia6 is called libpythia6 in gentoo
+ sed -i -e 's/libPythia6/libpythia6/g' \
+ configure || die "Adjust libpythia6 name failed"
+}
+
+src_compile() {
+
+ local target
+ if [[ "$(tc-getCXX)" == ic* ]]; then
+ if use amd64; then
+ target=linuxx8664icc
+ elif use x86; then
+ target=linuxicc
+ fi
+ fi
+
+ local myconf
+ use postgres && \
+ myconf="${myconf} --with-pgsql-incdir=/usr/include/postgresql"
+
+ use qt4 && \
+ myconf="${myconf} --with-qt-incdir=/usr/include/qt4" && \
+ myconf="${myconf} --with-qt-libdir=/usr/$(get_libdir)/qt4"
+
+ use geant4 && \
+ myconf="${myconf} --with-clhep-incdir=/usr/include" && \
+ myconf="${myconf} --with-g4-libdir=${G4LIB}"
+
+ use odbc && [[ -z $(type -P odbc-config) ]] && \
+ myconf="${myconf} --with-odbc-incdir=/usr/include/iodbc"
+
+ use pythia6 && \
+ myconf="${myconf} --enable-pythia6" && \
+ myconf="${myconf} --with-pythia6-libdir=/usr/$(get_libdir)"
+
+ use pythia8 && \
+ myconf="${myconf} --enable-pythia8" && \
+ myconf="${myconf} --with-pythia8-incdir=/usr/include/pythia"
+
+ # the configure script is not the standard autotools
+ ./configure \
+ ${target} \
+ --fail-on-missing \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --docdir=/usr/share/doc/${PF} \
+ --with-sys-iconpath=/usr/share/pixmaps \
+ --with-f77="${FORTRANC} ${FFLAGS}" \
+ --with-cc="$(tc-getCC) ${CFLAGS}" \
+ --with-cxx="$(tc-getCXX) ${CXXFLAGS}" \
+ --disable-builtin-afterimage \
+ --disable-builtin-freetype \
+ --disable-builtin-ftgl \
+ --disable-builtin-pcre \
+ --disable-builtin-zlib \
+ --enable-asimage \
+ --enable-astiff \
+ --enable-exceptions \
+ --enable-explicitlink \
+ --enable-gdml \
+ --enable-memstat \
+ --enable-opengl \
+ --enable-shadowpw \
+ --enable-shared \
+ --enable-soversion \
+ --enable-table \
+ ${myconf} \
+ $(use_enable afs) \
+ $(use_enable clarens) \
+ $(use_enable clarens peac) \
+ $(use_enable fftw fftw3) \
+ $(use_enable geant4 g4root) \
+ $(use_enable kerberos krb5) \
+ $(use_enable ldap) \
+ $(use_enable math gsl-shared) \
+ $(use_enable math genvector) \
+ $(use_enable math mathmore) \
+ $(use_enable math minuit2) \
+ $(use_enable math roofit) \
+ $(use_enable math unuran) \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(use_enable postgres pgsql) \
+ $(use_enable python) \
+ $(use_enable qt4 qt) \
+ $(use_enable qt4 qtgsi) \
+ $(use_enable reflex cintex) \
+ $(use_enable reflex) \
+ $(use_enable ruby) \
+ $(use_enable ssl) \
+ $(use_enable xml) \
+ $(use_enable xrootd) \
+ ${EXTRA_ECONF} \
+ || die "configure failed"
+
+ emake || die "emake failed"
+ emake cintdlls || die "emake cintdlls failed"
+ if use emacs; then
+ elisp-compile build/misc/*.el || die "elisp-compile failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ echo "LDPATH=/usr/$(get_libdir)/root" > 99root
+ use pythia8 && echo "PYTHIA8=/usr" >> 99root
+ use python && echo "PYTHONPATH=/usr/$(get_libdir)/root" >> 99root
+ use ruby && echo "RUBYLIB=/usr/$(get_libdir)/root" >> 99root
+ doenvd 99root || die "doenvd failed"
+
+ # The build system installs Emacs support unconditionally and in the wrong
+ # directory. Remove it and call elisp-install in case of USE=emacs.
+ rm -rf "${D}"/usr/share/emacs
+ if use emacs; then
+ elisp-install ${PN} build/misc/*.{el,elc} || die "elisp-install failed"
+ fi
+
+ if use doc; then
+ einfo "Installing user's guides"
+ insinto /usr/share/doc/${PF}
+ doins \
+ "${DISTDIR}"/Users_Guide_${DOC_PV}.pdf \
+ "${DISTDIR}"/TMVAUsersGuide_v${TMVA_DOC_PV}.pdf \
+ || die "pdf install failed"
+ if use math; then
+ doins "${DISTDIR}"/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf \
+ || die "math doc install failed"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ use ruby && elog "ROOT Ruby module is available as libRubyROOT"
+}