Bug 31554 - Please add an ebuild for plplot.
Bug#: 31554 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: TEST-REQUEST Assigned To: sci@gentoo.org Reported By: tyler@mithander.com
Component: Ebuilds
URL:  http://plplot.sourceforge.net
Summary: Please add an ebuild for plplot.
Keywords:  EBUILD
Status Whiteboard: 
Opened: 2003-10-19 17:11 0000
Description:   Opened: 2003-10-19 17:11 0000
plplot is a library that can output plots in several different formats.  I 
think it's nice to have. 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Patrick Kursawe 2003-10-19 22:58:06 0000 -------
You could try writing an ebuild for this until we get through our bug list
to this one :-)

------- Comment #2 From Tyler Nielsen 2003-10-20 19:15:57 0000 -------
Created an attachment (id=19567) [details]
Ebuild for plplot

Here is a tbz2 file with and ebuild for plplot.  I untared it in
/usr/portage/dev-libs and it appears to work correctly.

------- Comment #3 From Tyler Nielsen 2003-11-05 15:47:52 0000 -------
Created an attachment (id=20311) [details]
improved ebuild

This added USE flags doc and debug.
Also fixes segfaults in the package.
Still needs the patch from the other attachment.

------- Comment #4 From Donnie Berkholz 2003-11-10 00:20:43 0000 -------
Could you attach the patch as a text/plain file, so it's viewable from the
web?

------- Comment #5 From Tyler Nielsen 2003-11-10 09:42:10 0000 -------
Created an attachment (id=20528) [details]
Patch so that plplot compiles

Patch files attached as plain text

------- Comment #6 From Olivier Fisette 2004-06-16 08:38:37 0000 -------
Created an attachment (id=33383) [details]
plplot-5.3.0.ebuild - New ebuild

There is a new version of plplot (5.3.0). Here is a new ebuild, based on
Tyler's. Here is what I changed:

- The patch has been included upstream, so it is no longer needed.
- Corrected the way documentation is handled (--with-prebuilddoc assumes
documentation is already built. This is not the case.) 
- Added missing dependencies (pkgconfig, man, perl, opensp, jre, jadetex,
octave, libgd, truetype, tk, itcl, gnome-libs). These are not mandatory, but
some bindings and drivers depend on them.
- Added USE flags to control what language bindings and device drivers are
built (gd-external, gnome, java, jpeg, png, tetex, truetype, X, itcl and
octave). These flags are also used to determine dependencies.
- Made fortran support optional and added an option to use Intel's Fortran
Compiler (ifc) instead of the GNU Fortran Compiler (f77).
- Better compliance with Gentoo FSH (docs, shared files and java libs). I also
changed the octave script which loads plplot, to reflect the changes in the
files locations.

I still have two problems with the package:

- I can't get the documentation to build. The configure script doesn't locate
my catalog files. The html documentation is available (and installed), but
there is no pdf, dvi or info files.
- I can't get the configure script to locate libqhull, so I disabled it.

------- Comment #7 From Olivier Fisette 2004-06-16 08:39:53 0000 -------
Created an attachment (id=33384) [details]
metadata.xml

Goes with 33383

- Assigns to the sci herd
- Provides long description

------- Comment #8 From Doug Burke 2004-07-31 11:45:16 0000 -------
I believe there's a configuration problem with the 5.3.0 ebuild in that it
assumes files are in /use/share/plplot5.3.0/ when they're in
/usr/share/plplot/. 

Details:

I can compile the example programs in /usr/share/plplot/examples/c/ but they
crash on running: e.g.

$ ./x01c
PLplot library version: 5.3.0

Plotting Options:
 < 1> gnome      Gnome Canvas
 < 2> xwin       X-Window (Xlib)
 < 3> tk         Tcl/TK Window
 < 4> xterm      Xterm Window
 < 5> tekt       Tektronix Terminal (4010)
 < 6> tek4107t   Tektronix Terminal (4105/4107)
 < 7> mskermit   MS-Kermit emulator
 < 8> versaterm  Versaterm vt100/tek emulator
 < 9> vlt        VLT vt100/tek emulator
 <10> conex      Conex vt320/tek emulator
 <11> dg300      DG300 Terminal
 <12> plmeta     PLplot Native Meta-File
 <13> tekf       Tektronix File (4010)
 <14> tek4107f   Tektronix File (4105/4107)
 <15> ps         PostScript File (monochrome)
 <16> psc        PostScript File (color)
 <17> xfig       Xfig file
 <18> ljiip      LaserJet IIp/deskjet compressed graphics
 <19> ljii       LaserJet II Bitmap File (150 dpi)
 <20> hp7470     HP 7470 Plotter File (HPGL Cartridge, Small Plotter)
 <21> hp7580     HP 7580 Plotter File (Large Plotter)
 <22> lj_hpgl    HP Laserjet III, HPGL emulation mode
 <23> imp        Impress File
 <24> pbm        PDB (PPM) Driver
 <25> pstex      Combined Postscript/LaTeX files
 <26> null       Null device
 <27> ntk        New Tk device
 <28> mem        User-supplied memory device

Enter device number or keyword: 2

*** PLPLOT ERROR ***
Unable to open or allocate memory for font file
Program aborted

The choice of device doesn't matter. Using strace I found that it was looking
for the font file in /usr/share/plplot5.3.0/ whereas I only have
/usr/share/plplot/ [strace output below]. I hacked this by adding in a soft
link as I don't know enough about the gentoo layout to know what to hack in the
actual ebuild.

Output of 'strace ./x01c':

