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

Contents of /sci-physics/hepmc/hepmc-2.06.09-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed May 27 21:37:48 2015 UTC (4 years, 4 months ago) by bircoph
Branch: MAIN
CVS Tags: HEAD
update homepage, floatflt dep, bump to EAPI=5

Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
(Portage version: 2.2.20/cvs/Linux i686, signed Manifest commit with key 565953B95372756C)

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

  ViewVC Help
Powered by ViewVC 1.1.20