/[gentoo-x86]/sci-physics/pythia/pythia-8.1.57.ebuild
Gentoo

Contents of /sci-physics/pythia/pythia-8.1.57.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue May 22 17:32:22 2012 UTC (2 years, 3 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump

(Portage version: 2.1.10.60/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-physics/pythia/pythia-8.1.57.ebuild,v 1.1 2011/11/25 21:50:37 bicatali Exp $
4
5 EAPI=4
6
7 inherit eutils versionator
8
9 MV=$(get_major_version)
10 MY_P=${PN}$(replace_all_version_separators "" ${PV})
11
12 DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
13 HOMEPAGE="http://home.thep.lu.se/~torbjorn/Pythia.html"
14 SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz"
15
16 SLOT="8"
17 LICENSE="GPL-2"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc examples +hepmc static-libs"
20
21 DEPEND="hepmc? ( sci-physics/hepmc )"
22 RDEPEND="
23 virtual/fortran
24 ${DEPEND}"
25
26 S="${WORKDIR}/${MY_P}"
27
28 src_configure() {
29 use hepmc && export HEPMCVERSION=2 HEPMCLOCATION="${EPREFIX}/usr"
30 # homemade configure script creates a useless config.mk
31 rm -f config.mk
32 cat > config.mk <<-EOF
33 SHAREDLIBS = yes
34 LDFLAGSSHARED = -shared ${LDFLAGS}
35 LDFLAGLIBNAME = -Wl,-soname
36 SHAREDSUFFIX = so
37 EOF
38 if ! use static-libs; then
39 sed -i \
40 -e '/targets.*\.a/d' \
41 -e 's/+=\(.*libpythia8\)/=\1/' \
42 Makefile || die
43 sed -i \
44 -e 's:\.a:\.so:g' \
45 -e 's:$(LIBDIRARCH):$(LIBDIR):g' \
46 examples/Makefile || die
47 fi
48 }
49
50 src_test() {
51 cd "${S}"/examples
52 # use emake for parallel instead of long runmains
53 emake main0{1..9}
54 for i in main0{1..9}*.exe; do
55 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \
56 ./${i} > ${i}.out || die "test ${i} failed"
57 done
58 if use hepmc; then
59 emake main31 main32
60 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \
61 ./main31.exe > main31.exe.out || die
62 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \
63 ./main32.exe main32.cmnd hepmcout32.dat > main32.exe.out || die
64 fi
65 emake clean && rm -f main*out
66 }
67
68 src_install() {
69 dolib.so lib/*so
70 use static-libs && dolib.a lib/archive/*
71
72 insinto /usr/include/${PN}
73 doins include/*
74
75 # xmldoc needed by root
76 insinto /usr/share/${PN}
77 doins -r xmldoc
78 echo "PYTHIA8DATA=${EROOT}usr/share/${PN}/xmldoc" >> 99pythia8
79 doenvd 99pythia8
80
81 dodoc GUIDELINES AUTHORS README
82 if use doc; then
83 dodoc worksheet.pdf
84 dohtml -r htmldoc/*
85 fi
86 if use examples; then
87 insinto /usr/share/doc/${PF}
88 doins -r examples || die "examples install failed"
89 fi
90 }

  ViewVC Help
Powered by ViewVC 1.1.20