summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2008-09-08 23:43:20 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2008-09-08 23:43:20 +0000
commit3792f295f05d092de6d4fe402f5166f52e15a487 (patch)
treebbc953f105206a883b92adfd12ed2aff93ce755a /sci-physics
parent(#237091) Pull in the latest versions of X libraries and protocol headers so ... (diff)
downloadgentoo-2-3792f295f05d092de6d4fe402f5166f52e15a487.tar.gz
gentoo-2-3792f295f05d092de6d4fe402f5166f52e15a487.tar.bz2
gentoo-2-3792f295f05d092de6d4fe402f5166f52e15a487.zip
pythia:6, added more examples, some cleaning. pythia:8, added HepMC support, respect flags, better testing, cleaning.
(Portage version: 2.2_rc8/cvs/Linux 2.6.23-gentoo-r9 x86_64)
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/pythia/ChangeLog9
-rw-r--r--sci-physics/pythia/metadata.xml4
-rw-r--r--sci-physics/pythia/pythia-6.4.18.ebuild29
-rw-r--r--sci-physics/pythia/pythia-8.1.08-r1.ebuild72
4 files changed, 98 insertions, 16 deletions
diff --git a/sci-physics/pythia/ChangeLog b/sci-physics/pythia/ChangeLog
index 3e13966aa672..47c4c75b319f 100644
--- a/sci-physics/pythia/ChangeLog
+++ b/sci-physics/pythia/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-physics/pythia
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/ChangeLog,v 1.1 2008/09/02 08:41:08 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/ChangeLog,v 1.2 2008/09/08 23:43:20 bicatali Exp $
+
+*pythia-8.1.08-r1 (07 Sep 2008)
+
+ 07 Sep 2008; Sébastien Fabbro <bicatali@gentoo.org> metadata.xml,
+ pythia-6.4.18.ebuild, +pythia-8.1.08-r1.ebuild:
+ pythia:6, added more examples, some cleaning. pythia:8, added HepMC
+ support, respect flags, better testing, cleaning.
*pythia-8.1.08 (02 Sep 2008)
*pythia-6.4.18 (02 Sep 2008)
diff --git a/sci-physics/pythia/metadata.xml b/sci-physics/pythia/metadata.xml
index f983ccba9a5b..4e28dbdc4185 100644
--- a/sci-physics/pythia/metadata.xml
+++ b/sci-physics/pythia/metadata.xml
@@ -13,4 +13,8 @@
but also borrows many formulae and other knowledge from the
literature.
</longdescription>
+<use>
+ <flag name='hepmc'>Adds support for High Energy Physics Monte Carlo
+ Generators <pkg>sci-physics/hepmc</pkg></flag>
+</use>
</pkgmetadata>
diff --git a/sci-physics/pythia/pythia-6.4.18.ebuild b/sci-physics/pythia/pythia-6.4.18.ebuild
index f8dde255532d..6fe072c17bb0 100644
--- a/sci-physics/pythia/pythia-6.4.18.ebuild
+++ b/sci-physics/pythia/pythia-6.4.18.ebuild
@@ -1,32 +1,34 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/pythia-6.4.18.ebuild,v 1.1 2008/09/02 08:41:08 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/pythia-6.4.18.ebuild,v 1.2 2008/09/08 23:43:20 bicatali Exp $
inherit fortran versionator autotools
MV=$(get_major_version)
MY_PN=${PN}${MV}
+DOC_PV=0613
DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
HOMEPAGE="http://projects.hepforge.org/pythia6/"
# pythia6 from root is needed for some files to interface pythia6 with root
SRC_URI="http://www.hepforge.org/archive/${MY_PN}/${P}.f.gz
- ftp://root.cern.ch/root/pythia6.tar.gz
http://www.hepforge.org/archive/${MY_PN}/update_notes-${PV}.txt
- doc? ( http://home.thep.lu.se/~torbjorn/pythia/lutp0613man2.pdf
- http://home.thep.lu.se/~torbjorn/pythia/main60.f )"
+ ftp://root.cern.ch/root/pythia6.tar.gz
+ doc? ( http://home.thep.lu.se/~torbjorn/pythia/lutp${DOC_PV}man2.pdf )
+ examples? ( mirror://gentoo/${P}-examples.tar.bz2 )"
LICENSE="public-domain"
SLOT="6"
KEYWORDS="~amd64 ~sparc ~x86"
-IUSE="doc"
+IUSE="doc examples"
DEPEND=""
S="${WORKDIR}"
FORTRAN="gfortran ifc g77"
+S="${WORKDIR}"
src_unpack() {
unpack ${A}
cat > configure.ac <<-EOF
@@ -40,8 +42,8 @@ src_unpack() {
cat > Makefile.am <<-EOF
lib_LTLIBRARIES = lib${MY_PN}.la
lib${MY_PN}_la_SOURCES = ${P}.f \
- = pythia6/tpythia6_called_from_cc.F \
- = pythia6/pythia6_common_address.c
+ pythia6/tpythia6_called_from_cc.F \
+ pythia6/pythia6_common_address.c
EOF
eautoreconf
}
@@ -49,14 +51,11 @@ src_unpack() {
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc "${DISTDIR}"/update_notes-${PV}.txt
+ insinto /usr/share/doc/${PF}/
if use doc; then
- insinto /usr/share/doc/${PF}/
- doins "${DISTDIR}"/{lutp0613man2.pdf,main60.f} || die
+ doins "${DISTDIR}"/lutp${DOC_PV}man2.pdf || die
+ fi
+ if use examples; then
+ doins -r examples || die
fi
-}
-
-pkg_postinst() {
- elog "pythia-6 ebuild is still under development."
- elog "Help us improve the ebuild in:"
- elog "http://bugs.gentoo.org/show_bug.cgi?id=231484"
}
diff --git a/sci-physics/pythia/pythia-8.1.08-r1.ebuild b/sci-physics/pythia/pythia-8.1.08-r1.ebuild
new file mode 100644
index 000000000000..ce98d2715c99
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.1.08-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/pythia-8.1.08-r1.ebuild,v 1.1 2008/09/08 23:43:20 bicatali Exp $
+
+EAPI=1
+
+inherit versionator multilib
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://home.thep.lu.se/~torbjorn/Pythia.html"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="8"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="doc examples +hepmc"
+
+DEPEND="hepmc? ( sci-physics/hepmc )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ use hepmc && export HEPMCVERSION=2 HEPMCLOCATION=/usr
+ # homemade configure script creates a useless config.mk
+ rm -f config.mk && touch config.mk
+ emake SHAREDLIBS=yes || die "emake failed"
+}
+
+src_test() {
+ cd "${S}"/examples
+ # use emake for parallel instead of long runmains
+ emake \
+ $(ls main0{1..9}*.cc main1{0..5}*.cc | sed -e 's/.cc//') \
+ || die "emake tests failed"
+ for i in main0{1..9}*.exe main1{0..5}*.exe; do
+ ./${i} > ${i}.out || die "test ${i} failed"
+ done
+ if use hepmc; then
+ emake main31 main32 || die "emake tests for hepmc failed"
+ ./main31.exe > main31.exe.out || die
+ ./main32.exe main32.cmnd hepmcout32.dat > main32.exe.out || die
+ fi
+ emake clean && rm -f main*out
+}
+
+src_install() {
+ dolib.so lib/*so || die "shared lib install failed"
+ dolib.a lib/archive/* || die "static lib install failed"
+
+ insinto /usr/include/${PN}
+ doins include/* || die "headers install failed"
+
+ # xmldoc needed by root
+ insinto /usr/share/${PN}
+ doins -r xmldoc || die "xmldoc install failed"
+ echo PYTHIA8DATA=/usr/share/${PN}/xmldoc >> 99pythia8
+ doenvd 99pythia8
+
+ insinto /usr/share/doc/${PF}
+ dodoc GUIDELINES AUTHORS README
+ if use doc; then
+ doins worksheet.pdf || die "doc install failed"
+ mv htmldoc html
+ doins -r html || die "html doc install failed"
+ fi
+ if use examples; then
+ doins -r examples || die "examples install failed"
+ fi
+}