summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Bräunlich <wippbox@gmx.net>2016-11-11 14:52:01 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2016-11-12 00:31:08 +0100
commit6b785a844dbf9af8231edef10dc81595159770a4 (patch)
treedda0123655bf44ad56ea82591727bf12ea85c1d9 /sci-physics/thepeg/thepeg-2.0.4.ebuild
parentdev-perl/Spiffy: Stable for remaining arches (ALLARCHES), bug 582008 (diff)
downloadgentoo-6b785a844dbf9af8231edef10dc81595159770a4.tar.gz
gentoo-6b785a844dbf9af8231edef10dc81595159770a4.tar.bz2
gentoo-6b785a844dbf9af8231edef10dc81595159770a4.zip
sci-physics/thepeg: Version bump to 2.0.4, EAPI bump 5 -> 6
Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-physics/thepeg/thepeg-2.0.4.ebuild')
-rw-r--r--sci-physics/thepeg/thepeg-2.0.4.ebuild94
1 files changed, 94 insertions, 0 deletions
diff --git a/sci-physics/thepeg/thepeg-2.0.4.ebuild b/sci-physics/thepeg/thepeg-2.0.4.ebuild
new file mode 100644
index 000000000000..43b009a549bf
--- /dev/null
+++ b/sci-physics/thepeg/thepeg-2.0.4.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools elisp-common java-pkg-opt-2
+
+MY_P=ThePEG-${PV}
+
+DESCRIPTION="Toolkit for High Energy Physics Event Generation"
+HOMEPAGE="http://home.thep.lu.se/ThePEG/"
+
+TEST_URI="http://www.hepforge.org/archive/lhapdf/pdfsets/current"
+SRC_URI="http://www.hepforge.org/archive/thepeg/${MY_P}.tar.bz2
+ test? ( hepmc? (
+ ${TEST_URI}/cteq6ll.LHpdf
+ ${TEST_URI}/cteq5l.LHgrid
+ ${TEST_URI}/GRV98nlo.LHgrid
+ ${TEST_URI}/MRST2001nlo.LHgrid ) )"
+LICENSE="GPL-2"
+
+SLOT="0/20"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="c++11 emacs fastjet hepmc java lhapdf rivet static-libs test zlib"
+
+RDEPEND="
+ sci-libs/gsl:=
+ emacs? ( virtual/emacs )
+ fastjet? ( sci-physics/fastjet )
+ hepmc? ( sci-physics/hepmc )
+ java? ( >=virtual/jre-1.5:* )
+ lhapdf? ( >=sci-physics/lhapdf-6.0 )
+ rivet? ( sci-physics/rivet )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ test? ( sys-process/time )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.8.3-java.patch )
+
+src_prepare() {
+ find -name 'Makefile.am' -exec \
+ sed -i -e '1ipkgdatadir=$(datadir)/thepeg' {} \; || die
+ # trick to force c++ linking
+ sed -i \
+ -e '1inodist_EXTRA_libThePEG_la_SOURCES = dummy.cxx' \
+ -e '/dist_pkgdata_DATA = ThePEG.el/d' \
+ lib/Makefile.am || die
+ default
+ java-pkg-opt-2_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable c++11 stdcxx11) \
+ $(use_with fastjet fastjet "${EPREFIX}"/usr) \
+ $(use_with hepmc hepmc "${EPREFIX}"/usr) \
+ $(use_with java javagui) \
+ $(use_with lhapdf lhapdf "${EPREFIX}"/usr) \
+ $(use_with rivet rivet "${EPREFIX}"/usr) \
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+}
+
+src_compile() {
+ default
+ use emacs && elisp-compile lib/ThePEG.el
+}
+
+src_test() {
+ emake LHAPATH="${DISTDIR}" check
+}
+
+src_install() {
+ default
+ use emacs && elisp-install ${PN} lib/ThePEG.el{,c}
+ use java && java-pkg_newjar java/ThePEG.jar
+
+ cat <<-EOF > "${T}"/50${PN}
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/ThePEG"
+ EOF
+ doenvd "${T}"/50${PN}
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}