aboutsummaryrefslogtreecommitdiff
blob: f196349688e134fcb76462ad62af5ee57979d7d0 (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
62
63
64
65
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils

MYPN=MC-TESTER

DESCRIPTION="A universal tool for comparisons of Monte Carlo predictions in High Energy Physics"
HOMEPAGE="http://mc-tester.web.cern.ch/MC-TESTER/"
SRC_URI="http://mc-tester.web.cern.ch/MC-TESTER/${MYPN}-${PV}.tar.gz"
LICENSE="CPC GPL-2+"
#HepMC interface is licensed under GPL, other code under CPC

SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples hepmc"

RDEPEND="sci-physics/root
	hepmc? ( sci-physics/hepmc )
"
DEPEND="${RDEPEND}
	doc? ( app-doc/doxygen )"

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

src_prepare() {
	epatch "${FILESDIR}/${P}-compare.sh.patch"
}

src_configure() {
	econf \
		--with-root="${EPREFIX}/usr" \
		--without-Pythia8 \
		$(use_with hepmc HepMC "${EPREFIX}/usr")
}

src_compile() {
	emake
	use doc && cd doc && emake
}

src_install() {
	emake PREFIX="${D}/usr" install
	newbin analyze/compare.sh mc-tester-compare

	insinto /usr/libexec/${PN}/analyze
	doins analyze/*.C
	insinto /usr/share/${PN}
	doins analyze/*.tex

	if use doc; then
		dohtml doc/doxygenDocs/html/*
		dodoc doc/{README*,USER-TESTS,tester.ps.gz}
	fi

	use examples && dodoc -r examples-*
}

pkg_postinst() {
	elog "A script to perform an analysis step is installed as /usr/bin/mc-tester-compare"
	elog "it takes two root files with generation results as command line arguments"
}