Ravenports generated: 22 May 2022 14:00
[ravenports.git] / bucket_B9 / pgplot
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               pgplot
4 VERSION=                5.2.2
5 REVISION=               2
6 KEYWORDS=               graphics
7 VARIANTS=               standard
8 SDESC[standard]=        FORTRAN/C scientific graphic library
9 HOMEPAGE=               https://www.astro.caltech.edu/~tjp/pgplot/
10 CONTACT=                nobody
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            ftp://ftp.astro.caltech.edu/pub/pgplot/
14 DISTFILE[1]=            pgplot522.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[standard]=        complete
17                         primary
18                         docs
19                         examples
20
21 OPTIONS_AVAILABLE=      none
22 OPTIONS_STANDARD=       none
23
24 USES=                   png shebangfix perl:build cmake fortran:examples
25 XORG_COMPONENTS=        x11 xt
26
27 DISTNAME=               pgplot
28
29 LICENSE=                CUSTOM1:primary
30 LICENSE_NAME=           CUSTOM1:"PGPLOT License"
31 LICENSE_FILE=           CUSTOM1:{{WRKSRC}}/copyright.notice
32 LICENSE_SCHEME=         solo
33
34 FPC_EQUIVALENT=         graphics/pgplot
35 SHEBANG_FILES=          makehtml
36                         maketex
37 SHEBANG_OLD_PERL=       /usr/local/bin/perl
38
39 CONFIGURE_ENV=          FFLAGS=-fallow-argument-mismatch
40
41 CFLAGS=                 -Wno-implicit-function-declaration
42
43 post-patch:
44         ${REINPLACE_CMD} -e 's|png_ptr->jmpbuf|png_jmpbuf(png_ptr)|' \
45                 ${WRKSRC}/drivers/pndriv.c
46         ${REINPLACE_CMD} -e 's|/usr/local/pgplot|${PREFIX}/share/pgplot|g' \
47                 ${WRKSRC}/src/grgfil.f
48
49 post-install:
50         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pg*
51         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib*.so
52         ${STRIP_CMD} ${STAGEDIR}${STD_EXAMPLESDIR}/*pgdemo*
53
54 post-extract:
55         ${CP} ${FILESDIR}/grexec.f ${WRKSRC}/sys/
56         ${CP} ${FILESDIR}/CMakeLists.txt ${WRKSRC}/
57 .for d in drivers pgdispd fonts src sys examples
58         ${CP} ${FILESDIR}/${d}_CMakeLists.txt ${WRKSRC}/${d}/CMakeLists.txt
59 .endfor
60
61 post-patch-sunos:
62         (cd ${WRKSRC} && \
63                 ${REINPLACE_CMD} -e '/define.*_POSIX_SOURCE/d' \
64                 drivers/pgxwin_server.c\
65                 drivers/xwdriv.c\
66                 drivers/cgdriv.c\
67                 sys/grgetc.c\
68                 sys/grtermio.c\
69                 sys_cray/grtermio.c\
70                 sys_cray/grgetc.c\
71         )
72
73 [FILE:408:descriptions/desc.primary]
74 PGPLOT is a Fortran subroutine package for drawing graphs on a variety
75 of display devices. For more details, see the manual ``PGPLOT Graphics
76 Subroutine Library'', available from T. J. Pearson.
77
78 The CPGPLOT library adds an intermediate level of wrapper functions
79 between C programs and the PGPLOT library. These functions hide the
80 system dependencies of calling PGPLOT behind a system independent
81 interface.
82
83
84 [FILE:95:distinfo]
85 a5799ff719a510d84d26df4ae7409ae61fe66477e3f1e8820422a9a4727a5be4      1197397 pgplot522.tar.gz
86
87
88 [FILE:164:manifests/plist.primary]
89 bin/
90  pgdisp
91  pgxwin_server
92 include/cpgplot.h
93 lib/
94  libcpgplot.a
95  libcpgplot.so
96  libcpgplot.so.5
97  libpgplot.a
98  libpgplot.so
99  libpgplot.so.5
100 share/pgplot/grfont.dat
101
102
103 [FILE:101:manifests/plist.docs]
104 share/doc/pgplot/
105  cpgplot.doc
106  pgplot-routines.tex
107  pgplot.doc
108  pgplot.html
109  readme.pgdisp
110  rgb.txt
111
112
113 [FILE:193:manifests/plist.examples]
114 share/examples/pgplot/
115  cpgdemo
116  pgdemo1
117  pgdemo10
118  pgdemo11
119  pgdemo12
120  pgdemo13
121  pgdemo14
122  pgdemo15
123  pgdemo16
124  pgdemo17
125  pgdemo2
126  pgdemo3
127  pgdemo4
128  pgdemo5
129  pgdemo6
130  pgdemo7
131  pgdemo8
132  pgdemo9
133
134
135 [FILE:1127:patches/patch-64bit-drivers]
136 --- drivers/gidriv.f.orig       1998-05-13 21:05:05.000000000 -0400
137 +++ drivers/gidriv.f    2011-12-07 16:57:04.000000000 -0500
138 @@ -78,7 +78,7 @@
139  C Note: for 64-bit operating systems, change the following 
140  C declaration to INTEGER*8:
141  C
142 -      INTEGER PIXMAP, WORK
143 +      INTEGER*8 PIXMAP, WORK
144  C
145        SAVE UNIT, IC, CTABLE, NPICT, MAXIDX, BX, BY, PIXMAP, FILENM
146        SAVE CDEFLT, STATE
147 --- drivers/ppdriv.f.orig       1998-05-13 21:04:29.000000000 -0400
148 +++ drivers/ppdriv.f    2011-12-07 16:57:39.000000000 -0500
149 @@ -68,7 +68,7 @@
150  C Note: for 64-bit operating systems, change the following 
151  C declaration to INTEGER*8:
152  C
153 -      INTEGER PIXMAP
154 +      INTEGER*8 PIXMAP
155  C
156        SAVE    UNIT, IC, CVAL, CTABLE, BX, BY, PIXMAP, NPICT, CDEFLT
157        SAVE    STATE
158 --- drivers/wddriv.f.orig       1998-05-13 21:03:53.000000000 -0400
159 +++ drivers/wddriv.f    2011-12-07 16:56:29.000000000 -0500
160 @@ -61,7 +61,7 @@
161  C Note: for 64-bit operating systems, change the following 
162  C declaration to INTEGER*8:
163  C
164 -      INTEGER PIXMAP
165 +      INTEGER*8 PIXMAP
166  C
167        SAVE UNIT, IC, CTABLE, NPICT, MAXIDX, BX, BY, PIXMAP, FILENM
168        SAVE CDEFLT, STATE
169
170
171 [FILE:684:patches/patch-pgdispd_figcurs.c]
172 --- pgdispd/figcurs.c.orig      1993-11-29 19:55:24 UTC
173 +++ pgdispd/figcurs.c
174 @@ -21,6 +21,7 @@
175  #include <stdio.h>
176  #include <sys/types.h>
177  #include <netinet/in.h>
178 +#include <stdlib.h>
179  
180  /* The X Window include files */
181  #include <X11/Xlib.h>
182 @@ -113,8 +114,6 @@ XEvent event;
183         void getbuttonval();
184         int getkeyval();
185  
186 -       char *malloc();
187 -
188         if (event.type == ButtonPress) getbuttonval(event.xbutton.button, &val);
189         else if (!getkeyval(event, &val)) return(1);
190  
191 @@ -167,8 +166,6 @@ XEvent event;
192         void getbuttonval();
193         int getkeyval();
194  
195 -       char *malloc();
196 -
197         if (event.type == ButtonPress) getbuttonval(event.xbutton.button, &val);
198         else if (!getkeyval(event, &val)) return(1);
199  
200
201
202 [FILE:227:patches/patch-pgdispd_getvisuals.c]
203 --- pgdispd/getvisuals.c.orig   1993-05-10 00:42:46 UTC
204 +++ pgdispd/getvisuals.c
205 @@ -30,6 +30,7 @@
206  #include "messages.h"
207  
208  #include <stdio.h>
209 +#include <stdlib.h>
210  
211  #define MAX_DEPTH      24      /* the maximum visual depth to use */
212  
213
214
215 [FILE:421:patches/patch-pgdispd_initlgwin.c]
216 --- pgdispd/initlgwin.c.orig    1995-02-24 18:13:24 UTC
217 +++ pgdispd/initlgwin.c
218 @@ -34,6 +34,7 @@
219  
220  /* The system include files */
221  #include <stdio.h>
222 +#include <stdlib.h>
223  
224  /* the X Window include files */
225  #include <X11/Xlib.h>
226 @@ -67,7 +68,6 @@ int initlgwin()
227  
228         Pixmap XCreatePixmap();
229         void initlgluts();      /* initialize the LUTs */
230 -       char *malloc();
231         void initwmattr();
232  
233         /* Initialize the line graphics LUTs */
234
235
236 [FILE:615:patches/patch-pgdispd_proccom.c]
237 --- pgdispd/proccom.c.orig      1994-08-22 20:33:35 UTC
238 +++ pgdispd/proccom.c
239 @@ -92,8 +92,9 @@ static char rcsid[]="@(#)$Id: proccom.c,
240  #include <stdio.h>
241  #include <sys/types.h>
242  #include <netinet/in.h>
243 +#include <stdlib.h>
244  
245 -#ifndef VMS
246 +#if !defined(VMS) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__)
247  #include <values.h>
248  #endif
249  
250 @@ -163,8 +164,6 @@ int *retbuflen;     /* the length of retbuf
251         void drawline();        /* draw a line in the bitmap window */
252         Pixmap XCreatePixmap();
253  
254 -       char *malloc();
255 -
256         if (!len & savedshorts)
257         { /* an incomplete command was sent! */
258                 savedshorts=0;
259
260
261 [FILE:314:files/CMakeLists.txt]
262 cmake_minimum_required(VERSION 3.16)
263 project(pgplot)
264 enable_language(Fortran)
265
266 SET(CMAKE_SKIP_BUILD_RPATH  TRUE)
267
268 add_subdirectory(drivers)
269 add_subdirectory(pgdispd)
270 add_subdirectory(fonts)
271 add_subdirectory(src)
272 add_subdirectory(sys)
273 add_subdirectory(examples)
274
275 install(FILES rgb.txt DESTINATION share/doc/pgplot)
276
277
278 [FILE:5373:files/drivers.list]
279 ! PGPLOT drivers.
280 !------------------------------------------------------------------------------
281 ! To configure PGPLOT, ensure that drivers you do not want are
282 ! commented out (place ! in column 1). N.B. Many device-drivers are
283 ! available on selected operating systems only.
284 !------------------------------------------------------------------------------
285 ! File       Code       Description                                Restrictions
286 ! BCDRIV 0 /BCANON    Canon Laser printer (bitmap version), landscape
287 ! CADRIV 0 /CANON     Canon Laser printer, LBP-8/A2, landscape
288 ! CCDRIV 0 /CCP       DEC LJ250 Color Companion printer
289 ! CWDRIV 0 /CW6320    Gould/Bryans Colourwriter 6320 pen plotter        Std F77
290 ! EPDRIV 0 /EPSON     Epson FX100 dot matrix printer
291 ! EXDRIV 1 /EXCL      Talaris/EXCL printers, landscape
292 ! EXDRIV 2 /EXCL      Talaris/EXCL printers, portrait
293 ! GCDRIV 0 /GENICOM   Genicom 4410 dot-matrix printer, landscape
294 !             Caution: use of GIDRIV may require a license from Unisys:
295   GIDRIV 1 /GIF       GIF-format file, landscape
296   GIDRIV 2 /VGIF      GIF-format file, portrait
297   GLDRIV 1 /HPGL      Hewlett-Packard HP-GL plotters, landscape         Std F77
298   GLDRIV 2 /VHPGL     Hewlett-Packard HP-GL plotters, portrait          Std F77
299 ! GODRIV 0 /GOC       GOC Sigma T5670 terminal                          VMS 
300 ! GVDRIV 0 /GVENICOM  Genicom 4410 dot-matrix printer, portrait
301   HGDRIV 0 /HPGL2     Hewlett-Packard graphics language
302 ! HIDRIV 0 /HIDMP     Houston Instruments HIDMP pen plotter
303 ! HJDRIV 0 /HJ        Hewlett-Packard Desk/Laserjet printer
304 ! HPDRIV 0 /HP7221    Hewlett-Packard HP7221 pen plotter                Std F77
305 ! IMDRIV 0 /IMPRESS   Imagen printers (Impress language), landscape
306 ! IRDRIV 0 /IRIS      SiliconGraphics Console                           SGI (C)
307 ! LADRIV 0 /LA50      Dec LA50 and other sixel printers
308 ! LJDRIV 0 /LJ        Hewlett-Packard LaserJet printers
309 ! LSDRIV 1 /LIPS2     Canon LaserShot printer (landscape)
310 ! LSDRIV 2 /VLIPS2    Canon LaserShot printer (portrait)
311 ! LNDRIV 0 /LN03      Dec LN03-PLUS Laser printer (landscape)           VMS
312 ! LVDRIV 0 /LVN03     Dec LN03-PLUS Laser printer (portrait)            VMS
313   LXDRIV 0 /LATEX     LaTeX picture environment
314 ! MFDRIV 0 /FILE      PGPLOT graphics metafile
315 ! NEDRIV 0 /NEXT      Computers running NeXTstep operating system
316   NUDRIV 0 /NULL      Null device (no output)                           Std F77
317   PPDRIV 1 /PPM       Portable Pixel Map file, landscape
318   PPDRIV 2 /VPPM      Portable PIxel Map file, portrait
319   PSDRIV 1 /PS        PostScript printers, monochrome, landscape        Std F77
320   PSDRIV 2 /VPS       Postscript printers, monochrome, portrait         Std F77
321   PSDRIV 3 /CPS       PostScript printers, color, landscape             Std F77
322   PSDRIV 4 /VCPS      PostScript printers, color, portrait              Std F77
323 ! PXDRIV 0 /PRINTRONI Printronix P300 or P600 dot-matrix printer
324 ! QMDRIV 1 /QMS       QUIC devices (QMS and Talaris), landscape         Std F77
325 ! QMDRIV 2 /VQMS      QUIC devices (QMS and Talaris), portrait          Std F77
326 ! SVDRIV 0 /SUNVIEW   Sun workstations running SunView                  SunOS C
327 ! TFDRIV 0 /TFILE     Tektronix-format disk file                        VMS
328 ! TODRIV 0 /TOSHIBA   Toshiba "3-in-one" printer, model P351
329 ! TTDRIV 1 /TEK4010   Tektronix 4006/4010 storage-tube terminal         Std F77
330 ! TTDRIV 2 /GF        GraphOn terminal                                  Std F77
331 ! TTDRIV 3 /RETRO     RetroGraphics terminal                            Std F77
332   TTDRIV 4 /GTERM     GTERM Tektronix terminal emulator                 Std F77
333   TTDRIV 5 /XTERM     XTERM Tektronix terminal emulator                 Std F77
334 ! TTDRIV 6 /ZSTEM     ZSTEM terminal emulator                           Std F77
335 ! TTDRIV 7 /V603      Visual 603 terminal                               Std F77
336 ! TTDRIV 8 /KRM3      Kermit 3 on IBM-PC                                Std F77
337   TTDRIV 9 /TK4100    Tektronix 4100-series terminals                   Std F77
338 ! TXDRIV 0 /TX        TeX PK Font Output files
339 ! VADRIV 0 /VCANON    Canon Laser printer, LBP-8/A2, portrait
340 ! VBDRIV 0 /VBCANON   Canon Laser printer (bitmap version), portrait
341 ! VIDRIV 0 /VIPRESS   Imagen printers (Impress language), portrait
342 ! VTDRIV 0 /VT125     Dec Regis terminals (VT125 etc.)                  Std F77
343   WDDRIV 1 /WD        X Window dump file, landscape
344   WDDRIV 2 /VWD       X Window dump file, portrait
345 ! WSDRIV 0 /WS        VAX workstations running VWS software             VMS
346   X2DRIV 0 /XDISP     PGDISP or FIGDISP server for X workstations       C
347   XWDRIV 1 /XWINDOW   Workstations running X Window System              C
348   XWDRIV 2 /XSERVE    Persistent window on X Window System              C
349 ! ZEDRIV 0 /ZETA      Zeta 8 Digital Plotter
350 !
351 ! The following drivers can only be used in PGPLOT installations on MS-DOS
352 ! systems with appropriate hardware and software. Do not select these 
353 ! on UNIX or VMS systems.
354 !
355 ! LHDRIV 0 /LH        IBM PCs and clones, Lahey F77 32-bit Fortran v5.0
356 ! MSDRIV 0 /MSOFT     IBM PCs and clones running Microsoft Fortran 5.0
357 ! SSDRIV 0 /SS        IBM PCs and clones, MS-DOS, Salford Software FTN
358 !
359 ! The following driver can only be used in PGPLOT installations on Acorn
360 ! Archimedes systems with appropriate hardware and software.
361 !
362 ! ACDRIV 0 /ARC       Acorn Archimedes computer
363 !
364 ! Selection of the XMOTIF driver causes a stub driver to be placed in
365 ! the main PGPLOT library. The real driver is placed in libXmPgplot.a.
366 ! Applications that need the Motif driver should link with libXmPgplot.a
367 ! before the PGPLOT library. This treatment means that only Motif
368 ! applications have to be linked with Motif libraries.
369 !
370 ! XMDRIV 0 /XMOTIF    Motif applications containing XmPgplot widgets.   C
371
372
373 [FILE:200:files/drivers_CMakeLists.txt]
374 set (prog pgxwin_server)
375
376 add_executable (${prog}
377         pgxwin_server.c
378 )
379
380 target_compile_definitions (${prog} PUBLIC PGDISP)
381 target_link_libraries (${prog} X11)
382
383 install (TARGETS ${prog} DESTINATION bin)
384
385
386 [FILE:478:files/examples_CMakeLists.txt]
387 foreach(N 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17)
388   add_executable(pgdemo${N} pgdemo${N}.f)
389   target_link_libraries(pgdemo${N} pgplot X11)
390   target_compile_options(pgdemo${N} PUBLIC -fno-backslash)
391   install(TARGETS pgdemo${N} DESTINATION share/examples/pgplot)
392 endforeach(N)
393
394 include_directories(${CMAKE_BINARY_DIR}/src)
395
396 add_executable(cpgdemo ../cpg/cpgdemo.c)
397 target_link_libraries(cpgdemo cpgplot pgplot X11 m)
398 install(TARGETS cpgdemo DESTINATION share/examples/pgplot)
399
400
401 [FILE:420:files/fonts_CMakeLists.txt]
402 set(outprefix grfont)
403 set(infile ${CMAKE_SOURCE_DIR}/fonts/${outprefix}.txt)
404 set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outprefix}.dat)
405
406 add_executable (pgpack pgpack.f)
407
408 add_custom_command(
409         OUTPUT ${outfile}
410         COMMAND pgpack < ${infile}
411         DEPENDS pgpack ${infile}
412         COMMENT "Generated ${outfile}"
413         VERBATIM
414 )
415
416 add_custom_target (generate_file ALL
417         DEPENDS ${outfile}
418 )
419
420 install (FILES ${outfile} DESTINATION share/pgplot)
421
422
423 [FILE:1806:files/grexec.f]
424 C*GREXEC -- PGPLOT device handler dispatch routine
425 C+
426       SUBROUTINE GREXEC(IDEV,IFUNC,RBUF,NBUF,CHR,LCHR)
427       INTEGER IDEV, IFUNC, NBUF, LCHR
428       REAL    RBUF(*)
429       CHARACTER*(*) CHR
430 C---
431       INTEGER NDEV
432       PARAMETER (NDEV=21)
433       CHARACTER*10 MSG
434 C---
435       GOTO(1,2,3,4,5,6,7,8,9,10,11,12,13,14,
436      +     15,16,17,18,19,20,21) IDEV
437       IF (IDEV.EQ.0) THEN
438           RBUF(1) = NDEV
439           NBUF = 1
440       ELSE
441           WRITE (MSG,'(I10)') IDEV
442           CALL GRWARN('Unknown device code in GREXEC: '//MSG)
443       END IF
444       RETURN
445 C---
446 1     CALL GIDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,1)
447       RETURN
448 2     CALL GIDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,2)
449       RETURN
450 3     CALL GLDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,1)
451       RETURN
452 4     CALL GLDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,2)
453       RETURN
454 5     CALL HGDRIV(IFUNC,RBUF,NBUF,CHR,LCHR)
455       RETURN
456 6     CALL LXDRIV(IFUNC,RBUF,NBUF,CHR,LCHR)
457       RETURN
458 7     CALL NUDRIV(IFUNC,RBUF,NBUF,CHR,LCHR)
459       RETURN
460 8     CALL PPDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,1)
461       RETURN
462 9     CALL PPDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,2)
463       RETURN
464 10    CALL PSDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,1)
465       RETURN
466 11    CALL PSDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,2)
467       RETURN
468 12    CALL PSDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,3)
469       RETURN
470 13    CALL PSDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,4)
471       RETURN
472 14    CALL TTDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,4)
473       RETURN
474 15    CALL TTDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,5)
475       RETURN
476 16    CALL TTDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,9)
477       RETURN
478 17    CALL WDDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,1)
479       RETURN
480 18    CALL WDDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,2)
481       RETURN
482 19    CALL X2DRIV(IFUNC,RBUF,NBUF,CHR,LCHR)
483       RETURN
484 20    CALL XWDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,1)
485       RETURN
486 21    CALL XWDRIV(IFUNC,RBUF,NBUF,CHR,LCHR,2)
487       RETURN
488 C
489       END
490
491
492 [FILE:498:files/pgdispd_CMakeLists.txt]
493 set (prog pgdisp)
494
495 add_executable (${prog}
496         cleanup.c
497         exposelgwin.c
498         figcurs.c
499         getcolors.c
500         getdata.c
501         getvisuals.c
502         handlexevent.c
503         initlgluts.c
504         initlgwin.c
505         initlock.c
506         initwmattr.c
507         mainloop.c
508         pgdisp.c
509         proccom.c
510         resdb.c
511         resizelgwin.c
512         returnbuf.c
513         updatelgtitle.c
514         waitevent.c
515 )
516
517 target_compile_definitions (${prog} PUBLIC PGDISP)
518 target_link_libraries (${prog} X11)
519
520 install(TARGETS ${prog} DESTINATION bin)
521 install(FILES aaaread.me
522         RENAME readme.pgdisp
523         DESTINATION share/doc/pgplot
524 )
525
526
527 [FILE:4104:files/src_CMakeLists.txt]
528 add_executable (pgbind ../cpg/pgbind.c)
529 target_compile_definitions (pgbind PUBLIC PG_PPU)
530
531 set(libsrcs
532         pgarro.f pgask.f pgband.f pgbbuf.f pgbeg.f pgbin.f pgbox.f
533         pgbox1.f pgcirc.f pgcl.f pgclos.f pgcn01.f pgcnsc.f pgconb.f pgconl.f
534         pgcons.f pgcont.f pgconx.f pgcp.f pgctab.f pgcurs.f pgdraw.f pgebuf.f
535         pgend.f pgenv.f pgeras.f pgerrb.f pgerrx.f pgerry.f pgetxt.f pgfunt.f
536         pgfunx.f pgfuny.f pggray.f pghi2d.f pghis1.f pghist.f pghtch.f
537         pgiden.f pgimag.f pginit.f pglab.f pglcur.f pgldev.f pglen.f pgline.f
538         pgmove.f pgmtxt.f pgncur.f pgnoto.f pgnpl.f pgnumb.f pgolin.f pgopen.f
539         pgpage.f pgpanl.f pgpap.f pgpixl.f pgpnts.f pgpoly.f pgpt.f pgptxt.f
540         pgqah.f pgqcf.f pgqch.f pgqci.f pgqcir.f pgqcol.f pgqcr.f pgqcs.f
541         pgqfs.f pgqhs.f pgqid.f pgqinf.f pgqitf.f pgqls.f pgqlw.f pgqpos.f
542         pgqtbg.f pgqtxt.f pgqvp.f pgqvsz.f pgqwin.f pgrect.f pgrnd.f pgrnge.f
543         pgsah.f pgsave.f pgscf.f pgsch.f pgsci.f pgscir.f pgscr.f pgscrn.f
544         pgsfs.f pgshls.f pgshs.f pgsitf.f pgslct.f pgsls.f pgslw.f pgstbg.f
545         pgsubp.f pgsvp.f pgswin.f pgtbox.f pgtext.f pgupdt.f pgvect.f pgvsiz.f
546         pgvstd.f pgvw.f pgwedg.f pgwnad.f pgadvance.f pgbegin.f pgcurse.f
547         pglabel.f pgmtext.f pgncurse.f pgpaper.f pgpoint.f pgptext.f pgvport.f
548         pgvsize.f pgvstand.f pgwindow.f pgaxis.f pgconf.f pgerr1.f pgpt1.f
549         pgqclp.f pgqdt.f pgqndt.f pgsclp.f pgscrl.f pgtick.f
550 )
551 set(src
552         cpgarro.c cpgask.c cpgband.c cpgbbuf.c cpgbeg.c cpgbin.c cpgbox.c
553         cpgcirc.c cpgclos.c cpgconb.c cpgconl.c cpgcons.c cpgcont.c cpgctab.c
554         cpgcurs.c cpgdraw.c cpgebuf.c cpgend.c cpgenv.c cpgeras.c cpgerrb.c
555         cpgerrx.c cpgerry.c cpgetxt.c cpggray.c cpghi2d.c cpghist.c cpgiden.c
556         cpgimag.c cpglab.c cpglcur.c cpgldev.c cpglen.c cpgline.c cpgmove.c
557         cpgmtxt.c cpgncur.c cpgnumb.c cpgolin.c cpgopen.c cpgpage.c cpgpanl.c
558         cpgpap.c cpgpixl.c cpgpnts.c cpgpoly.c cpgpt.c cpgptxt.c cpgqah.c
559         cpgqcf.c cpgqch.c cpgqci.c cpgqcir.c cpgqcol.c cpgqcr.c cpgqcs.c
560         cpgqfs.c cpgqhs.c cpgqid.c cpgqinf.c cpgqitf.c cpgqls.c cpgqlw.c
561         cpgqpos.c cpgqtbg.c cpgqtxt.c cpgqvp.c cpgqvsz.c cpgqwin.c cpgrect.c
562         cpgrnd.c cpgrnge.c cpgsah.c cpgsave.c cpgscf.c cpgsch.c cpgsci.c
563         cpgscir.c cpgscr.c cpgscrn.c cpgsfs.c cpgshls.c cpgshs.c cpgsitf.c
564         cpgslct.c cpgsls.c cpgslw.c cpgstbg.c cpgsubp.c cpgsvp.c cpgswin.c
565         cpgtbox.c cpgtext.c cpgunsa.c cpgupdt.c cpgvect.c cpgvsiz.c cpgvstd.c
566         cpgwedg.c cpgwnad.c cpgaxis.c cpgconf.c cpgerr1.c cpgpt1.c cpgqclp.c
567         cpgqdt.c cpgqndt.c cpgsclp.c cpgscrl.c cpgtick.c
568 )
569
570 macro(bind infile)
571 add_custom_command(
572         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/c${infile}.c
573         COMMAND pgbind bsd -h -w ${CMAKE_SOURCE_DIR}/src/${infile}.f
574         DEPENDS pgbind ${CMAKE_SOURCE_DIR}/src/${infile}.f
575         VERBATIM
576 )
577 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/c${infile}.c
578         PROPERTIES GENERATED true
579 )
580 endmacro(bind)
581
582 foreach(dossier ${src})
583         set(pathsrc ${pathsrc} ${CMAKE_CURRENT_BINARY_DIR}/${dossier})
584         set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${dossier}
585                 PROPERTIES GENERATED true)
586 endforeach(dossier)
587
588 foreach(dossier ${libsrcs})
589         set(pathlibsrcs ${pathlibsrcs} ${CMAKE_SOURCE_DIR}/src/${dossier})
590 endforeach(dossier)
591
592 add_custom_command(
593         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpgplot.h ${pathsrc}
594         COMMAND pgbind bsd -h -w ${pathlibsrcs}
595         DEPENDS pgbind ${pathlibsrcs}
596         VERBATIM
597 )
598
599 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/cpgplot.h
600         PROPERTIES GENERATED true)
601
602 add_library(plotobj OBJECT ${src})
603 set_property(TARGET plotobj PROPERTY POSITION_INDEPENDENT_CODE 1)
604
605 add_library(cpgplot SHARED $<TARGET_OBJECTS:plotobj>)
606 add_library(cpgplot_static ${src})
607
608 set_target_properties(cpgplot PROPERTIES VERSION 5)
609 set_target_properties(cpgplot PROPERTIES SOVERSION 5)
610 set_target_properties(cpgplot PROPERTIES PUBLIC_HEADER
611         ${CMAKE_CURRENT_BINARY_DIR}/cpgplot.h)
612
613 target_compile_definitions (cpgplot PUBLIC PG_PPU)
614 target_compile_definitions (cpgplot_static PUBLIC PG_PPU)
615
616 install(TARGETS cpgplot
617         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
618         PUBLIC_HEADER DESTINATION include)
619
620 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcpgplot_static.a
621         RENAME libcpgplot.a
622         DESTINATION lib)
623 install(FILES ../cpg/cpgplot.doc DESTINATION share/doc/pgplot)
624
625
626 [FILE:5920:files/sys_CMakeLists.txt]
627 set (S "${CMAKE_SOURCE_DIR}/src")
628 set (D "../drivers")
629 set (BSD "../sys_freebsd")
630
631 set(PG_ROUTINES
632         ${S}/pgarro.f
633         ${S}/pgask.f
634         ${S}/pgaxis.f
635         ${S}/pgaxlg.f
636         ${S}/pgband.f
637         ${S}/pgbbuf.f
638         ${S}/pgbeg.f
639         ${S}/pgbin.f
640         ${S}/pgbox.f
641         ${S}/pgbox1.f
642         ${S}/pgcirc.f
643         ${S}/pgcl.f
644         ${S}/pgclos.f
645         ${S}/pgcn01.f
646         ${S}/pgcnsc.f
647         ${S}/pgconb.f 
648         ${S}/pgconf.f 
649         ${S}/pgconl.f 
650         ${S}/pgcons.f 
651         ${S}/pgcont.f 
652         ${S}/pgconx.f 
653         ${S}/pgcp.f 
654         ${S}/pgctab.f
655         ${S}/pgcurs.f 
656         ${S}/pgdraw.f 
657         ${S}/pgebuf.f 
658         ${S}/pgend.f 
659         ${S}/pgenv.f 
660         ${S}/pgeras.f 
661         ${S}/pgerr1.f 
662         ${S}/pgerrb.f
663         ${S}/pgerrx.f 
664         ${S}/pgerry.f 
665         ${S}/pgetxt.f 
666         ${S}/pgfunt.f 
667         ${S}/pgfunx.f 
668         ${S}/pgfuny.f 
669         ${S}/pggray.f
670         ${S}/pghi2d.f 
671         ${S}/pghis1.f 
672         ${S}/pghist.f 
673         ${S}/pghtch.f 
674         ${S}/pgiden.f 
675         ${S}/pgimag.f 
676         ${S}/pginit.f 
677         ${S}/pglab.f
678         ${S}/pglcur.f 
679         ${S}/pgldev.f 
680         ${S}/pglen.f 
681         ${S}/pgline.f 
682         ${S}/pgmove.f 
683         ${S}/pgmtxt.f 
684         ${S}/pgncur.f 
685         ${S}/pgnoto.f
686         ${S}/pgnpl.f 
687         ${S}/pgnumb.f 
688         ${S}/pgolin.f 
689         ${S}/pgopen.f 
690         ${S}/pgpage.f 
691         ${S}/pgpanl.f 
692         ${S}/pgpap.f 
693         ${S}/pgpixl.f
694         ${S}/pgpnts.f 
695         ${S}/pgpoly.f 
696         ${S}/pgpt.f 
697         ${S}/pgpt1.f 
698         ${S}/pgptxt.f 
699         ${S}/pgqah.f 
700         ${S}/pgqcf.f 
701         ${S}/pgqch.f
702         ${S}/pgqci.f 
703         ${S}/pgqcir.f 
704         ${S}/pgqclp.f 
705         ${S}/pgqcol.f 
706         ${S}/pgqcr.f 
707         ${S}/pgqcs.f 
708         ${S}/pgqdt.f 
709         ${S}/pgqfs.f
710         ${S}/pgqhs.f 
711         ${S}/pgqid.f 
712         ${S}/pgqinf.f 
713         ${S}/pgqitf.f 
714         ${S}/pgqls.f 
715         ${S}/pgqlw.f 
716         ${S}/pgqndt.f 
717         ${S}/pgqpos.f
718         ${S}/pgqtbg.f 
719         ${S}/pgqtxt.f 
720         ${S}/pgqvp.f 
721         ${S}/pgqvsz.f 
722         ${S}/pgqwin.f 
723         ${S}/pgrect.f 
724         ${S}/pgrnd.f 
725         ${S}/pgrnge.f
726         ${S}/pgsah.f 
727         ${S}/pgsave.f 
728         ${S}/pgscf.f 
729         ${S}/pgsch.f 
730         ${S}/pgsci.f 
731         ${S}/pgscir.f 
732         ${S}/pgsclp.f 
733         ${S}/pgscr.f
734         ${S}/pgscrl.f 
735         ${S}/pgscrn.f 
736         ${S}/pgsfs.f 
737         ${S}/pgshls.f 
738         ${S}/pgshs.f 
739         ${S}/pgsitf.f 
740         ${S}/pgslct.f 
741         ${S}/pgsls.f
742         ${S}/pgslw.f 
743         ${S}/pgstbg.f 
744         ${S}/pgsubp.f 
745         ${S}/pgsvp.f 
746         ${S}/pgswin.f 
747         ${S}/pgtbox.f 
748         ${S}/pgtext.f 
749         ${S}/pgtick.f
750         ${S}/pgtikl.f 
751         ${S}/pgupdt.f 
752         ${S}/pgvect.f 
753         ${S}/pgvsiz.f 
754         ${S}/pgvstd.f 
755         ${S}/pgvw.f 
756         ${S}/pgwedg.f 
757         ${S}/pgwnad.f
758 )
759
760 set(PG_NON_STANDARD
761         ${S}/pgadvance.f 
762         ${S}/pgbegin.f 
763         ${S}/pgcurse.f 
764         ${S}/pglabel.f
765         ${S}/pgmtext.f 
766         ${S}/pgncurse.f 
767         ${S}/pgpaper.f 
768         ${S}/pgpoint.f 
769         ${S}/pgptext.f 
770         ${S}/pgvport.f 
771         ${S}/pgvsize.f
772         ${S}/pgvstand.f 
773         ${S}/pgwindow.f
774 )
775
776 set(GR_ROUTINES
777         ${S}/grarea.f 
778         ${S}/grbpic.f 
779         ${S}/grchsz.f 
780         ${S}/grclip.f 
781         ${S}/grclos.f 
782         ${S}/grclpl.f
783         ${S}/grctoi.f 
784         ${S}/grcurs.f 
785         ${S}/grdot0.f 
786         ${S}/grdot1.f 
787         ${S}/grdtyp.f 
788         ${S}/gresc.f 
789         ${S}/grepic.f 
790         ${S}/gretxt.f
791         ${S}/grfa.f 
792         ${S}/grfao.f 
793         ${S}/grgfil.f 
794         ${S}/grgray.f 
795         ${S}/grimg0.f 
796         ${S}/grimg1.f 
797         ${S}/grimg2.f 
798         ${S}/grimg3.f
799         ${S}/grinit.f 
800         ${S}/gritoc.f 
801         ${S}/grldev.f 
802         ${S}/grlen.f 
803         ${S}/grlin0.f 
804         ${S}/grlin1.f 
805         ${S}/grlin2.f 
806         ${S}/grlin3.f
807         ${S}/grlina.f 
808         ${S}/grmcur.f 
809         ${S}/grmker.f 
810         ${S}/grmova.f 
811         ${S}/grmsg.f 
812         ${S}/gropen.f 
813         ${S}/grpage.f 
814         ${S}/grpars.f
815         ${S}/grpixl.f 
816         ${S}/grpocl.f 
817         ${S}/grprom.f 
818         ${S}/grpxpo.f 
819         ${S}/grpxps.f 
820         ${S}/grpxpx.f 
821         ${S}/grpxre.f
822         ${S}/grqcap.f 
823         ${S}/grqci.f 
824         ${S}/grqcol.f 
825         ${S}/grqcr.f 
826         ${S}/grqdev.f 
827         ${S}/grqdt.f 
828         ${S}/grqfnt.f 
829         ${S}/grqls.f
830         ${S}/grqlw.f 
831         ${S}/grqpos.f 
832         ${S}/grqtxt.f 
833         ${S}/grqtyp.f 
834         ${S}/grquit.f 
835         ${S}/grrec0.f 
836         ${S}/grrect.f 
837         ${S}/grsci.f
838         ${S}/grscr.f 
839         ${S}/grsetc.f 
840         ${S}/grscrl.f 
841         ${S}/grsetc.f 
842         ${S}/grsets.f 
843         ${S}/grsfnt.f 
844         ${S}/grsize.f 
845         ${S}/grskpb.f
846         ${S}/grslct.f 
847         ${S}/grsls.f 
848         ${S}/grslw.f 
849         ${S}/grsyds.f 
850         ${S}/grsymk.f 
851         ${S}/grsyxd.f 
852         ${S}/grterm.f 
853         ${S}/grtext.f
854         ${S}/grtoup.f 
855         ${S}/grtrim.f 
856         ${S}/grtrn0.f 
857         ${S}/grtxy0.f 
858         ${S}/grvct0.f 
859         ${S}/grwarn.f 
860         ${S}/grxhls.f
861         ${S}/grxrgb.f
862 )
863
864 set(DRIVERS
865         ${D}/gidriv.f
866         ${D}/gldriv.f
867         ${D}/hgdriv.f
868         ${D}/lxdriv.f
869         ${D}/nudriv.f
870         ${D}/ppdriv.f
871         ${D}/psdriv.f
872         ${D}/ttdriv.f
873         ${D}/wddriv.f
874         ${D}/x2driv.c
875         ${D}/figdisp_comm.c
876         ${D}/xwdriv.c
877         ${D}/cgdriv.c
878         ${D}/pndriv.c
879         ${D}/xadriv.c
880 )
881
882 set(SYSTEM_ROUTINES
883         grdate.c grfileio.c grflun.f grgcom.f grgenv.f
884         grgetc.c grglun.f grgmem.c grgmsg.f grlgtr.f groptx.f grsy00.f
885         grtermio.c grtrml.f grtter.f gruser.c
886 )
887
888 IF(CMAKE_SYSTEM_NAME MATCHES "(FreeBSD|DragonFly)")
889         set(OS_SPECIFIC ${BSD}/iand.c)
890 ENDIF()
891
892 set(SRCS 
893         ${PG_ROUTINES}
894         ${PG_NON_STANDARD}
895         ${GR_ROUTINES}
896         ${SYSTEM_ROUTINES}
897         ${DRIVERS}
898         ${OS_SPECIFIC}
899         grexec.f        # provided
900 )
901
902 add_library(fplotobj OBJECT ${SRCS})
903 set_property(TARGET fplotobj PROPERTY POSITION_INDEPENDENT_CODE 1)
904
905 add_library(pgplot SHARED $<TARGET_OBJECTS:fplotobj>)
906 add_library(pgplot_static ${SRCS})
907
908 set_target_properties(pgplot PROPERTIES VERSION 5)
909 set_target_properties(pgplot PROPERTIES SOVERSION 5)
910
911 target_compile_definitions (fplotobj PUBLIC PG_PPU)
912 target_compile_definitions (pgplot_static PUBLIC PG_PPU)
913
914 target_link_libraries (pgplot png)
915
916 install(TARGETS pgplot
917         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
918         PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
919
920 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpgplot_static.a
921         RENAME libpgplot.a
922         DESTINATION lib)
923
924 set (out_doc ${CMAKE_CURRENT_BINARY_DIR}/pgplot.doc)
925 set (out_htm ${CMAKE_CURRENT_BINARY_DIR}/pgplot.html)
926 set (out_tex ${CMAKE_CURRENT_BINARY_DIR}/pgplot-routines.tex)
927
928 add_custom_command(
929         OUTPUT ${out_doc}
930         COMMAND ${CMAKE_SOURCE_DIR}/makedoc ${PG_ROUTINES} ${PG_NON_STANDARD} > ${out_doc}
931         DEPENDS ${PG_ROUTINES} ${PG_NON_STANDARD}
932         COMMENT "Generated ${out_doc}"
933         VERBATIM
934 )
935
936 add_custom_command(
937         OUTPUT ${out_htm}
938         COMMAND ${CMAKE_SOURCE_DIR}/makehtml ${PG_ROUTINES} ${PG_NON_STANDARD} > ${out_htm}
939         DEPENDS ${PG_ROUTINES} ${PG_NON_STANDARD}
940         COMMENT "Generated ${out_htm}"
941         VERBATIM
942 )
943
944 add_custom_command(
945         OUTPUT ${out_tex}
946         COMMAND ${CMAKE_SOURCE_DIR}/maketex ${PG_ROUTINES} ${PG_NON_STANDARD} > ${out_tex}
947         DEPENDS ${PG_ROUTINES} ${PG_NON_STANDARD}
948         COMMENT "Generated ${out_tex}"
949         VERBATIM
950 )
951
952 add_custom_target(gen_docs ALL
953         DEPENDS ${out_doc} ${out_htm} ${out_tex}
954 )
955
956 install(FILES ${out_doc} ${out_htm} ${out_tex}
957         DESTINATION share/doc/pgplot)
958