... lots of lines deleted ...
_llseek(4, 0, [0], SEEK_CUR)            = 0
getcwd("/home/doug/tmp", 256)           = 15
open("plxtnd5.fnt", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/usr/share/plplot5.3.0/plxtnd5.fnt", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/local/plplot/lib/plxtnd5.fnt", O_RDONLY) = -1 ENOENT (No such file
or directory)
write(2, "\n*** PLPLOT ERROR ***\n", 22
*** PLPLOT ERROR ***
) = 22
write(2, "Unable to open or allocate memor"..., 48Unable to open or allocate
memory for font file
) = 48
write(3, "\4\0\2\0\1\0\0\0036\0\2\0\4\0\0\3", 16) = 16
write(3, "<\0\2\0\2\0\0\3<\0\2\0\0\0\0\3+\3\1\0", 20) = 20
read(3, 0xb412e940, 32)                 = -1 EAGAIN (Resource temporarily
unavailable)
select(4, [3], NULL, NULL, NULL)        = 1 (in [3])
read(3, "\22\303+\0\1\0\0\3\1\0\0\3\0001\"\262\251s\224E \315\236"..., 32) = 32
read(3, "\21\303+\0\1\0\0\3\1\0\0\3\3101\"\262\251s\224E\370\362"..., 32) = 32
read(3, "\1\1/\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\342"..., 32) = 32
shutdown(3, 2 /* send and receive */)   = 0
close(3)                                = 0
write(2, "Program aborted\n", 16Program aborted
)       = 16
write(4, "\6\17\2\0\17\1\0", 7)         = 7
munmap(0x41a96000, 4096)                = 0
munmap(0x41a94000, 4096)                = 0
exit_group(1)                           = ?

------- Comment #9 From Marcus D. Hanwell 2004-11-14 16:14:50 0000 -------
Created an attachment (id=43960) [details]
Diff of plplot-5.3.0.ebuild

This is a diff of the previous ebuild. It corrects the problem described on 
comment #8. I have successfully compiled and run the new ebuild on amd64 arch
with GCC 3.4, and compiled the C++ exmamples in /usr/share/plplot/examples/c++.

They now run correctly and I have tested them using the xwin and png drivers.

------- Comment #10 From Colin Macdonald 2004-12-13 11:30:05 0000 -------
 eerror "GNU fortran 77 compiler not found on the system."
        eerror "Please add f77 to your USE flags and reemerge gcc."

I think this error message should now read "Please add fortran to your USE flags"

------- Comment #11 From Colin Macdonald 2005-01-09 12:56:17 0000 -------
Created an attachment (id=48042) [details]
patch to fix octave in plplot 5.3.1

This patch applies the 5.3.0 patched with Comment #9.  Changes:
1)  Fix octave dependency from the app-sci -> sci-mathematics move
2)  Fix the paths used for plplot's .m files
3)  Change warning in Comment #10.

I will attach my new ebuild with this patch applied.

------- Comment #12 From Colin Macdonald 2005-01-09 12:56:47 0000 -------
Created an attachment (id=48044) [details]
plplot-5.3.1-r1.ebuild

------- Comment #13 From Marcus D. Hanwell 2005-01-24 11:20:31 0000 -------
I am still working on this - I had already added doc installation, fixed the
fortran USE flag and had changed the octave dependency. I tried your patch for
the octave path and it does not work on my amd64 system,

make[4]: Entering directory
`/var/tmp/portage/plplot-5.3.1/work/plplot-5.3.1/bindings/octave'
if x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-I../../include     -march=k8 -O2 -pipe -MT massage.o -MD -MP -MF
".deps/massage.Tpo" -c -o massage.o massage.c; \
then mv -f ".deps/massage.Tpo" ".deps/massage.Po"; else rm -f
".deps/massage.Tpo"; exit 1; fi
/bin/sh ../../libtool --mode=link x86_64-pc-linux-gnu-gcc  -march=k8 -O2 -pipe 
 -o massage  massage.o  -lm
mkdir .libs
x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -o massage massage.o  -lm
perl
/var/tmp/portage/plplot-5.3.1/work/plplot-5.3.1/bindings/octave/matwrap/matwrap
-language octave -o plplot_octave.cc       -stub tmp_stub \
-cpp_ignore plplot_octave_rej.h -cpp x86_64-pc-linux-gnu-gcc -E -C
plplot_octave.h
unrecognized type '__builtin_va_list '
make[4]: *** [plplot_octave.cc] Error 9
make[4]: Leaving directory
`/var/tmp/portage/plplot-5.3.1/work/plplot-5.3.1/bindings/octave'

I will dig a little deeper and see if I can get to the bottom of that error
later when I have some time. Once I have it working I will put it into the tree
under sci-libs. Diffs are preferred to ebuilds as it is easier to see what you
have changed.

------- Comment #14 From Colin Macdonald 2005-01-24 13:00:27 0000 -------
My patched only changed src_install.  It also shouldn't be archecture
dependent; it only moves a file and runs sed.  Are you sure that error is
caused by my changes?

Re: diffs: I also attached a patch (see Comment #11).

------- Comment #15 From Marcus D. Hanwell 2005-01-26 02:10:23 0000 -------
I didn't mean to imply that your changes broke the octave support, just that I
would not be adding it until I had sorted out all remaining issues. I found a
patch on Debian's bugzilla that seems to fix this issue, just testing it out
now.

I should be able to get this added and in testing for x86 and amd64 soon - just
a little more testing is required.

------- Comment #16 From Marcus D. Hanwell 2005-01-29 16:40:52 0000 -------
I have added plplot to the tree. Please test it out and let me know of any
issues. I think I have addressed most of them, but it is quite a complex
library so I could have missed something. Thanks for all the contributions
made.