diff --git a/graphics/ploticus/Makefile b/graphics/ploticus/Makefile index e4c08451e85ae..128c32fcaa409 100644 --- a/graphics/ploticus/Makefile +++ b/graphics/ploticus/Makefile @@ -1,42 +1,40 @@ -# $NetBSD: Makefile,v 1.48 2013/06/04 22:16:25 tron Exp $ +# $NetBSD: Makefile,v 1.49 2013/06/30 15:13:09 ryoon Exp $ -DISTNAME= pl231src -PKGNAME= ploticus-2.31pl4 -PKGREVISION= 12 +DISTNAME= ploticus242_src +PKGNAME= ploticus-2.42 CATEGORIES= graphics -MASTER_SITES= http://ploticus.sourceforge.net/download/ +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ploticus/} MAINTAINER= rh@NetBSD.org HOMEPAGE= http://ploticus.sourceforge.net/ COMMENT= Versatile data visualization engine +LICENSE= gnu-gpl-v2 -WRKSRC= ${WRKDIR}/${DISTNAME}/src -NO_CONFIGURE= yes +WRKSRC= ${WRKDIR}/${DISTNAME:S/_src//} -BUILD_TARGET= ploticus -MANSRC= ${WRKDIR}/${DISTNAME}/man -PREFABSRC= ${WRKDIR}/${DISTNAME}/prefabs +BUILD_DIRS= src +BUILD_TARGET= pl -DOCDST= ${PREFIX}/share/doc/ploticus -PREFABDST= ${PREFIX}/share/ploticus +DOCSRC= ${WRKSRC}/pltestsuite +PREFABSRC= ${WRKSRC}/prefabs + +DOCDST= share/doc/ploticus +PREFABDST= share/ploticus MAKE_ENV+= XLIBS="-L${X11BASE}/lib -lX11" MAKE_ENV+= XINCLUDEDIR="-I${X11BASE}/include" -INSTALLATION_DIRS= bin - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/pl ${DESTDIR}${PREFIX}/bin/pl - ${INSTALL_DATA_DIR} ${DESTDIR}${PREFABDST} -.for file in \ - README chron.pl chunk_area chunk_chronfilter chunk_doheatmap \ - chunk_heatmapfilter chunk_logstubs chunk_logtics chunk_read \ - chunk_setstd chunk_stackareafilter chunk_title chunk_vdistfilter \ - chunk_xaxis chunk_yaxis compare.pl cumufrac.pl dist.pl draw.pl \ - heatmap.pl lines.pl multidist.pl pie.pl processdata.pl scat.pl \ - stack.pl vbars.pl vdist.pl - ${INSTALL_DATA} ${PREFABSRC}/${file} ${DESTDIR}${PREFABDST}/${file} -.endfor +SUBST_CLASSES+= prefab +SUBST_STAGE.prefab= pre-configure +SUBST_MESSAGE.prefab= Hardcode PLOTICUS_PREFABS. +SUBST_FILES.prefab= src/pl.h +SUBST_VARS.prefab= PREFIX + +INSTALLATION_DIRS+= ${DOCDST} ${PREFABDST} + +post-install: + ${INSTALL_DATA} ${DOCSRC}/* ${DESTDIR}${PREFIX}/${DOCDST} + ${INSTALL_DATA} ${PREFABSRC}/* ${DESTDIR}${PREFIX}/${PREFABDST} .include "../../devel/zlib/buildlink3.mk" .include "../../graphics/gd/buildlink3.mk" diff --git a/graphics/ploticus/PLIST b/graphics/ploticus/PLIST index b59cd3cf62c7c..becd2b26c0014 100644 --- a/graphics/ploticus/PLIST +++ b/graphics/ploticus/PLIST @@ -1,7 +1,118 @@ -@comment $NetBSD: PLIST,v 1.6 2009/06/14 17:59:24 joerg Exp $ +@comment $NetBSD: PLIST,v 1.7 2013/06/30 15:13:09 ryoon Exp $ bin/pl +share/doc/ploticus/Diag.out +share/doc/ploticus/Makefile +share/doc/ploticus/README +share/doc/ploticus/annot +share/doc/ploticus/annot2.htm +share/doc/ploticus/bars3.htm +share/doc/ploticus/bigcsv.pl +share/doc/ploticus/catlines1.htm +share/doc/ploticus/colorgrid.htm +share/doc/ploticus/colorgrid2.htm +share/doc/ploticus/csmap.out +share/doc/ploticus/cumufrac.dat +share/doc/ploticus/curve1.dat +share/doc/ploticus/data1 +share/doc/ploticus/data10 +share/doc/ploticus/data10h +share/doc/ploticus/data11 +share/doc/ploticus/data12 +share/doc/ploticus/data13 +share/doc/ploticus/data14 +share/doc/ploticus/data15 +share/doc/ploticus/data16 +share/doc/ploticus/data17 +share/doc/ploticus/data18 +share/doc/ploticus/data19 +share/doc/ploticus/data2 +share/doc/ploticus/data20 +share/doc/ploticus/data21 +share/doc/ploticus/data22 +share/doc/ploticus/data23 +share/doc/ploticus/data24 +share/doc/ploticus/data25 +share/doc/ploticus/data26 +share/doc/ploticus/data27 +share/doc/ploticus/data28 +share/doc/ploticus/data3 +share/doc/ploticus/data4 +share/doc/ploticus/data5 +share/doc/ploticus/data6 +share/doc/ploticus/data6b +share/doc/ploticus/data7 +share/doc/ploticus/data8 +share/doc/ploticus/data9 +share/doc/ploticus/devol.dat +share/doc/ploticus/devol.htm +share/doc/ploticus/dexa.dat +share/doc/ploticus/distrib.htm +share/doc/ploticus/drawcom.dcm +share/doc/ploticus/drawcom.htm +share/doc/ploticus/dtfut.dat +share/doc/ploticus/dtfut.htm +share/doc/ploticus/errbar1.htm +share/doc/ploticus/errbar5.htm +share/doc/ploticus/heatmap3.htm +share/doc/ploticus/hgb.dat +share/doc/ploticus/hitcount.dat +share/doc/ploticus/hitcount3.htm +share/doc/ploticus/kmslide.htm +share/doc/ploticus/legends232.htm +share/doc/ploticus/lineplot20.htm +share/doc/ploticus/lineplot4.htm +share/doc/ploticus/lineplot5.htm +share/doc/ploticus/p241.eps +share/doc/ploticus/pie1.htm +share/doc/ploticus/plconfig.spanish +share/doc/ploticus/propbars1.htm +share/doc/ploticus/quarters.htm +share/doc/ploticus/rangesweep2_dostext.htm +share/doc/ploticus/run_all_scripts +share/doc/ploticus/run_prefabs_test +share/doc/ploticus/run_prefabs_test.bat +share/doc/ploticus/run_script_test +share/doc/ploticus/run_script_test.bat +share/doc/ploticus/sar-cpu.dat +share/doc/ploticus/sar-cpu.htm +share/doc/ploticus/scatterplot10.dat +share/doc/ploticus/scatterplot10.htm +share/doc/ploticus/scatterplot4.htm +share/doc/ploticus/snpmap.dat +share/doc/ploticus/stock.csv +share/doc/ploticus/stock2.htm +share/doc/ploticus/strainz.dat +share/doc/ploticus/supstubs.htm +share/doc/ploticus/td.htm +share/doc/ploticus/testpf_chron +share/doc/ploticus/testpf_compare +share/doc/ploticus/testpf_cumufrac +share/doc/ploticus/testpf_dist +share/doc/ploticus/testpf_draw +share/doc/ploticus/testpf_heatmap +share/doc/ploticus/testpf_lines +share/doc/ploticus/testpf_multidist +share/doc/ploticus/testpf_pie +share/doc/ploticus/testpf_scat +share/doc/ploticus/testpf_stack +share/doc/ploticus/testpf_vbars +share/doc/ploticus/testpf_vdist +share/doc/ploticus/timeline2.htm +share/doc/ploticus/timely.dat +share/doc/ploticus/timely.htm +share/doc/ploticus/tree1.htm +share/doc/ploticus/vector1.htm +share/doc/ploticus/venn.htm +share/doc/ploticus/vermonth.tab +share/doc/ploticus/vf.dat +share/doc/ploticus/wind.csv +share/doc/ploticus/windbarbs.htm +share/doc/ploticus/ycase.newick share/ploticus/README +share/ploticus/SCP share/ploticus/chron.pl +share/ploticus/chron.pl- +share/ploticus/chron.pl-- share/ploticus/chunk_area share/ploticus/chunk_chronfilter share/ploticus/chunk_doheatmap @@ -20,6 +131,7 @@ share/ploticus/cumufrac.pl share/ploticus/dist.pl share/ploticus/draw.pl share/ploticus/heatmap.pl +share/ploticus/heatmap.pl- share/ploticus/lines.pl share/ploticus/multidist.pl share/ploticus/pie.pl diff --git a/graphics/ploticus/distinfo b/graphics/ploticus/distinfo index 6c0f4e838e60f..1ee982765603c 100644 --- a/graphics/ploticus/distinfo +++ b/graphics/ploticus/distinfo @@ -1,13 +1,9 @@ -$NetBSD: distinfo,v 1.13 2012/05/23 06:37:50 dholland Exp $ +$NetBSD: distinfo,v 1.14 2013/06/30 15:13:09 ryoon Exp $ -SHA1 (pl231src.tar.gz) = 9b7219acb31231efcf1200ad586e526814ae8283 -RMD160 (pl231src.tar.gz) = 379e6c3d2d6482cda2a76726c439b4e6f5395b1f -Size (pl231src.tar.gz) = 443596 bytes -SHA1 (patch-aa) = 322dc993492291f74b19f865cf149c8b50c5b9e5 -SHA1 (patch-ab) = ce2e4da8d87b915466fc8d107fcb60bf332767fe -SHA1 (patch-ba) = 69043093a1a77e14b776e3166eb874a508ae11d7 -SHA1 (patch-bb) = cd27de0c5c9d20d7909e0e3b7c0d8d0c662b232f -SHA1 (patch-bc) = eafd9ec5a0c7856a208df17a0a45e547239b66ac -SHA1 (patch-bd) = 7f269658b3eefdc26b36b395f657168dac8c25f4 -SHA1 (patch-functions_c) = 2dc6235796e95cd8e8de8131ee424290df9a8e0a -SHA1 (patch-gd__png.c) = cf5cd60d4ce7e8dbd95b40c2684e5f784075682c +SHA1 (ploticus242_src.tar.gz) = b3d9caa1db12144bdeff2b0b3857762e6aef26a9 +RMD160 (ploticus242_src.tar.gz) = 25535639286ca6caa9cf10971b43181ffa449f7d +Size (ploticus242_src.tar.gz) = 535755 bytes +SHA1 (patch-src_Makefile) = 4650de057a7d85da01153be4b3b53493220e372a +SHA1 (patch-src_gd__png.c) = e52d3bbdbc7dd6d4afa537e5a0dfa0cbfe46c6d9 +SHA1 (patch-src_pl.h) = 08903fb3afc7b13b190c492cf7b948d1518b6f07 +SHA1 (patch-src_tdhkit.c) = 5df8f2895f96e949411e00c853c3e1d111434cf9 diff --git a/graphics/ploticus/patches/patch-aa b/graphics/ploticus/patches/patch-aa deleted file mode 100644 index e8a0e05eb933f..0000000000000 --- a/graphics/ploticus/patches/patch-aa +++ /dev/null @@ -1,61 +0,0 @@ -$NetBSD: patch-aa,v 1.8 2005/02/08 09:40:35 adam Exp $ - ---- Makefile.orig 2005-02-03 21:17:43.000000000 +0000 -+++ Makefile -@@ -26,7 +26,7 @@ - - - # defaults.. --CC = gcc -+#CC = gcc - PLATFORM = UNIX - RMCOM = rm -f - XOBJ = x11.o interact.o -@@ -42,8 +42,8 @@ EXE = pl - ############################################################# - - #### For Linux uncomment the following.. ####################### --XLIBS = -L/usr/X11R6/lib -lX11 --INCLUDEDIRS = -I/usr/X11R6/include -+#XLIBS = -L/usr/X11R6/lib -lX11 -+#INCLUDEDIRS = -I/usr/X11R6/include - - #### Note: for 64 bit platform I used: XLIBS = -L/usr/X11R6/lib64 - -@@ -159,11 +159,11 @@ ZFLAG = -DWZ - #### For JPEG, WBMP, PNG, and FreeType2, using your copy of GD 1.84+, ###### - #### uncomment the following.. (gd 1.84+, libpng, zlib, libjpeg, libfreetype ###### - #### are all required). Set GDFONTPATH to directory containing .ttf files ###### --# ploticus: plgd18 --# GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype --# GD18H = --# GDFREETYPE = -DGDFREETYPE --# ZFLAG = -DWZ -+ploticus: plgd18 -+GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype -+GD18H = -+GDFREETYPE = -DGDFREETYPE -+ZFLAG = -DWZ - - - #### To disable all GD image support uncomment the following.. ###################### -@@ -197,6 +197,7 @@ BIN = /usr/local/bin - #### If done, users won't be required to have PLOTICUS_PREFABS environment variable defined. - #### This option not available for win32 - # PREFABS_DIR = "/usr/lib/ploticus" -+PREFABS_DIR = "${PREFIX}/share/ploticus" - - - #### For LOCALE support (non-roman alphabets & collation), uncomment the following.. -@@ -258,9 +259,9 @@ GD16 = grgd16.o devstuff16.o gd16.o gd_i - GD = gdfontg.o gdfontl.o gdfontmb.o gdfonts.o gdfontt.o - - --LIBS = $(XLIBS) -lm $(ADDLIBS) -+LIBS = ${LDFLAGS} $(XLIBS) -lm $(ADDLIBS) - --CFLAGS = $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(FLAGS) $(LOCALE_FLAG) \ -+CFLAGS += $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(FLAGS) $(LOCALE_FLAG) \ - $(NOGDFLAG) $(NOXFLAG) $(NOPSFLAG) $(NOSVGFLAG) $(NOSWFFLAG) $(INCLUDEDIRS) \ - $(MINGH) $(NORLIMFLAG) -DPREFABS_DIR=\"$(PREFABS_DIR)\" - diff --git a/graphics/ploticus/patches/patch-ab b/graphics/ploticus/patches/patch-ab deleted file mode 100644 index 50e778452f036..0000000000000 --- a/graphics/ploticus/patches/patch-ab +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ab,v 1.3 2006/08/22 20:51:44 jdc Exp $ - ---- gd16.c.orig 2001-07-12 15:24:23.000000000 +0100 -+++ gd16.c 2006-08-22 21:15:41.000000000 +0100 -@@ -1477,7 +1477,7 @@ - return cmpStatus; - } - --int cost[] = { -+static int cost[] = { - 1024, - 1023, - 1023, -@@ -1840,7 +1840,7 @@ - 1023 - }; - --int sint[] = { -+static int sint[] = { - 0, - 17, - 35, diff --git a/graphics/ploticus/patches/patch-ba b/graphics/ploticus/patches/patch-ba deleted file mode 100644 index 972fa19f233aa..0000000000000 --- a/graphics/ploticus/patches/patch-ba +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ba,v 1.1 2005/05/02 17:58:00 drochner Exp $ - ---- ../prefabs/processdata.pl.orig 2005-04-20 21:12:35.000000000 +0200 -+++ ../prefabs/processdata.pl -@@ -1,6 +1,7 @@ - #musthave action - - #setifnotgiven data = "-" -+#setifnotgiven inlinedata = "" - - #include $chunk_read - diff --git a/graphics/ploticus/patches/patch-bb b/graphics/ploticus/patches/patch-bb deleted file mode 100644 index fd43e5ef39dbd..0000000000000 --- a/graphics/ploticus/patches/patch-bb +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-bb,v 1.1 2005/05/02 17:58:00 drochner Exp $ - ---- proc_processdata.c.orig 2005-04-20 21:12:59.000000000 +0200 -+++ proc_processdata.c -@@ -602,9 +602,9 @@ else if( strcmp( action, "stats" )==0 ) - if( n > 1 ) setfloatvar( "SD", sqrt( ( accum[1] - (accum[0]*accum[0]/(double)n )) / ((double)n-1.0) ) ); - else setcharvar( "SD", "n/a" ); - setfloatvar( "MAX", max ); -- if( nfld > 1 ) setcharvar( "MAX_ID", breakbuf[0] ); -+ if( tagfld >= 0 ) setcharvar( "MAX_ID", breakbuf[0] ); - setfloatvar( "MIN", min ); -- if( nfld > 1 ) setcharvar( "MIN_ID", breakbuf[1] ); -+ if( tagfld >= 0 ) setcharvar( "MIN_ID", breakbuf[1] ); - } - return( 0 ); - } diff --git a/graphics/ploticus/patches/patch-bc b/graphics/ploticus/patches/patch-bc deleted file mode 100644 index 5bda8aed9708f..0000000000000 --- a/graphics/ploticus/patches/patch-bc +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-bc,v 1.1 2005/05/02 17:58:00 drochner Exp $ - ---- autorange.c.orig 2005-04-20 21:13:19.000000000 +0200 -+++ autorange.c -@@ -45,10 +45,9 @@ int mininit, maxinit; - - /* see what scaletype is being used.. */ - Egetunits( axis, unittyp ); --/* for linear, default to automatic determination of reasonable endpoints.. */ - if( strcmp( unittyp, "linear" )==0 ) strcpy( nearest, "auto" ); --/* for date, time, and other types, default to exact endpoints.. */ --else strcpy( nearest, "exact" ); -+else if ( GL_smemberi( unittyp, "date time datetime" )) strcpy( nearest, "datematic" ); -+else strcpy( nearest, "exact" ); /* categories? */ - - margin = 0.0; - strcpy( dfield, "" ); -@@ -110,7 +109,7 @@ if( ndf == 0 ) return( Eerr( 7194, "auto - /* ----------------- */ - - /* override.. */ --if( stricmp( nearest, "day" )==0 && stricmp( unittyp, "date" )==0 ) strcpy( nearest, "exact" ); -+/* if( stricmp( nearest, "day" )==0 && stricmp( unittyp, "date" )==0 ) strcpy( nearest, "exact" ); */ /* removed scg 4/19/05 */ - - /* find data min and max.. */ - -@@ -190,8 +189,8 @@ max += margin; - - /* degenerate case.. all data the same (bad if it happens to lie on inc boundary, eg: 0) - added scg 9/21/01 */ - if( min == max ) { -- min = min - 1.0; -- max = max + 1.0; -+ /* min = min - 1.0; max = max + 1.0; */ -+ min -= (min*0.2); max += (max*0.2); /* changed to work better w/ small magnitude values - scg 3/3/05 */ - } - - -@@ -208,7 +207,8 @@ else { - - /******* handle nearest= ***********/ - --if( GL_slmember( nearest, "dat*matic" ) || ( stricmp( nearest, "exact" )==0 && GL_smember( unittyp, "datetime time" )) ) { -+if( GL_slmember( nearest, "dat*matic" ) ) { -+ /* || ( stricmp( nearest, "exact" )==0 && GL_smember( unittyp, "datetime time" )) ) { */ /* removed scg 4/19/05 */ - char foo1[40], foo2[40], foo3[40], foo4[40], foo5[40], foo6[40]; - double dfoo1, dfoo2; - /* get an automatic reasonable "nearest" value.. */ diff --git a/graphics/ploticus/patches/patch-bd b/graphics/ploticus/patches/patch-bd deleted file mode 100644 index 4a49fb863f813..0000000000000 --- a/graphics/ploticus/patches/patch-bd +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-bd,v 1.1 2005/05/02 17:58:00 drochner Exp $ - ---- proc_pie.c.orig 2005-05-02 21:46:37.000000000 +0200 -+++ proc_pie.c -@@ -225,7 +225,7 @@ for( j = 0; j < 2; j++ ) { /* first time - - first = 1; - stheta = theta; -- if( j == 1 && strnicmp( outlinedetails, "no", 2 )==0 ) break; /* goto DOLAB; */ -+ if( j == 1 && strnicmp( outlinedetails, "no", 2 )==0 ) /* break; */ goto DOLAB; /* changed again, scg 4/29/05 */ - for( ; theta > stop; theta -= 0.03 ) { - if( theta - stop < 0.03 ) theta = stop; - x = cx + (radius * cos( theta )); -@@ -273,6 +273,7 @@ for( j = 0; j < 2; j++ ) { /* first time - - /* labeling */ /* if doing legend, handle this during j == 0 because color is available; - otherwise do labeling during j == 1 to avoid color fill obliterating labels.. */ -+ DOLAB: - if( ( j == 0 && ilabmode == LEGEND ) || ( j == 1 && ilabmode != 0 ) ) { - strcpy( label, "" ); - diff --git a/graphics/ploticus/patches/patch-functions_c b/graphics/ploticus/patches/patch-functions_c deleted file mode 100644 index 76d11c43d7a21..0000000000000 --- a/graphics/ploticus/patches/patch-functions_c +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-functions_c,v 1.1 2012/05/23 06:37:50 dholland Exp $ - -Don't declare own strchr(). - ---- functions.c~ 2005-01-12 20:25:45.000000000 +0000 -+++ functions.c -@@ -636,7 +636,6 @@ else { - - if( hash == 1708 ) { /* $htmldisplay( var1, .. varN ) - convert embedded HTML problem chars (<,>,&) - * to their html esc sequences for all variables given */ -- char *strchr(); - for( i = 0; i < nargs; i++ ) { - stat = TDH_getvalue( tok, arg[i], TDH_dat, TDH_recid ); - if( strchr( tok, '&' ) != NULL ) GL_substitute( "&", "&", tok ); diff --git a/graphics/ploticus/patches/patch-src_Makefile b/graphics/ploticus/patches/patch-src_Makefile new file mode 100644 index 0000000000000..75616a463a7cc --- /dev/null +++ b/graphics/ploticus/patches/patch-src_Makefile @@ -0,0 +1,69 @@ +$NetBSD: patch-src_Makefile,v 1.1 2013/06/30 15:13:09 ryoon Exp $ + +* zlib is also needed explicitly. + +--- src/Makefile.orig 2013-06-07 17:05:43.000000000 +0000 ++++ src/Makefile +@@ -7,7 +7,7 @@ + + + # defaults.. +-CC = gcc ++#CC = gcc + PLATFORM = UNIX + RMCOM = rm -f + NOX11 = -DNOX11 +@@ -91,10 +91,10 @@ NOX11 = -DNOX11 + + + ########### Option 1: use bundled GD16 (PNG only). Requires libpng and zlib. +-exetarget: plpng +-GD16LIBS = -lpng -lz +-GD16H = -I/usr/local/include +-ZFLAG = -DWZ ++#exetarget: plpng ++#GD16LIBS = -lpng -lz ++#GD16H = -I/usr/local/include ++#ZFLAG = -DWZ + ### These should remain commented unless your libs are not in usual places, then alter to suit... + ### GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a + ### GD16H = -I/home/scg/lib +@@ -103,11 +103,11 @@ ZFLAG = -DWZ + # exetarget: pl + + ########### Option 3: use your own GD resource. Requires GD 1.84+, libpng, zlib, libjpeg +-# exetarget: plgd18 +-# GD18LIBS = -lgd -lpng -lz -ljpeg +-# GD18H = +-# GDFREETYPE = +-# ZFLAG = -DWZ ++exetarget: plgd18 ++GD18LIBS = -lgd -lpng -lz -ljpeg ++GD18H = ++GDFREETYPE = ++ZFLAG = -DWZ + + ########### Option 4: use your own GD resource with FreeType2 (ttf) fonts enabled. + ########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype +@@ -188,9 +188,9 @@ GD13 = grgd13.o devstuff13.o gd13.o + GD16 = grgd16.o devstuff16.o gd16.o gd_io.o gd_io_dp.o gd_io_file.o gd_png.o + GD = gdfontg.o gdfontl.o gdfontmb.o gdfonts.o gdfontt.o + +-LIBS = $(XLIBS) -lm $(ADDLIBS) ++LIBS = ${LDFLAGS} $(XLIBS) -lm $(ADDLIBS) -lz + +-CFLAGS = $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \ ++CFLAGS += $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \ + $(NOGD) $(NOX11) $(NOPS) $(NOSVG) $(NOSWF) $(XINCLUDEDIR) $(MINGH) + + OBJ = proc_annotate.o proc_areadef.o proc_axis.o proc_bars.o proc_rect.o proc_breakaxis.o \ +@@ -263,7 +263,8 @@ devgrgd: + + + install: +- cp $(EXE) $(INSTALLBIN) ++ ${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin ++ ${BSD_INSTALL_PROGRAM} $(EXE) ${DESTDIR}${PREFIX}/bin + + clean: + $(RMCOM) *.o gd??files diff --git a/graphics/ploticus/patches/patch-src_Makefile.orig b/graphics/ploticus/patches/patch-src_Makefile.orig new file mode 100644 index 0000000000000..33c5a01b6518f --- /dev/null +++ b/graphics/ploticus/patches/patch-src_Makefile.orig @@ -0,0 +1,68 @@ +$NetBSD: patch-src_Makefile.orig,v 1.1 2013/06/30 15:13:09 ryoon Exp $ + +* zlib is also needed explicitly. + +--- src/Makefile.orig 2013-06-07 17:05:43.000000000 +0000 ++++ src/Makefile +@@ -7,7 +7,7 @@ + + + # defaults.. +-CC = gcc ++#CC = gcc + PLATFORM = UNIX + RMCOM = rm -f + NOX11 = -DNOX11 +@@ -91,10 +91,10 @@ NOX11 = -DNOX11 + + + ########### Option 1: use bundled GD16 (PNG only). Requires libpng and zlib. +-exetarget: plpng +-GD16LIBS = -lpng -lz +-GD16H = -I/usr/local/include +-ZFLAG = -DWZ ++#exetarget: plpng ++#GD16LIBS = -lpng -lz ++#GD16H = -I/usr/local/include ++#ZFLAG = -DWZ + ### These should remain commented unless your libs are not in usual places, then alter to suit... + ### GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a + ### GD16H = -I/home/scg/lib +@@ -103,11 +103,11 @@ ZFLAG = -DWZ + # exetarget: pl + + ########### Option 3: use your own GD resource. Requires GD 1.84+, libpng, zlib, libjpeg +-# exetarget: plgd18 +-# GD18LIBS = -lgd -lpng -lz -ljpeg +-# GD18H = +-# GDFREETYPE = +-# ZFLAG = -DWZ ++exetarget: plgd18 ++GD18LIBS = -lgd -lpng -lz -ljpeg ++GD18H = ++GDFREETYPE = ++ZFLAG = -DWZ + + ########### Option 4: use your own GD resource with FreeType2 (ttf) fonts enabled. + ########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype +@@ -137,7 +137,7 @@ ZFLAG = -DWZ + + #### To set a hard-coded directory for prefabs files, edit the PREFABS_DIR define in pl.h before doing the build. + #### If the installer does this, users won't be required to have PLOTICUS_PREFABS environment variable defined. +- ++PREFABS_DIR = "${PREFIX}/share/ploticus" + + #### If you do a "make install", where do you want the executable(s) to be moved to? + INSTALLBIN = /usr/local/bin +@@ -188,9 +188,9 @@ GD13 = grgd13.o devstuff13.o gd13.o + GD16 = grgd16.o devstuff16.o gd16.o gd_io.o gd_io_dp.o gd_io_file.o gd_png.o + GD = gdfontg.o gdfontl.o gdfontmb.o gdfonts.o gdfontt.o + +-LIBS = $(XLIBS) -lm $(ADDLIBS) ++LIBS = ${LDFLAGS} $(XLIBS) -lm $(ADDLIBS) -lz + +-CFLAGS = $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \ ++CFLAGS += $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \ + $(NOGD) $(NOX11) $(NOPS) $(NOSVG) $(NOSWF) $(XINCLUDEDIR) $(MINGH) + + OBJ = proc_annotate.o proc_areadef.o proc_axis.o proc_bars.o proc_rect.o proc_breakaxis.o \ diff --git a/graphics/ploticus/patches/patch-gd__png.c b/graphics/ploticus/patches/patch-src_gd__png.c similarity index 57% rename from graphics/ploticus/patches/patch-gd__png.c rename to graphics/ploticus/patches/patch-src_gd__png.c index f983044d06ee8..248d192678362 100644 --- a/graphics/ploticus/patches/patch-gd__png.c +++ b/graphics/ploticus/patches/patch-src_gd__png.c @@ -1,10 +1,10 @@ -$NetBSD: patch-gd__png.c,v 1.1 2011/04/03 11:58:22 wiz Exp $ +$NetBSD: patch-src_gd__png.c,v 1.1 2013/06/30 15:13:09 ryoon Exp $ -Fix build with png-1.5. +* Fix build with png-1.5. ---- gd_png.c.orig 1999-07-29 23:25:50.000000000 +0000 -+++ gd_png.c -@@ -265,7 +265,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC +--- src/gd_png.c.orig 2010-03-02 21:01:01.000000000 +0000 ++++ src/gd_png.c +@@ -268,7 +268,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC png_color_16p histogram; png_get_hIST(png_ptr, info_ptr, &histogram); @@ -13,7 +13,7 @@ Fix build with png-1.5. max_screen_colors, histogram, 1); } else #endif -@@ -291,7 +291,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC +@@ -294,7 +294,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC palette[2].red = palette[2].green = palette[2].blue = 128; palette[3].red = palette[3].green = palette[3].blue = 64; /* final argument (full_dither) *must* be 1: */ @@ -22,12 +22,3 @@ Fix build with png-1.5. #else /* allocate a 6x6x6 color cube, starting at index 0 or 1 */ idx = (transparent < 0)? 0 : 1; -@@ -305,7 +305,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC - } - } - } -- png_set_dither(png_ptr, palette, idx, idx, NULL, 1); -+ png_set_quantize(png_ptr, palette, idx, idx, NULL, 1); - #endif - } - break; diff --git a/graphics/ploticus/patches/patch-src_gd__png.c.orig b/graphics/ploticus/patches/patch-src_gd__png.c.orig new file mode 100644 index 0000000000000..e015484b9f88f --- /dev/null +++ b/graphics/ploticus/patches/patch-src_gd__png.c.orig @@ -0,0 +1,24 @@ +$NetBSD: patch-src_gd__png.c.orig,v 1.1 2013/06/30 15:13:09 ryoon Exp $ + +* Fix build with png-1.5. + +--- src/gd_png.c.orig 2010-03-02 21:01:01.000000000 +0000 ++++ src/gd_png.c +@@ -268,7 +268,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC + png_color_16p histogram; + + png_get_hIST(png_ptr, info_ptr, &histogram); +- png_set_dither(png_ptr, palette, num_palette, ++ png_set_quantize(png_ptr, palette, num_palette, + max_screen_colors, histogram, 1); + } else + #endif +@@ -294,7 +294,7 @@ gdImagePtr gdImageCreateFromPngCtx(gdIOC + palette[2].red = palette[2].green = palette[2].blue = 128; + palette[3].red = palette[3].green = palette[3].blue = 64; + /* final argument (full_dither) *must* be 1: */ +- png_set_dither(png_ptr, palette, 256, 256, NULL, 1); ++ png_set_quantize(png_ptr, palette, 256, 256, NULL, 1); + #else + /* allocate a 6x6x6 color cube, starting at index 0 or 1 */ + idx = (transparent < 0)? 0 : 1; diff --git a/graphics/ploticus/patches/patch-src_pl.h b/graphics/ploticus/patches/patch-src_pl.h new file mode 100644 index 0000000000000..43851fb449957 --- /dev/null +++ b/graphics/ploticus/patches/patch-src_pl.h @@ -0,0 +1,15 @@ +$NetBSD: patch-src_pl.h,v 1.1 2013/06/30 15:13:09 ryoon Exp $ + +* Hardcode PREFABS_DIR. + +--- src/pl.h.orig 2013-05-14 20:21:14.000000000 +0000 ++++ src/pl.h +@@ -8,7 +8,7 @@ + #include + #include "plg.h" + +-#define PREFABS_DIR "" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */ ++#define PREFABS_DIR "@PREFIX@/share/ploticus" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */ + + #define PLVERSION "2.42-May2013" /* see also the Copyright page, and page headers and footers */ + diff --git a/graphics/ploticus/patches/patch-src_tdhkit.c b/graphics/ploticus/patches/patch-src_tdhkit.c new file mode 100644 index 0000000000000..f9b62fad19f6e --- /dev/null +++ b/graphics/ploticus/patches/patch-src_tdhkit.c @@ -0,0 +1,14 @@ +$NetBSD: patch-src_tdhkit.c,v 1.1 2013/06/30 15:13:09 ryoon Exp $ + +* Include stdlib.h for putenv(3). + +--- src/tdhkit.c.orig 2008-01-11 16:48:13.000000000 +0000 ++++ src/tdhkit.c +@@ -13,6 +13,7 @@ + + + #include "tdhkit.h" ++#include + #include + + extern int DT_setdateparms(); diff --git a/graphics/ploticus/patches/patch-src_tdhkit.c.orig b/graphics/ploticus/patches/patch-src_tdhkit.c.orig new file mode 100644 index 0000000000000..525be5d4273d6 --- /dev/null +++ b/graphics/ploticus/patches/patch-src_tdhkit.c.orig @@ -0,0 +1,14 @@ +$NetBSD: patch-src_tdhkit.c.orig,v 1.1 2013/06/30 15:13:09 ryoon Exp $ + +* Include stdlib.h for putenv(3). + +--- src/tdhkit.c.orig 2008-01-11 16:48:13.000000000 +0000 ++++ src/tdhkit.c +@@ -13,6 +13,7 @@ + + + #include "tdhkit.h" ++#include + #include + + extern int DT_setdateparms();