aboutsummaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2013-04-27 16:00:26 +0000
committerHiroki Sato <hrs@FreeBSD.org>2013-04-27 16:00:26 +0000
commit03156fbc9e57b8833d571c09fe86a65de05d8966 (patch)
treea41583195bf11eaddcc25d81461b4a49df2cefca /print
parentbfd963a8d0744b35d2c9acd4b82023eadad3a02d (diff)
downloadports-03156fbc9e57b8833d571c09fe86a65de05d8966.tar.gz
ports-03156fbc9e57b8833d571c09fe86a65de05d8966.zip
Add libpaper support to print/a2ps-*[1], print/c2ps-*, print/lprps-*,
graphics/jpeg2ps-*, and merge the papersize-suffixed versions into single ones respectively as print/psutils did. Approved by: dinoex (maintainer) [1]
Notes
Notes: svn path=/head/; revision=316672
Diffstat (limited to 'print')
-rw-r--r--print/Makefile10
-rw-r--r--print/a2ps-a4/Makefile7
-rw-r--r--print/a2ps/Makefile (renamed from print/a2ps-letter/Makefile)54
-rw-r--r--print/a2ps/distinfo (renamed from print/a2ps-letter/distinfo)0
-rw-r--r--print/a2ps/files/patch-ad (renamed from print/a2ps-letter/files/patch-ad)0
-rw-r--r--print/a2ps/files/patch-ae (renamed from print/a2ps-letter/files/patch-ae)0
-rw-r--r--print/a2ps/files/patch-contrib-emacs-Makefile.in (renamed from print/a2ps-letter/files/patch-contrib-emacs-Makefile.in)0
-rw-r--r--print/a2ps/files/patch-contrib-tmpdircreation (renamed from print/a2ps-letter/files/patch-contrib-tmpdircreation)0
-rw-r--r--print/a2ps/files/patch-etc-Makefile.in (renamed from print/a2ps-letter/files/patch-etc-Makefile.in)0
-rw-r--r--print/a2ps/files/patch-intl-localealias.c (renamed from print/a2ps-letter/files/patch-intl-localealias.c)0
-rw-r--r--print/a2ps/files/patch-lib-xgethostname.c (renamed from print/a2ps-letter/files/patch-lib-xgethostname.c)0
-rw-r--r--print/a2ps/files/patch-printers.c (renamed from print/a2ps-letter/files/patch-printers.c)0
-rw-r--r--print/a2ps/files/patch-select.c (renamed from print/a2ps-letter/files/patch-select.c)0
-rw-r--r--print/a2ps/files/patch-xgethostname.c (renamed from print/a2ps-letter/files/patch-xgethostname.c)0
-rw-r--r--print/a2ps/pkg-descr (renamed from print/a2ps-letter/pkg-descr)0
-rw-r--r--print/a2ps/pkg-plist (renamed from print/a2ps-letter/pkg-plist)0
-rw-r--r--print/c2ps-a4/Makefile11
-rw-r--r--print/c2ps-letter/Makefile37
-rw-r--r--print/c2ps/Makefile22
-rw-r--r--print/c2ps/distinfo (renamed from print/c2ps-letter/distinfo)0
-rw-r--r--print/c2ps/files/patch-Makefile47
-rw-r--r--print/c2ps/files/patch-c2ps.c346
-rw-r--r--print/c2ps/pkg-descr (renamed from print/c2ps-letter/pkg-descr)0
-rw-r--r--print/foomatic-filters/Makefile23
-rw-r--r--print/lprps-a4/Makefile12
-rw-r--r--print/lprps-letter/files/patch-ac11
-rw-r--r--print/lprps-letter/files/patch-ad13
-rw-r--r--print/lprps/Makefile (renamed from print/lprps-letter/Makefile)32
-rw-r--r--print/lprps/distinfo (renamed from print/lprps-letter/distinfo)0
-rw-r--r--print/lprps/files/patch-Makefile (renamed from print/lprps-letter/files/patch-aa)36
-rw-r--r--print/lprps/files/patch-ae (renamed from print/lprps-letter/files/patch-ae)0
-rw-r--r--print/lprps/files/patch-lprps.c (renamed from print/lprps-letter/files/patch-ab)32
-rw-r--r--print/lprps/files/patch-psif.c10
-rw-r--r--print/lprps/files/patch-psof.c26
-rw-r--r--print/lprps/files/patch-psrev.c31
-rw-r--r--print/lprps/files/patch-textps.c54
-rw-r--r--print/lprps/pkg-descr (renamed from print/lprps-letter/pkg-descr)0
-rw-r--r--print/lprps/pkg-plist (renamed from print/lprps-letter/pkg-plist)0
-rw-r--r--print/xfce4-print/Makefile9
39 files changed, 637 insertions, 186 deletions
diff --git a/print/Makefile b/print/Makefile
index 667d0557767c..67d1ee635efb 100644
--- a/print/Makefile
+++ b/print/Makefile
@@ -4,9 +4,7 @@
COMMENT = Desktop publishing
SUBDIR += a2pdf
- SUBDIR += a2ps-a4
- SUBDIR += a2ps-letter
- SUBDIR += a2ps-letterdj
+ SUBDIR += a2ps
SUBDIR += abc2mtex
SUBDIR += abcm2ps
SUBDIR += abntex
@@ -26,8 +24,7 @@
SUBDIR += biblio-py
SUBDIR += bibview
SUBDIR += bophook
- SUBDIR += c2ps-a4
- SUBDIR += c2ps-letter
+ SUBDIR += c2ps
SUBDIR += catdvi
SUBDIR += cdlabelgen
SUBDIR += cjk-lyx
@@ -174,8 +171,7 @@
SUBDIR += linux-f10-cups-libs
SUBDIR += lout
SUBDIR += lpr-wrapper
- SUBDIR += lprps-a4
- SUBDIR += lprps-letter
+ SUBDIR += lprps
SUBDIR += lyx
SUBDIR += lyx16
SUBDIR += magicfilter
diff --git a/print/a2ps-a4/Makefile b/print/a2ps-a4/Makefile
deleted file mode 100644
index b77a60a7d604..000000000000
--- a/print/a2ps-a4/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# Created by: Chuck Robey (chuckr@freebsd.org)
-# $FreeBSD$
-
-PAPERSIZE= a4
-MASTERDIR= ${.CURDIR}/../a2ps-letter
-
-.include "${MASTERDIR}/Makefile"
diff --git a/print/a2ps-letter/Makefile b/print/a2ps/Makefile
index 64c1d0ff0d68..9f0eab002d5b 100644
--- a/print/a2ps-letter/Makefile
+++ b/print/a2ps/Makefile
@@ -1,53 +1,42 @@
-# Created by: Chuck Robey (chuckr@freebsd.org)
+# Created by: Chuck Robey <chuckr@freebsd.org>
# $FreeBSD$
PORTNAME= a2ps
PORTVERSION= 4.13b
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_GNU} \
${MASTER_SITE_LOCAL:S/$/:i18n/}
MASTER_SITE_SUBDIR= ${PORTNAME} hrs/a2ps/:i18n
-PKGNAMESUFFIX= -${PAPERSIZE:L}${PKGNAMESUFFIX2}
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Formats an ASCII file for printing on a postscript printer
LICENSE= GPLv2
+LIB_DEPENDS= paper:${PORTSDIR}/print/libpaper
+
USE_PERL5= yes
USE_CSTD= gnu89
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
-MAN1= a2ps.1 ogonkify.1 card.1 psmandup.1 fixps.1 pdiff.1 psset.1 texi2dvi4a2ps.1
+MAN1= a2ps.1 ogonkify.1 card.1 psmandup.1 fixps.1 pdiff.1 psset.1 \
+ texi2dvi4a2ps.1
INFO= a2ps ogonkify regex
WRKSRC= ${WRKDIR}/${PORTNAME}-4.13
I18N_PACKAGE= i18n-fonts-0.1
PORTSCOUT= skipv:4.14
-PAPERSIZE?= letter
-PAPERSIZECNF= ${PAPERSIZE:S/l/L/:S/a/A/}
STRIP=
-CONFIGURE_ARGS= --with-medium=${PAPERSIZECNF} --sharedstatedir=${PREFIX}/share --sysconfdir=${PREFIX}/etc --datadir=${PREFIX}/share --localstatedir=${PREFIX}/share
-
-.if ${PAPERSIZE:L} != a4 && ${PAPERSIZE} != letter && ${PAPERSIZE} != letterdj
-.BEGIN:
- @${ECHO_CMD}
- @${ECHO_CMD} "PAPERSIZE incorrect value: ${PAPERSIZE}."
- @${ECHO_CMD}
- @${ECHO_CMD} "Must specify PAPERSIZE as one of a4, letter, or letterdj."
- @${ECHO_CMD} "letterdj allows a slightly larger margins for DeskJets."
- @${FALSE}
-.endif
+CONFIGURE_ARGS= --with-medium=libpaper --sharedstatedir=${PREFIX}/share \
+ --sysconfdir=${PREFIX}/etc --datadir=${PREFIX}/share \
+ --localstatedir=${PREFIX}/share
+CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib"
+MAKE_JOBS_SAFE= yes
+PAPERSIZE?=
.if ${PAPERSIZE:L} == a4
-CONFLICTS?= a2ps-letter-4.* a2ps-letterdj-4.*
-.else
-.if ${PAPERSIZE:L} == letter
-CONFLICTS?= a2ps-a4-4.* a2ps-letterdj-4.*
-.else
-CONFLICTS?= a2ps-a4-4.* a2ps-letter-4.*
-.endif
+RUN_DEPENDS+= ${LOCALBASE}/etc/papersize:${PORTSDIR}/print/papersize-default-a4
.endif
OPTIONS_DEFINE=NLS I18N EMACS
@@ -58,7 +47,7 @@ I18N_DESC=Enable I18N support
.include <bsd.port.options.mk>
-.if !defined(WITHOUT_NLS)
+.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
@@ -80,13 +69,15 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${I18N_PACKAGE}${EXTRACT_SUFX}:i18n
PLIST_SUB+= WITHI18N=""
pre-configure:
- @cd ${WRKDIR}/${I18N_PACKAGE}/afm && ${ECHO} *.afm > afms.lst && \
- ${MV} *.afm ${WRKSRC}/afm && cd ../fonts && \
- ${MV} *.pfb ${WRKSRC}/fonts
+ cd ${WRKDIR}/${I18N_PACKAGE}/afm && \
+ ${ECHO_CMD} *.afm > afms.lst && \
+ ${MV} *.afm ${WRKSRC}/afm
+ cd ${WRKDIR}/${I18N_PACKAGE}/fonts && \
+ ${MV} *.pfb ${WRKSRC}/fonts
post-configure:
- @cd ${WRKSRC}/fonts && { ${ECHO} ''; \
- ${ECHO} "pfb_fonts =" *.pfb; } >> Makefile && \
+ @cd ${WRKSRC}/fonts && { ${ECHO_CMD} ''; \
+ ${ECHO_CMD} "pfb_fonts =" *.pfb; } >> Makefile && \
${REINPLACE_CMD} 's,^\(fonts_DATA = .*\),\1 $$(pfb_fonts),' Makefile
@cd ${WRKSRC}/afm && { ${ECHO} ''; \
${ECHO} "i18n_afms =" `cat ${WRKDIR}/${I18N_PACKAGE}/afm/afms.lst`; } >> Makefile && \
@@ -104,7 +95,8 @@ post-install:
${LN} -sf ${PREFIX}/share/emacs/site-lisp/a2ps.el \
${PREFIX}/lib/xemacs/site-lisp/a2ps.el
.endif
- (cd ${WRKSRC}/doc; ${MAKE} install)
+ cd ${WRKSRC}/doc && \
+ ${SETENV} ${MAKE_ENV} ${MAKE} ${.MAKEFLAGS} ${INSTALL_TARGET}
${RM} -f ${PREFIX}/lib/liba2ps.la
.include <bsd.port.mk>
diff --git a/print/a2ps-letter/distinfo b/print/a2ps/distinfo
index f5a7b78eb097..f5a7b78eb097 100644
--- a/print/a2ps-letter/distinfo
+++ b/print/a2ps/distinfo
diff --git a/print/a2ps-letter/files/patch-ad b/print/a2ps/files/patch-ad
index 4b8428030547..4b8428030547 100644
--- a/print/a2ps-letter/files/patch-ad
+++ b/print/a2ps/files/patch-ad
diff --git a/print/a2ps-letter/files/patch-ae b/print/a2ps/files/patch-ae
index e85e42c0dc42..e85e42c0dc42 100644
--- a/print/a2ps-letter/files/patch-ae
+++ b/print/a2ps/files/patch-ae
diff --git a/print/a2ps-letter/files/patch-contrib-emacs-Makefile.in b/print/a2ps/files/patch-contrib-emacs-Makefile.in
index c1dab47d2a50..c1dab47d2a50 100644
--- a/print/a2ps-letter/files/patch-contrib-emacs-Makefile.in
+++ b/print/a2ps/files/patch-contrib-emacs-Makefile.in
diff --git a/print/a2ps-letter/files/patch-contrib-tmpdircreation b/print/a2ps/files/patch-contrib-tmpdircreation
index e47e97120ad4..e47e97120ad4 100644
--- a/print/a2ps-letter/files/patch-contrib-tmpdircreation
+++ b/print/a2ps/files/patch-contrib-tmpdircreation
diff --git a/print/a2ps-letter/files/patch-etc-Makefile.in b/print/a2ps/files/patch-etc-Makefile.in
index 6dddd830dcbf..6dddd830dcbf 100644
--- a/print/a2ps-letter/files/patch-etc-Makefile.in
+++ b/print/a2ps/files/patch-etc-Makefile.in
diff --git a/print/a2ps-letter/files/patch-intl-localealias.c b/print/a2ps/files/patch-intl-localealias.c
index 074a19569ca5..074a19569ca5 100644
--- a/print/a2ps-letter/files/patch-intl-localealias.c
+++ b/print/a2ps/files/patch-intl-localealias.c
diff --git a/print/a2ps-letter/files/patch-lib-xgethostname.c b/print/a2ps/files/patch-lib-xgethostname.c
index 06312ddf88e3..06312ddf88e3 100644
--- a/print/a2ps-letter/files/patch-lib-xgethostname.c
+++ b/print/a2ps/files/patch-lib-xgethostname.c
diff --git a/print/a2ps-letter/files/patch-printers.c b/print/a2ps/files/patch-printers.c
index 943fc6445a24..943fc6445a24 100644
--- a/print/a2ps-letter/files/patch-printers.c
+++ b/print/a2ps/files/patch-printers.c
diff --git a/print/a2ps-letter/files/patch-select.c b/print/a2ps/files/patch-select.c
index a2c38898fdc6..a2c38898fdc6 100644
--- a/print/a2ps-letter/files/patch-select.c
+++ b/print/a2ps/files/patch-select.c
diff --git a/print/a2ps-letter/files/patch-xgethostname.c b/print/a2ps/files/patch-xgethostname.c
index bfc7c33e0a6d..bfc7c33e0a6d 100644
--- a/print/a2ps-letter/files/patch-xgethostname.c
+++ b/print/a2ps/files/patch-xgethostname.c
diff --git a/print/a2ps-letter/pkg-descr b/print/a2ps/pkg-descr
index 2e47ab4fab5b..2e47ab4fab5b 100644
--- a/print/a2ps-letter/pkg-descr
+++ b/print/a2ps/pkg-descr
diff --git a/print/a2ps-letter/pkg-plist b/print/a2ps/pkg-plist
index 2101bd94764b..2101bd94764b 100644
--- a/print/a2ps-letter/pkg-plist
+++ b/print/a2ps/pkg-plist
diff --git a/print/c2ps-a4/Makefile b/print/c2ps-a4/Makefile
deleted file mode 100644
index 6d36211a9d53..000000000000
--- a/print/c2ps-a4/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# New ports collection makefile for: c2ps (a4)
-# Date created: 19 March 1997
-# Whom: Matthew Hunt <mph@pobox.com>
-#
-# $FreeBSD$
-#
-
-PAPERSIZE= a4
-MASTERDIR= ${.CURDIR}/../c2ps-letter
-
-.include "${MASTERDIR}/Makefile"
diff --git a/print/c2ps-letter/Makefile b/print/c2ps-letter/Makefile
deleted file mode 100644
index b356ca625409..000000000000
--- a/print/c2ps-letter/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# New ports collection makefile for: c2ps (letter)
-# Date created: 19 March 1997
-# Whom: Matthew Hunt <mph@pobox.com>
-#
-# $FreeBSD$
-#
-
-PORTNAME= c2ps-${PAPERSIZE}
-PORTVERSION= 4.0
-PORTREVISION= 1
-CATEGORIES= print
-MASTER_SITES= http://www.cs.technion.ac.il/users/c2ps/
-DISTNAME= c2ps-${PORTVERSION}
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= A PostScript pretty-printer for C source
-
-MAKE_ARGS= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
- DEFAULT_PAPER_TYPE="${PS}"
-
-MAN1= c2ps.1
-PLIST_FILES= bin/c2ps
-
-PAPERSIZE?= letter
-PS!= echo ${PAPERSIZE} | awk '{print toupper($$1)}'
-.if ${PAPERSIZE:L} != a4 && ${PAPERSIZE:L} != letter
-.BEGIN:
- @${ECHO_MSG} "Invalid value for PAPERSIZE: \"${PAPERSIZE}\""
- @${ECHO_MSG} "Possible values are: a4, and letter."
- @${FALSE}
-.endif
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/c2ps ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/c2ps.1 ${MANPREFIX}/man/man1
-
-.include <bsd.port.mk>
diff --git a/print/c2ps/Makefile b/print/c2ps/Makefile
new file mode 100644
index 000000000000..ef5170f6aecb
--- /dev/null
+++ b/print/c2ps/Makefile
@@ -0,0 +1,22 @@
+# Created by: Matthew Hunt <mph@pobox.com>
+# $FreeBSD$
+
+PORTNAME= c2ps
+PORTVERSION= 4.0
+PORTREVISION= 2
+CATEGORIES= print
+MASTER_SITES= http://www.cs.technion.ac.il/users/c2ps/
+DISTNAME= c2ps-${PORTVERSION}
+
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= A PostScript pretty-printer for C source
+
+CFLAGS+= -g -I${LOCALBASE}/include
+MAN1= c2ps.1
+PLIST_FILES= bin/c2ps
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/c2ps ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/c2ps.1 ${MANPREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/print/c2ps-letter/distinfo b/print/c2ps/distinfo
index d7c3c78e5140..d7c3c78e5140 100644
--- a/print/c2ps-letter/distinfo
+++ b/print/c2ps/distinfo
diff --git a/print/c2ps/files/patch-Makefile b/print/c2ps/files/patch-Makefile
new file mode 100644
index 000000000000..602ed394d712
--- /dev/null
+++ b/print/c2ps/files/patch-Makefile
@@ -0,0 +1,47 @@
+--- Makefile.orig 1997-05-16 00:50:56.000000000 +0900
++++ Makefile 2013-04-27 18:57:47.000000000 +0900
+@@ -2,12 +2,12 @@
+ # Last modified: Sat Apr 19 1997
+
+ RM = rm -f
+-CC = gcc
+-CCFLAGS = -O
++CC? = gcc
++CCFLAGS?= -O
+
+-PREFIX = /usr/local
++PREFIX?= /usr/local
+ BIN = $(PREFIX)/bin
+-MAN = $(PREFIX)/man/man1
++MAN = ${MAN1PREFIX}/man/man1
+
+ # you may predefine some of the default settings
+ DEFAULT_FONT = \"Courier\"
+@@ -31,23 +31,20 @@
+ -DSTRINGS=$(STRINGS_FONT) -DPREPROC=$(PREPROC_FONT)\
+ -DKEYWORD=$(KEYWORD_FONT) -DTYPE=$(TYPE_FONT)\
+ -DLNUMBER=$(LNUMBER_FONT) -DFUNCTION=$(FUNCTION_FONT)\
+- -DDIM=$(COMMENT_DIMMING_DEGREE)\
+- -D$(DEFAULT_PAPER_TYPE)
++ -DDIM=$(COMMENT_DIMMING_DEGREE)
+
+ all: compile
+
+ install: bininstall maninstall
+
+ bininstall: c2ps
+- install -m 755 c2ps $(BIN)
++ ${BSD_INSTALL_PROGRAM} c2ps $(BIN)
+
+ maninstall: c2ps.1
+- install -m 644 c2ps.1 $(MAN)
++ ${BSD_INSTALL_DATA} c2ps.1 $(MAN)
+
+ compile: c2ps.c
+- $(CC) $(PREP_OPTIONS) $(CCFLAGS) -o c2ps c2ps.c
++ $(CC) $(PREP_OPTIONS) $(CFLAGS) -o c2ps c2ps.c -L${LOCALBASE}/lib -lm -lpaper
+
+ clean:
+ $(RM) c2ps *.o core *~
+-
+-
diff --git a/print/c2ps/files/patch-c2ps.c b/print/c2ps/files/patch-c2ps.c
new file mode 100644
index 000000000000..04eddfb73978
--- /dev/null
+++ b/print/c2ps/files/patch-c2ps.c
@@ -0,0 +1,346 @@
+--- c2ps.c.orig 1997-05-19 21:43:04.000000000 +0900
++++ c2ps.c 2013-04-27 18:55:52.000000000 +0900
+@@ -45,7 +45,6 @@
+
+
+
+-#line 2 "c2ps.c"
+ #define FLEX_SCANNER
+ #define YY_FLEX_MAJOR_VERSION 2
+ #define YY_FLEX_MINOR_VERSION 5
+@@ -1641,9 +1640,7 @@
+ #define yymore() (yy_more_flag = 1)
+ #define YY_MORE_ADJ yy_more_len
+ char *yytext;
+-#line 1 "l1.m"
+ #define INITIAL 0
+-#line 2 "l1.m"
+ #define VERSION "4.0"
+
+ #ifndef DEFAULT
+@@ -1673,11 +1670,6 @@
+ #ifndef DIM
+ #define DIM 0.75
+ #endif
+-#ifdef LETTER
+-#define LETTER 1
+-#else
+-#define LETTER 0
+-#endif
+
+ #define ISO "\n"\
+ "%%%%BeginProlog \n"\
+@@ -1829,6 +1821,14 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
++#include <math.h>
++#include <paper.h>
++
++struct {
++ char *name;
++ int width, height;
++} pspec;
++
+ FILE* out; /* output stream */
+
+ struct fun { /* strucure to hold info about fun id definition */
+@@ -1845,7 +1845,6 @@
+ unsigned line_cut = 0; /* global: cut long lines */
+ unsigned ppl = 1; /* global: columns per page */
+ unsigned lpp = 0; /* global: lines per page */
+-unsigned letter = LETTER; /* global: use letter paper type */
+ unsigned frame = 0; /* global: draw frame around each column */
+ unsigned iso = 1; /* global: support ISO Latin 1 encoding */
+ unsigned last_modified = 1; /* global: print the time when file was last modified */
+@@ -1929,7 +1928,6 @@
+
+ #define dont_highlight 4
+
+-#line 1892 "c2ps.c"
+
+ /* Macros after this point can all be overridden by user definitions in
+ * section 1.
+@@ -2079,9 +2077,7 @@
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+-#line 301 "l1.m"
+
+-#line 2044 "c2ps.c"
+
+ if ( yy_init )
+ {
+@@ -2197,21 +2193,18 @@
+ { /* beginning of action switch */
+ case 1:
+ YY_RULE_SETUP
+-#line 302 "l1.m"
+ {
+ PString(yytext);
+ }
+ YY_BREAK
+ case 2:
+ YY_RULE_SETUP
+-#line 305 "l1.m"
+ {
+ NextLine();
+ }
+ YY_BREAK
+ case 3:
+ YY_RULE_SETUP
+-#line 308 "l1.m"
+ { /*'*/
+ PFlush();
+ fprintf(out, "cf fst\n");
+@@ -2221,7 +2214,6 @@
+ YY_BREAK
+ case 4:
+ YY_RULE_SETUP
+-#line 314 "l1.m"
+ {
+ PFlush();
+ while (1)
+@@ -2244,7 +2236,6 @@
+ YY_BREAK
+ case 5:
+ YY_RULE_SETUP
+-#line 333 "l1.m"
+ {
+ c = yytext;
+ if (adjust_comments)
+@@ -2267,12 +2258,10 @@
+ YY_BREAK
+ case 6:
+ YY_RULE_SETUP
+-#line 352 "l1.m"
+ { yymore(); }
+ YY_BREAK
+ case 7:
+ YY_RULE_SETUP
+-#line 353 "l1.m"
+ {
+ c = yytext;
+ if (adjust_comments && comment_many_lines++)
+@@ -2290,12 +2279,10 @@
+ yy_c_buf_p = yy_cp = yy_bp + 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 364 "l1.m"
+ { yymore(); }
+ YY_BREAK
+ case 9:
+ YY_RULE_SETUP
+-#line 366 "l1.m"
+ {
+ PFlush();
+ while (1)
+@@ -2316,7 +2303,6 @@
+ YY_BREAK
+ case 10:
+ YY_RULE_SETUP
+-#line 383 "l1.m"
+ {
+ PFlush();
+ while (1)
+@@ -2411,7 +2397,6 @@
+ YY_BREAK
+ case 11:
+ YY_RULE_SETUP
+-#line 474 "l1.m"
+ {
+ PFill("\\");
+ PFlush();
+@@ -2423,7 +2408,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 479 "l1.m"
+ {
+ PFlush();
+ BEGIN((nesting <= 0) ? nnested : INITIAL);
+@@ -2431,7 +2415,6 @@
+ YY_BREAK
+ case 13:
+ YY_RULE_SETUP
+-#line 483 "l1.m"
+ {
+ if (pd > 0 &&
+ prep_touch[pd - 1] &&
+@@ -2489,7 +2472,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 534 "l1.m"
+ {
+ PFill(yytext);
+ PFlush();
+@@ -2503,7 +2485,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 541 "l1.m"
+ {
+ PFlush();
+ fprintf(out, "cf fty\n");
+@@ -2516,7 +2497,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 547 "l1.m"
+ {
+ PFill(yytext);
+ PFlush();
+@@ -2530,7 +2510,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 554 "l1.m"
+ {
+ PFlush();
+ fprintf(out, "cf %s\n", (ext) ? "fty" : "fdf");
+@@ -2543,7 +2522,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 560 "l1.m"
+ {
+ PFill(yytext);
+ PFlush();
+@@ -2557,7 +2535,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 567 "l1.m"
+ {
+ PFlush();
+ fprintf(out, "cf fke\n");
+@@ -2570,7 +2547,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 573 "l1.m"
+ {
+ PFill(yytext);
+ PFlush();
+@@ -2584,7 +2560,6 @@
+ yy_c_buf_p = yy_cp -= 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
+-#line 580 "l1.m"
+ {
+ PFlush();
+ fprintf(out, "cf %s\n", (ext) ? "fke" : "fdf");
+@@ -2594,7 +2569,6 @@
+ YY_BREAK
+ case 22:
+ YY_RULE_SETUP
+-#line 586 "l1.m"
+ {
+ PFlush();
+ if (! (pd > 0 &&
+@@ -2604,17 +2578,14 @@
+ YY_BREAK
+ case 23:
+ YY_RULE_SETUP
+-#line 592 "l1.m"
+ {
+ PFill(yytext);
+ }
+ YY_BREAK
+ case 24:
+ YY_RULE_SETUP
+-#line 595 "l1.m"
+ ECHO;
+ YY_BREAK
+-#line 2577 "c2ps.c"
+ case YY_STATE_EOF(INITIAL):
+ case YY_STATE_EOF(comm):
+ case YY_STATE_EOF(preps):
+@@ -3479,7 +3450,6 @@
+ return 0;
+ }
+ #endif
+-#line 595 "l1.m"
+
+
+ #ifdef YY_USE_PROTOS
+@@ -3680,7 +3650,7 @@
+ page / ppl + 1, total_page / ppl +1);
+ if (page > 0 && comment)
+ fprintf(out, "setgray\n");
+- if (letter)
++ if (strncasecmp(pspec.name, "letter", 7) == 0)
+ fprintf(out, "0.93 0.93 scale 31 8 translate\n");
+ switch(ppl)
+ {
+@@ -3917,6 +3887,34 @@
+ return 1;
+ }
+
++void getpaper(char *name)
++{
++ const struct paper *pp;
++
++ if (name == NULL) {
++ name = (char *)systempapername();
++ if (name == NULL)
++ name = (char *)defaultpapername();
++ }
++
++ /* Support only A4 or letter. */
++ if (strncasecmp(name, "a4", 3) != 0 &&
++ strncasecmp(name, "letter", 7) != 0) {
++ fprintf(stderr, "Unsupported paper size: %s. "
++ "A4 size will be used instead.\n", name);
++ name = "a4";
++ }
++
++ paperinit();
++ for (pp = paperfirst(); pp; pp = papernext(pp)) {
++ if (strcmp(name, papername(pp)) == 0) {
++ pspec.name = strdup(name);
++ pspec.width = round(paperpswidth(pp));
++ pspec.height = round(paperpsheight(pp));
++ }
++ }
++}
++
+ #define REENCODE(font) fprintf(out,"/%s /%s-iso isovec ReEncode\n",font,font)
+
+ #ifdef YY_USE_PROTOS
+@@ -3937,6 +3935,7 @@
+ char *lnumber = NULL;
+ char *function = NULL;
+ char *nonlatin = NULL;
++ char *pflag = NULL;
+
+ out = stdout;
+ first = NULL;
+@@ -3984,7 +3983,7 @@
+ argv[i]);
+ exit(0);
+ } break;
+- case 'p': if (!strcmp(argv[i], "Letter")) letter = 1; break;
++ case 'p': DUP(pflag, argv[i]); break;
+ case 't': tab = abs(atoi (argv[i])); break;
+ case 'F': DUP(dftfont, argv[i]); break;
+ case 'P': DUP(preproc, argv[i]); break;
+@@ -4078,6 +4077,8 @@
+ nonlatin_text = 1;
+ }
+
++ getpaper(pflag);
++
+ fprintf(out, "%%!PS-Adobe-2.0\n%%%%Creator: c2ps version %s\n", VERSION);
+ fprintf(out, "%%%%Orientation: %s\n", (ppl == 2) ? "Landscape" : "Portrait");
+ fprintf(out, "%%%%Pages: (atend)\n");
+@@ -4089,7 +4090,7 @@
+ fprintf(out, " %s %s %s %s %s %s",
+ keyword, strings, type, preproc, comment, function);
+ fprintf(out, "\n%%%%DocumentMedia: %s\n%%%%EndComments\n\n",
+- (letter) ? "Letter 612 792" : "A4 595 842");
++ (strncasecmp(pspec.name, "letter", 7) == 0) ? "Letter 612 792" : "A4 595 842");
+ if (iso)
+ {
+ fprintf(out, ISO);
diff --git a/print/c2ps-letter/pkg-descr b/print/c2ps/pkg-descr
index f2e8a59364d6..f2e8a59364d6 100644
--- a/print/c2ps-letter/pkg-descr
+++ b/print/c2ps/pkg-descr
diff --git a/print/foomatic-filters/Makefile b/print/foomatic-filters/Makefile
index 75a27083fd1b..ca7fe97352bd 100644
--- a/print/foomatic-filters/Makefile
+++ b/print/foomatic-filters/Makefile
@@ -3,7 +3,7 @@
PORTNAME= foomatic-filters
PORTVERSION= 4.0.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= print
MASTER_SITES= http://www.openprinting.org/download/foomatic/
@@ -28,15 +28,12 @@ CONFIGURE_ENV= ac_cv_path_A2PS=${LOCALBASE}/bin/a2ps \
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-OPTIONS_DEFINE= CUPS_IMAGE MPAGE
-OPTIONS_SINGLE= A2PS ENSCRIPT
-OPTIONS_SINGLE_A2PS= A2PS_A4 A2PS_LETTER A2PS_LETTERDJ
+OPTIONS_DEFINE= A2PS CUPS_IMAGE MPAGE
+OPTIONS_SINGLE= ENSCRIPT
OPTIONS_SINGLE_ENSCRIPT= ENSCRIPT_A4 ENSCRIPT_LETTER ENSCRIPT_LETTERDJ
-OPTIONS_DEFAULT= CUPS_IMAGE A2PS_A4 ENSCRIPT_A4 MPAGE
+OPTIONS_DEFAULT= CUPS_IMAGE A2PS ENSCRIPT_A4 MPAGE
CUPS_IMAGE_DESC= Install cups image utilities
-A2PS_A4_DESC= Install a2ps convertor (A4)
-A2PS_LETTER_DESC= Install a2ps convertor (letter)
-A2PS_LETTERDJ_DESC= Install a2ps convertor (letterdj)
+A2PS_DESC= Install a2ps convertor
ENSCRIPT_A4_DESC= Install enscript convertor (A4)
ENSCRIPT_LETTER_DESC= Install enscript convertor (letter)
ENSCRIPT_LETTERDJ_DESC= Install enscript convertor (letterdj)
@@ -50,18 +47,10 @@ MAN1= foomatic-rip.1
RUN_DEPENDS+= ${LOCALBASE}/lib/libcupsimage.so:${PORTSDIR}/print/cups-image
.endif
-.if ${PORT_OPTIONS:MA2PS_A4}
+.if ${PORT_OPTIONS:MA2PS}
RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4
.endif
-.if ${PORT_OPTIONS:MA2PS_LETTER}
-RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter
-.endif
-
-.if ${PORT_OPTIONS:MA2PS-LETTERDJ}
-RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letterdj
-.endif
-
.if ${PORT_OPTIONS:MENSCRIPT_A4}
RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-a4
.endif
diff --git a/print/lprps-a4/Makefile b/print/lprps-a4/Makefile
deleted file mode 100644
index a29af8356eff..000000000000
--- a/print/lprps-a4/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# ex:ts=8
-# Ports collection makefile for: lprps (a4)
-# Date created: Sat Aug 3, 1996
-# Whom: David O'Brien (obrien@cs.ucdavis.edu)
-#
-# $FreeBSD$
-#
-
-PAPERSIZE= a4
-MASTERDIR= ${.CURDIR}/../lprps-letter
-
-.include "${MASTERDIR}/Makefile"
diff --git a/print/lprps-letter/files/patch-ac b/print/lprps-letter/files/patch-ac
deleted file mode 100644
index 095b9d6ab36d..000000000000
--- a/print/lprps-letter/files/patch-ac
+++ /dev/null
@@ -1,11 +0,0 @@
---- psof.c.orig Wed Sep 11 03:12:36 1996
-+++ psof.c Wed Sep 11 03:15:16 1996
-@@ -216,7 +216,7 @@
- if ((status & 0xff) != 0) {
- int sig = status & 0x7f;
- if (sig < NSIG) {
-- extern char *sys_siglist[];
-+ /* extern char *sys_siglist[]; */
- syslog(LOG_ERR, "%s: %s%s", LPRPS, sys_siglist[sig],
- (status & 0x80) ? " (core dumped)" : "");
- }
diff --git a/print/lprps-letter/files/patch-ad b/print/lprps-letter/files/patch-ad
deleted file mode 100644
index 60604d868073..000000000000
--- a/print/lprps-letter/files/patch-ad
+++ /dev/null
@@ -1,13 +0,0 @@
---- psrev.c.orig Wed Sep 11 03:12:11 1996
-+++ psrev.c Wed Sep 11 03:13:12 1996
-@@ -24,8 +24,8 @@
- void sys_error(message, arg)
- char *message, *arg;
- {
-- extern char *sys_errlist[];
-- extern int sys_nerr;
-+ /* extern char *sys_errlist[]; */
-+ /* extern int sys_nerr; */
- int en;
-
- en = errno;
diff --git a/print/lprps-letter/Makefile b/print/lprps/Makefile
index 9e6e1acb9174..0ac307ac1fb9 100644
--- a/print/lprps-letter/Makefile
+++ b/print/lprps/Makefile
@@ -1,40 +1,21 @@
-# ex:ts=8
-# Ports collection makefile for: lprps (letter)
-# Date created: Sat Aug 3, 1996
-# Whom: David O'Brien (obrien@cs.ucdavis.edu)
-#
+# Created by: David O'Brien <obrien@FreeBSD.org>
# $FreeBSD$
-#
PORTNAME= lprps
PORTVERSION= 2.5
CATEGORIES= print
MASTER_SITES= ftp://ftp.jclark.com/pub/lprps/
-PKGNAMESUFFIX= -${PAPERSIZE}
EXTRACT_SUFX= .tar.Z
-MAINTAINER= ports@FreeBSD.org
-COMMENT= PostScript printer filter package supporting a bidirectional serial channel
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= PostScript printer filter supporting a bidirectional serial channel
-MAKE_FLAGS?= PAPERSIZE=${PS} -f
-PORTDOCS= INSTALL
+LIB_DEPENDS= paper:${PORTSDIR}/print/libpaper
+PORTDOCS= INSTALL
MAN1= psrev.1 textps.1
MAN8= lprps.8 psif.8 psof.8
-PAPERSIZE?= letter
-PS= ${PAPERSIZE:U}
-
-.if ${PAPERSIZE} != a4 && ${PAPERSIZE} != letter
-.BEGIN:
- @${ECHO_MSG} "Error: invalid value for PAPERSIZE: \"${PAPERSIZE}\""
- @${ECHO_MSG} "Possible values are: a4 or letter"
- @${FALSE}
-.endif
-
-post-patch:
- ${REINPLACE_CMD} -e 's/^\(CC[^g]*\)cc$$/\1${CC}/' ${WRKSRC}/Makefile
-
do-install:
${MKDIR} ${DATADIR}
cd ${WRKSRC} && \
@@ -53,8 +34,5 @@ post-install:
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
- @${ECHO_MSG} ""
- @${ECHO_MSG} Now edit your /etc/printcap
- @${ECHO_MSG} ""
.include <bsd.port.mk>
diff --git a/print/lprps-letter/distinfo b/print/lprps/distinfo
index a08d19f6ecd2..a08d19f6ecd2 100644
--- a/print/lprps-letter/distinfo
+++ b/print/lprps/distinfo
diff --git a/print/lprps-letter/files/patch-aa b/print/lprps/files/patch-Makefile
index 343b98251cfc..1b474346f1b2 100644
--- a/print/lprps-letter/files/patch-aa
+++ b/print/lprps/files/patch-Makefile
@@ -1,12 +1,12 @@
---- Makefile.orig Wed Sep 11 03:08:08 1996
-+++ Makefile Wed Sep 11 03:11:29 1996
+--- Makefile.orig 1993-02-22 21:45:50.000000000 +0900
++++ Makefile 2013-04-27 22:53:50.000000000 +0900
@@ -3,21 +3,21 @@
# Define IIg to enable a workaround for a bug in the serial
# driver of the Laserwriter IIf and IIg; this requires the POSIX
# tcdrain() function. (I haven't tested this personally.)
-DEFINES=-DA4 #-DIIg
-PREFIX=/usr/local
-+DEFINES=-D$(PAPERSIZE)
++DEFINES=
# Where to install public executables.
BINDIR=$(PREFIX)/bin
# Where to install private executables.
@@ -27,3 +27,33 @@
# Filter to convert text to PostScript. You can use your own instead.
# It must be able to read from standard input.
TEXT_TO_PS=$(BINDIR)/textps
+@@ -29,15 +29,15 @@
+ MAN8EXT=8
+ MAN8DIR=$(MANROOT)/man$(MAN8EXT)
+
+-CC=cc
+-CFLAGS=-O $(DEFINES)
++CC?=cc
++CFLAGS+=-I${LOCALBASE}/include $(DEFINES)
+ #CFLAGS=-g -Bstatic $(DEFINES)
+ # Command for installing programs.
+-INSTALL_PROGRAM=install
++INSTALL_PROGRAM=${BSD_INSTALL_PROGRAM}
+ # Command for installing man pages.
+-INSTALL_DATA=install -m 0444
++INSTALL_DATA=${BSD_INSTALL_DATA}
+
+-SHELL=/bin/sh
++SHELL=${SH}
+ # Uncomment the next line for Ultrix.
+ #SHELL=/bin/sh5
+
+@@ -89,7 +89,7 @@
+ -DPS_FILTER=\"$(PS_FILTER)\" -o $@ psif.c
+
+ textps: textps.c
+- $(CC) $(CFLAGS) -o $@ textps.c
++ $(CC) $(CFLAGS) -o $@ textps.c -lpaper -L${LOCALBASE}/lib
+
+ psrev: psrev.c
+ $(CC) $(CFLAGS) -o $@ psrev.c
diff --git a/print/lprps-letter/files/patch-ae b/print/lprps/files/patch-ae
index 919ad1f5ced3..919ad1f5ced3 100644
--- a/print/lprps-letter/files/patch-ae
+++ b/print/lprps/files/patch-ae
diff --git a/print/lprps-letter/files/patch-ab b/print/lprps/files/patch-lprps.c
index 587c5404e22a..08f4e761355f 100644
--- a/print/lprps-letter/files/patch-ab
+++ b/print/lprps/files/patch-lprps.c
@@ -1,7 +1,20 @@
---- lprps.c.orig Mon Feb 22 06:46:10 1993
-+++ lprps.c Sat Jun 19 17:55:56 1999
-@@ -17,6 +17,10 @@
+--- lprps.c.orig 1993-02-22 21:46:10.000000000 +0900
++++ lprps.c 2013-04-27 23:00:32.000000000 +0900
+@@ -5,7 +5,9 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
++#include <string.h>
+ #include <strings.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+@@ -15,8 +17,13 @@
+ #include <sys/time.h>
+ #include <signal.h>
#include <syslog.h>
++#include <unistd.h>
#include <errno.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
@@ -11,7 +24,7 @@
#ifndef errno
extern int errno;
#endif
-@@ -27,7 +31,13 @@
+@@ -27,7 +34,13 @@
#define VOLATILE /* as nothing */
#endif
@@ -26,7 +39,16 @@
#define EXIT_SUCCESS 0
#define EXIT_REPRINT 1
-@@ -346,7 +356,9 @@
+@@ -43,8 +56,6 @@
+ char ctrl_d = '\004';
+ char ctrl_t = '\024';
+
+-char *malloc();
+-
+ /* user's login name */
+ char *login = 0;
+ /* user's host */
+@@ -346,7 +357,9 @@
char *strsignal(n)
int n;
{
diff --git a/print/lprps/files/patch-psif.c b/print/lprps/files/patch-psif.c
new file mode 100644
index 000000000000..374330a22587
--- /dev/null
+++ b/print/lprps/files/patch-psif.c
@@ -0,0 +1,10 @@
+--- psif.c.orig 2013-04-27 22:58:26.000000000 +0900
++++ psif.c 2013-04-27 22:58:42.000000000 +0900
+@@ -5,6 +5,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
diff --git a/print/lprps/files/patch-psof.c b/print/lprps/files/patch-psof.c
new file mode 100644
index 000000000000..54197b8d20cd
--- /dev/null
+++ b/print/lprps/files/patch-psof.c
@@ -0,0 +1,26 @@
+--- psof.c.orig 1993-02-22 21:46:11.000000000 +0900
++++ psof.c 2013-04-27 23:05:56.000000000 +0900
+@@ -11,11 +11,14 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <strings.h>
+ #include <signal.h>
+ #include <syslog.h>
+ #include <errno.h>
+ #include <ctype.h>
++#include <unistd.h>
+
+ #ifndef errno
+ extern int errno;
+@@ -216,7 +219,7 @@
+ if ((status & 0xff) != 0) {
+ int sig = status & 0x7f;
+ if (sig < NSIG) {
+- extern char *sys_siglist[];
++ /* extern char *sys_siglist[]; */
+ syslog(LOG_ERR, "%s: %s%s", LPRPS, sys_siglist[sig],
+ (status & 0x80) ? " (core dumped)" : "");
+ }
diff --git a/print/lprps/files/patch-psrev.c b/print/lprps/files/patch-psrev.c
new file mode 100644
index 000000000000..2c59b7001dfb
--- /dev/null
+++ b/print/lprps/files/patch-psrev.c
@@ -0,0 +1,31 @@
+--- psrev.c.orig 1993-02-22 21:46:09.000000000 +0900
++++ psrev.c 2013-04-27 22:56:35.000000000 +0900
+@@ -5,6 +5,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -14,9 +15,6 @@
+ extern int errno;
+ #endif
+
+-char *malloc();
+-char *realloc();
+-
+ char *xmalloc();
+ char *xrealloc();
+ char *prog;
+@@ -24,8 +22,8 @@
+ void sys_error(message, arg)
+ char *message, *arg;
+ {
+- extern char *sys_errlist[];
+- extern int sys_nerr;
++ /* extern char *sys_errlist[]; */
++ /* extern int sys_nerr; */
+ int en;
+
+ en = errno;
diff --git a/print/lprps/files/patch-textps.c b/print/lprps/files/patch-textps.c
new file mode 100644
index 000000000000..3e8cfe11dfc3
--- /dev/null
+++ b/print/lprps/files/patch-textps.c
@@ -0,0 +1,54 @@
+--- textps.c.orig 1993-02-22 21:46:10.000000000 +0900
++++ textps.c 2013-04-27 23:04:41.000000000 +0900
+@@ -41,10 +41,12 @@
+ #endif /* not BOLD_FONT */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
+ #include <string.h>
+
+-extern char *malloc();
++#include <paper.h>
++
+ extern char *optarg;
+ extern int optind;
+
+@@ -86,10 +88,24 @@
+ exit(1);
+ }
+
++const struct paper *findpaper(char *name)
++{
++ const struct paper *pp;
++
++ paperinit();
++ for (pp = paperfirst(); pp; pp = papernext(pp)) {
++ if (strcmp(name, papername(pp)) == 0)
++ return (pp);
++ }
++ return (NULL);
++}
++
+ main(argc, argv)
+ int argc;
+ char **argv;
+ {
++ const struct paper *pp;
++ char *name;
+ int bad_files = 0;
+ double cpi = 12.0; /* characters per inch */
+ int opt;
+@@ -124,6 +140,12 @@
+ abort();
+ }
+
++ name = (char *)systempapername();
++ if (name == NULL)
++ name = (char *)defaultpapername();
++ if ((pp = findpaper(name)) != NULL)
++ page_length = paperpsheight(pp);
++
+ char_width = 72.0/cpi;
+ prologue();
+ if (optind >= argc)
diff --git a/print/lprps-letter/pkg-descr b/print/lprps/pkg-descr
index d5e72229d11a..d5e72229d11a 100644
--- a/print/lprps-letter/pkg-descr
+++ b/print/lprps/pkg-descr
diff --git a/print/lprps-letter/pkg-plist b/print/lprps/pkg-plist
index 35b900630e6e..35b900630e6e 100644
--- a/print/lprps-letter/pkg-plist
+++ b/print/lprps/pkg-plist
diff --git a/print/xfce4-print/Makefile b/print/xfce4-print/Makefile
index 8998c1befe5d..f42ecbb84d67 100644
--- a/print/xfce4-print/Makefile
+++ b/print/xfce4-print/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xfce4-print
PORTVERSION= 4.6.1
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= print xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
MASTER_SITE_SUBDIR= src/archive/xfprint/${PORTVERSION:R}
@@ -13,6 +13,9 @@ DIST_SUBDIR= xfce4
MAINTAINER= xfce@FreeBSD.org
COMMENT= Xfce 4 graphical frontend for printing
+BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps
+RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps
+
GNU_CONFIGURE= yes
INSTALLS_ICONS= yes
USE_BZIP2= yes
@@ -50,12 +53,8 @@ PLIST_SUB+= LPR="@comment "
.if ${PORT_OPTIONS:MLETTER}
CONFIGURE_ARGS+=--enable-letter
-BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter
-RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter
.else
CONFIGURE_ARGS+=--disable-letter
-BUILD_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4
-RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-a4
.endif
post-patch: