From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-libs/pgplot/Manifest | 12 ++ sci-libs/pgplot/files/pgplot-compile-setup.patch | 96 ++++++++++ sci-libs/pgplot/files/pgplot-drivers.patch | 117 ++++++++++++ sci-libs/pgplot/files/pgplot-headers.patch | 109 +++++++++++ sci-libs/pgplot/files/pgplot-libpng15.patch | 11 ++ sci-libs/pgplot/files/pgplot-makemake.patch | 223 +++++++++++++++++++++++ sci-libs/pgplot/files/pgplot-tk86.patch | 47 +++++ sci-libs/pgplot/metadata.xml | 15 ++ sci-libs/pgplot/pgplot-5.2.2-r6.ebuild | 180 ++++++++++++++++++ sci-libs/pgplot/pgplot-5.2.2-r7.ebuild | 173 ++++++++++++++++++ 10 files changed, 983 insertions(+) create mode 100644 sci-libs/pgplot/Manifest create mode 100644 sci-libs/pgplot/files/pgplot-compile-setup.patch create mode 100644 sci-libs/pgplot/files/pgplot-drivers.patch create mode 100644 sci-libs/pgplot/files/pgplot-headers.patch create mode 100644 sci-libs/pgplot/files/pgplot-libpng15.patch create mode 100644 sci-libs/pgplot/files/pgplot-makemake.patch create mode 100644 sci-libs/pgplot/files/pgplot-tk86.patch create mode 100644 sci-libs/pgplot/metadata.xml create mode 100644 sci-libs/pgplot/pgplot-5.2.2-r6.ebuild create mode 100644 sci-libs/pgplot/pgplot-5.2.2-r7.ebuild (limited to 'sci-libs/pgplot') diff --git a/sci-libs/pgplot/Manifest b/sci-libs/pgplot/Manifest new file mode 100644 index 000000000000..abc64f889849 --- /dev/null +++ b/sci-libs/pgplot/Manifest @@ -0,0 +1,12 @@ +AUX pgplot-compile-setup.patch 3038 SHA256 ede1880c6f00a17004aab3af8b26a01287cb3a7d1a184e60f6f21ba46fe7e404 SHA512 83cf82d37bb6d29787ef86db8467629d16a3c429d728049d2ff842d1778e09cd9991ac1576dd023fb43455a955cd3e4677e7e1694c0f5a321be673f25f613e21 WHIRLPOOL 440769e461e0bdde67b0da4f54a4da75b62de1363d0084c4a02c39b0e2e524aae766ea93f9334c44670c1582bd909f10fcc6edfef614ce2e48b2fe764d4d5275 +AUX pgplot-drivers.patch 7430 SHA256 391986e5da6ef8ee2c2a03c2ef185527bc614a4808ac96b1076e5384e3fa062e SHA512 91203108d4e054f7505a324de2a2d0c96d6379f8c928c5e912d72ecd604fbfd6591cbf241b842ce3ec094079d43a916c9d0446dfb26692b5861f61f2bd7a4dc4 WHIRLPOOL 85954ce2f26e4de1ace7a352f791bc4febbe49972c5c40cb7e87bb29f5810f8c0272bdf3758efc240b129c86504b16b8749401402df293447f21010da5c9c075 +AUX pgplot-headers.patch 2681 SHA256 b548d2cea1740a6cd3bce2cd5feb3fd11b65b1b6efa44f9d88ad2bdf463410f9 SHA512 a8134726467341ec0cce84d6f44355a874dfee6fce1c33ea07cc39134180787f2628e84c0acf9b021d81decb948ccf0f96a294481c564b251df8d0be379da469 WHIRLPOOL a0afe9328f1d18f99570cd3f3759c57c297e023be1276d091b72043274f60018acb0cfcf748c34f2c48bb69002e75119dbf4eee93a98fd7dab5ff41bb0e6cbbe +AUX pgplot-libpng15.patch 374 SHA256 0ce4c180f800621ba5aba80474a400dbfe5a084f32abacb91ba61a569041f897 SHA512 c3942468cac0ff7138020515de83a2fa9a6c7b10baa55e1655052b4dfabdbac9c3fc66093ad6a4dbdc9bb1e00204699a473d5a8248435f96ca0cda39bcf89b5e WHIRLPOOL c5d8d41b9677d4ed5053bca016ed156ea709080b2baf4c8b48fdb2797b13bf93d12898b40f3f4f807a54a359904fbc411ad6237524ad1af9f998c2830422ca28 +AUX pgplot-makemake.patch 7901 SHA256 169d823955c037e50ec11a7afe6c4842022153711d31d57e17537d8d20d2cf03 SHA512 a29bc78eb17397c8fc3a0ec0f8dcec28d5d3f1345b16b90c05aad6459c9b312b63d04e55882b99c47ab22e7b3e16ee3e437c684fb5f50a43aaecd5fc6915689a WHIRLPOOL 8dec414c8753df8066b0094248ee2bb92d68faf1beb7039e7421fb1d9ff2842313f1ec3010259157830b79d6c4d3fd1f8f5319856b60e12851d3cdb7c534473e +AUX pgplot-tk86.patch 1863 SHA256 4c6a92a9dfd674a3db9431de3d7559ecf473e43d200cfb21f595c452219afd17 SHA512 32abe4409cc1b63bf807a3544c36c163c6278dbe3dfd50ce24c6c65da6e22c8d8c0992217bab44c3e3105a11a6cad9b721c1ed8efe6835b46686072f40b83468 WHIRLPOOL cb1237d8a7ac997afbd09c0f82b4438852a998d7da3561d8fc80f2dd3fed3acbcf7c7173db00349b8517b585b87dac45a49242f547e4e338e9406b1bb3b9d8df +DIST pgplot522.tar.gz 1197397 SHA256 a5799ff719a510d84d26df4ae7409ae61fe66477e3f1e8820422a9a4727a5be4 SHA512 03a075c84506ead1d665a7105cd41c7cfbe19d12094cb36fb7459a0f6ee0df0638543b7eca92aaf80677984cc47a07b968f854db8eaa90ec605f78d89c615d1f WHIRLPOOL ced06d5fc275530fae0ed839aaaa360a1c560a102126c8cad6936c1d6494403c97489e6f248e28e64ca5cc2950677e5b336861876cc554965bb9c05b1bf0fba9 +EBUILD pgplot-5.2.2-r6.ebuild 4414 SHA256 a4aa27ea74371b7f3e1664980b1faeb47cce47eb76e87b6fa9cc111167b452f2 SHA512 21e0ef68fdb94a9b37b5423b3d8b32f6e052ba931248a463f9abd5067aeb193f874c6449458a80eb8ff0c484ca1b225ea5c00782a96e950533d7c8ae5970c181 WHIRLPOOL 360fc251cd664b9de24d25db70dc23e78c3b19ee46e9f97466d0187a64f16a037119e81d3c54d5c429b760257419c6a92bab66ffd291827e25f2438f76185dfe +EBUILD pgplot-5.2.2-r7.ebuild 4352 SHA256 6b58d52783ccb70e14fb711b8ed8bd9da73e081a2bd2d84c0f2bb92d0364809d SHA512 f82c4c994761b1bf9004218db54b6364cc8da6222fb1cb2bb9449b7f1761b55af03e43091b61d2c3310203f6454c039012a4c15c18a0de085ef9439fca28d7cb WHIRLPOOL 26018b0b873c98e5a82bf79d88f30d0673c15a2a961d49904d8b9519e15cb0f65b09d264bb9ab13f449a32fec9a64cb534201bec0f021e9c1793446d42239832 +MISC ChangeLog 3034 SHA256 9f9a4fdec6a0195011add8c723eaf35058032a22e066e03588e694edd2dc5345 SHA512 d9ffa307ec60a701107efb5f274aeb5f588aef3078af715eff9ac838067dd038b7a513ce5e9c3051d9b6ec584e0ad1f2de337a6bcde00e74a3f898c0a625b393 WHIRLPOOL d057eb403e5cb0e3fff2066f3f13aaa67c0497b561dfb16055b0d5c91309afae15c071ddd5d249e74e89f4e1ee1c655ccbaa0ef6d053ada13f02cdf5216877f2 +MISC ChangeLog-2015 5558 SHA256 dee9815d3520ac13e9963f1584687736a1c8e3abb1860b6ec277542e2b857e80 SHA512 a2997696b1c234917d7ea8b457b7231095f89fc41c5fd091cbad61de97dd9199e830ae4d3b50d27410060b2bd2c078b69a0e03f01eb20202d971474adca23d2d WHIRLPOOL 3cf4429538a5c89a5835125b5e73e4b4d4432e3a1d31f9d79750abdb3263bec45275442c8b316f72c6f354a0f629f68f84ec5aa92f65c637e009485b44753218 +MISC metadata.xml 622 SHA256 8ae8c973086f0cb41ece8502f96fa39ad084e689d320984e806a14d864f7e0d7 SHA512 09372d4c73ac5f4222ac4c47df1ff138bc1266740552b4592fc3765b5a6391f1dbadf58a5cfc0985eb6000709ab57a5bb3ecaf24cfe59213caaaaf70536227f7 WHIRLPOOL bbd2185f5eaba4e5727528532f1dc1abdb8b0cd8604ec459d02f75b9bada92c27ea6d3d405c59b3e5be03cd12269574dd499fc79bae4345ebc5d4571850bafaa 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..a5baef6a4d22 --- /dev/null +++ b/sci-libs/pgplot/files/pgplot-compile-setup.patch @@ -0,0 +1,96 @@ +--- a/sys_linux/g77_gcc.conf.orig 1999-07-05 19:10:33.000000000 +0100 ++++ b/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..c03d7508fc38 --- /dev/null +++ b/sci-libs/pgplot/files/pgplot-drivers.patch @@ -0,0 +1,117 @@ +--- a/drivers.list 2007-03-08 15:56:20.000000000 +0000 ++++ b/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..c05ca702648e --- /dev/null +++ b/sci-libs/pgplot/files/pgplot-headers.patch @@ -0,0 +1,109 @@ +--- a/sys/grtermio.c 2008-10-29 17:42:48.000000000 +0000 ++++ b/sys/grtermio.c 2008-10-29 19:54:43.000000000 +0000 +@@ -7,6 +7,10 @@ + + #include + #include ++#include ++#include ++#include ++#include + + #ifdef PG_PPU + #define GROTER groter_ +--- a/sys/grfileio.c 2008-10-29 15:10:02.000000000 +0000 ++++ b/sys/grfileio.c 2008-10-29 17:56:50.000000000 +0000 +@@ -17,7 +17,9 @@ + */ + + #include ++#include + #include ++#include + #include + #include + +--- a/drivers/figdisp_comm.c 2008-10-29 15:09:15.000000000 +0000 ++++ b/drivers/figdisp_comm.c 2008-10-29 17:54:08.000000000 +0000 +@@ -17,6 +17,8 @@ + + /* The system include files */ + #include ++#include ++#include + + /* Get ntohs prototype or macro */ + +--- a/pgdispd/resdb.c 2008-10-29 18:22:41.000000000 +0000 ++++ b/pgdispd/resdb.c 2008-10-29 20:10:22.000000000 +0000 +@@ -47,6 +47,8 @@ + #include + #include + #include ++#include ++ + #ifndef VMS + #include + #endif +@@ -1042,7 +1044,6 @@ + int uid; + + extern char *getenv(); +- extern int getuid(); + extern struct passwd *getpwuid(); + struct passwd *pw; + register char *ptr; +--- a/pgdispd/proccom.c 2008-10-29 15:03:34.000000000 +0000 ++++ b/pgdispd/proccom.c 2008-10-29 18:15:48.000000000 +0000 +@@ -90,6 +90,7 @@ + + /* The system include files */ + #include ++#include + #include + #include + +@@ -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! */ +--- a/pgdispd/getvisuals.c 2008-10-29 17:59:37.000000000 +0000 ++++ b/pgdispd/getvisuals.c 2008-10-29 18:00:18.000000000 +0000 +@@ -30,6 +30,7 @@ + #include "messages.h" + + #include ++#include + + #define MAX_DEPTH 24 /* the maximum visual depth to use */ + +--- a/pgdispd/figcurs.c 2008-10-29 17:58:22.000000000 +0000 ++++ b/pgdispd/figcurs.c 2008-10-29 18:14:02.000000000 +0000 +@@ -19,6 +19,7 @@ + + /* The standard include files */ + #include ++#include + #include + #include + +@@ -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..a3cefe1dde77 --- /dev/null +++ b/sci-libs/pgplot/files/pgplot-libpng15.patch @@ -0,0 +1,11 @@ +--- a/drivers/pndriv.c ++++ b/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..fafd2f16ea40 --- /dev/null +++ b/sci-libs/pgplot/files/pgplot-makemake.patch @@ -0,0 +1,223 @@ +--- a/makemake 2012-07-05 14:08:30.210815190 -0700 ++++ b/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.a" ++ 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-tk86.patch b/sci-libs/pgplot/files/pgplot-tk86.patch new file mode 100644 index 000000000000..3223dc0dac4b --- /dev/null +++ b/sci-libs/pgplot/files/pgplot-tk86.patch @@ -0,0 +1,47 @@ +--- a/drivers/xtk/tkpgplot.c 2000-12-13 03:16:28.000000000 +0100 ++++ b/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..1f8f0d3e10fe --- /dev/null +++ b/sci-libs/pgplot/metadata.xml @@ -0,0 +1,15 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + 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. + + 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..87dd80c669a9 --- /dev/null +++ b/sci-libs/pgplot/pgplot-5.2.2-r6.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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} < ${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 +} diff --git a/sci-libs/pgplot/pgplot-5.2.2-r7.ebuild b/sci-libs/pgplot/pgplot-5.2.2-r7.ebuild new file mode 100644 index 000000000000..793ce9da5939 --- /dev/null +++ b/sci-libs/pgplot/pgplot-5.2.2-r7.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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" + +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:= ) + tk? ( dev-lang/tk:= )" +DEPEND="${RDEPEND} + doc? ( virtual/latex-base )" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${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 +) + +src_prepare() { + default + # 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 "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" + sed -e 's/GIDRIV/! GIDRIV/g' \ + -e 's/PPDRIV/! GIDRIV/g' \ + -e 's/WDDRIV/! GIDRIV/g' \ + -i drivers.list || die "sed drivers failed" + fi + + # fix pointers for 64 bits + if use amd64 || use ia64; then + sed -e 's/INTEGER PIXMAP/INTEGER*8 PIXMAP/g' \ + -i drivers/{gi,pp,wd}driv.f || die "sed 64bits failed" + fi + + cp sys_linux/g77_gcc.conf local.conf + + sed -e "s:FCOMPL=.*:FCOMPL=\"$(tc-getFC)\":g" \ + -e "s:CCOMPL=.*:CCOMPL=\"$(tc-getCC)\":g" \ + -i local.conf || die "sed flags failed" + + if [[ "$(tc-getFC)" = if* ]]; then + sed -e 's/-Wall//g' \ + -e 's/TK_LIBS="/TK_LIBS="-nofor-main /' \ + -i local.conf || die "sed drivers failed" + fi + + sed -e "s:/usr/local/pgplot:${EPREFIX}/usr/$(get_libdir)/pgplot:g" \ + -e "s:/usr/local/bin:${EPREFIX}/usr/bin:g" \ + -i 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|${EPREFIX}/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} < ${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=${EPREFIX%/}/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 pgplot.html + dodoc 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 +} -- cgit v1.2.3