diff -urN /usr/ports/print/hp2xx/Makefile print/hp2xx/Makefile --- /usr/ports/print/hp2xx/Makefile 2014-07-30 00:58:52.000000000 +0900 +++ print/hp2xx/Makefile 2014-10-21 00:00:00.000000000 +0900 @@ -3,39 +3,36 @@ PORTNAME= hp2xx PORTVERSION= 3.4.4 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= print x11 -MASTER_SITES= ${MASTER_SITE_GNU} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= GNU MAINTAINER= ports@FreeBSD.org COMMENT= HPGL to vector and raster formats converter and previewer for X11 +LICENSE= GPLv2 # (or later) + LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \ libtiff.so:${PORTSDIR}/graphics/tiff -WRKSRC= ${WRKDIR}/${DISTNAME}/sources +WRKSRC_SUBDIR= sources USES= makeinfo MAKE_ENV= DEFINES="${CPPFLAGS}" ALL_LIBS="${LDFLAGS}" -PLIST_FILES= bin/hp2xx man/man1/hp2xx.1.gz -INFO= hp2xx - CPPFLAGS+= -DUNIX -I${LOCALBASE}/include LDFLAGS+= -lm -L${LOCALBASE}/lib -ltiff -lpng -lz -OPTIONS_DEFINE= X11 -OPTIONS_DEFAULT=X11 +INFO= hp2xx +PLIST_FILES= bin/hp2xx man/man1/hp2xx.1.gz -X11_USE= XORG=x11 -X11_CPPFLAGS= -DHAS_UNIX_X11 -I${LOCALBASE}/include -X11_LDFLAGS= -L${LOCALBASE}/lib -lX11 +OPTIONS_DEFINE= X11 +OPTIONS_DEFAULT= X11 + +X11_USE= XORG=x11 X11_MAKE_ENV= PREVIEWER=to_x11 X11_MAKE_ENV_OFF= PREVIEWER=no_prev - -post-patch: - @${REINPLACE_CMD} -E 's,(bin|info|man1)dir),DESTDIR)$$(&,' \ - ${WRKSRC}/Makefile +X11_CPPFLAGS= -DHAS_UNIX_X11 -I${LOCALBASE}/include +X11_LDFLAGS= -L${LOCALBASE}/lib -lX11 .include diff -urN /usr/ports/print/hp2xx/files/patch-Makefile print/hp2xx/files/patch-Makefile --- /usr/ports/print/hp2xx/files/patch-Makefile 2014-07-30 00:58:52.000000000 +0900 +++ print/hp2xx/files/patch-Makefile 2014-10-21 00:00:00.000000000 +0900 @@ -86,15 +86,15 @@ - -$(STRIP) $(PROGRAM) - -$(CP) $(PROGRAM) $(bindir) - -$(CHMOD) 755 $(bindir)/$(PROGRAM) -+ ${BSD_INSTALL_PROGRAM} $(PROGRAM) $(bindir) ++ ${BSD_INSTALL_PROGRAM} $(PROGRAM) $(DESTDIR)$(bindir) install-info: hp2xx.info - -$(CP) hp2xx.info $(infodir) - -$(CHMOD) 644 $(infodir)/hp2xx.info -+ ${BSD_INSTALL_DATA} hp2xx.info $(infodir) ++ ${BSD_INSTALL_DATA} hp2xx.info $(DESTDIR)$(infodir) install-man: ../doc/hp2xx.1 - -$(CP) ../doc/hp2xx.1 $(man1dir) - -$(CHMOD) 644 $(man1dir)/hp2xx.1 -+ ${BSD_INSTALL_MAN} ../doc/hp2xx.1 $(man1dir) ++ ${BSD_INSTALL_MAN} ../doc/hp2xx.1 $(DESTDIR)$(man1dir) diff -urN /usr/ports/print/hp2xx/files/patch-doc__hp2xx.1 print/hp2xx/files/patch-doc__hp2xx.1 --- /usr/ports/print/hp2xx/files/patch-doc__hp2xx.1 1970-01-01 09:00:00.000000000 +0900 +++ print/hp2xx/files/patch-doc__hp2xx.1 2014-10-21 00:00:00.000000000 +0900 @@ -0,0 +1,20 @@ +--- ../doc/hp2xx.1.orig ++++ ../doc/hp2xx.1 +@@ -155,7 +155,7 @@ + Use option + .I -m mode + to select the program mode, i.e. the output format. Currently supported: +-mode = "mf" (Metafont), "em" (emTeX \special{} commands), "epic" ++mode = "mf" (Metafont), "em" (emTeX \\special{} commands), "epic" + (line drawing using TeX macros within epic.sty), "eps" (PostScript), + "dxf" (Autocad), "emf/emp" (MS Enhanced Metafile / Printing - available + in Windows-built executables only), "svg" (Scalable Vector Graphics), +@@ -260,7 +260,7 @@ + create. Edit the metafont source, e.g., to change the letter "Z" for + another, or to change the line thickness, which is set to 0.4pt by default. + The other TeX-related modes ("cad" for TeXcad compatible code, "em" for +-employing \special{em:line} macros, and "epic" for drawing lines with ++employing \\special{em:line} macros, and "epic" for drawing lines with + macros from "epic.sty") address different compromises to cope with TeX's + poor line drawing capability and are generally not recommended nor fully + supported. Feel free to experiment with them -- they generate ASCII output diff -urN /usr/ports/print/hp2xx/files/patch-doc_hp2xxinf.tex print/hp2xx/files/patch-doc_hp2xxinf.tex --- /usr/ports/print/hp2xx/files/patch-doc_hp2xxinf.tex 2014-07-30 00:58:52.000000000 +0900 +++ print/hp2xx/files/patch-doc_hp2xxinf.tex 2014-10-21 00:00:00.000000000 +0900 @@ -12,8 +12,8 @@ @c @smallbook @c @cropmarks @c %**end of header -@@ -35,14 +40,6 @@ - @c 00/09/20 V 1.2 MK fixed INFO-DIR-ENTRY, updates for 3.4.0 +@@ -36,14 +41,6 @@ + @c 03/06/21 V 1.4 MK updates and fixes for 3.4.4 @c THIS MANUAL REQUIRES TEXINFO-2 macros and info-makers to format properly. -@ifinfo @@ -27,3 +27,12 @@ @c @ifinfo This file documents the HP-GL converter HP2XX +@@ -92,7 +89,7 @@ + @page + @tex + {\parskip=0pt +-\hfill mk\@daveg.com\par ++\hfill mk@@daveg.com\par + \hfill {\it Using HP2XX}, \manvers\par + \hfill \TeX{}info \texinfoversion\par + } diff -urN /usr/ports/print/hp2xx/files/patch-hp2xx.c print/hp2xx/files/patch-hp2xx.c --- /usr/ports/print/hp2xx/files/patch-hp2xx.c 1970-01-01 09:00:00.000000000 +0900 +++ print/hp2xx/files/patch-hp2xx.c 2014-10-21 00:00:00.000000000 +0900 @@ -0,0 +1,21 @@ +--- hp2xx.c.orig ++++ hp2xx.c +@@ -464,7 +464,8 @@ + po->dpi_y = 0; + po->vga_mode = 18; /* 0x12: VGA 640x480, 16 colors */ + po->picbuf = NULL; +- po->outfile = ""; ++ po->outfile = malloc(128 * sizeof(char)); ++ po->outfile[0] = '\0'; + po->zengage = -1.; + po->zretract = 1.; + +@@ -552,7 +553,7 @@ + len = (int) strlen(in_name); + + if (len == 0) { /* If input from stdin: *//* then supply a default file name */ +- *outfile = "hp2xx.out"; ++ strcpy(*outfile, "hp2xx.out"); + return; + } + diff -urN /usr/ports/print/hp2xx/files/patch-hpgl.c print/hp2xx/files/patch-hpgl.c --- /usr/ports/print/hp2xx/files/patch-hpgl.c 1970-01-01 09:00:00.000000000 +0900 +++ print/hp2xx/files/patch-hpgl.c 2014-10-21 00:00:00.000000000 +0900 @@ -0,0 +1,42 @@ +--- hpgl.c.orig ++++ hpgl.c +@@ -2622,9 +2622,6 @@ + fprintf(stderr, + "only fixed fonts available\n"); + break; +- case 3: /* font pitch */ +- case 4: /* font height */ +- case 5: /* posture */ + case 6: /* stroke weight */ + if (read_float(&ftmp, hd)) + par_err_exit(2, cmd, hd); +@@ -2636,6 +2633,9 @@ + tp->astrokewidth = 0.11 + ftmp / 70.; /* 0.01 ... 0.21 mm */ + } + break; ++ case 3: /* font pitch */ ++ case 4: /* font height */ ++ case 5: /* posture */ + case 7: /* typeface */ + if (read_float(&csfont, hd)) + par_err_exit(2, cmd, hd); +@@ -3720,9 +3720,6 @@ + fprintf(stderr, + "only fixed fonts available\n"); + break; +- case 3: /* font pitch */ +- case 4: /* font height */ +- case 5: /* posture */ + case 6: /* stroke weight */ + if (read_float(&ftmp, hd)) + par_err_exit(2, cmd, hd); +@@ -3734,6 +3731,9 @@ + tp->sstrokewidth = 0.11 + ftmp / 70.; /* 0.01 ... 0.21 mm */ + } + break; ++ case 3: /* font pitch */ ++ case 4: /* font height */ ++ case 5: /* posture */ + case 7: /* typeface */ + if (read_float(&csfont, hd)) + par_err_exit(2, cmd, hd); diff -urN /usr/ports/print/hp2xx/files/patch-std_main.c print/hp2xx/files/patch-std_main.c --- /usr/ports/print/hp2xx/files/patch-std_main.c 1970-01-01 09:00:00.000000000 +0900 +++ print/hp2xx/files/patch-std_main.c 2014-10-21 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- std_main.c.orig ++++ std_main.c +@@ -605,7 +605,7 @@ + if (strlen(Po.outfile) > 0) + strcpy(outname, Po.outfile); /* store fixed outfile name if present */ + else { +- Po.outfile = malloc(1 * sizeof(char)); ++ Po.outfile = realloc(Po.outfile, 2 * sizeof(char)); + strcpy(Po.outfile, ""); + } + /**