Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/openfoam-bin: metadata.xml ChangeLog openfoam-bin-1.5.ebuild
Date: Sat, 25 Apr 2009 16:12:52
Message-Id: E1LxkUj-0004sB-UC@stork.gentoo.org
1 patrick 09/04/25 16:12:49
2
3 Added: metadata.xml ChangeLog openfoam-bin-1.5.ebuild
4 Log:
5 Initial import from sunrise. Thanks to Oliver Borm for the ebuild and the sunrise people for massaging it into shape.
6 (Portage version: 2.2_rc31/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-libs/openfoam-bin/metadata.xml
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/openfoam-bin/metadata.xml?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/openfoam-bin/metadata.xml?rev=1.1&content-type=text/plain
13
14 Index: metadata.xml
15 ===================================================================
16 <?xml version="1.0" encoding="UTF-8"?>
17 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
18 <pkgmetadata>
19 <herd>no-herd</herd>
20 <maintainer>
21 <email>patrick@g.o</email>
22 <name>Patrick Lauer</name>
23 </maintainer>
24 </pkgmetadata>
25
26
27
28 1.1 sci-libs/openfoam-bin/ChangeLog
29
30 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/openfoam-bin/ChangeLog?rev=1.1&view=markup
31 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/openfoam-bin/ChangeLog?rev=1.1&content-type=text/plain
32
33 Index: ChangeLog
34 ===================================================================
35 # ChangeLog for sci-libs/openfoam-bin
36 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
37 # $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-bin/ChangeLog,v 1.1 2009/04/25 16:12:49 patrick Exp $
38
39 *openfoam-bin-1.5 (25 Apr 2009)
40
41 25 Apr 2009; Patrick Lauer <patrick@g.o>
42 +files/OpenFOAM-1.5-compile.patch, +metadata.xml,
43 +openfoam-bin-1.5.ebuild:
44 Initial import from sunrise. Thanks to Oliver Borm for the ebuild and the
45 sunrise people for massaging it into shape.
46
47 20 Feb 2009; Tomas Chvatal <scarabeus@g.o> metadata.xml:
48 Remove unused local useflags.
49
50 13 Feb 2009; Oliver Borm (boroli) <oli.borm@×××.de>
51 -openfoam-bin-1.4.1_p20080118.ebuild, -files/compile-1.4.1.patch:
52 Remove old version.
53
54 05 Feb 2009; Tomas Chvatal <scarabeus@g.o>
55 openfoam-bin-1.4.1_p20080118.ebuild, openfoam-bin-1.5.ebuild:
56 Make repoman happy
57
58 31 Aug 2008; Thomas Sachau (Tommy[D]) <tommy@g.o> metadata.xml:
59 Add local useflags to metadata.xml (GLEP 56)
60
61 04 Aug 2008; Oliver Borm (boroli) <oli.borm@×××.de>
62 openfoam-bin-1.4.1_p20080118.ebuild, openfoam-bin-1.5.ebuild:
63 Changed version dependencies
64
65 26 Jul 2008; Thomas Anderson <gentoofan23@g.o>
66 openfoam-bin-1.5.ebuild:
67 Fix unnecessary quoting
68
69 22 Jul 2008; Oliver Borm (boroli) <oli.borm@×××.de>
70 +openfoam-bin-1.5.ebuild, +files/OpenFOAM-1.5-compile.patch:
71 Version bump to 1.5 for bug 104257
72
73 27 Mar 2008; Markus Ullmann <jokey@g.o>
74 -openfoam-bin-1.4.1_p20080118.patch:
75 Move patch to dev.ge.org
76
77 29 Jan 2008; Oliver Borm (boroli) <oli.borm@×××.de>
78 openfoam-bin-1.4.1_p20080118.ebuild:
79 Updated dependencies
80
81 18 Jan 2008; Oliver Borm (boroli) <oli.borm@×××.de>
82 +files/openfoam-bin-1.4.1_p20080118.patch, +files/compile-1.4.1.patch,
83 +metadata.xml, +openfoam-bin-1.4.1_p20080118.ebuild:
84 New ebuild for the binary version of OpenFOAM from bug 104257
85
86
87
88
89 1.1 sci-libs/openfoam-bin/openfoam-bin-1.5.ebuild
90
91 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/openfoam-bin/openfoam-bin-1.5.ebuild?rev=1.1&view=markup
92 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/openfoam-bin/openfoam-bin-1.5.ebuild?rev=1.1&content-type=text/plain
93
94 Index: openfoam-bin-1.5.ebuild
95 ===================================================================
96 # Copyright 1999-2009 Gentoo Foundation
97 # Distributed under the terms of the GNU General Public License v2
98 # $Header: /var/cvsroot/gentoo-x86/sci-libs/openfoam-bin/openfoam-bin-1.5.ebuild,v 1.1 2009/04/25 16:12:49 patrick Exp $
99
100 inherit eutils versionator multilib toolchain-funcs
101
102 MY_PN="OpenFOAM"
103 MY_PV=$(get_version_component_range 1-2)
104 MY_P="${MY_PN}-${MY_PV}"
105
106 DESCRIPTION="Open Field Operation and Manipulation - CFD Simulation Toolbox"
107 HOMEPAGE="http://www.opencfd.co.uk/openfoam/"
108 SRC_URI="mirror://sourceforge/foam/${MY_P}.General.gtgz
109 x86? ( mirror://sourceforge/foam/${MY_P}.linuxGccDPOpt.gtgz )
110 amd64? ( mirror://sourceforge/foam/${MY_P}.linux64GccDPOpt.gtgz )"
111
112 LICENSE="GPL-2"
113 SLOT="1.5"
114 KEYWORDS="-* ~amd64 ~x86"
115 IUSE="examples doc"
116
117 DEPEND="!=sci-libs/openfoam-${MY_PV}*
118 !=sci-libs/openfoam-kernel-${MY_PV}*
119 !=sci-libs/openfoam-meta-${MY_PV}*
120 !=sci-libs/openfoam-solvers-${MY_PV}*
121 !=sci-libs/openfoam-utilities-${MY_PV}*
122 !=sci-libs/openfoam-wmake-${MY_PV}*
123 || ( >sci-visualization/paraview-3.0 sci-visualization/opendx )
124 virtual/mpi"
125 RDEPEND="${DEPEND}"
126
127 S=${WORKDIR}/${MY_P}
128
129 pkg_setup() {
130 if ! version_is_at_least 4.2 $(gcc-version) ; then
131 die "${PN} requires >=sys-devel/gcc-4.2 to compile."
132 fi
133
134 elog
135 elog "In order to use ${MY_PN} you should add the following line to ~/.bashrc :"
136 elog "source /usr/$(get_libdir)/${MY_PN}/bashrc"
137 ewarn
138 ewarn "FoamX is deprecated since ${MY_PN}-1.5! "
139 ewarn
140
141 use x86 && WM_OPTIONS="linuxGccDPOpt"
142 use amd64 && WM_OPTIONS="linux64GccDPOpt"
143 }
144
145 src_unpack() {
146 ln -s "${DISTDIR}"/${MY_P}.General.gtgz ${MY_P}.General.tgz
147 unpack ./${MY_P}.General.tgz
148
149 use x86 && ln -s "${DISTDIR}"/${MY_P}.linuxGccDPOpt.gtgz ${MY_P}.binary.tgz
150 use amd64 && ln -s "${DISTDIR}"/${MY_P}.linux64GccDPOpt.gtgz ${MY_P}.binary.tgz
151 unpack ./${MY_P}.binary.tgz
152
153 cd "${S}"
154 epatch "${FILESDIR}"/${MY_P}-compile.patch
155 }
156
157 src_compile() {
158 if has_version sys-cluster/lam-mpi ; then
159 export WM_MPLIB=LAM
160 export MPI_VERSION=lam
161 elif has_version sys-cluster/mpich2 ; then
162 export WM_MPLIB=MPICH
163 export MPI_VERSION=mpich
164 elif has_version sys-cluster/openmpi ; then
165 export WM_MPLIB=OPENMPI
166 export MPI_VERSION=openmpi
167 else
168 die "You need one of the following mpi implementations: openmpi, lam-mpi or mpich2"
169 fi
170
171 sed -i -e "s|WM_MPLIB:=OPENMPI|WM_MPLIB:="${WM_MPLIB}"|" etc/bashrc
172 sed -i -e "s|setenv WM_MPLIB OPENMPI|setenv WM_MPLIB "${WM_MPLIB}"|" etc/cshrc
173
174 mv lib/${WM_OPTIONS}/$MPI_VERSION* lib/${WM_OPTIONS}/$MPI_VERSION
175 }
176
177 src_test() {
178 cd bin
179 ./foamInstallationTest
180 }
181
182 src_install() {
183 insinto /usr/$(get_libdir)/${MY_PN}/${MY_P}
184 doins -r etc
185
186 rm -rf tutorials/rhoPorousSimpleFoam/angledDuctExplicit/{0,constant}
187 cp -a tutorials/rhoPorousSimpleFoam/angledDuctImplicit/{0,constant} tutorials/rhoPorousSimpleFoam/angledDuctExplicit
188 use examples && doins -r tutorials
189
190 insopts -m0755
191 doins -r bin
192
193 insinto /usr/$(get_libdir)/${MY_PN}/${MY_P}/applications/bin
194 doins -r applications/bin/${WM_OPTIONS}/*
195
196 insinto /usr/$(get_libdir)/${MY_PN}/${MY_P}/lib
197 doins -r lib/${WM_OPTIONS}/*
198
199 insinto /usr/$(get_libdir)/${MY_PN}/${MY_P}/wmake
200 doins -r wmake/*
201
202 insopts -m0644
203 insinto /usr/share/doc/${PF}
204 doins doc/Guides-a4/*.pdf
205 dodoc README
206
207 if use doc ; then
208 dohtml -r doc/Doxygen
209 fi
210
211 dosym /usr/$(get_libdir)/${MY_PN}/${MY_P}/etc/bashrc /usr/$(get_libdir)/${MY_PN}/bashrc
212 dosym /usr/$(get_libdir)/${MY_PN}/${MY_P}/etc/cshrc /usr/$(get_libdir)/${MY_PN}/cshrc
213 }