summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-07-05 22:00:11 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-07-05 22:00:11 +0000
commit5bd594ccf33ebca333419b7c9c52ad15aaf38eaa (patch)
treef84e268ffefe2806f7f5f97a0b37e97426eb4df8 /sci-libs/pgplot
parentRe-sign manifest. (diff)
downloadhistorical-5bd594ccf33ebca333419b7c9c52ad15aaf38eaa.tar.gz
historical-5bd594ccf33ebca333419b7c9c52ad15aaf38eaa.tar.bz2
historical-5bd594ccf33ebca333419b7c9c52ad15aaf38eaa.zip
Switch to EAPI4, added static-libs, fixed makemake patch, keyword amd64-linux, x86-linux
Package-Manager: portage-2.2.01.20430-prefix/cvs/Linux x86_64
Diffstat (limited to 'sci-libs/pgplot')
-rw-r--r--sci-libs/pgplot/ChangeLog12
-rw-r--r--sci-libs/pgplot/files/pgplot-ldflags.patch20
-rw-r--r--sci-libs/pgplot/files/pgplot-makemake.patch108
-rw-r--r--sci-libs/pgplot/pgplot-5.2.2-r3.ebuild168
-rw-r--r--sci-libs/pgplot/pgplot-5.2.2-r5.ebuild (renamed from sci-libs/pgplot/pgplot-5.2.2-r4.ebuild)78
5 files changed, 145 insertions, 241 deletions
diff --git a/sci-libs/pgplot/ChangeLog b/sci-libs/pgplot/ChangeLog
index c50966fe9f39..1f88b7f1f28e 100644
--- a/sci-libs/pgplot/ChangeLog
+++ b/sci-libs/pgplot/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-libs/pgplot
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/ChangeLog,v 1.23 2011/09/14 16:01:26 ssuominen Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/ChangeLog,v 1.24 2012/07/05 22:00:11 bicatali Exp $
+
+*pgplot-5.2.2-r5 (05 Jul 2012)
+
+ 05 Jul 2012; SĂ©bastien Fabbro <bicatali@gentoo.org> +pgplot-5.2.2-r5.ebuild,
+ -files/pgplot-ldflags.patch, -pgplot-5.2.2-r3.ebuild, -pgplot-5.2.2-r4.ebuild,
+ files/pgplot-makemake.patch:
+ Switch to EAPI4, added static-libs, fixed makemake patch, keyword amd64-linux,
+ x86-linux
14 Sep 2011; Samuli Suominen <ssuominen@gentoo.org>
+files/pgplot-libpng15.patch, pgplot-5.2.2-r4.ebuild:
diff --git a/sci-libs/pgplot/files/pgplot-ldflags.patch b/sci-libs/pgplot/files/pgplot-ldflags.patch
deleted file mode 100644
index 30e288f8bf14..000000000000
--- a/sci-libs/pgplot/files/pgplot-ldflags.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-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/files/pgplot-makemake.patch b/sci-libs/pgplot/files/pgplot-makemake.patch
index f1fed866ecd6..f7e16bca7f53 100644
--- a/sci-libs/pgplot/files/pgplot-makemake.patch
+++ b/sci-libs/pgplot/files/pgplot-makemake.patch
@@ -1,5 +1,5 @@
---- makemake.orig 2010-01-28 18:57:25.000000000 +0000
-+++ makemake 2010-01-28 18:59:06.000000000 +0000
+--- makemake.orig 2012-07-05 14:08:30.210815190 -0700
++++ makemake 2012-07-05 14:26:28.353381906 -0700
@@ -73,7 +73,7 @@
# List the default make targets.
@@ -9,13 +9,14 @@
# Get the configuration variables.
-@@ -199,17 +199,17 @@
+@@ -199,18 +199,18 @@
fi
if (echo $DRIV_LIST | grep -s xmdriv 2>&1 1>/dev/null); then
- DEFAULT_TARGETS="$DEFAULT_TARGETS libXmPgplot.a pgmdemo"
+- INSTALL_LIST="$INSTALL_LIST libXmPgplot.a XmPgplot.h"
+ DEFAULT_TARGETS="$DEFAULT_TARGETS libXmPgplot.a"
- INSTALL_LIST="$INSTALL_LIST libXmPgplot.a XmPgplot.h"
++ INSTALL_LIST="$INSTALL_LIST libXmPgplot.a XmPgplot.h"
fi
if (echo $DRIV_LIST | grep -s xadriv 2>&1 1>/dev/null); then
@@ -26,10 +27,12 @@
if (echo $DRIV_LIST | grep -s tkdriv 2>&1 1>/dev/null); then
- DEFAULT_TARGETS="$DEFAULT_TARGETS libtkpgplot.a pgtkdemo pgtkdemo.tcl"
-+ DEFAULT_TARGETS="$DEFAULT_TARGETS libtkpgplot.a"
- INSTALL_LIST="$INSTALL_LIST libtkpgplot.a tkpgplot.h"
+- INSTALL_LIST="$INSTALL_LIST libtkpgplot.a tkpgplot.h"
++ DEFAULT_TARGETS="$DEFAULT_TARGETS libtkpgplot.so"
++ INSTALL_LIST="$INSTALL_LIST libtkpgplot.a tkpgplot.h"
fi
+ if (echo $DRIV_LIST | grep -s rvdriv 2>&1 1>/dev/null); then
@@ -622,7 +622,7 @@
# Fortran compiler and compilation flags
#
@@ -77,11 +80,11 @@
+# $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+# $(SHARED_LD)
+
-+shared: $(PG_ROUTINES) $(PG_NON_STANDARD) \
++shared: $(PG_ROUTINES) $(PG_NON_STANDARD) grfont.dat \
+ $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+ $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \
+ $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
-+ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` -o $(SHARED_LIB) $(SHARED_LIB_LIBS)
++ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS) -o $(SHARED_LIB)
+ ln -s $(SHARED_LIB) libpgplot.so
EOD
@@ -95,7 +98,63 @@
$(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
$(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
EOD
-@@ -1025,12 +1039,12 @@
+@@ -857,7 +871,7 @@
+
+ for file in $DEMOS; do
+ echo "${file}: \$(DEMDIR)/${file}.f $EXTRA_DEPENDENCY"
+-echo " \$(FCOMPL) \$(FFLAGD) -o ${file} \$(DEMDIR)/${file}.f \$(PGPLOT_LIB) \$(LIBS)"
++echo " \$(FCOMPL) \$(FFLAGD) \$(DEMDIR)/${file}.f \$(PGPLOT_LIB) \$(LIBS) -o ${file}"
+ done >> makefile
+
+ cat >> makefile << \EOD
+@@ -921,13 +935,13 @@
+ # 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) $(DRVDIR)/pgxwin_server.c $(LIBS) -o pgxwin_server
+
+ #-----------------------------------------------------------------------
+ # Target "pgdisp" is the pgdisp server program for /XDISP driver
+ #-----------------------------------------------------------------------
+ pgdisp: $(PGDISP_ROUTINES)
+- $(CCOMPL) $(CFLAGC) -o pgdisp $(PGDISP_ROUTINES) $(LIBS)
++ $(CCOMPL) $(CFLAGC) $(LDFLAGS) $(PGDISP_ROUTINES) $(LIBS) -o pgdisp
+
+ #-----------------------------------------------------------------------
+ # Target "libxmpgplot.a" contains the Motif widget driver.
+@@ -937,6 +951,10 @@
+ ar ru libXmPgplot.a XmPgplot.o
+ $(RANLIB) libXmPgplot.a
+
++libXmPgplot.so: XmPgplot.h XmPgplot.o
++ $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) XmPgplot.o -L. -lcpgplot $(MOTIF_LIBS) -o libXmPgplot.so.5
++ ln -s libXmPgplot.so.5 libXmPgplot.so
++
+ XmPgplot.h: $(XMDIR)/XmPgplot.h
+ cp $(XMDIR)/XmPgplot.h XmPgplot.h
+
+@@ -965,6 +983,10 @@
+ ar ru libtkpgplot.a tkpgplot.o
+ $(RANLIB) libtkpgplot.a
+
++libtkpgplot.so: tkpgplot.h tkpgplot.o
++ $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) tkpgplot.o -L. -lcpgplot $(TK_LIBS) -o libtkpgplot.so.5
++ ln -s libtkpgplot.so.5 libtkpgplot.so
++
+ tkpgplot.h: $(TKDIR)/tkpgplot.h
+ cp $(TKDIR)/tkpgplot.h tkpgplot.h
+
+@@ -983,7 +1005,7 @@
+ cp $(TKDIR)/rvpgplot.h rvpgplot.h
+
+ rvpgplot.o: $(DRVDIR)/pgxwin.h rvpgplot.h $(TKDIR)/tkpgplot.c
+- $(CCOMPL) -o $@ -c -DUSE_RIVET $(CFLAGC) -I$(DRVDIR) -I$(TKDIR) $(RV_INCL) $(TKDIR)/tkpgplot.c
++ $(CCOMPL) -c -DUSE_RIVET $(CFLAGC) -I$(DRVDIR) -I$(TKDIR) $(RV_INCL) $(TKDIR)/tkpgplot.c -o $@
+
+ #-----------------------------------------------------------------------
+ # Target "install" is required for Figaro.
+@@ -1025,12 +1047,12 @@
grivas.o : $(DRVDIR)/gadef.h
grtv00.o : $(DRVDIR)/imdef.h
pgxwin.o : $(DRVDIR)/pgxwin.h
@@ -110,7 +169,7 @@
@echo ' '
@echo '*** Finished compilation of the C PGPLOT wrapper library ***'
@echo ' '
-@@ -1039,17 +1053,29 @@
+@@ -1039,24 +1061,36 @@
@echo 'will be needed.'
@echo ' '
@@ -120,7 +179,7 @@
$(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind
-libcpgplot.a cpgplot.h: $(PG_SOURCE) pgbind
-+cpgplot.h: $(PG_SOURCE) pgbind
++cpgplot.h: $(PG_SOURCE) pgbind
./pgbind $(PGBIND_FLAGS) -h -w $(PG_SOURCE)
+
+libcpgplot.a: cpgplot.h
@@ -130,14 +189,35 @@
$(RANLIB) libcpgplot.a
rm -f cpg*.o
-+libcpgplot.so: $(PG_SOURCE) pgbind
++libcpgplot.so: cpgplot.h $(PG_SOURCE) pgbind
+ ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
+ $(CCOMPL) -c $(CFLAGC) cpg*.c
+ rm -f cpg*.c
-+ $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) cpg*.o -o $(SHARED_CLIB) -L. -lpgplot $(SHARED_LIB_LIBS)
++ $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) cpg*.o -L. -lpgplot $(SHARED_LIB_LIBS) -o $(SHARED_CLIB)
+ ln -s $(SHARED_CLIB) libcpgplot.so
+ rm -f cpg*.o
+
cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c libcpgplot.a
$(CCOMPL) $(CFLAGD) -c -I. $(SRC)/cpg/cpgdemo.c
- $(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)
+- $(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)
++ $(FCOMPL) cpgdemo.o $(CPGPLOT_LIB) $(LIBS) -o cpgdemo
+ rm -f cpgdemo.o
+
+-pgmdemo: pgmdemo.o libXmPgplot.a
+- $(FCOMPL) -o pgmdemo pgmdemo.o -L`pwd` -lXmPgplot $(CPGPLOT_LIB) $(MOTIF_LIBS)
++pgmdemo: pgmdemo.o libXmPgplot.so
++ $(FCOMPL) pgmdemo.o -L`pwd` -lXmPgplot $(CPGPLOT_LIB) $(MOTIF_LIBS) -o pgmdemo
+
+ pgmdemo.o: $(XMDIR)/pgmdemo.c XmPgplot.h libcpgplot.a cpgplot.h
+ $(CCOMPL) $(CFLAGD) -c -I`pwd` $(MOTIF_INCL) $(XMDIR)/pgmdemo.c
+@@ -1067,8 +1101,8 @@
+ pgawdemo.o: $(XADIR)/pgawdemo.c XaPgplot.h libcpgplot.a cpgplot.h
+ $(CCOMPL) $(CFLAGD) -c -I`pwd` $(ATHENA_INCL) $(XADIR)/pgawdemo.c
+
+-pgtkdemo: pgtkdemo.o libtkpgplot.a
+- $(FCOMPL) -o pgtkdemo pgtkdemo.o -L`pwd` -ltkpgplot $(CPGPLOT_LIB) $(TK_LIBS)
++pgtkdemo: pgtkdemo.o libtkpgplot.so
++ $(FCOMPL) pgtkdemo.o -L`pwd` -ltkpgplot $(CPGPLOT_LIB) $(TK_LIBS) -o pgtkdemo
+
+ pgtkdemo.tcl: $(TKDIR)/pgtkdemo.tcl
+ cp $(TKDIR)/pgtkdemo.tcl pgtkdemo.tcl
diff --git a/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild
deleted file mode 100644
index 159e7b2b4109..000000000000
--- a/sci-libs/pgplot/pgplot-5.2.2-r3.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2011 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.10 2011/06/21 15:14:59 jlec Exp $
-
-EAPI=2
-inherit eutils fortran-2 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="
- virtual/fortran
- x11-libs/libX11
- x11-libs/libXt
- media-libs/libpng
- motif? ( >=x11-libs/openmotif-2.3:0 )
- 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
-
- # 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 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 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
-}
diff --git a/sci-libs/pgplot/pgplot-5.2.2-r4.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r5.ebuild
index 1202702b5242..ec76d44aa6e9 100644
--- a/sci-libs/pgplot/pgplot-5.2.2-r4.ebuild
+++ b/sci-libs/pgplot/pgplot-5.2.2-r5.ebuild
@@ -1,29 +1,29 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 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.5 2011/09/14 16:01:26 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/pgplot/pgplot-5.2.2-r5.ebuild,v 1.1 2012/07/05 22:00:11 bicatali Exp $
-EAPI=2
-inherit eutils fortran-2 toolchain-funcs
+EAPI=4
+inherit eutils fortran-2 toolchain-funcs multilib
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="
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc motif static-libs tk"
+RDEPEND="media-libs/libpng
virtual/fortran
x11-libs/libX11
x11-libs/libXt
- media-libs/libpng
motif? ( >=x11-libs/openmotif-2.3:0 )
tk? ( dev-lang/tk )"
DEPEND="${RDEPEND}
doc? ( virtual/latex-base )"
-S=${WORKDIR}/${PN}
+S="${WORKDIR}/${PN}"
src_prepare() {
epatch \
@@ -31,19 +31,17 @@ src_prepare() {
"${FILESDIR}"/${PN}-makemake.patch \
"${FILESDIR}"/${PN}-compile-setup.patch \
"${FILESDIR}"/${PN}-headers.patch \
- "${FILESDIR}"/${PN}-ldflags.patch \
"${FILESDIR}"/${PN}-libpng15.patch
# gfortran < 4.3 does not compile gif, pp and wd drivers
- if [[ "$(tc-getFC)" == gfortran ]] &&
+ 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 "if you want more drivers, use gfortran >= 4.3"
ewarn
- epause 4
sed -i \
-e 's/GIDRIV/! GIDRIV/g' \
-e 's/PPDRIV/! GIDRIV/g' \
@@ -81,22 +79,27 @@ src_prepare() {
use tk && sed -i -e '/TKDRIV/s/!//' drivers.list
}
-src_compile() {
+src_configure() {
./makemake . linux
- einfo "Doing static libs and execs"
- emake all cpg || die "emake static failed"
- emake -j1 clean
- einfo "Doing shared libs"
+ # post makefile creation prefix hack
+ sed -i -e "s|/usr|${EROOT}/usr|g" makefile || die
+}
+
+src_compile() {
emake \
CFLAGS="${CFLAGS} -fPIC" \
FFLAGS="${FFLAGS} -fPIC" \
- shared cpg-shared \
- || die "emake shared failed"
+ shared cpg-shared pgxwin_server pgdisp pgplot.doc
+
+ use tk && emake CFLAGS="${CFLAGS} -fPIC" libtkpgplot.so
+ use motif && emake CFLAGS="${CFLAGS} -fPIC" libXmPgplot.so
+
+ emake -j1 clean
+ use static-libs && emake all cpg
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"
+ emake pgplot.html pgplot-routines.tex
pdflatex pgplot-routines.tex
pdflatex pgplot-routines.tex
fi
@@ -106,8 +109,8 @@ src_compile() {
}
src_test() {
- einfo "Testing various demo programs"
# i can go to 16
+ local i j
for i in 1 2 3; do
emake pgdemo${i}
# j can also be LATEX CPS...
@@ -123,32 +126,33 @@ src_test() {
src_install() {
insinto /usr/$(get_libdir)/pgplot
- doins grfont.dat grexec.f *.inc rgb.txt || die
+ doins grfont.dat grexec.f *.inc rgb.txt
- # 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"
+ dolib.so libpgplot.so*
+ dobin pgxwin_server pgdisp
# 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"
+ doins cpgplot.h
+ dolib.so libcpgplot.so*
if use motif; then
- doins XmPgplot.h || die "doins motif failed"
- dolib.a libXmPgplot.a || die "dolib.a motif failed"
+ insinto /usr/include
+ doins XmPgplot.h
+ dolib.so libXmPgplot.so*
fi
if use tk; then
- doins tkpgplot.h || die "doins tk failed"
- dolib.a libtkpgplot.a || die "dolib.a tk failed"
+ insinto /usr/include
+ doins tkpgplot.h
+ dolib.so libtkpgplot.so*
fi
+ use static-libs && dolib.a lib*pgplot.a
+
# minimal doc
- dodoc aaaread.me pgplot.doc || die "dodoc minimal doc failed"
- newdoc pgdispd/aaaread.me pgdispd.txt || die "install pgdispd doc failed"
+ dodoc aaaread.me pgplot.doc
+ newdoc pgdispd/aaaread.me pgdispd.txt
if use doc; then
dodoc cpg/cpgplot.doc applications/curvefit/curvefit.doc