mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-21 20:38:45 +00:00
A4/Letter papersize controlled by PAPERSIZE variable. Closes PR 1104 and
1106. Submitted by: David O'Brien (obrien@cs.ucdavis.edu)
This commit is contained in:
parent
dea2cec8b6
commit
579fb031a5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3142
@ -1,13 +1,13 @@
|
|||||||
# New ports collection makefile for: a2ps
|
# New ports collection makefile for: a2ps
|
||||||
# Version required: 4.3
|
# Version required: 4.3
|
||||||
# Date created: 6 November 1994
|
# Date created: 6 November 1994
|
||||||
# Whom: jmz
|
# Whom: jmz & David O'Brien (obrien@cs.ucdavis.edu)
|
||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.5 1995/11/22 13:17:46 asami Exp $
|
# $Id: Makefile,v 1.6 1996/04/02 20:33:42 jmz Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
DISTNAME= a2ps
|
DISTNAME= a2ps
|
||||||
PKGNAME= a2ps-4.3
|
PKGNAME= a2ps-${PAPERSIZE}-4.3
|
||||||
CATEGORIES+= print
|
CATEGORIES+= print
|
||||||
MASTER_SITES= ftp://ftp.imag.fr/archive/postscript/format.translators/
|
MASTER_SITES= ftp://ftp.imag.fr/archive/postscript/format.translators/
|
||||||
DISTFILES= a2ps.V4.3.tar.gz
|
DISTFILES= a2ps.V4.3.tar.gz
|
||||||
@ -16,9 +16,64 @@ MAINTAINER= jmz@FreeBSD.org
|
|||||||
|
|
||||||
NO_WRKSUBDIR= yes
|
NO_WRKSUBDIR= yes
|
||||||
|
|
||||||
|
MAKE_FLAGS?= WIDTH=${WIDTH} HEIGHT=${HEIGHT} A4_PAPERSIZE=${A4_PAPERSIZE} -f
|
||||||
|
|
||||||
|
|
||||||
|
letter::
|
||||||
|
${MAKE} PAPERSIZE=letter
|
||||||
|
|
||||||
|
letter-install::
|
||||||
|
${MAKE} PAPERSIZE=letter install
|
||||||
|
|
||||||
|
a4::
|
||||||
|
${MAKE} PAPERSIZE=a4
|
||||||
|
|
||||||
|
a4-install::
|
||||||
|
${MAKE} PAPERSIZE=a4 install
|
||||||
|
|
||||||
|
|
||||||
|
.if !defined(PAPERSIZE)
|
||||||
|
PAPERSIZE=a4
|
||||||
|
WIDTH=8.27
|
||||||
|
HEIGHT=11.64
|
||||||
|
A4_PAPERSIZE=1
|
||||||
|
PAPERSIZE_UNSPECIFIED= yes
|
||||||
|
.elif ${PAPERSIZE} == A4 || ${PAPERSIZE} == a4
|
||||||
|
PAPERSIZE=a4
|
||||||
|
WIDTH=8.27
|
||||||
|
HEIGHT=11.64
|
||||||
|
A4_PAPERSIZE=1
|
||||||
|
.elif ${PAPERSIZE} == letter || ${PAPERSIZE} == LETTER
|
||||||
|
PAPERSIZE=letter
|
||||||
|
WIDTH=8.5
|
||||||
|
HEIGHT=11.0
|
||||||
|
A4_PAPERSIZE=0
|
||||||
|
.else
|
||||||
|
PAPERSIZE_INVALID= yes
|
||||||
|
.endif # not defined PAPERSIZE
|
||||||
|
|
||||||
|
|
||||||
|
pre-fetch:
|
||||||
|
.if defined(PAPERSIZE_UNSPECIFIED)
|
||||||
|
@echo "Defaulting to ${PAPERSIZE} sized paper."
|
||||||
|
@echo ""
|
||||||
|
@echo "Set the environment variable PAPERSIZE if you want to use other sizes."
|
||||||
|
@echo "Possible values are: A4 (default) or letter"
|
||||||
|
.elif defined(PAPERSIZE_INVALID)
|
||||||
|
@echo "Error: invalid value for PAPERSIZE: \"${PAPERSIZE}\""
|
||||||
|
@echo "Possible values are: A4 (default) or letter"
|
||||||
|
@/usr/bin/false
|
||||||
|
.endif
|
||||||
|
|
||||||
pre-install:
|
pre-install:
|
||||||
@mkdir -p ${PREFIX}/bin
|
@mkdir -p ${PREFIX}/bin
|
||||||
@mkdir -p ${PREFIX}/man/man1
|
@mkdir -p ${PREFIX}/man/man1
|
||||||
@(cd ${WRKSRC}; make install.man)
|
@(cd ${WRKSRC}; make install.man)
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
.if !defined(NOMANCOMPRESS)
|
||||||
|
gzip -nf ${PREFIX}/man/man1/a2ps.1
|
||||||
|
.endif
|
||||||
|
strip ${PREFIX}/bin/a2ps
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,6 +1,2 @@
|
|||||||
@cd /usr/local
|
|
||||||
@owner bin
|
|
||||||
@mode 755
|
|
||||||
bin/a2ps
|
bin/a2ps
|
||||||
@mode 644
|
man/man1/a2ps.1.gz
|
||||||
man/man1/a2ps.1
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# New ports collection makefile for: a2ps
|
# New ports collection makefile for: a2ps
|
||||||
# Version required: 4.3
|
# Version required: 4.3
|
||||||
# Date created: 6 November 1994
|
# Date created: 6 November 1994
|
||||||
# Whom: jmz
|
# Whom: jmz & David O'Brien (obrien@cs.ucdavis.edu)
|
||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.5 1995/11/22 13:17:46 asami Exp $
|
# $Id: Makefile,v 1.6 1996/04/02 20:33:42 jmz Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
DISTNAME= a2ps
|
DISTNAME= a2ps
|
||||||
PKGNAME= a2ps-4.3
|
PKGNAME= a2ps-${PAPERSIZE}-4.3
|
||||||
CATEGORIES+= print
|
CATEGORIES+= print
|
||||||
MASTER_SITES= ftp://ftp.imag.fr/archive/postscript/format.translators/
|
MASTER_SITES= ftp://ftp.imag.fr/archive/postscript/format.translators/
|
||||||
DISTFILES= a2ps.V4.3.tar.gz
|
DISTFILES= a2ps.V4.3.tar.gz
|
||||||
@ -16,9 +16,64 @@ MAINTAINER= jmz@FreeBSD.org
|
|||||||
|
|
||||||
NO_WRKSUBDIR= yes
|
NO_WRKSUBDIR= yes
|
||||||
|
|
||||||
|
MAKE_FLAGS?= WIDTH=${WIDTH} HEIGHT=${HEIGHT} A4_PAPERSIZE=${A4_PAPERSIZE} -f
|
||||||
|
|
||||||
|
|
||||||
|
letter::
|
||||||
|
${MAKE} PAPERSIZE=letter
|
||||||
|
|
||||||
|
letter-install::
|
||||||
|
${MAKE} PAPERSIZE=letter install
|
||||||
|
|
||||||
|
a4::
|
||||||
|
${MAKE} PAPERSIZE=a4
|
||||||
|
|
||||||
|
a4-install::
|
||||||
|
${MAKE} PAPERSIZE=a4 install
|
||||||
|
|
||||||
|
|
||||||
|
.if !defined(PAPERSIZE)
|
||||||
|
PAPERSIZE=a4
|
||||||
|
WIDTH=8.27
|
||||||
|
HEIGHT=11.64
|
||||||
|
A4_PAPERSIZE=1
|
||||||
|
PAPERSIZE_UNSPECIFIED= yes
|
||||||
|
.elif ${PAPERSIZE} == A4 || ${PAPERSIZE} == a4
|
||||||
|
PAPERSIZE=a4
|
||||||
|
WIDTH=8.27
|
||||||
|
HEIGHT=11.64
|
||||||
|
A4_PAPERSIZE=1
|
||||||
|
.elif ${PAPERSIZE} == letter || ${PAPERSIZE} == LETTER
|
||||||
|
PAPERSIZE=letter
|
||||||
|
WIDTH=8.5
|
||||||
|
HEIGHT=11.0
|
||||||
|
A4_PAPERSIZE=0
|
||||||
|
.else
|
||||||
|
PAPERSIZE_INVALID= yes
|
||||||
|
.endif # not defined PAPERSIZE
|
||||||
|
|
||||||
|
|
||||||
|
pre-fetch:
|
||||||
|
.if defined(PAPERSIZE_UNSPECIFIED)
|
||||||
|
@echo "Defaulting to ${PAPERSIZE} sized paper."
|
||||||
|
@echo ""
|
||||||
|
@echo "Set the environment variable PAPERSIZE if you want to use other sizes."
|
||||||
|
@echo "Possible values are: A4 (default) or letter"
|
||||||
|
.elif defined(PAPERSIZE_INVALID)
|
||||||
|
@echo "Error: invalid value for PAPERSIZE: \"${PAPERSIZE}\""
|
||||||
|
@echo "Possible values are: A4 (default) or letter"
|
||||||
|
@/usr/bin/false
|
||||||
|
.endif
|
||||||
|
|
||||||
pre-install:
|
pre-install:
|
||||||
@mkdir -p ${PREFIX}/bin
|
@mkdir -p ${PREFIX}/bin
|
||||||
@mkdir -p ${PREFIX}/man/man1
|
@mkdir -p ${PREFIX}/man/man1
|
||||||
@(cd ${WRKSRC}; make install.man)
|
@(cd ${WRKSRC}; make install.man)
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
.if !defined(NOMANCOMPRESS)
|
||||||
|
gzip -nf ${PREFIX}/man/man1/a2ps.1
|
||||||
|
.endif
|
||||||
|
strip ${PREFIX}/bin/a2ps
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,14 +1,23 @@
|
|||||||
*** a2ps.1.orig Tue Feb 15 01:15:16 1994
|
--- Makefile.orig Mon Feb 14 07:09:33 1994
|
||||||
--- a2ps.1 Tue Feb 21 16:56:19 1995
|
+++ Makefile Thu May 16 19:20:50 1996
|
||||||
***************
|
@@ -29,12 +29,16 @@
|
||||||
*** 155,160 ****
|
D =.
|
||||||
--- 155,163 ----
|
O =.
|
||||||
is the number of copies desired of each file named. By default, you get
|
|
||||||
only one copy.
|
-BINDIR =/usr/local/bin
|
||||||
.TP 0.6i
|
+##BINDIR =/usr/local/bin
|
||||||
+ .B -a
|
+BINDIR = $(PREFIX)/bin
|
||||||
+ Use the American paper size (8.5" x 11") as the basis for all calculations.
|
|
||||||
+ .TP 0.6i
|
-MANDIR =/usr/man/mann
|
||||||
.B -d
|
-MANEXT =n
|
||||||
Print the current date and time at the bottom of the page. This option
|
+##MANDIR =/usr/man/mann
|
||||||
is affected by the no surrounding border and the no header options.
|
+##MANEXT =n
|
||||||
|
+MANEXT = 1
|
||||||
|
+MANDIR = $(PREFIX)/man/man$(MANEXT)
|
||||||
|
|
||||||
|
-CFLAGS = -DBSD -O -DLPR_PRINT
|
||||||
|
+##CFLAGS = -DBSD -O -DLPR_PRINT
|
||||||
|
+CFLAGS = -DBSD -O -DWIDTH=$(WIDTH) -DHEIGTH=$(HEIGHT) -DA4_PAPERSIZE=$(A4_PAPERSIZE)
|
||||||
|
# Default values for HEIGHT, WIDTH, MARGIN and DIR_SEP (11.64, 8.27, 1.2, '/').
|
||||||
|
# Default values for LPR_COMMAND and LPR_OPT ("lpr", "-l")
|
||||||
|
# No values for TWOSIDED_DFLT, ONESIDED and TWOSIDED
|
||||||
|
@ -1,89 +1,78 @@
|
|||||||
*** a2ps.c.orig Tue Feb 15 01:14:59 1994
|
--- a2ps.c.orig Tue Feb 15 01:14:59 1994
|
||||||
--- a2ps.c Tue Feb 21 16:56:19 1995
|
+++ a2ps.c Thu May 16 19:04:15 1996
|
||||||
***************
|
@@ -164,12 +164,17 @@
|
||||||
*** 166,175 ****
|
/*
|
||||||
--- 166,177 ----
|
* Default page dimensions
|
||||||
*/
|
*/
|
||||||
#ifndef WIDTH
|
+#define USA_WIDTH 8.5
|
||||||
#define WIDTH 8.27
|
+#define USA_HEIGHT 11.0
|
||||||
+ #define USA_WIDTH 8.5
|
+#define A4_WIDTH 8.27
|
||||||
#endif
|
+#define A4_HEIGHT 11.64
|
||||||
|
+
|
||||||
#ifndef HEIGHT
|
#ifndef WIDTH
|
||||||
#define HEIGHT 11.64
|
-#define WIDTH 8.27
|
||||||
+ #define USA_HEIGHT 11.0
|
+#define WIDTH A4_WIDTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MARGIN
|
#ifndef HEIGHT
|
||||||
***************
|
-#define HEIGHT 11.64
|
||||||
*** 362,367 ****
|
+#define HEIGHT A4_HEIGHT
|
||||||
--- 364,371 ----
|
#endif
|
||||||
/*
|
|
||||||
* Sheet dimensions
|
#ifndef MARGIN
|
||||||
*/
|
@@ -362,6 +367,8 @@
|
||||||
+ double paper_height = HEIGHT; /* Paper height */
|
/*
|
||||||
+ double paper_width = WIDTH; /* Paper width */
|
* Sheet dimensions
|
||||||
double page_height = HEIGHT; /* Paper height */
|
*/
|
||||||
double page_width = WIDTH; /* Paper width */
|
+double paper_height = HEIGHT; /* Paper height */
|
||||||
|
+double paper_width = WIDTH; /* Paper width */
|
||||||
***************
|
double page_height = HEIGHT; /* Paper height */
|
||||||
*** 382,387 ****
|
double page_width = WIDTH; /* Paper width */
|
||||||
--- 386,392 ----
|
|
||||||
fprintf(stderr,"pos. = -#num\t\tnumber of copies to print\n");
|
@@ -382,6 +389,11 @@
|
||||||
fprintf(stderr," -1\t\tone page per sheet\n");
|
fprintf(stderr,"pos. = -#num\t\tnumber of copies to print\n");
|
||||||
fprintf(stderr," -2\t\tTWIN PAGES per sheet\n");
|
fprintf(stderr," -1\t\tone page per sheet\n");
|
||||||
+ fprintf(stderr," -a\t\tUse USA paper size (8.5 x 11)\n");
|
fprintf(stderr," -2\t\tTWIN PAGES per sheet\n");
|
||||||
fprintf(stderr," -d\t-nd\tprint (DON'T PRINT) current date at the bottom\n");
|
+#if A4_PAPERSIZE == 1
|
||||||
fprintf(stderr," -Fnum\t\tfont size, num is a float number\n");
|
+ fprintf(stderr," -a\t\tUse USA paper size (8.5\" x 11\")\n");
|
||||||
fprintf(stderr," -Hstr\t\tuse str like header title for subsequent files\n");
|
+#else
|
||||||
***************
|
+ fprintf(stderr," -a\t\tUse A4 paper size (21cm x 29.56cm (8.27\" x 11.64\"))\n");
|
||||||
*** 464,469 ****
|
+#endif
|
||||||
--- 469,478 ----
|
fprintf(stderr," -d\t-nd\tprint (DON'T PRINT) current date at the bottom\n");
|
||||||
usage(EXIT_FAILURE);
|
fprintf(stderr," -Fnum\t\tfont size, num is a float number\n");
|
||||||
interpret = TRUE;
|
fprintf(stderr," -Hstr\t\tuse str like header title for subsequent files\n");
|
||||||
break;
|
@@ -464,6 +476,12 @@
|
||||||
+ case 'a': /* American paper sizes */
|
usage(EXIT_FAILURE);
|
||||||
+ paper_height = USA_HEIGHT;
|
interpret = TRUE;
|
||||||
+ paper_width = USA_WIDTH;
|
break;
|
||||||
+ break;
|
+ case 'a': /* American paper sizes */
|
||||||
case 'n':
|
+#if defined(USA_HEIGHT) && defined(USA_WIDTH)
|
||||||
if (arg[2] == NUL)
|
+ paper_height = USA_HEIGHT;
|
||||||
return;
|
+ paper_width = USA_WIDTH;
|
||||||
***************
|
+# endif
|
||||||
*** 1471,1478 ****
|
+ break;
|
||||||
printf("\n%% Initialize page description variables.\n");
|
case 'n':
|
||||||
printf("/x0 0 def\n");
|
if (arg[2] == NUL)
|
||||||
printf("/y0 0 def\n");
|
return;
|
||||||
! printf("/sh %g inch def\n", (double)HEIGHT);
|
@@ -1471,8 +1489,8 @@
|
||||||
! printf("/sw %g inch def\n", (double)WIDTH);
|
printf("\n%% Initialize page description variables.\n");
|
||||||
printf("/margin %g inch def\n", (double)MARGIN);
|
printf("/x0 0 def\n");
|
||||||
printf("/rm margin 3 div def\n");
|
printf("/y0 0 def\n");
|
||||||
printf("/lm margin 2 mul 3 div def\n");
|
- printf("/sh %g inch def\n", (double)HEIGHT);
|
||||||
--- 1480,1487 ----
|
- printf("/sw %g inch def\n", (double)WIDTH);
|
||||||
printf("\n%% Initialize page description variables.\n");
|
+ printf("/sh %g inch def\n", (double)paper_height);
|
||||||
printf("/x0 0 def\n");
|
+ printf("/sw %g inch def\n", (double)paper_width);
|
||||||
printf("/y0 0 def\n");
|
printf("/margin %g inch def\n", (double)MARGIN);
|
||||||
! printf("/sh %g inch def\n", (double)paper_height);
|
printf("/rm margin 3 div def\n");
|
||||||
! printf("/sw %g inch def\n", (double)paper_width);
|
printf("/lm margin 2 mul 3 div def\n");
|
||||||
printf("/margin %g inch def\n", (double)MARGIN);
|
@@ -1794,8 +1812,8 @@
|
||||||
printf("/rm margin 3 div def\n");
|
/* Initialize variables not depending of positional options */
|
||||||
printf("/lm margin 2 mul 3 div def\n");
|
landscape = twinpages = -1; /* To force format switching */
|
||||||
***************
|
fontsize = -1.0; /* To force fontsize switching */
|
||||||
*** 1794,1801 ****
|
- page_height = (double)(HEIGHT - MARGIN) * PIXELS_INCH;
|
||||||
/* Initialize variables not depending of positional options */
|
- page_width = (double)(WIDTH - MARGIN) * PIXELS_INCH;
|
||||||
landscape = twinpages = -1; /* To force format switching */
|
+ page_height = (double)(paper_height - MARGIN) * PIXELS_INCH;
|
||||||
fontsize = -1.0; /* To force fontsize switching */
|
+ page_width = (double)(paper_width - MARGIN) * PIXELS_INCH;
|
||||||
! page_height = (double)(HEIGHT - MARGIN) * PIXELS_INCH;
|
|
||||||
! page_width = (double)(WIDTH - MARGIN) * PIXELS_INCH;
|
/* Postcript prologue printing */
|
||||||
|
print_prologue();
|
||||||
/* Postcript prologue printing */
|
|
||||||
print_prologue();
|
|
||||||
--- 1803,1810 ----
|
|
||||||
/* Initialize variables not depending of positional options */
|
|
||||||
landscape = twinpages = -1; /* To force format switching */
|
|
||||||
fontsize = -1.0; /* To force fontsize switching */
|
|
||||||
! page_height = (double)(paper_height - MARGIN) * PIXELS_INCH;
|
|
||||||
! page_width = (double)(paper_width - MARGIN) * PIXELS_INCH;
|
|
||||||
|
|
||||||
/* Postcript prologue printing */
|
|
||||||
print_prologue();
|
|
||||||
|
12
print/a2ps43-letter/files/patch-ac
Normal file
12
print/a2ps43-letter/files/patch-ac
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- a2ps.1.orig Tue Feb 15 01:15:16 1994
|
||||||
|
+++ a2ps.1 Fri Apr 5 00:00:01 1996
|
||||||
|
@@ -155,6 +155,9 @@
|
||||||
|
is the number of copies desired of each file named. By default, you get
|
||||||
|
only one copy.
|
||||||
|
.TP 0.6i
|
||||||
|
+.B -a
|
||||||
|
+Use the American paper size (8.5" x 11") as the basis for all calculations.
|
||||||
|
+.TP 0.6i
|
||||||
|
.B -d
|
||||||
|
Print the current date and time at the bottom of the page. This option
|
||||||
|
is affected by the no surrounding border and the no header options.
|
@ -1,6 +1,2 @@
|
|||||||
@cd /usr/local
|
|
||||||
@owner bin
|
|
||||||
@mode 755
|
|
||||||
bin/a2ps
|
bin/a2ps
|
||||||
@mode 644
|
man/man1/a2ps.1.gz
|
||||||
man/man1/a2ps.1
|
|
||||||
|
5
print/a2ps43-letter/scripts/configure
vendored
5
print/a2ps43-letter/scripts/configure
vendored
@ -4,10 +4,7 @@ cd $WRKSRC || exit 1;
|
|||||||
|
|
||||||
cat >> Makefile << END
|
cat >> Makefile << END
|
||||||
|
|
||||||
CFLAGS= -DBSD -O
|
PREFIX= $PREFIX
|
||||||
BINDIR= $PREFIX/bin
|
|
||||||
MANDIR= $PREFIX/man/man1
|
|
||||||
MANEXT= 1
|
|
||||||
|
|
||||||
END
|
END
|
||||||
exit 0;
|
exit 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user