View | Details | Raw Unified | Return to bug 194500
Collapse All | Expand All

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

Return to bug 194500