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
On 07:21 Mon 03 Dec , Steve Arnold (nerdboy) wrote:
> 1.1 sci-libs/hdf5/hdf5-1.6.6.ebuild
>
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/hdf5/hdf5-1.6.6.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/hdf5/hdf5-1.6.6.ebuild?rev=1.1&content-type=text/plain
> pkg_setup() {
> # The above gcc dep is a hack to insure at least one Fortran 90
> # compiler is installed if the user enables fortran support. Feel
> # free to improve it...
> if use fortran ; then
> if [ $(gcc-major-version) -ge 4 ]
> && built_with_use sys-devel/gcc fortran ; then
> FORTRAN="gfortran"
> fortran_pkg_setup
> export F9X="gfortran"
> einfo "Configuring for GNU gfortran..."
> elif
> test -d /opt/intel/fortran90 ; then
> FORTRAN="ifc"
> fortran_pkg_setup
> export F9X="ifc"
> einfo "Configuring for Intel fortran..."
> else
> einfo "No F90 compiler found; please install either gcc 4 with"
> einfo "fortran support or some other Fortran 90 compiler such"
> einfo "as ifc or pgf90 (or disable fortran support)."
> die "No usable Fortran 90 compiler found."
> fi
You're pretty much reimplementing the fortran eclass here.
> src_unpack() {
> unpack "${A}"
> cd "${S}"
>
> if use mpi; then
> # this is required for mpich2, and should be safe otherwise
> epatch "${FILESDIR}/${PN}-mpich2.patch" || die "mpich2 patch failed"
> fi
>
> sed -i -e "s/tail +/tail -n +/" "${S}"/bin/release
> "${S}"/tools/h5dump/testh5dump.sh.in
Using fixheadtails.eclass is an option here that would also
automatically let you know when it's no longer needed.
> src_compile() {
> local myconf="--with-pic --enable-shared"
>
> if use cxx && ! use mpi ; then
> myconf="${myconf} --enable-cxx"
> elif use cxx && use mpi ; then
> ewarn "C++ support is not compatible with the mpi interface."
> die "Please disable either cxx or mpi."
> else
> myconf="${myconf} --disable-cxx"
> fi
>
> if use fortran && use mpi ; then
> ewarn "Requires Fortran 90 support in your mpi library..."