/[gentoo-x86]/sci-physics/hepmc/hepmc-2.06.08.ebuild
Gentoo

Contents of /sci-physics/hepmc/hepmc-2.06.08.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Aug 7 16:56:28 2012 UTC (2 years ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
keyword amd64-linux, x86-linux

(Portage version: 2.2.01.20796-prefix/cvs/Linux x86_64)

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/hepmc/hepmc-2.06.08.ebuild,v 1.1 2012/03/02 05:26:02 bicatali Exp $
4
5 EAPI=4
6
7 inherit cmake-utils
8
9 MYP=HepMC-${PV}
10
11 DESCRIPTION="Event Record for Monte Carlo Generators"
12 HOMEPAGE="https://savannah.cern.ch/projects/hepmc/"
13 SRC_URI="http://lcgapp.cern.ch/project/simu/HepMC/download/${MYP}.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18 IUSE="cm doc examples gev static-libs test"
19
20 RDEPEND=""
21 DEPEND="${RDEPEND}
22 doc? ( app-doc/doxygen dev-tex/floatflt )"
23
24 S="${WORKDIR}/${MYP}"
25
26 DOCS=( ChangeLog AUTHORS )
27
28 src_prepare() {
29 sed -i -e '/add_subdirectory(doc)/d' CMakeLists.txt
30 # CMake doc building broken
31 # gentoo doc directory
32 #sed -i \
33 # -e "s:share/HepMC/doc:share/doc/${PF}:" \
34 # doc/CMakeLists.txt || die
35
36 # gentoo examples directory
37 sed -i \
38 -e "s:share/HepMC:share/doc/${PF}:" \
39 $(find examples -name CMakeLists.txt) || die
40
41 # respect user's flags
42 sed -i \
43 -e "s/-O -ansi -pedantic -Wall//g" \
44 cmake/Modules/HepMCVariables.cmake || die
45
46 # gentoo libdir love
47 sed -i \
48 -e '/DESTINATION/s/lib/lib${LIB_SUFFIX}/g' \
49 {src,fio}/CMakeLists.txt || die
50
51 # remove targets if use flags not set
52 use examples || sed -i -e '/add_subdirectory(examples)/d' CMakeLists.txt
53 use test || sed -i -e '/add_subdirectory(test)/d' CMakeLists.txt
54 if ! use static-libs; then
55 sed -i \
56 -e '/(HepMC\(fio\|\)S/d' \
57 -e '/TARGETS/s/HepMC\(fio\|\)S//' \
58 {src,fio}/CMakeLists.txt || die
59 fi
60 }
61
62 src_configure() {
63 # use MeV over GeV and mm over cm
64 local length_conf="MM"
65 use cm && length_conf="CM"
66 local momentum_conf="MEV"
67 use gev && momentum_conf="GEV"
68 mycmakeargs+=(
69 -Dlength=${length_conf}
70 -Dmomentum=${momentum_conf}
71 )
72 cmake-utils_src_configure
73 }
74
75 src_compile() {
76 cmake-utils_src_compile
77 if use doc; then
78 cd doc
79 ./buildDoc.sh || die
80 ./buildDoxygen.sh || die
81 fi
82 }
83
84 src_install() {
85 cmake-utils_src_install
86 use doc && dodoc doc/*.pdf && dohtml -r doc/html/*
87 }

  ViewVC Help
Powered by ViewVC 1.1.20