Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: gentoo-dev@l.g.o, nerdboy@g.o
Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sci-libs/hdf5: hdf5-1.6.2.ebuild ChangeLog hdf5-1.6.4.ebuild hdf5-1.6.5-r1.ebuild hdf5-1.6.5.ebuild hdf5-1.6.6.ebuild
Date: Tue, 04 Dec 2007 00:52:13
Message-Id: 20071204004837.GC29076@supernova
1 On 07:21 Mon 03 Dec , Steve Arnold (nerdboy) wrote:
2 > 1.1 sci-libs/hdf5/hdf5-1.6.6.ebuild
3 >
4 > file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/hdf5/hdf5-1.6.6.ebuild?rev=1.1&view=markup
5 > plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/hdf5/hdf5-1.6.6.ebuild?rev=1.1&content-type=text/plain
6
7 > pkg_setup() {
8 > # The above gcc dep is a hack to insure at least one Fortran 90
9 > # compiler is installed if the user enables fortran support. Feel
10 > # free to improve it...
11 > if use fortran ; then
12 > if [ $(gcc-major-version) -ge 4 ] \
13 > && built_with_use sys-devel/gcc fortran ; then
14 > FORTRAN="gfortran"
15 > fortran_pkg_setup
16 > export F9X="gfortran"
17 > einfo "Configuring for GNU gfortran..."
18 > elif
19 > test -d /opt/intel/fortran90 ; then
20 > FORTRAN="ifc"
21 > fortran_pkg_setup
22 > export F9X="ifc"
23 > einfo "Configuring for Intel fortran..."
24 > else
25 > einfo "No F90 compiler found; please install either gcc 4 with"
26 > einfo "fortran support or some other Fortran 90 compiler such"
27 > einfo "as ifc or pgf90 (or disable fortran support)."
28 > die "No usable Fortran 90 compiler found."
29 > fi
30
31 You're pretty much reimplementing the fortran eclass here.
32
33 > src_unpack() {
34 > unpack "${A}"
35 > cd "${S}"
36 >
37 > if use mpi; then
38 > # this is required for mpich2, and should be safe otherwise
39 > epatch "${FILESDIR}/${PN}-mpich2.patch" || die "mpich2 patch failed"
40 > fi
41 >
42 > sed -i -e "s/tail +/tail -n +/" "${S}"/bin/release \
43 > "${S}"/tools/h5dump/testh5dump.sh.in
44
45 Using fixheadtails.eclass is an option here that would also
46 automatically let you know when it's no longer needed.
47
48 > src_compile() {
49 > local myconf="--with-pic --enable-shared"
50 >
51 > if use cxx && ! use mpi ; then
52 > myconf="${myconf} --enable-cxx"
53 > elif use cxx && use mpi ; then
54 > ewarn "C++ support is not compatible with the mpi interface."
55 > die "Please disable either cxx or mpi."
56 > else
57 > myconf="${myconf} --disable-cxx"
58 > fi
59 >
60 > if use fortran && use mpi ; then
61 > ewarn "Requires Fortran 90 support in your mpi library..."
62
63 Is there some way to check this?
64
65 > src_install() {
66 > make \
67 > prefix="${D}"usr \
68 > mandir="${D}"usr/share/man \
69 > docdir="${D}"usr/share/doc/"${PF}" \
70 > libdir="${D}"usr/$(get_libdir) \
71 > infodir="${D}usr"/share/info \
72 > install || die "make install failed"
73
74 This looks an awful lot like einstall.
75
76 Thanks,
77 Donnie
78 --
79 gentoo-dev@g.o mailing list