diff options
author | Marcus D. Hanwell <cryos@gentoo.org> | 2005-01-30 00:36:04 +0000 |
---|---|---|
committer | Marcus D. Hanwell <cryos@gentoo.org> | 2005-01-30 00:36:04 +0000 |
commit | c7c0c4378e390fb601df91b696e8f0e0f5d3058f (patch) | |
tree | c07df3db65ad53290077900273b7454ed8c73874 /sci-libs/plplot | |
parent | Added fortran, itcl and octave local use flags for sci-libs/plplot. (diff) | |
download | gentoo-2-c7c0c4378e390fb601df91b696e8f0e0f5d3058f.tar.gz gentoo-2-c7c0c4378e390fb601df91b696e8f0e0f5d3058f.tar.bz2 gentoo-2-c7c0c4378e390fb601df91b696e8f0e0f5d3058f.zip |
Initial import of ebuild, closes bug 31554.
(Portage version: 2.0.51-r15)
Diffstat (limited to 'sci-libs/plplot')
-rw-r--r-- | sci-libs/plplot/ChangeLog | 13 | ||||
-rw-r--r-- | sci-libs/plplot/Manifest | 2 | ||||
-rw-r--r-- | sci-libs/plplot/files/digest-plplot-5.3.1 | 1 | ||||
-rw-r--r-- | sci-libs/plplot/files/plplot-5.3.1-gcc-3.4-fix.patch | 24 | ||||
-rw-r--r-- | sci-libs/plplot/metadata.xml | 21 | ||||
-rw-r--r-- | sci-libs/plplot/plplot-5.3.1.ebuild | 172 |
6 files changed, 233 insertions, 0 deletions
diff --git a/sci-libs/plplot/ChangeLog b/sci-libs/plplot/ChangeLog new file mode 100644 index 000000000000..eb4bc9743109 --- /dev/null +++ b/sci-libs/plplot/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for sci-libs/plplot +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/plplot/ChangeLog,v 1.1 2005/01/30 00:36:04 cryos Exp $ + +*plplot-5.3.1 (30 Jan 2005) + + 30 Jan 2005; Marcus D. Hanwell <cryos@gentoo.org> +metadata.xml, + +files/plplot-5.3.1-gcc-3.4-fix.patch, +plplot-5.3.1.ebuild: + Initial import of ebuild. Thanks go to Tyler Nielsen <tyler@mithander.com> for + the original ebuild as well as Olivier Fisette <ribosome@gentoo.org>, Colin + Macdonald <cbm@sfu.ca> and myself who provided numerous improvements to the + ebuild in bug 31554. + diff --git a/sci-libs/plplot/Manifest b/sci-libs/plplot/Manifest new file mode 100644 index 000000000000..48805eed0594 --- /dev/null +++ b/sci-libs/plplot/Manifest @@ -0,0 +1,2 @@ +MD5 ed6feb50382db89bd9db9996db715e7a plplot-5.3.1.ebuild 5551 +MD5 7a1afddc57a8d11a2ee37e5dbd8b552e files/digest-plplot-5.3.1 65 diff --git a/sci-libs/plplot/files/digest-plplot-5.3.1 b/sci-libs/plplot/files/digest-plplot-5.3.1 new file mode 100644 index 000000000000..36a01f4d8460 --- /dev/null +++ b/sci-libs/plplot/files/digest-plplot-5.3.1 @@ -0,0 +1 @@ +MD5 3487a6b2a78a064188a80f244b341d33 plplot-5.3.1.tar.gz 5543320 diff --git a/sci-libs/plplot/files/plplot-5.3.1-gcc-3.4-fix.patch b/sci-libs/plplot/files/plplot-5.3.1-gcc-3.4-fix.patch new file mode 100644 index 000000000000..b295b74168a9 --- /dev/null +++ b/sci-libs/plplot/files/plplot-5.3.1-gcc-3.4-fix.patch @@ -0,0 +1,24 @@ +diff -ruN plplot-5.3.1/bindings/octave/Makefile.am plplot-5.3.1-cryos/bindings/octave/Makefile.am +--- plplot-5.3.1/bindings/octave/Makefile.am 2004-06-14 22:51:50.000000000 +0100 ++++ plplot-5.3.1-cryos/bindings/octave/Makefile.am 2005-01-26 12:13:43.085567448 +0000 +@@ -74,7 +74,7 @@ + # also still works on gcc 2.95 + plplot_octave.cc tmp_stub: plplot_octave.h + $(PERL) $(MATWRAP) -language octave -o plplot_octave.cc -stub tmp_stub \ +- -cpp_ignore plplot_octave_rej.h -cpp $(CC) -E -C plplot_octave.h ++ -cpp_ignore plplot_octave_rej.h -cpp $(CC) -D__builtin_va_list=void -E -C plplot_octave.h + mv -f plplot_octave.cc tmp_plplot_octave.cc + sed 's/ string / std::string /' tmp_plplot_octave.cc > plplot_octave.cc + +diff -ruN plplot-5.3.1/bindings/octave/Makefile.in plplot-5.3.1-cryos/bindings/octave/Makefile.in +--- plplot-5.3.1/bindings/octave/Makefile.in 2004-06-25 08:18:00.000000000 +0100 ++++ plplot-5.3.1-cryos/bindings/octave/Makefile.in 2005-01-26 12:13:55.387697240 +0000 +@@ -877,7 +877,7 @@ + # also still works on gcc 2.95 + @enable_octave_TRUE@plplot_octave.cc tmp_stub: plplot_octave.h + @enable_octave_TRUE@ $(PERL) $(MATWRAP) -language octave -o plplot_octave.cc -stub tmp_stub \ +-@enable_octave_TRUE@ -cpp_ignore plplot_octave_rej.h -cpp $(CC) -E -C plplot_octave.h ++@enable_octave_TRUE@ -cpp_ignore plplot_octave_rej.h -cpp $(CC) -D__builtin_va_list=void -E -C plplot_octave.h + @enable_octave_TRUE@ mv -f plplot_octave.cc tmp_plplot_octave.cc + @enable_octave_TRUE@ sed 's/ string / std::string /' tmp_plplot_octave.cc > plplot_octave.cc + diff --git a/sci-libs/plplot/metadata.xml b/sci-libs/plplot/metadata.xml new file mode 100644 index 000000000000..b402ba956e7f --- /dev/null +++ b/sci-libs/plplot/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci</herd> + <maintainer> + <email>cryos@gentoo.org</email> + </maintainer> + <longdescription> + PLplot is a library of functions that are useful for making scientific + plots. It can be used from within compiled languages such as C, C++, + FORTRAN and Java, as well as interactively from interpreted languages such + as Octave, Python, Perl and Tcl. It is capable of producing standard x-y + plots, semilog plots, log-log plots, contour plots, 3D surface plots, mesh + plots, bar charts and pie charts. Multiple graphs may be composited, and it + also supports a large variety of output file devices such as Postscript, + PNG, JPEG, LaTeX and others. It is also possible to to use interactive + devices such as xwin, tk and xterm as output devices. PLplot also offers + support for extended characters inculding the Greek alphabet and a host of + mathematical symbols. + </longdescription> +</pkgmetadata> diff --git a/sci-libs/plplot/plplot-5.3.1.ebuild b/sci-libs/plplot/plplot-5.3.1.ebuild new file mode 100644 index 000000000000..fe174a363403 --- /dev/null +++ b/sci-libs/plplot/plplot-5.3.1.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/plplot/plplot-5.3.1.ebuild,v 1.1 2005/01/30 00:36:04 cryos Exp $ + +inherit eutils + +# Known problems with this ebuild: +# - No support for libqhull. +# - No documentation building - although prebuilt docs are in the tarball. + +DESCRIPTION="A Scientific Plotting Library" +HOMEPAGE="http://plplot.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="LGPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc fortran gd-external gnome ifc java jpeg png python tcltk tetex truetype X itcl octave" + +DEPEND="dev-util/pkgconfig + ifc? ( dev-lang/ifc ) + virtual/libc + sys-apps/man + dev-lang/perl + app-text/opensp + python? ( dev-python/numeric ) + java? ( virtual/jre ) + tetex? ( app-text/jadetex ) + octave? ( sci-mathematics/octave ) + external-gd? ( media-libs/gd ) + truetype? ( media-libs/freetype ) + X? ( virtual/x11 + tcltk? ( dev-lang/tcl + dev-lang/tk + itcl? ( dev-tcltk/itcl ) + ) + gnome? ( gnome-base/gnome-libs ) + ) + doc? ( sys-apps/texinfo )" + # Optional support for libqhull (currently doesn't work). + # qhull? ( media-libs/qhull ) + +pkg_setup() { + # If the fortran interface is wanted, the gnu f77 compiler + # is needed unless ifc is used (which is taken care of in + # the dependencies). + use fortran && ! use ifc || if [ -z 'which g77' ]; then + eerror "GNU fortran 77 compiler not found on the system." + eerror "Please add fortran to your USE flags and reemerge gcc." + die + fi +} + +src_unpack() { + unpack ${A} + # Fix compilation problems on GCC 3.4 and the octave bindings, thanks to the + # patch from Debian's BTS bug 274359. + epatch ${FILESDIR}/${P}-gcc-3.4-fix.patch +} + +src_compile() { + # Doesn't compile with j > 1. + MAKEOPTS="${MAKEOPTS} -e -j1" + + local EXTRA_CONF + + # Export DATA_DIR and DOC_DIR so that configure uses correct install path + EXTRA_CONF="${EXTRA_CONF} DATA_DIR=\"/usr/share/${PN}\"" + EXTRA_CONF="${EXTRA_CONF} DOC_DIR=\"/usr/share/doc/${PF}\"" + + # Use pkg-config + EXTRA_CONF="${EXTRA_CONF} --with-pkg-config" + + # Compilation options (debug, documentation). + EXTRA_CONF="${EXTRA_CONF} $(use_with debug)" + # Documentation building doesn't work. + # The xml catalogs are not found. +# if use doc; then +# EXTRA_CONF="${EXTRA_CONF} --enable-builddoc \ +# --with-xml-declaration=/usr/share/sgml/xml.dcl \ +# --with-sgml-catalogs=/etc/sgml/catalog:/usr/share/sgml/docbook/sgml-dtd-4.2/catalog:/usr/share/sgml/docbook/sgml-dtd-4.2/docbook.dtd:/usr/share/sgml/docbook/sgml-dtd-4.2/docbookx.dtd" +# EXTRA_CONF="${EXTRA_CONF} --with-db2x_texixml=/usr/bin/db2x_texixml.pl --with-db2x_xsltproc=/usr/bin/db2x_xsltproc.pl" +# else +# EXTRA_CONF="${EXTRA_CONF} --disable-builddoc" +# fi + EXTRA_CONF="${EXTRA_CONF} --disable-builddoc" + + # Language bindings. + EXTRA_CONF="${EXTRA_CONF} $(use_enable python)" + EXTRA_CONF="${EXTRA_CONF} $(use_enable java)" + EXTRA_CONF="${EXTRA_CONF} $(use_enable octave)" + if use ifc; then + EXTRA_CONF="${EXTRA_CONF} --enable-f77 F77=/opt/intel/compiler70/ia32/bin/ifc" + elif use fortran; then + EXTRA_CONF="${EXTRA_CONF} --enable-f77" + else + EXTRA_CONF="${EXTRA_CONF} --disable-f77" + fi + + # Device drivers. + EXTRA_CONF="${EXTRA_CONF} $(use_enable jpeg)" + EXTRA_CONF="${EXTRA_CONF} $(use_enable png)" + EXTRA_CONF="${EXTRA_CONF} $(use_enable tetex pstex)" + # Dynamic driver loading causes segfaults. + EXTRA_CONF="${EXTRA_CONF} --disable-dyndrivers" + # The linuxvga driver doesn't compile. + EXTRA_CONF="${EXTRA_CONF} --disable-linuxvga" + + # Support for optional libraries. + EXTRA_CONF="${EXTRA_CONF} $(use_with truetype freetype)" + # Support for libqhull doesn't work. The configure script + # doesn't find the lib. + # EXTRA_CONF="${EXTRA_CONF} $(use_with qhull)" + EXTRA_CONF="${EXTRA_CONF} --without-qhull" + + # Additional X-dependent language bindings and device drivers. + if use X; then + EXTRA_CONF="${EXTRA_CONF} --with-x" + if use tcltk; then + EXTRA_CONF="${EXTRA_CONF} --enable-tcl" + EXTRA_CONF="${EXTRA_CONF} $(use_enable itcl)" + else + EXTRA_CONF="${EXTRA_CONF} --disable-tcl" + EXTRA_CONF="${EXTRA_CONF} --disable-tk" + EXTRA_CONF="${EXTRA_CONF} --disable-itcl" + fi + EXTRA_CONF="${EXTRA_CONF} $(use_enable gnome)" + else + EXTRA_CONF="${EXTRA_CONF} --without-x" + EXTRA_CONF="${EXTRA_CONF} --disable-tcl" + EXTRA_CONF="${EXTRA_CONF} --disable-itcl" + EXTRA_CONF="${EXTRA_CONF} --disable-gnome" + fi + + econf ${EXTRA_CONF} || die + emake || die "make step failed." +} + +src_install() { + + # A little sed magic to make some of the docs install to the right place + sed -i -e "s|\$(datadir)/doc/plplot|/usr/share/doc/${PF}|" Makefile || \ + die "sed replacement of docs dir failed." + + make install DESTDIR=${D} || die "make install step failed." + + # To match the Gentoo FSH. + if use java; then + mv ${D}/usr/lib/java/plplot ${D}/usr/share/${PN}/lib + rm -r ${D}/usr/lib/java + fi + if use octave; then + # fix the path to plplot's .m files + mv ${D}/usr/share/plplot_octave ${D}/usr/share/plplot/octave || die \ + "Error moving octave files." + sed -i -e 's|/usr/share/plplot_octave|/usr/share/plplot/octave|' \ + ${D}/usr/share/octave/site/m/PLplot/plplot_octave_path.m \ + || die "sed replacement of octave path failed." + fi + + # Fix permissions and gzip the basic documentation. + chmod 644 ${D}/usr/share/doc/${PF}/* + gzip ${D}/usr/share/doc/${PF}/* + # Install prebuilt documentation. + if use doc; then + cd doc/docbook/src/ + dohtml *.html + doinfo plplotdoc.info + insinto /usr/share/doc/${PF} + doins plplot-5.3.1.pdf + fi +} |