summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-05-22 06:50:38 +0000
committerJustin Lecher <jlec@gentoo.org>2010-05-22 06:50:38 +0000
commit97c33de5489258217cd547feace2e3691d5a2380 (patch)
tree6133eb0edb83813ab558b331d17cc82fcc23d913
parentamd64 stable, bug #309227 (diff)
downloadgentoo-2-97c33de5489258217cd547feace2e3691d5a2380.tar.gz
gentoo-2-97c33de5489258217cd547feace2e3691d5a2380.tar.bz2
gentoo-2-97c33de5489258217cd547feace2e3691d5a2380.zip
LDFLAGS respected, fix parallel make issue
(Portage version: 2.2_rc67/cvs/Linux x86_64)
-rw-r--r--sci-libs/pgplot/ChangeLog8
-rw-r--r--sci-libs/pgplot/files/pgplot-ldflags.patch20
-rw-r--r--sci-libs/pgplot/pgplot-5.2.2-r3.ebuild7
-rw-r--r--sci-libs/pgplot/pgplot-5.2.2-r4.ebuild167
4 files changed, 198 insertions, 4 deletions
diff --git a/sci-libs/pgplot/ChangeLog b/sci-libs/pgplot/ChangeLog
index 5b20490231b0..1fc3ffaaad4c 100644
--- a/sci-libs/pgplot/ChangeLog
+++ b/sci-libs/pgplot/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/pgplot
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/ChangeLog,v 1.18 2010/03/15 05:45:42 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/ChangeLog,v 1.19 2010/05/22 06:50:38 jlec Exp $
+
+*pgplot-5.2.2-r4 (22 May 2010)
+
+ 22 May 2010; Justin Lecher <jlec@gentoo.org> pgplot-5.2.2-r3.ebuild,
+ +pgplot-5.2.2-r4.ebuild, +files/pgplot-ldflags.patch:
+ LDFLAGS respected, fix parallel make issue
15 Mar 2010; Sébastien Fabbro <bicatali@gentoo.org>
pgplot-5.2.2-r3.ebuild:
diff --git a/sci-libs/pgplot/files/pgplot-ldflags.patch b/sci-libs/pgplot/files/pgplot-ldflags.patch
new file mode 100644
index 000000000000..30e288f8bf14
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-ldflags.patch
@@ -0,0 +1,20 @@
+diff --git a/makemake b/makemake
+index 2055125..a5968c7 100755
+--- a/makemake
++++ b/makemake
+@@ -935,13 +935,13 @@ cat >> makefile << \EOD
+ # Target "pgxwin_server" is the server program for the XW driver
+ #-----------------------------------------------------------------------
+ pgxwin_server: $(DRVDIR)/pgxwin_server.c
+- $(CCOMPL) $(CFLAGC) $(XINCL) -o pgxwin_server $(DRVDIR)/pgxwin_server.c $(LIBS)
++ $(CCOMPL) $(CFLAGC) $(LDFLAGS) $(XINCL) -o pgxwin_server $(DRVDIR)/pgxwin_server.c $(LIBS)
+
+ #-----------------------------------------------------------------------
+ # Target "pgdisp" is the pgdisp server program for /XDISP driver
+ #-----------------------------------------------------------------------
+ pgdisp: $(PGDISP_ROUTINES)
+- $(CCOMPL) $(CFLAGC) -o pgdisp $(PGDISP_ROUTINES) $(LIBS)
++ $(CCOMPL) $(LDFLAGS) $(CFLAGC) -o pgdisp $(PGDISP_ROUTINES) $(LIBS)
+
+ #-----------------------------------------------------------------------
+ # Target "libxmpgplot.a" contains the Motif widget driver.
diff --git a/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild
index 5a1fcd1b74a6..1c6d4704a108 100644
--- a/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild
+++ b/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild,v 1.5 2010/03/15 05:45:42 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild,v 1.6 2010/05/22 06:50:38 jlec Exp $
EAPI=2
inherit eutils toolchain-funcs
@@ -28,6 +28,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-makemake.patch
epatch "${FILESDIR}"/${PN}-compile-setup.patch
epatch "${FILESDIR}"/${PN}-headers.patch
+ epatch "${FILESDIR}"/${PN}-ldflags.patch
# gfortran < 4.3 does not compile gif, pp and wd drivers
if [[ "$(tc-getFC)" == gfortran ]] &&
@@ -80,7 +81,7 @@ src_compile() {
./makemake . linux
einfo "Doing static libs and execs"
emake all cpg || die "emake static failed"
- emake clean
+ emake -j1 clean
einfo "Doing shared libs"
emake \
CFLAGS="${CFLAGS} -fPIC" \
@@ -97,7 +98,7 @@ src_compile() {
fi
# this just cleans out not needed files
- emake clean
+ emake -j1 clean
}
src_test() {
diff --git a/sci-libs/pgplot/pgplot-5.2.2-r4.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r4.ebuild
new file mode 100644
index 000000000000..34707a7b0531
--- /dev/null
+++ b/sci-libs/pgplot/pgplot-5.2.2-r4.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/pgplot-5.2.2-r4.ebuild,v 1.1 2010/05/22 06:50:38 jlec Exp $
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="FORTRAN/C device-independent scientific graphic library"
+HOMEPAGE="http://www.astro.caltech.edu/~tjp/pgplot/"
+SRC_URI="ftp://ftp.astro.caltech.edu/pub/pgplot/${MY_P}.tar.gz"
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86"
+IUSE="doc motif tk"
+RDEPEND="x11-libs/libX11
+ x11-libs/libXt
+ media-libs/libpng
+ motif? ( x11-libs/openmotif )
+ tk? ( dev-lang/tk )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-drivers.patch
+ epatch "${FILESDIR}"/${PN}-makemake.patch
+ epatch "${FILESDIR}"/${PN}-compile-setup.patch
+ epatch "${FILESDIR}"/${PN}-headers.patch
+ epatch "${FILESDIR}"/${PN}-ldflags.patch
+
+ # gfortran < 4.3 does not compile gif, pp and wd drivers
+ if [[ "$(tc-getFC)" == gfortran ]] &&
+ [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]] ; then
+ ewarn
+ ewarn "Warning!"
+ ewarn "gfortran < 4.3 selected: does not compile all drivers"
+ ewarn "disabling gif, wd, and ppd drivers"
+ ewarn "if you want more drivers, use gfortran >= 4.3, g77 or ifort"
+ ewarn
+ epause 4
+ sed -i \
+ -e 's/GIDRIV/! GIDRIV/g' \
+ -e 's/PPDRIV/! GIDRIV/g' \
+ -e 's/WDDRIV/! GIDRIV/g' \
+ drivers.list || die "sed drivers failed"
+ fi
+
+ # fix pointers for 64 bits
+ if use amd64 || use ia64; then
+ sed -i \
+ -e 's/INTEGER PIXMAP/INTEGER*8 PIXMAP/g' \
+ drivers/{gi,pp,wd}driv.f || die "sed 64bits failed"
+ fi
+
+ cp sys_linux/g77_gcc.conf local.conf
+
+ sed -i \
+ -e "s:FCOMPL=.*:FCOMPL=\"$(tc-getFC)\":g" \
+ -e "s:CCOMPL=.*:CCOMPL=\"$(tc-getCC)\":g" \
+ local.conf || die "sed flags failed"
+
+ if [[ "$(tc-getFC)" = if* ]]; then
+ sed -i \
+ -e 's/-Wall//g' \
+ -e 's/TK_LIBS="/TK_LIBS="-nofor-main /' \
+ local.conf || die "sed drivers failed"
+ fi
+
+ sed -i \
+ -e "s:/usr/local/pgplot:/usr/$(get_libdir)/pgplot:g" \
+ -e "s:/usr/local/bin:/usr/bin:g" \
+ src/grgfil.f makehtml maketex || die "sed path failed"
+
+ use motif && sed -i -e '/XMDRIV/s/!//' drivers.list
+ use tk && sed -i -e '/TKDRIV/s/!//' drivers.list
+}
+
+src_compile() {
+ ./makemake . linux
+ einfo "Doing static libs and execs"
+ emake all cpg || die "emake static failed"
+ emake -j1 clean
+ einfo "Doing shared libs"
+ emake \
+ CFLAGS="${CFLAGS} -fPIC" \
+ FFLAGS="${FFLAGS} -fPIC" \
+ shared cpg-shared \
+ || die "emake shared failed"
+
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake pgplot.html || die "make pgplot.html failed"
+ emake pgplot-routines.tex || die "make pgplot-routines failed"
+ pdflatex pgplot-routines.tex
+ pdflatex pgplot-routines.tex
+ fi
+
+ # this just cleans out not needed files
+ emake -j1 clean
+}
+
+src_test() {
+ einfo "Testing various demo programs"
+ # i can go to 16
+ for i in 1 2 3; do
+ emake pgdemo${i}
+ # j can also be LATEX CPS...
+ for j in NULL PNG PS CPS LATEX; do
+ local testexe=./test_${j}_${i}
+ echo "LD_LIBRARY_PATH=. ./pgdemo${i} <<EOF" > ${testexe}
+ echo "/${j}" >> ${testexe}
+ echo "EOF" >> ${testexe}
+ sh ${testexe} || die "test ${i} failed"
+ done
+ done
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/pgplot
+ doins grfont.dat grexec.f *.inc rgb.txt || die
+
+ # FORTRAN libs
+ dolib.a libpgplot.a || die "dolib.a failed"
+ dolib.so libpgplot.so* || die "dolib.so failed"
+ dobin pgxwin_server pgdisp || die "dobin failed"
+
+ # C binding
+ insinto /usr/include
+ doins cpgplot.h || die "doins C binding failed"
+ dolib.a libcpgplot.a || die "dolib.a failed"
+ dolib.so libcpgplot.so* || die "dolib C failed"
+
+ if use motif; then
+ doins XmPgplot.h || die "doins motif failed"
+ dolib.a libXmPgplot.a || die "dolib.a motif failed"
+ fi
+
+ if use tk; then
+ doins tkpgplot.h || die "doins tk failed"
+ dolib.a libtkpgplot.a || die "dolib.a tk failed"
+ fi
+
+ # minimal doc
+ dodoc aaaread.me pgplot.doc || die "dodoc minimal doc failed"
+ newdoc pgdispd/aaaread.me pgdispd.txt || die "install pgdispd doc failed"
+
+ if use doc; then
+ dodoc cpg/cpgplot.doc applications/curvefit/curvefit.doc
+ dohtml pgplot.html
+ insinto /usr/share/doc/${PF}
+ doins pgplot-routines.pdf pgplot-routines.tex
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/* cpg/cpgdemo.c
+ insinto /usr/share/doc/${PF}/applications
+ doins -r applications/*
+ if use motif; then
+ insinto /usr/share/doc/${PF}/pgm
+ doins pgmf/* drivers/xmotif/pgmdemo.c
+ fi
+ if use tk; then
+ insinto /usr/share/doc/${PF}/pgtk
+ doins drivers/xtk/pgtkdemo.*
+ fi
+ fi
+}