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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Nov 30 22:08:58 2012 UTC (21 months, 2 weeks ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Changed home page, thanks Andrew Savchenko bug #438762

(Portage version: 2.2.01.21313-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 # Copyright 1999-2012 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.65.ebuild,v 1.3 2012/10/16 18:54:19 jlec Exp $
4
5 EAPI=4
6
7 inherit eutils fortran-2 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 ~amd64-linux ~x86-linux"
19 IUSE="doc examples +hepmc static-libs"
20
21 DEPEND="hepmc? ( sci-physics/hepmc )"
22 RDEPEND="${DEPEND}"
23
24 S="${WORKDIR}/${MY_P}"
25
26 src_configure() {
27 use hepmc && export HEPMCVERSION=2 HEPMCLOCATION="${EPREFIX}/usr"
28 # homemade configure script creates a useless config.mk
29 rm -f config.mk
30 cat > config.mk <<-EOF
31 SHAREDLIBS = yes
32 LDFLAGSSHARED = -shared ${LDFLAGS}
33 LDFLAGLIBNAME = -Wl,-soname
34 SHAREDSUFFIX = so
35 EOF
36 if ! use static-libs; then
37 sed -i \
38 -e '/targets.*\.a/d' \
39 -e 's/+=\(.*libpythia8\)/=\1/' \
40 Makefile || die
41 sed -i \
42 -e 's:\.a:\.so:g' \
43 -e 's:$(LIBDIRARCH):$(LIBDIR):g' \
44 examples/Makefile || die
45 fi
46 }
47
48 src_test() {
49 cd examples
50 # use emake for parallel instead of long runmains
51 emake main0{1..9}
52 for i in main0{1..9}*.exe; do
53 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \
54 ./${i} > ${i}.out || die "test ${i} failed"
55 done
56 if use hepmc; then
57 emake main31
58 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \
59 ./main31.exe > main31.exe.out || die
60 fi
61 emake clean && rm -f main*out
62 }
63
64 src_install() {
65 dolib.so lib/*so
66 use static-libs && dolib.a lib/archive/*
67
68 insinto /usr/include/${PN}
69 doins include/*
70
71 # xmldoc needed by root
72 insinto /usr/share/${PN}
73 doins -r xmldoc
74
75 echo "PYTHIA8DATA=${EROOT}usr/share/${PN}/xmldoc" >> 99pythia8
76 doenvd 99pythia8
77
78 dodoc GUIDELINES AUTHORS README
79 if use doc; then
80 dodoc worksheet.pdf
81 dohtml -r htmldoc/*
82 fi
83 if use examples; then
84 insinto /usr/share/doc/${PF}
85 doins -r examples
86 fi
87 }

  ViewVC Help
Powered by ViewVC 1.1.20