diff options
Diffstat (limited to 'sci-geosciences/gmt')
-rw-r--r-- | sci-geosciences/gmt/ChangeLog | 10 | ||||
-rw-r--r-- | sci-geosciences/gmt/gmt-4.5.0.ebuild | 113 |
2 files changed, 121 insertions, 2 deletions
diff --git a/sci-geosciences/gmt/ChangeLog b/sci-geosciences/gmt/ChangeLog index f0b46ede2aba..5fa5dc420b0e 100644 --- a/sci-geosciences/gmt/ChangeLog +++ b/sci-geosciences/gmt/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-geosciences/gmt -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/ChangeLog,v 1.17 2008/08/06 17:51:06 ulm Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/ChangeLog,v 1.18 2009/07/25 12:53:51 cryos Exp $ + +*gmt-4.5.0 (25 Jul 2009) + + 25 Jul 2009; Marcus D. Hanwell <cryos@gentoo.org> +gmt-4.5.0.ebuild: + Version bump (long overdue). Thanks for the suggestions and contributions + from people in bug 145277. Closes bug 145277. 06 Aug 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml: Add USE flag description to metadata wrt GLEP 56. diff --git a/sci-geosciences/gmt/gmt-4.5.0.ebuild b/sci-geosciences/gmt/gmt-4.5.0.ebuild new file mode 100644 index 000000000000..bf7ab3eed698 --- /dev/null +++ b/sci-geosciences/gmt/gmt-4.5.0.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gmt/gmt-4.5.0.ebuild,v 1.1 2009/07/25 12:53:51 cryos Exp $ + +inherit multilib autotools + +GSHHS="GSHHS2.0" + +DESCRIPTION="Powerful map generator" +HOMEPAGE="http://gmt.soest.hawaii.edu/" +SRC_URI="ftp://falcon.grdl.noaa.gov/pub/gmt/GMT${PV}_src.tar.bz2 + ftp://falcon.grdl.noaa.gov/pub/gmt/GMT${PV}_share.tar.bz2 + ftp://falcon.grdl.noaa.gov/pub/gmt/${GSHHS}_coast.tar.bz2 + doc? ( ftp://falcon.grdl.noaa.gov/pub/gmt/GMT${PV}_doc.tar.bz2 ) + gmtsuppl? ( ftp://falcon.grdl.noaa.gov/pub/gmt/GMT${PV}_suppl.tar.bz2 ) + gmtfull? ( ftp://falcon.grdl.noaa.gov/pub/gmt/${GSHHS}_full.tar.bz2 ) + gmthigh? ( ftp://falcon.grdl.noaa.gov/pub/gmt/${GSHHS}_high.tar.bz2 ) + gmttria? ( ftp://falcon.grdl.noaa.gov/pub/gmt/GMT${PV}_triangle.tar.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gmtsuppl gmtfull gmthigh gmttria doc" + +RDEPEND=">=sci-libs/netcdf-3.5.0" +DEPEND="${RDEPEND} + gmtsuppl? ( >=sys-devel/autoconf-2.58 )" + +S="${WORKDIR}/GMT${PV}" + +src_unpack() { + unpack ${A} || die "Unpacking failed." + mv -f "${WORKDIR}/share/"* "${S}/share/" || die "Moving sources failed." + cd "${S}" + if use gmtsuppl; then + WANT_AUTOCONF=2.5 eautoreconf || die "autoconf failed." + fi +} + +src_compile() { + + # In make process will include /lib and /include to NETCDFHOME + export NETCDFHOME="/usr" + + local myconf="" + + if use gmttria; then + myconf="${myconf} --enable-triangle" + fi + + econf \ + --libdir=/usr/$(get_libdir)/${P} \ + --includedir=/usr/include/${P} \ + --datadir=/usr/share/${P} \ + ${myconf} \ + || die "Configure failed." + + local mymake= + if use gmtsuppl; then + mymake="${mymake} suppl" + fi + + emake gmt ${mymake} || die "Make ${mymake} failed." +} + +src_install() { + local mymake= + if use gmtsuppl; then + mymake="${mymake} install-suppl" + fi + if use doc; then + mymake="${mymake} install-doc" + mkdir -p www/gmt/doc/html + fi + + einstall \ + includedir=${D}/usr/include/${P} \ + libdir=${D}/usr/$(get_libdir)/${P} \ + datadir=${D}/usr/share/${P} \ + install \ + install-data \ + install-man \ + ${mymake} \ + || die "Make install failed." + + #now some docs + dodoc README + cp -r "${S}/{examples,tutorial}" "${D}/usr/share/doc/${PF}/" + + # Move the HTML and PDF docs to the docs directory. Old location breaks FHS + # compliance, and is not used by web servers generally. + if use doc; then + mv "${D}/usr/www/gmt/doc/pdf/*.pdf" "${D}/usr/share/doc/${PF}/" + mv "${D}/usr/www/gmt/doc/html" "${D}/usr/share/doc/${PF}/" + rm -rf "${D}/usr/www" + fi + +# dodir /etc/env.d +# echo "GMTHOME=/usr/share/${P}" > ${D}/etc/env.d/99gmt + cd "${D}/usr/share/${P}" + ln -s . share +} + +pkg_postinst() { + einfo "The default installation is the cleanest one" + einfo "To include more resources use the syntax:" + einfo "USE=\"gmt_flags\" emerge gmt" + einfo "Possible GMT flags are:" + einfo "gmthigh -> High resolution bathimetry database;" + einfo "gmtfull -> Full resolution bathimetry database;" + einfo "gmttria -> Non GNU triangulate method, but more efficient;" + einfo "gmtsuppl -> Supplementary functions for GMT;" +} |