aboutsummaryrefslogtreecommitdiff
blob: 39408ed492d1fbc8bd551e70fbb611e20cc71fd5 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

AUTOTOOLS_AUTORECONF=1
AUTOTOOLS_IN_SOURCE_BUILD=1

inherit autotools-utils eutils flag-o-matic multilib

MYP=Herwig++-${PV}

DESCRIPTION="High-Energy Physics event generator"
HOMEPAGE="http://herwig.hepforge.org/"
SRC_URI="http://www.hepforge.org/archive/herwig/${MYP}.tar.bz2"

LICENSE="GPL-2"

SLOT="0/14"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="c++0x fastjet static-libs"

RDEPEND="
	dev-libs/boost:0=
	sci-libs/gsl:0=
	<=sci-physics/looptools-2.8:0=
	>=sci-physics/thepeg-1.9.1:0=
	fastjet? ( sci-physics/fastjet:0= )"
DEPEND="${RDEPEND}
	virtual/fortran"

S="${WORKDIR}/${MYP}"

src_prepare() {
	epatch "${FILESDIR}"/${PN}-2.6.3-looptools.patch
	find -name 'Makefile.am' -exec \
		sed -i -e '1ipkgdatadir=$(datadir)/herwig++' {} \; || die
	autotools-utils_src_prepare
}

src_configure() {
	use prefix && \
		append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/ThePEG
	local myeconfargs=(
		--with-boost="${EPREFIX}"/usr
		--with-thepeg="${EPREFIX}"/usr
		$(use_enable c++0x stdcxx11)
		$(use_with fastjet fastjet "${EPREFIX}"/usr)
	)
	autotools-utils_src_configure
}

pkg_preinst () {
	sed -i -e "s|${ED}||g" "${ED}"/usr/share/herwig++/defaults/PDF.in || die
	sed -i -e "s|${ED}||g" "${ED}"/usr/share/herwig++/HerwigDefaults.rpo || die
}