diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-physics/pythia/pythia-8.1.86-r1.ebuild | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-physics/pythia/pythia-8.1.86-r1.ebuild')
-rw-r--r-- | sci-physics/pythia/pythia-8.1.86-r1.ebuild | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/sci-physics/pythia/pythia-8.1.86-r1.ebuild b/sci-physics/pythia/pythia-8.1.86-r1.ebuild new file mode 100644 index 000000000000..bfaafd213f52 --- /dev/null +++ b/sci-physics/pythia/pythia-8.1.86-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils versionator toolchain-funcs multilib + +MV=$(get_major_version) +MY_P=${PN}$(replace_all_version_separators "" ${PV}) + +DESCRIPTION="Lund Monte Carlo high-energy physics event generator" +HOMEPAGE="http://pythia8.hepforge.org/" +SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz" + +SLOT="8" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples gzip +hepmc static-libs" + +DEPEND=" + gzip? ( dev-libs/boost sys-libs/zlib ) + hepmc? ( sci-physics/hepmc:0= )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + PYTHIADIR="${EPREFIX}/usr/share/pythia8" + # set datadir for xmldor in include file + sed -i \ + -e "s:../xmldoc:${PYTHIADIR}/xmldoc:" \ + include/Pythia8/Pythia.h || die + # respect libdir, prefix, flags + sed -i \ + -e "s:/lib:/$(get_libdir):g" \ + -e "s:/usr:${EPREFIX}/usr:g" \ + -e "s:-O2::g" \ + configure || die + sed -i \ + -e "s:LIBDIR=.*:LIBDIR=$(get_libdir):" \ + -e "s:LIBDIRARCH=.*:LIBDIRARCH=$(get_libdir):" \ + -e "s:cp -r lib:cp -r $(get_libdir):" \ + -e '/ln -fs/d' \ + Makefile examples/Makefile || die +} + +src_configure() { + export USRCXXFLAGS="${CXXFLAGS}" + export USRLDFLAGSSHARED="${LDFLAGS}" + tc-export CC CXX + # homemade configure script + ./configure \ + --installdir="${EPREFIX}/usr" \ + --datadir="${PYTHIADIR}" \ + --enable-shared \ + $(usex gzip "--enable-gzip=yes" "") \ + $(usex hepmc "--with-hepmcversion=2 --with-hepmc=${EPREFIX}/usr" "") \ + || die + if ! use static-libs; then + sed -i \ + -e '/targets.*=$(LIBDIR.*\.a$/d' \ + -e 's/+=\(.*libpythia8\.\)/=\1/' \ + Makefile || die + sed -i \ + -e 's:\.a:\.so:g' \ + -e 's:$(LIBDIRARCH):$(LIBDIR):g' \ + examples/Makefile || die + fi +} + +src_test() { + cd examples || die + # use emake for parallel instead of long runmains + local tests="$(echo main0{1..8})" t + use hepmc && tests="${tests} main31" + emake ${tests} + for t in ${tests}; do + LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \ + bin/${t}.exe > ${t}.out || die "test ${t} failed" + done + emake clean && rm main*out +} + +src_install() { + emake INSTALLDIR="${ED}/usr" DATADIR="${D}/${PYTHIADIR}" install + rm -r "${D}"/${PYTHIADIR}/{html,php}doc || die + echo "PYTHIA8DATA=${PYTHIADIR}/xmldoc" >> 99pythia8 + doenvd 99pythia8 + + dodoc GUIDELINES AUTHORS README + if use doc; then + dodoc worksheet.pdf htmldoc/pythia8100.pdf + dohtml -r htmldoc/* + fi + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples rootexamples + docompress -x /usr/share/doc/${PF}/{root,}examples + fi +} |