summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/pgplot
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/pgplot')
-rw-r--r--sci-libs/pgplot/Manifest1
-rw-r--r--sci-libs/pgplot/files/pgplot-compile-setup.patch96
-rw-r--r--sci-libs/pgplot/files/pgplot-drivers.patch117
-rw-r--r--sci-libs/pgplot/files/pgplot-headers.patch109
-rw-r--r--sci-libs/pgplot/files/pgplot-libpng15.patch11
-rw-r--r--sci-libs/pgplot/files/pgplot-makemake.patch223
-rw-r--r--sci-libs/pgplot/files/pgplot-pgdisp.patch11
-rw-r--r--sci-libs/pgplot/files/pgplot-tk86.patch47
-rw-r--r--sci-libs/pgplot/metadata.xml12
-rw-r--r--sci-libs/pgplot/pgplot-5.2.2-r6.ebuild181
10 files changed, 808 insertions, 0 deletions
diff --git a/sci-libs/pgplot/Manifest b/sci-libs/pgplot/Manifest
new file mode 100644
index 000000000000..d2c61570b4fc
--- /dev/null
+++ b/sci-libs/pgplot/Manifest
@@ -0,0 +1 @@
+DIST pgplot522.tar.gz 1197397 SHA256 a5799ff719a510d84d26df4ae7409ae61fe66477e3f1e8820422a9a4727a5be4 SHA512 03a075c84506ead1d665a7105cd41c7cfbe19d12094cb36fb7459a0f6ee0df0638543b7eca92aaf80677984cc47a07b968f854db8eaa90ec605f78d89c615d1f WHIRLPOOL ced06d5fc275530fae0ed839aaaa360a1c560a102126c8cad6936c1d6494403c97489e6f248e28e64ca5cc2950677e5b336861876cc554965bb9c05b1bf0fba9
diff --git a/sci-libs/pgplot/files/pgplot-compile-setup.patch b/sci-libs/pgplot/files/pgplot-compile-setup.patch
new file mode 100644
index 000000000000..f1709c333f4f
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-compile-setup.patch
@@ -0,0 +1,96 @@
+--- sys_linux/g77_gcc.conf.orig 1999-07-05 19:10:33.000000000 +0100
++++ sys_linux/g77_gcc.conf 2008-10-29 18:30:33.000000000 +0000
+@@ -1,4 +1,4 @@
+-# The GNU g77 FORTRAN compiler and Gnu gcc C compiler on an elf-system.
++# The GNU gfortran FORTRAN compiler and Gnu gcc C compiler on an elf-system.
+ #-----------------------------------------------------------------------
+
+ # Optional: Needed by XWDRIV (/xwindow and /xserve) and
+@@ -23,7 +23,7 @@
+ # The arguments needed by the C compiler to locate Tcl, Tk and
+ # X-window include files.
+
+- TK_INCL="-I/usr/include $XINCL"
++ TK_INCL="$XINCL"
+
+ # Optional: Needed by RVDRIV (/xrv).
+ # The arguments needed by the C compiler to locate Rivet, Tcl, Tk and
+@@ -34,13 +34,13 @@
+ # Mandatory.
+ # The FORTRAN compiler to use.
+
+- FCOMPL="g77"
++ FCOMPL="gfortran"
+
+ # Mandatory.
+ # The FORTRAN compiler flags to use when compiling the pgplot library.
+ # (NB. makemake prepends -c to $FFLAGC where needed)
+
+- FFLAGC="-u -Wall -fPIC -O"
++ FFLAGC="-u -Wall"
+
+ # Mandatory.
+ # The FORTRAN compiler flags to use when compiling fortran demo programs.
+@@ -57,12 +57,12 @@
+ # Mandatory.
+ # The C compiler flags to use when compiling the pgplot library.
+
+- CFLAGC="-Wall -fPIC -DPG_PPU -O"
++ CFLAGC="-Wall -DPG_PPU"
+
+ # Mandatory.
+ # The C compiler flags to use when compiling C demo programs.
+
+- CFLAGD="-Wall -O"
++ CFLAGD="-Wall"
+
+ # Optional: Only needed if the cpgplot library is to be compiled.
+ # The flags to use when running pgbind to create the C pgplot wrapper
+@@ -74,7 +74,7 @@
+ # The library-specification flags to use when linking normal pgplot
+ # demo programs.
+
+- LIBS="-L/usr/X11R6/lib -lX11"
++ LIBS="-lX11"
+
+ # Optional: Needed by XMDRIV (/xmotif).
+ # The library-specification flags to use when linking motif
+@@ -92,7 +92,7 @@
+ # The library-specification flags to use when linking Tk demo programs.
+ # Note that you may need to append version numbers to -ltk and -ltcl.
+
+- TK_LIBS="-L/usr/lib -ltk -ltcl $LIBS -ldl"
++ TK_LIBS="-ltk -ltcl $LIBS -ldl"
+
+ # Mandatory.
+ # On systems that have a ranlib utility, put "ranlib" here. On other
+@@ -103,12 +103,18 @@
+ # Optional: Needed on systems that support shared libraries.
+ # The name to give the shared pgplot library.
+
+- SHARED_LIB="libpgplot.so"
++ MV=5
++ SHARED_LIB="libpgplot.so.$MV"
++ SHARED_CLIB="libcpgplot.so.$MV"
+
+ # Optional: Needed if SHARED_LIB is set.
+ # How to create a shared library from a trailing list of object files.
+
+- SHARED_LD="gcc -shared -o $SHARED_LIB"
++ SHARED_LD_PGPLOT_OPTS="$LDFLAGS -Wl,-soname,$SHARED_LIB"
++
++ SHARED_LD_CPGPLOT_OPTS="$LDFLAGS -Wl,-soname,$SHARED_CLIB"
++
++ SHARED_LD="$FCOMPL -shared"
+
+ # Optional:
+ # On systems such as Solaris 2.x, that allow specification of the
+@@ -117,7 +123,7 @@
+ # library-specification flags used to specify these libraries to
+ # $SHARED_LD
+
+- SHARED_LIB_LIBS=""
++ SHARED_LIB_LIBS="-lX11 -lXt -lpng"
+
+ # Optional:
+ # Compiler name used on Next systems to compile objective-C files.
diff --git a/sci-libs/pgplot/files/pgplot-drivers.patch b/sci-libs/pgplot/files/pgplot-drivers.patch
new file mode 100644
index 000000000000..8201bdfaeb70
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-drivers.patch
@@ -0,0 +1,117 @@
+--- drivers.list.orig 2007-03-08 15:56:20.000000000 +0000
++++ drivers.list 2007-03-08 15:59:21.000000000 +0000
+@@ -6,71 +6,71 @@
+ !------------------------------------------------------------------------------
+ ! File Code Description Restrictions
+ ! BCDRIV 0 /BCANON Canon Laser printer (bitmap version), landscape
+-! CADRIV 0 /CANON Canon Laser printer, LBP-8/A2, landscape
++ CADRIV 0 /CANON Canon Laser printer, LBP-8/A2, landscape
+ ! CCDRIV 0 /CCP DEC LJ250 Color Companion printer
+-! CGDRIV 1 /CGM CGM metafile, indexed colour selection C
+-! CGDRIV 2 /CGMD CGM metafile, direct colour selection C
+-! CWDRIV 0 /CW6320 Gould/Bryans Colourwriter 6320 pen plotter Std F77
++ CGDRIV 1 /CGM CGM metafile, indexed colour selection C
++ CGDRIV 2 /CGMD CGM metafile, direct colour selection C
++ CWDRIV 0 /CW6320 Gould/Bryans Colourwriter 6320 pen plotter Std F77
+ ! EPDRIV 0 /EPSON Epson FX100 dot matrix printer
+ ! EXDRIV 1 /EXCL Talaris/EXCL printers, landscape
+ ! EXDRIV 2 /EXCL Talaris/EXCL printers, portrait
+ ! GCDRIV 0 /GENICOM Genicom 4410 dot-matrix printer, landscape
+ ! Caution: use of GIDRIV may require a license from Unisys:
+-! GIDRIV 1 /GIF GIF-format file, landscape
+-! GIDRIV 2 /VGIF GIF-format file, portrait
+-! GLDRIV 1 /HPGL Hewlett-Packard HP-GL plotters, landscape Std F77
+-! GLDRIV 2 /VHPGL Hewlett-Packard HP-GL plotters, portrait Std F77
++ GIDRIV 1 /GIF GIF-format file, landscape
++ GIDRIV 2 /VGIF GIF-format file, portrait
++ GLDRIV 1 /HPGL Hewlett-Packard HP-GL plotters, landscape Std F77
++ GLDRIV 2 /VHPGL Hewlett-Packard HP-GL plotters, portrait Std F77
+ ! GODRIV 0 /GOC GOC Sigma T5670 terminal VMS
+ ! GVDRIV 0 /GVENICOM Genicom 4410 dot-matrix printer, portrait
+-! HGDRIV 0 /HPGL2 Hewlett-Packard graphics language
+-! HIDRIV 0 /HIDMP Houston Instruments HIDMP pen plotter
++ HGDRIV 0 /HPGL2 Hewlett-Packard graphics language
++ HIDRIV 0 /HIDMP Houston Instruments HIDMP pen plotter
+ ! HJDRIV 0 /HJ Hewlett-Packard Desk/Laserjet printer
+-! HPDRIV 0 /HP7221 Hewlett-Packard HP7221 pen plotter Std F77
++ HPDRIV 0 /HP7221 Hewlett-Packard HP7221 pen plotter Std F77
+ ! LADRIV 0 /LA50 Dec LA50 and other sixel printers
+ ! LJDRIV 0 /LJ Hewlett-Packard LaserJet printers VMS
+-! LSDRIV 1 /LIPS2 Canon LaserShot printer (landscape)
+-! LSDRIV 2 /VLIPS2 Canon LaserShot printer (portrait)
++ LSDRIV 1 /LIPS2 Canon LaserShot printer (landscape)
++ LSDRIV 2 /VLIPS2 Canon LaserShot printer (portrait)
+ ! LNDRIV 0 /LN03 Dec LN03-PLUS Laser printer (landscape) VMS
+ ! LVDRIV 0 /LVN03 Dec LN03-PLUS Laser printer (portrait) VMS
+-! LXDRIV 0 /LATEX LaTeX picture environment
++ LXDRIV 0 /LATEX LaTeX picture environment
+ ! MFDRIV 0 /FILE PGPLOT graphics metafile
+ ! NEDRIV 0 /NEXT Computers running NeXTstep operating system
+ NUDRIV 0 /NULL Null device (no output) Std F77
+-! PGDRIV 0 /PGMF PGPLOT metafile (new format, experimental) Std F77
+-! PNDRIV 1 /PNG Portable Network Graphics file C
+-! PNDRIV 2 /TPNG Portable Network Graphics file - transparent background C
+-! PPDRIV 1 /PPM Portable Pixel Map file, landscape
+-! PPDRIV 2 /VPPM Portable PIxel Map file, portrait
+-! PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
+-! PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77
+-! PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
+-! PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77
++ PGDRIV 0 /PGMF PGPLOT metafile (new format, experimental) Std F77
++ PNDRIV 1 /PNG Portable Network Graphics file C
++ PNDRIV 2 /TPNG Portable Network Graphics file - transparent background C
++ PPDRIV 1 /PPM Portable Pixel Map file, landscape
++ PPDRIV 2 /VPPM Portable PIxel Map file, portrait
++ PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
++ PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77
++ PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
++ PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77
+ ! PXDRIV 0 /PRINTRONI Printronix P300 or P600 dot-matrix printer
+-! QMDRIV 1 /QMS QUIC devices (QMS and Talaris), landscape Std F77
+-! QMDRIV 2 /VQMS QUIC devices (QMS and Talaris), portrait Std F77
++ QMDRIV 1 /QMS QUIC devices (QMS and Talaris), landscape Std F77
++ QMDRIV 2 /VQMS QUIC devices (QMS and Talaris), portrait Std F77
+ ! TFDRIV 0 /TFILE Tektronix-format disk file VMS
+ ! TODRIV 0 /TOSHIBA Toshiba "3-in-one" printer, model P351
+-! TTDRIV 1 /TEK4010 Tektronix 4006/4010 storage-tube terminal Std F77
+-! TTDRIV 2 /GF GraphOn terminal Std F77
+-! TTDRIV 3 /RETRO RetroGraphics terminal Std F77
+-! TTDRIV 4 /GTERM GTERM Tektronix terminal emulator Std F77
+-! TTDRIV 5 /XTERM XTERM Tektronix terminal emulator Std F77
+-! TTDRIV 6 /ZSTEM ZSTEM terminal emulator Std F77
+-! TTDRIV 7 /V603 Visual 603 terminal Std F77
++ TTDRIV 1 /TEK4010 Tektronix 4006/4010 storage-tube terminal Std F77
++ TTDRIV 2 /GF GraphOn terminal Std F77
++ TTDRIV 3 /RETRO RetroGraphics terminal Std F77
++ TTDRIV 4 /GTERM GTERM Tektronix terminal emulator Std F77
++ TTDRIV 5 /XTERM XTERM Tektronix terminal emulator Std F77
++ TTDRIV 6 /ZSTEM ZSTEM terminal emulator Std F77
++ TTDRIV 7 /V603 Visual 603 terminal Std F77
+ ! TTDRIV 8 /KRM3 Kermit 3 on IBM-PC Std F77
+-! TTDRIV 9 /TK4100 Tektronix 4100-series terminals Std F77
+-! TTDRIV 10 /VMAC Macintosh VersaTerm-PRO Tektronix-4105 emulator Std F77
++ TTDRIV 9 /TK4100 Tektronix 4100-series terminals Std F77
++ TTDRIV 10 /VMAC Macintosh VersaTerm-PRO Tektronix-4105 emulator Std F77
+ ! TXDRIV 0 /TX TeX PK Font Output files
+-! VADRIV 0 /VCANON Canon Laser printer, LBP-8/A2, portrait
+-! VBDRIV 0 /VBCANON Canon Laser printer (bitmap version), portrait
+-! VTDRIV 0 /VT125 Dec Regis terminals (VT125 etc.) Std F77
+-! WDDRIV 1 /WD X Window dump file, landscape
+-! WDDRIV 2 /VWD X Window dump file, portrait
++ VADRIV 0 /VCANON Canon Laser printer, LBP-8/A2, portrait
++! VBDRIV 0 /VBCANON Canon Laser printer (bitmap version), portrait
++ VTDRIV 0 /VT125 Dec Regis terminals (VT125 etc.) Std F77
++ WDDRIV 1 /WD X Window dump file, landscape
++ WDDRIV 2 /VWD X Window dump file, portrait
+ ! WSDRIV 0 /WS VAX workstations running VWS software VMS
+-! X2DRIV 0 /XDISP PGDISP or FIGDISP server for X workstations C
+-! XWDRIV 1 /XWINDOW Workstations running X Window System C
+-! XWDRIV 2 /XSERVE Persistent window on X Window System C
+-! ZEDRIV 0 /ZETA Zeta 8 Digital Plotter
++ X2DRIV 0 /XDISP PGDISP or FIGDISP server for X workstations C
++ XWDRIV 1 /XWINDOW Workstations running X Window System C
++ XWDRIV 2 /XSERVE Persistent window on X Window System C
++! ZEDRIV 0 /ZETA Zeta 8 Digital Plotter
+ !
+ ! The following drivers can only be used in PGPLOT installations on MS-DOS
+ ! systems with appropriate hardware and software. Do not select these
diff --git a/sci-libs/pgplot/files/pgplot-headers.patch b/sci-libs/pgplot/files/pgplot-headers.patch
new file mode 100644
index 000000000000..7bde726a041a
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-headers.patch
@@ -0,0 +1,109 @@
+--- ./sys/grtermio.c.orig 2008-10-29 17:42:48.000000000 +0000
++++ ./sys/grtermio.c 2008-10-29 19:54:43.000000000 +0000
+@@ -7,6 +7,10 @@
+
+ #include <stdio.h>
+ #include <termios.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <fcntl.h>
+
+ #ifdef PG_PPU
+ #define GROTER groter_
+--- ./sys/grfileio.c.orig 2008-10-29 15:10:02.000000000 +0000
++++ ./sys/grfileio.c 2008-10-29 17:56:50.000000000 +0000
+@@ -17,7 +17,9 @@
+ */
+
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+
+--- ./drivers/figdisp_comm.c.orig 2008-10-29 15:09:15.000000000 +0000
++++ ./drivers/figdisp_comm.c 2008-10-29 17:54:08.000000000 +0000
+@@ -17,6 +17,8 @@
+
+ /* The system include files */
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+
+ /* Get ntohs prototype or macro */
+
+--- ./pgdispd/resdb.c.orig 2008-10-29 18:22:41.000000000 +0000
++++ ./pgdispd/resdb.c 2008-10-29 20:10:22.000000000 +0000
+@@ -47,6 +47,8 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
++
+ #ifndef VMS
+ #include <pwd.h>
+ #endif
+@@ -1042,7 +1044,6 @@
+ int uid;
+
+ extern char *getenv();
+- extern int getuid();
+ extern struct passwd *getpwuid();
+ struct passwd *pw;
+ register char *ptr;
+--- ./pgdispd/proccom.c.orig 2008-10-29 15:03:34.000000000 +0000
++++ ./pgdispd/proccom.c 2008-10-29 18:15:48.000000000 +0000
+@@ -90,6 +90,7 @@
+
+ /* The system include files */
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <netinet/in.h>
+
+@@ -163,7 +164,6 @@
+ void drawline(); /* draw a line in the bitmap window */
+ Pixmap XCreatePixmap();
+
+- char *malloc();
+
+ if (!len & savedshorts)
+ { /* an incomplete command was sent! */
+--- ./pgdispd/getvisuals.c.orig 2008-10-29 17:59:37.000000000 +0000
++++ ./pgdispd/getvisuals.c 2008-10-29 18:00:18.000000000 +0000
+@@ -30,6 +30,7 @@
+ #include "messages.h"
+
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #define MAX_DEPTH 24 /* the maximum visual depth to use */
+
+--- ./pgdispd/figcurs.c.orig 2008-10-29 17:58:22.000000000 +0000
++++ ./pgdispd/figcurs.c 2008-10-29 18:14:02.000000000 +0000
+@@ -19,6 +19,7 @@
+
+ /* The standard include files */
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <netinet/in.h>
+
+@@ -113,7 +114,6 @@
+ void getbuttonval();
+ int getkeyval();
+
+- char *malloc();
+
+ if (event.type == ButtonPress) getbuttonval(event.xbutton.button, &val);
+ else if (!getkeyval(event, &val)) return(1);
+@@ -167,7 +167,6 @@
+ void getbuttonval();
+ int getkeyval();
+
+- char *malloc();
+
+ if (event.type == ButtonPress) getbuttonval(event.xbutton.button, &val);
+ else if (!getkeyval(event, &val)) return(1);
diff --git a/sci-libs/pgplot/files/pgplot-libpng15.patch b/sci-libs/pgplot/files/pgplot-libpng15.patch
new file mode 100644
index 000000000000..b1064cb4da12
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-libpng15.patch
@@ -0,0 +1,11 @@
+--- drivers/pndriv.c
++++ drivers/pndriv.c
+@@ -222,7 +222,7 @@
+ return;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) { /* not really sure what I'm doing here... */
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ fprintf(stderr,"%s: error in libpng while writing file %s, plotting disabled\n", png_ident, filename);
+ png_destroy_write_struct(&png_ptr,&info_ptr);
+ dev->error = true;
diff --git a/sci-libs/pgplot/files/pgplot-makemake.patch b/sci-libs/pgplot/files/pgplot-makemake.patch
new file mode 100644
index 000000000000..6cc3c637b6ef
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-makemake.patch
@@ -0,0 +1,223 @@
+--- 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.
+
+-DEFAULT_TARGETS="lib grfont.dat prog pgplot.doc"
++DEFAULT_TARGETS="lib grfont.dat pgplot.doc"
+
+ # Get the configuration variables.
+
+@@ -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"
+ fi
+
+ if (echo $DRIV_LIST | grep -s xadriv 2>&1 1>/dev/null); then
+- DEFAULT_TARGETS="$DEFAULT_TARGETS libXaPgplot.a pgawdemo"
++ DEFAULT_TARGETS="$DEFAULT_TARGETS libXaPgplot.a"
+ INSTALL_LIST="$INSTALL_LIST libXaPgplot.a XaPgplot.h"
+ fi
+
+ if (echo $DRIV_LIST | grep -s tkdriv 2>&1 1>/dev/null); then
+- DEFAULT_TARGETS="$DEFAULT_TARGETS libtkpgplot.a pgtkdemo pgtkdemo.tcl"
+- 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
+ #
+ FCOMPL=$FCOMPL
+-FFLAGC=$FFLAGC
++FFLAGC=$FFLAGC \$(FFLAGS)
+ FFLAGD=$FFLAGD
+ #
+ # C compiler and compilation flags
+@@ -633,7 +633,7 @@
+ TK_INCL=$TK_INCL
+ RV_INCL=$RV_INCL
+ CCOMPL=$CCOMPL
+-CFLAGC=$CFLAGC -I.
++CFLAGC=$CFLAGC -I. \$(CFLAGS)
+ CFLAGD=$CFLAGD
+ MCOMPL=$MCOMPL
+ MFLAGC=$MFLAGC
+@@ -657,7 +657,10 @@
+ # Shared library creation.
+ #
+ SHARED_LIB=$SHARED_LIB
++SHARED_CLIB=$SHARED_CLIB
+ SHARED_LD=$SHARED_LD
++SHARED_LD_PGPLOT_OPTS=$SHARED_LD_PGPLOT_OPTS
++SHARED_LD_CPGPLOT_OPTS=$SHARED_LD_CPGPLOT_OPTS
+ #
+ # The libraries that the shared PGPLOT library depends upon.
+ # This is for systems that allow one to specify what libraries
+@@ -806,7 +809,8 @@
+ # libraries.
+ #-----------------------------------------------------------------------
+
+-lib : libpgplot.a $(SHARED_LIB)
++#lib : libpgplot.a $(SHARED_LIB)
++lib : libpgplot.a
+
+ libpgplot.a : $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \
+ $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+@@ -816,6 +820,16 @@
+ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq`
+ $(RANLIB) libpgplot.a
+
++#shared: $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \
++# $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
++# $(SHARED_LD)
++
++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` $(SHARED_LIB_LIBS) -o $(SHARED_LIB)
++ ln -s $(SHARED_LIB) libpgplot.so
+ EOD
+
+ # Emit the shared library dependency if requested.
+@@ -824,7 +838,7 @@
+ cat >> makefile << \EOD
+ $(SHARED_LIB): $(PG_ROUTINES) $(PG_NON_STANDARD) \
+ $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+- $(SHARED_LD) `ls $(PG_ROUTINES) \
++ $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \
+ $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
+ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
+ EOD
+@@ -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) $(LDFLAGS) -Wl,-soname,libXmPgplot.so.5 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) $(LDFLAGS) -Wl,-soname,libtkpgplot.so.5 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
+-pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
++pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h /usr/include/zconf.h
+
+ x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h
+
+
+-cpg: libcpgplot.a cpgplot.h cpgdemo
++cpg: cpgplot.h libcpgplot.a
+ @echo ' '
+ @echo '*** Finished compilation of the C PGPLOT wrapper library ***'
+ @echo ' '
+@@ -1039,24 +1061,36 @@
+ @echo 'will be needed.'
+ @echo ' '
+
++cpg-shared: libcpgplot.so
++
+ pgbind: $(SRC)/cpg/pgbind.c
+ $(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind
+
+-libcpgplot.a cpgplot.h: $(PG_SOURCE) pgbind
++cpgplot.h: $(PG_SOURCE) pgbind
+ ./pgbind $(PGBIND_FLAGS) -h -w $(PG_SOURCE)
++
++libcpgplot.a: cpgplot.h
+ $(CCOMPL) -c $(CFLAGC) cpg*.c
+ rm -f cpg*.c
+ ar ru libcpgplot.a cpg*.o
+ $(RANLIB) libcpgplot.a
+ rm -f cpg*.o
+
++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 -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) 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/files/pgplot-pgdisp.patch b/sci-libs/pgplot/files/pgplot-pgdisp.patch
new file mode 100644
index 000000000000..9828a3bdbcbd
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-pgdisp.patch
@@ -0,0 +1,11 @@
+--- pgdispd/proccom.c 2007-03-08 14:47:15.000000000 +0000
++++ pgdispd/proccom.c.new 2007-03-08 15:34:36.000000000 +0000
+@@ -163,8 +163,6 @@
+ void drawline(); /* draw a line in the bitmap window */
+ Pixmap XCreatePixmap();
+
+- char *malloc();
+-
+ if (!len & savedshorts)
+ { /* an incomplete command was sent! */
+ savedshorts=0;
diff --git a/sci-libs/pgplot/files/pgplot-tk86.patch b/sci-libs/pgplot/files/pgplot-tk86.patch
new file mode 100644
index 000000000000..bc0023eb90d2
--- /dev/null
+++ b/sci-libs/pgplot/files/pgplot-tk86.patch
@@ -0,0 +1,47 @@
+--- drivers/xtk/tkpgplot.c.ORIG 2000-12-13 03:16:28.000000000 +0100
++++ drivers/xtk/tkpgplot.c 2013-01-15 11:02:27.221231471 +0100
+@@ -417,7 +417,7 @@
+ /*
+ * If Tk_Init() hasn't been called, then there won't be a main window
+ * yet. In such cases, Tk_MainWindow() places a suitable error message
+- * in interp->result.
++ * in Tcl_GetStringResult(interp).
+ */
+ if(!main_w)
+ return TCL_ERROR;
+@@ -2136,7 +2136,7 @@
+ tkpg->border = bd;
+ tkpg_draw_3d_border(tkpg);
+ } else {
+- fprintf(stderr, "Tk_Get3DBorder failed: %s\n", tkpg->interp->result);
++ fprintf(stderr, "Tk_Get3DBorder failed: %s\n", Tcl_GetStringResult(tkpg->interp));
+ };
+ }
+
+@@ -2261,7 +2261,7 @@
+ * argv char ** The array of 'argc' configuration arguments.
+ * Output:
+ * return int TCL_ERROR and the context of the error
+- * is recorded in interp->result.
++ * is recorded in Tcl_GetStringResult(result).
+ */
+ static int tkpg_scrollbar_error(TkPgplot *tkpg, Tcl_Interp *interp,
+ char *widget, char *view, int argc,
+@@ -2586,7 +2586,7 @@
+ * Output:
+ * return Tk_Window The top-level window of the path, or NULL if
+ * it doesn't exist. In the latter case an error
+- * message will have been appended to interp->result.
++ * message will have been appended to Tcl_GetStringResult(interp).
+ */
+ static Tk_Window tkpg_toplevel_of_path(Tcl_Interp *interp, Tk_Window main_w,
+ char *path)
+@@ -2630,7 +2630,7 @@
+ free(first);
+ /*
+ * If the window doesn't exist, Tk_NameToWindow() is documented to place
+- * an error message in interp->result, so just return the error condition.
++ * an error message in Tcl_GetStringResult(interp), so just return the error condition.
+ */
+ if(!w)
+ return NULL;
diff --git a/sci-libs/pgplot/metadata.xml b/sci-libs/pgplot/metadata.xml
new file mode 100644
index 000000000000..7afe58a52a3f
--- /dev/null
+++ b/sci-libs/pgplot/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ PGPLOT is a Fortran subroutine package for drawing graphs on a variety
+ of display devices. The CPGPLOT library adds an intermediate level of
+ wrapper functions between C programs and the PGPLOT library. These
+ functions hide the system dependencies of calling PGPLOT behind a
+ system independent interface.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-libs/pgplot/pgplot-5.2.2-r6.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r6.ebuild
new file mode 100644
index 000000000000..17e77d90e4cb
--- /dev/null
+++ b/sci-libs/pgplot/pgplot-5.2.2-r6.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+
+SLOT="0"
+LICENSE="free-noncomm"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc motif static-libs tk"
+
+RDEPEND="
+ media-libs/libpng
+ x11-libs/libX11
+ x11-libs/libXt
+ motif? ( >=x11-libs/motif-2.3:0 )
+ tk? ( dev-lang/tk )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-drivers.patch \
+ "${FILESDIR}"/${PN}-makemake.patch \
+ "${FILESDIR}"/${PN}-compile-setup.patch \
+ "${FILESDIR}"/${PN}-headers.patch \
+ "${FILESDIR}"/${PN}-libpng15.patch \
+ "${FILESDIR}"/${PN}-tk86.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
+ echo
+ 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"
+ echo
+ 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_configure() {
+ ./makemake . linux
+ # 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 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 pgplot-routines.tex
+ pdflatex pgplot-routines.tex
+ pdflatex pgplot-routines.tex
+ fi
+
+ # this just cleans out not needed files
+ emake -j1 clean
+}
+
+src_test() {
+ # i can go to 16
+ local i j
+ 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
+ echo "PGPLOT_FONT=${EROOT%/}/usr/$(get_libdir)/pgplot/grfont.dat" >> 99pgplot
+ doenvd 99pgplot
+
+ dolib.so libpgplot.so*
+ dobin pgxwin_server pgdisp
+
+ # C binding
+ insinto /usr/include
+ doins cpgplot.h
+ dolib.so libcpgplot.so*
+
+ if use motif; then
+ insinto /usr/include
+ doins XmPgplot.h
+ dolib.so libXmPgplot.so*
+ fi
+
+ if use tk; then
+ 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
+ newdoc pgdispd/aaaread.me pgdispd.txt
+
+ 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
+}