blob: ead318b8d829a43b79cc894df829c2a184df835b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit versionator multilib toolchain-funcs
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 ~x86"
IUSE="doc"
DEPEND=""
S="${WORKDIR}/${MY_P}"
src_compile() {
# evil hand-rolled stuff (no autoconf)
./configure \
--enable-shared \
|| die "configure failed"
# add user's flags TODO can this be done better?
echo CXXFLAGS+="${CXXFLAGS}" >> config.mk
emake CXX=$(tc-getCXX) || die "emake failed"
}
src_test() {
cd "${S}"/examples
./configure \
--enable-shared \
|| die "configure for examples failed"
echo CXXFLAGS+=${CXXFLAGS} >> config.mk
emake CXX=$(tc-getCXX) || die "emake examples failed"
./runmains || die "test of examples failed"
}
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"
insinto /usr/share/doc/${PF}
dodoc GUIDELINES AUTHORS README
if use doc; then
doins -r worksheet.pdf examples htmldoc || die "doc install failed"
fi
}
pkg_postinst() {
elog "pythia-8 ebuild is still under development."
elog "Help us improve the ebuild in:"
elog "http://bugs.gentoo.org/show_bug.cgi?id=231484"
}
|