/[gentoo-x86]/sci-physics/geant/geant-4.9.6_p01.ebuild
Gentoo

Contents of /sci-physics/geant/geant-4.9.6_p01.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jun 10 16:51:50 2013 UTC (5 years, 10 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Split installation of all data into a new package sci-physics/geant-data, also fixing bug #472550

(Portage version: 2.2.01.21938-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/geant-4.9.6_p01.ebuild,v 1.2 2013/03/02 23:26:38 hwoarang Exp $
4
5 EAPI=5
6
7 inherit cmake-utils eutils fortran-2 versionator multilib
8
9 PV1=$(get_version_component_range 1 ${PV})
10 PV2=$(get_version_component_range 2 ${PV})
11 PV3=$(get_version_component_range 3 ${PV})
12 MYP=${PN}$(replace_version_separator 3 .)
13
14 DESCRIPTION="Toolkit for simulation of passage of particles through matter"
15 HOMEPAGE="http://geant4.cern.ch/"
16 SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
17
18 LICENSE="geant4"
19 SLOT="4"
20 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
21 IUSE="+data dawn examples gdml geant3 motif opengl openinventor
22 raytracerx qt4 static-libs vrml zlib"
23
24 RDEPEND="
25 dev-libs/expat
26 >=sci-physics/clhep-2.1.3
27 dawn? ( media-gfx/dawn )
28 gdml? ( dev-libs/xerces-c )
29 motif? ( x11-libs/motif:0 )
30 opengl? ( virtual/opengl )
31 openinventor? ( media-libs/openinventor )
32 qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
33 raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
34 zlib? ( sys-libs/zlib )"
35 DEPEND="${RDEPEND}"
36
37 S="${WORKDIR}/${MYP}"
38
39 PATCHES=( "${FILESDIR}"/${PN}-4.9.4-zlib.patch )
40
41 src_configure() {
42 local mycmakeargs=(
43 -DGEANT4_USE_SYSTEM_CLHEP=ON
44 -DCMAKE_INSTALL_LIBDIR="${EROOT}usr/$(get_libdir)"
45 $(use openinventor && echo "-DINVENTOR_SOXT_LIBRARY=${EROOT}usr/$(get_libdir)/libInventorXt.so")
46 $(cmake-utils_use data GEANT4_INSTALL_DATA)
47 $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
48 $(cmake-utils_use gdml GEANT4_USE_GDML)
49 $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
50 $(cmake-utils_use motif GEANT4_USE_XM)
51 $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
52 $(cmake-utils_use openinventor GEANT4_USE_INVENTOR)
53 $(cmake-utils_use qt4 GEANT4_USE_QT)
54 $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
55 $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
56 $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
57 $(cmake-utils_use_build static-libs STATIC_LIBS)
58 )
59 cmake-utils_src_configure
60 }
61
62 src_install() {
63 # adjust clhep linking flags for system clhep
64 # binmake.gmk is only useful for legacy build systems
65 sed -i "s,-lG4clhep,-lCLHEP," config/binmake.gmk || die "sed failed"
66
67 cmake-utils_src_install
68 insinto /usr/share/doc/${PF}
69 local mypv="${PV1}.${PV2}.${PV3}"
70 doins ReleaseNotes/ReleaseNotes${mypv}.html
71 [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
72 dodoc ReleaseNotes/Patch${mypv}-*.txt
73 use examples && doins -r examples
74 if use data ; then
75 sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EPREFIX}/usr\2,p" \
76 "${CMAKE_BUILD_DIR}/InstallTreeFiles/geant4.sh" > 99geant
77 doenvd 99geant
78 fi
79 }
80
81 pkg_postinst() {
82 elog "The following scripts are provided for backward compatibility:"
83 elog "$(ls -1 ${EROOT}usr/share/Geant4-${PV2}.${PV3}.*/geant4make/*sh)"
84 }

  ViewVC Help
Powered by ViewVC 1.1.20