diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2006-05-25 20:30:08 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2006-05-25 20:30:08 +0000 |
commit | b6f65329087b509e2046d78a72abbc9cf6cd51e4 (patch) | |
tree | 31b4ccbb409b7885c5f19ad331679e560eaa683f /sci-libs/netcdf/netcdf-3.6.1.ebuild | |
parent | Stable on ppc. Bug 133529 (diff) | |
download | gentoo-2-b6f65329087b509e2046d78a72abbc9cf6cd51e4.tar.gz gentoo-2-b6f65329087b509e2046d78a72abbc9cf6cd51e4.tar.bz2 gentoo-2-b6f65329087b509e2046d78a72abbc9cf6cd51e4.zip |
update fortran handling (bug 133519)
(Portage version: 2.1_rc1-r3)
Diffstat (limited to 'sci-libs/netcdf/netcdf-3.6.1.ebuild')
-rw-r--r-- | sci-libs/netcdf/netcdf-3.6.1.ebuild | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/sci-libs/netcdf/netcdf-3.6.1.ebuild b/sci-libs/netcdf/netcdf-3.6.1.ebuild index b87bd5ea9694..1a8cb7102ea1 100644 --- a/sci-libs/netcdf/netcdf-3.6.1.ebuild +++ b/sci-libs/netcdf/netcdf-3.6.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-3.6.1.ebuild,v 1.1 2006/04/07 13:57:30 markusle Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-3.6.1.ebuild,v 1.2 2006/05/25 20:30:08 nerdboy Exp $ inherit fortran eutils @@ -10,11 +10,19 @@ HOMEPAGE="http://my.unidata.ucar.edu/content/software/netcdf/index.html" LICENSE="UCAR-Unidata" SLOT="0" -IUSE="" +IUSE="fortran" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" S="${WORKDIR}/${P}/src" +fortran_pkg_setup() { + if use fortran ; then + FORTRAN="g77 gfortran pgf90" + need_fortran "g77 gfortran pgf90" + else + FORTRAN="" + fi +} src_unpack() { unpack ${A} cd ${S} @@ -24,10 +32,12 @@ src_unpack() { src_compile() { local myconf - if [[ ${FORTRANC} == gfortran ]]; then + if use fortran ; then + if [ ${FORTRANC} == gfortran -o ${FORTRANC} == pgf90 ] ; then myconf="${myconf} CPPFLAGS=-DpgiFortran" - else + else myconf="${myconf} CPPFLAGS=-Df2cFortran" + fi fi econf ${myconf} || die "econf failed" @@ -36,12 +46,21 @@ src_compile() { } src_install() { - dodir /usr/{lib,share} /usr/share/man/man3 /usr/share/man/man3f - einstall MANDIR=${D}/usr/share/man \ - || die "Failed to install man pages" - mv ${D}/usr/share/man/man3/netcdf.3f ${D}/usr/share/man/man3f/. \ - || die "Failed to move man pages" - + dodir /usr/{lib,share} /usr/share/man/man3 + einstall MANDIR=${D}usr/share/man || die "Failed to install man pages" + if use fortran ; then + dodir /usr/share/man/man3f + mv ${D}usr/share/man/man3/netcdf.3f ${D}usr/share/man/man3f/ \ + || die "Failed to move man page" + dosed "s:NETCDF 3:NETCDF 3F:g" /usr/share/man/man3f/netcdf.3f \ + || die "dosed failed" + if [ ${FORTRANC} == gfortran -o ${FORTRANC} == pgf90 ] ; then + dodir /usr/share/man/man3f90 + mv ${D}usr/share/man/man3/netcdf.3f90 ${D}usr/share/man/man3f90/ \ + || die "Failed to move man page" + fi + dodoc fortran/cfortran.doc || die "Failed to install fortran docs" + fi dodoc COPYRIGHT MANIFEST README RELEASE_NOTES VERSION \ - fortran/cfortran.doc || die "Failed to install docs" + || die "Failed to install docs" } |