[Midnightbsd-cvs] mports [19481] trunk/print: add psutils

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jun 10 19:17:52 EDT 2015


Revision: 19481
          http://svnweb.midnightbsd.org/mports/?rev=19481
Author:   laffer1
Date:     2015-06-10 19:17:52 -0400 (Wed, 10 Jun 2015)
Log Message:
-----------
add psutils

Modified Paths:
--------------
    trunk/print/Makefile

Added Paths:
-----------
    trunk/print/psutils/
    trunk/print/psutils/Makefile
    trunk/print/psutils/distinfo
    trunk/print/psutils/files/
    trunk/print/psutils/files/patch-Makefile.unix
    trunk/print/psutils/files/patch-b4
    trunk/print/psutils/files/patch-epsffit.c
    trunk/print/psutils/files/patch-getafm.sh
    trunk/print/psutils/files/patch-psbook.c
    trunk/print/psutils/files/patch-pserror.c
    trunk/print/psutils/files/patch-psnup.c
    trunk/print/psutils/files/patch-psresize.c
    trunk/print/psutils/files/patch-psselect.c
    trunk/print/psutils/files/patch-pstops.c
    trunk/print/psutils/files/patch-psutil.c
    trunk/print/psutils/pkg-descr
    trunk/print/psutils/pkg-plist

Modified: trunk/print/Makefile
===================================================================
--- trunk/print/Makefile	2015-06-10 23:15:06 UTC (rev 19480)
+++ trunk/print/Makefile	2015-06-10 23:17:52 UTC (rev 19481)
@@ -48,6 +48,7 @@
 SUBDIR += mp-letter
 SUBDIR += pdflib
 SUBDIR += pecl-pdflib
+SUBDIR += psutils
 SUBDIR += t1utils
 SUBDIR += teTeX
 SUBDIR += teTeX-base

Added: trunk/print/psutils/Makefile
===================================================================
--- trunk/print/psutils/Makefile	                        (rev 0)
+++ trunk/print/psutils/Makefile	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,29 @@
+# Created by: Jean-Marc Zucconi <jmz at FreeBSD.org> and David O'Brien <obrien at FreeBSD.org>
+# $MidnightBSD$
+# $FreeBSD: head/print/psutils/Makefile 386312 2015-05-14 10:15:04Z mat $
+
+PORTNAME=	psutils
+PORTVERSION=	1.17
+CATEGORIES=	print
+MASTER_SITES=	ftp://ftp.dcs.ed.ac.uk/pub/ajcd/ \
+		ftp://ftp.knackered.org/pub/psutils/ \
+		TEX_CTAN/support/psutils
+DISTNAME=	psutils-p17
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Utilities for manipulating PostScript documents
+
+LICENSE=	other
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libpaper.so:${PORTSDIR}/print/libpaper
+
+USES=		perl5
+USE_PERL5=	build
+WRKSRC=		${WRKDIR}/${PORTNAME}
+MAKEFILE=	Makefile.unix
+MAKE_ENV+=	DATADIR="${DATADIR}" PERL="${PERL}" CHMOD="${CHMOD}"
+SCRIPTS_ENV+=	PERL5=${PERL} CC=${CC} DATADIR=${DATADIR} \
+		MANPREFIX=${MANPREFIX} PAPER=dummy
+
+.include <bsd.port.mk>


Property changes on: trunk/print/psutils/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/distinfo
===================================================================
--- trunk/print/psutils/distinfo	                        (rev 0)
+++ trunk/print/psutils/distinfo	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,2 @@
+SHA256 (psutils-p17.tar.gz) = 3853eb79584ba8fbe27a815425b65a9f7f15b258e0d43a05a856bdb75d588ae4
+SIZE (psutils-p17.tar.gz) = 62039


Property changes on: trunk/print/psutils/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-Makefile.unix
===================================================================
--- trunk/print/psutils/files/patch-Makefile.unix	                        (rev 0)
+++ trunk/print/psutils/files/patch-Makefile.unix	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,103 @@
+--- Makefile.unix.orig	1997-03-12 07:52:59.000000000 +0900
++++ Makefile.unix	2013-04-23 16:36:38.000000000 +0900
+@@ -25,21 +25,22 @@
+ 
+ OS = UNIX
+ 
+-BINDIR = /usr/local/bin
++BINDIR ?= $(DESTDIR)$(PREFIX)/bin
+ SCRIPTDIR = $(BINDIR)
+-INCLUDEDIR = /usr/local/share/psutils
+-PERL = /usr/local/bin/perl
++INCLUDEDIR ?= $(DESTDIR)$(DATADIR)
++PERL ?= $(PERL5)
+ 
+-BINMODE = 0755
+-MANMODE = 0644
+-CHMOD = chmod
++BINMODE ?= 0755
++MANMODE ?= 0644
++CHMOD ?= chmod
+ INSTALL = install -c -m $(BINMODE)
+ INSTALLMAN = install -c -m $(MANMODE)
+ MANEXT = 1
+-MANDIR = /usr/local/share/man/man$(MANEXT)
++MANDIR ?= $(DESTDIR)$(MANPREFIX)/man/man$(MANEXT)
+ 
+-CC = gcc
+-CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall
++CC ?= gcc
++CFLAGS += -DLIBPAPER -DPAPER=\"$(PAPER)\" -I${LOCALBASE}/include -DUNIX -Wall
++LDFLAGS+= -L${LOCALBASE}/lib -lm -lpaper
+ 
+ BIN = psbook psselect pstops epsffit psnup \
+ 	psresize
+@@ -65,30 +66,30 @@
+ epsffit.o: epsffit.c pserror.h patchlev.h
+ 
+ epsffit: epsffit.o pserror.o
+-	$(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o
++	$(CC) $(LDFLAGS) -o epsffit pserror.o epsffit.o
+ 
+ psnup: psnup.o psutil.o psspec.o pserror.o
+-	$(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o
++	$(CC) $(LDFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o
+ 
+ psnup.o: psutil.h patchlev.h psspec.h pserror.h psnup.c
+ 
+ psresize: psresize.o psutil.o pserror.o psspec.o
+-	$(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o
++	$(CC) $(LDFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o
+ 
+ psresize.o: psutil.h patchlev.h psspec.h pserror.h psresize.c
+ 
+ psbook: psbook.o psutil.o pserror.o
+-	$(CC) $(CCFLAGS) -o psbook psutil.o pserror.o psbook.o
++	$(CC) $(LDFLAGS) -o psbook psutil.o pserror.o psbook.o
+ 
+ psbook.o: psutil.h patchlev.h pserror.h psbook.c
+ 
+ psselect: psselect.o psutil.o pserror.o
+-	$(CC) $(CCFLAGS) -o psselect psutil.o pserror.o psselect.o
++	$(CC) $(LDFLAGS) -o psselect psutil.o pserror.o psselect.o
+ 
+ psselect.o: psutil.h patchlev.h pserror.h psselect.c
+ 
+ pstops: pstops.o psutil.o psspec.o pserror.o
+-	$(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o
++	$(CC) $(LDFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o
+ 
+ pstops.o: psutil.h patchlev.h psspec.h pserror.h pstops.c
+ 
+@@ -222,27 +223,27 @@
+ 	-mkdir $(BINDIR)
+ 	@for i in $(BIN); do \
+ 		echo Installing $$i; \
+-		$(INSTALL) $$i $(BINDIR); \
++		$(BSD_INSTALL_PROGRAM) $$i $(BINDIR); \
+ 	done
+ 
+ install.script: $(PERLSCRIPTS) $(SHELLSCRIPTS)
+ 	-mkdir $(SCRIPTDIR)
+ 	@for i in $(PERLSCRIPTS) $(SHELLSCRIPTS); do \
+ 		echo Installing $$i; \
+-		$(INSTALL) $$i $(SCRIPTDIR); \
++		$(BSD_INSTALL_SCRIPT) $$i $(SCRIPTDIR); \
+ 	done
+ 
+ install.include: $(INCLUDES)
+ 	-mkdir $(INCLUDEDIR)
+ 	@for i in $(INCLUDES); do \
+ 		echo Installing $$i; \
+-		$(INSTALLMAN) $$i $(INCLUDEDIR); \
++		$(BSD_INSTALL_DATA) $$i $(INCLUDEDIR); \
+ 	done
+ 
+ install.man: $(MANPAGES)
+ 	-mkdir $(MANDIR)
+ 	@for i in $(MANPAGES); do \
+ 		echo Installing manual page for $$i; \
+-		$(INSTALLMAN) $$i $(MANDIR)/$$i; \
++		$(BSD_INSTALL_DATA) $$i $(MANDIR)/$$i; \
+ 	done
+ 


Property changes on: trunk/print/psutils/files/patch-Makefile.unix
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-b4
===================================================================
--- trunk/print/psutils/files/patch-b4	                        (rev 0)
+++ trunk/print/psutils/files/patch-b4	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,15 @@
+--- psutil.c.bak	Thu Oct  5 10:17:44 2000
++++ psutil.c	Thu Oct  5 10:17:44 2000
+@@ -48,10 +48,12 @@
+    { "a4", 595, 842 },		/* 21cm * 29.7cm */
+    { "a5", 421, 595 },		/* 14.85cm * 21cm */
+    { "b5", 516, 729 },		/* 18.2cm * 25.72cm */
++   { "b4", 729, 1032 },		/* 25.72cm * 36.4cm */
+    { "A3", 842, 1191 },		/* 29.7cm * 42cm */
+    { "A4", 595, 842 },		/* 21cm * 29.7cm */
+    { "A5", 421, 595 },		/* 14.85cm * 21cm */
+    { "B5", 516, 729 },		/* 18.2cm * 25.72cm */
++   { "B4", 729, 1032 },		/* 25.72cm * 36.4cm */
+    { "letter", 612, 792 },	/* 8.5in * 11in */
+    { "legal", 612, 1008 },	/* 8.5in * 14in */
+    { "ledger", 1224, 792 },	/* 17in * 11in */


Property changes on: trunk/print/psutils/files/patch-b4
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-epsffit.c
===================================================================
--- trunk/print/psutils/files/patch-epsffit.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-epsffit.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,22 @@
+--- epsffit.c.orig	1997-03-12 07:52:52.000000000 +0900
++++ epsffit.c	2012-03-03 02:46:20.000000000 +0900
+@@ -39,10 +39,10 @@
+    exit(1);
+ }
+ 
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+    int bbfound = 0;              /* %%BoundingBox: found */
+-   int urx, ury, llx, lly;
++   int urx = 0, ury = 0, llx = 0, lly = 0;
+    int furx, fury, fllx, flly;
+    int showpage = 0, centre = 0, rotate = 0, aspect = 0, maximise = 0;
+    char buf[BUFSIZ];
+@@ -185,5 +185,5 @@
+    } else
+       message(FATAL, "no %%%%BoundingBox:\n");
+ 
+-   exit(0);
++   return (0);
+ }


Property changes on: trunk/print/psutils/files/patch-epsffit.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-getafm.sh
===================================================================
--- trunk/print/psutils/files/patch-getafm.sh	                        (rev 0)
+++ trunk/print/psutils/files/patch-getafm.sh	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,34 @@
+--- getafm.sh.orig	2013-04-23 16:38:17.000000000 +0900
++++ getafm.sh	2013-04-23 16:38:24.000000000 +0900
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ 
+ if [ $# -ne 1 ]; then
+-  echo "usage: $0 font-name | gsnd - >font-name.afm" >&2
++  echo "usage: $0 font-name | gsnd -q - >font-name.afm" >&2
+   exit 1
+ fi
+ 
+@@ -13,6 +13,11 @@
+ %	getafm 1.00 (c) AJCD
+ % and getafm.ps by an unknown author,
+ %	modified by J. Daniel Smith <dsmith at mailhost.aa.cad.slb.com>
++%
++% modified by Joachim H. Kaiser <jhk at cmpnetmail.com>:
++% - suggest a quiet gs run in usage
++% - get font version info (from 'version', not 'Version')
++% - add copyright field to output
+ 
+ % Metrics dictionary code added by AJCD, 7/6/93
+ 
+@@ -66,8 +71,9 @@
+ 	(isFixedPitch)(IsFixedPitch) prany
+ 	(UnderlinePosition)dup prany
+ 	(UnderlineThickness)dup prany
+-	(Version)(version) prany
++	(version)(Version) prany
+ 	(Notice)dup prany
++	(Copyright)dup prany
+       pop
+     }
+     {


Property changes on: trunk/print/psutils/files/patch-getafm.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-psbook.c
===================================================================
--- trunk/print/psutils/files/patch-psbook.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-psbook.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,18 @@
+--- psbook.c.orig	2011-06-21 04:19:12.000000000 +0900
++++ psbook.c	2011-06-21 04:19:36.000000000 +0900
+@@ -32,7 +32,7 @@
+ }
+ 
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    int signature = 0;
+    int currentpg, maxpage;
+@@ -107,5 +107,5 @@
+    }
+    writetrailer();
+ 
+-   exit(0);
++   return (0);
+ }


Property changes on: trunk/print/psutils/files/patch-psbook.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-pserror.c
===================================================================
--- trunk/print/psutils/files/patch-pserror.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-pserror.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,11 @@
+--- pserror.c.orig	2011-06-21 04:20:14.000000000 +0900
++++ pserror.c	2011-06-21 04:20:31.000000000 +0900
+@@ -24,7 +24,7 @@
+ void message(int flags, char *format, ...)
+ {
+   va_list args ;
+-  static column = 0 ;		/* current screen column for message wrap */
++  static int column = 0 ;		/* current screen column for message wrap */
+   char msgbuf[MAX_MESSAGE] ;	/* buffer in which to put the message */
+   char *bufptr = msgbuf ;	/* message buffer pointer */
+ 


Property changes on: trunk/print/psutils/files/patch-pserror.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-psnup.c
===================================================================
--- trunk/print/psutils/files/patch-psnup.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-psnup.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,63 @@
+--- psnup.c.orig	1997-03-12 07:53:02.000000000 +0900
++++ psnup.c	2012-03-03 03:03:01.000000000 +0900
+@@ -28,6 +28,10 @@
+ #include "pserror.h"
+ #include "patchlev.h"
+ 
++#if defined(LIBPAPER)
++#include <paper.h>
++#endif
++
+ char *program ;
+ int pages ;
+ int verbose ;
+@@ -66,12 +70,12 @@
+    return (0);
+ }
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+-   int horiz, vert, rotate, column, flip, leftright, topbottom;
++   int horiz = 0, vert = 0, rotate = 0, column, flip, leftright, topbottom;
+    int nup = 1;
+    double draw = 0;				/* draw page borders */
+-   double scale;				/* page scale */
++   double scale = 0;				/* page scale */
+    double uscale = 0;				/* user supplied scale */
+    double ppwid, pphgt;				/* paper dimensions */
+    double margin, border;			/* paper & page margins */
+@@ -79,13 +83,21 @@
+    double iwidth, iheight ;			/* input paper size */
+    double tolerance = 100000;			/* layout tolerance */
+    Paper *paper;
++   char *name;
+ 
++#if defined(LIBPAPER)
++	name = (char *)systempapername();
++	if (name == NULL)
++		name = (char *)defaultpapername();
++#else
+ #ifdef PAPER
+-   if ( (paper = findpaper(PAPER)) != (Paper *)0 ) {
+-      width = (double)PaperWidth(paper);
+-      height = (double)PaperHeight(paper);
+-   }
++	name = PAPER;
+ #endif
++#endif
++	if ((paper = findpaper(name)) != NULL) {
++		width = (double)PaperWidth(paper);
++		height = (double)PaperHeight(paper);
++	}
+ 
+    margin = border = vshift = hshift = column = flip = 0;
+    leftright = topbottom = 1;
+@@ -331,6 +343,6 @@
+       pstops(nup, 1, 0, specs, draw);		/* do page rearrangement */
+    }
+ 
+-   exit(0);
++   return (0);
+ }
+ 


Property changes on: trunk/print/psutils/files/patch-psnup.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-psresize.c
===================================================================
--- trunk/print/psutils/files/patch-psresize.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-psresize.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,56 @@
+--- psresize.c.orig	1997-03-12 07:53:03.000000000 +0900
++++ psresize.c	2012-03-03 03:02:24.000000000 +0900
+@@ -20,6 +20,10 @@
+ #include "pserror.h"
+ #include "patchlev.h"
+ 
++#if defined(LIBPAPER)
++#include <paper.h>
++#endif
++
+ char *program ;
+ int pages ;
+ int verbose ;
+@@ -46,7 +50,7 @@
+ #define MIN(x,y) ((x) > (y) ? (y) : (x))
+ #define MAX(x,y) ((x) > (y) ? (x) : (y))
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    double scale, rscale;			/* page scale */
+    double waste, rwaste;			/* amount wasted */
+@@ -56,13 +60,21 @@
+    double inheight = -1;
+    Paper *paper;
+    PageSpec *specs;
++   char *name = NULL;
+ 
++#if defined(LIBPAPER)
++	name = (char *)systempapername();
++	if (name == NULL)
++		name = (char *)defaultpapername();
++#else
+ #ifdef PAPER
+-   if ( (paper = findpaper(PAPER)) != (Paper *)0 ) {
+-      inwidth = width = (double)PaperWidth(paper);
+-      inheight = height = (double)PaperHeight(paper);
+-   }
++	name = PAPER;
++#endif
+ #endif
++	if ((paper = findpaper(name)) != NULL) {
++		inwidth = width = (double)PaperWidth(paper);
++		inheight = height = (double)PaperHeight(paper);
++	}
+ 
+    vshift = hshift = 0;
+    rotate = 0;
+@@ -175,6 +187,6 @@
+       
+    pstops(1, 1, 0, specs, 0.0);		/* do page rearrangement */
+ 
+-   exit(0);
++   return (0);
+ }
+ 


Property changes on: trunk/print/psutils/files/patch-psresize.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-psselect.c
===================================================================
--- trunk/print/psutils/files/patch-psselect.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-psselect.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,18 @@
+--- psselect.c.orig	2011-06-21 04:20:51.000000000 +0900
++++ psselect.c	2011-06-21 04:21:08.000000000 +0900
+@@ -91,7 +91,7 @@
+ }
+ 
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    int currentpg, maxpage = 0;
+    int even = 0, odd = 0, reverse = 0;
+@@ -235,5 +235,5 @@
+    }
+    writetrailer();
+ 
+-   exit(0);
++   return (0);
+ }


Property changes on: trunk/print/psutils/files/patch-psselect.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-pstops.c
===================================================================
--- trunk/print/psutils/files/patch-pstops.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-pstops.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,53 @@
+--- pstops.c.orig	1997-03-12 07:53:04.000000000 +0900
++++ pstops.c	2012-03-03 03:04:32.000000000 +0900
+@@ -13,6 +13,10 @@
+ #include "pserror.h"
+ #include "patchlev.h"
+ 
++#if defined(LIBPAPER)
++#include <paper.h>
++#endif
++
+ char *program ;
+ int pages ;
+ int verbose ;
+@@ -112,19 +116,27 @@
+    return (head);
+ }
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    PageSpec *specs = NULL;
+    int nobinding = 0;
+    double draw = 0;
+    Paper *paper;
++   char *name;
+ 
++#if defined(LIBPAPER)
++	name = (char *)systempapername();
++	if (name == NULL)
++		name = (char *)defaultpapername();
++#else
+ #ifdef PAPER
+-   if ( (paper = findpaper(PAPER)) != (Paper *)0 ) {
+-      width = (double)PaperWidth(paper);
+-      height = (double)PaperHeight(paper);
+-   }
++	name = PAPER;
++#endif
+ #endif
++	if ((paper = findpaper(name)) != NULL) {
++		width = (double)PaperWidth(paper);
++		height = (double)PaperHeight(paper);
++	}
+ 
+    infile = stdin;
+    outfile = stdout;
+@@ -194,5 +206,5 @@
+ 
+    pstops(modulo, pagesperspec, nobinding, specs, draw);
+ 
+-   exit(0);
++   return (0);
+ }


Property changes on: trunk/print/psutils/files/patch-pstops.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/files/patch-psutil.c
===================================================================
--- trunk/print/psutils/files/patch-psutil.c	                        (rev 0)
+++ trunk/print/psutils/files/patch-psutil.c	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,58 @@
+--- psutil.c.orig	2012-03-03 03:13:21.000000000 +0900
++++ psutil.c	2012-03-03 03:20:46.000000000 +0900
+@@ -21,6 +21,11 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ 
++#if defined(LIBPAPER)
++#include <math.h>
++#include <paper.h>
++#endif
++
+ #define iscomment(x,y) (strncmp(x,y,strlen(y)) == 0)
+ 
+ extern char *program ;
+@@ -42,6 +47,7 @@
+ static int maxpages = 100;
+ static long *pageptr;
+ 
++#if !defined(LIBPAPER)
+ /* list of paper sizes supported */
+ static Paper papersizes[] = {
+    { "a3", 842, 1191 },		/* 29.7cm * 42cm */
+@@ -70,6 +76,7 @@
+ Paper* findpaper(char *name)
+ {
+    Paper *pp;
++
+    for (pp = papersizes; PaperName(pp); pp++) {
+       if (strcmp(PaperName(pp), name) == 0) {
+ 	 return pp;
+@@ -77,6 +84,27 @@
+    }
+    return (Paper *)NULL;
+ }
++#else
++static Paper pspec;
++
++Paper *findpaper(char *name)
++{
++	const struct paper *pp;
++
++	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));
++			return (&pspec);
++		}
++	}
++	return (NULL);
++}
++#endif
++
++
+ 
+ /* Make a file seekable, using temporary files if necessary */
+ FILE *seekable(FILE *fp)


Property changes on: trunk/print/psutils/files/patch-psutil.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/pkg-descr
===================================================================
--- trunk/print/psutils/pkg-descr	                        (rev 0)
+++ trunk/print/psutils/pkg-descr	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,23 @@
+psbook            rearranges pages into signatures
+psselect          selects pages and page ranges
+pstops            performs general page rearrangement and selection
+psnup             put multiple pages per physical sheet of paper
+psresize          alter document paper size
+epsffit           fits an EPSF file to a given bounding box
+getafm     (sh)   outputs PostScript to retrieve AFM file from printer
+showchar   (sh)   outputs PostScript to draw a character with metric info
+fixdlsrps  (perl) filter to fix DviLaser/PS output so that PSUtils works
+fixfmps    (perl) filter to fix framemaker documents so that psselect etc. work
+fixmacps   (perl) filter to fix Macintosh documents with saner version of md
+fixpsditps (perl) filter to fix Transcript psdit documents to work with PSUtils
+fixpspps   (perl) filter to fix PSPrint PostScript so that psselect etc. work
+fixscribeps (perl) filter to fix Scribe PostScript so that psselect etc. work
+fixtpps    (perl) filter to fix Troff Tpscript documents
+fixwfwps   (perl) filter to fix Word for Windows documents for PSUtils
+fixwpps    (perl) filter to fix WordPerfect documents for PSUtils
+fixwwps    (perl) filter to fix Windows Write documents for PSUtils
+extractres (perl) filter to extract resources from PostScript files
+includeres (perl) filter to include resources into PostScript files
+psmerge    (perl) hack script to merge multiple PostScript files
+
+WWW: http://gershwin.ens.fr/vdaniel/Doc-Locale/Outils-Gnu-Linux/PsUtils/


Property changes on: trunk/print/psutils/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/print/psutils/pkg-plist
===================================================================
--- trunk/print/psutils/pkg-plist	                        (rev 0)
+++ trunk/print/psutils/pkg-plist	2015-06-10 23:17:52 UTC (rev 19481)
@@ -0,0 +1,43 @@
+bin/psbook
+bin/psselect
+bin/pstops
+bin/epsffit
+bin/psnup
+bin/psresize
+bin/getafm
+bin/fixfmps
+bin/fixmacps
+bin/fixpsditps
+bin/fixpspps
+bin/fixtpps
+bin/fixwfwps
+bin/fixwpps
+bin/fixscribeps
+bin/fixwwps
+bin/fixdlsrps
+bin/extractres
+bin/includeres
+bin/psmerge
+bin/showchar
+man/man1/epsffit.1.gz
+man/man1/extractres.1.gz
+man/man1/fixdlsrps.1.gz
+man/man1/fixfmps.1.gz
+man/man1/fixmacps.1.gz
+man/man1/fixpsditps.1.gz
+man/man1/fixpspps.1.gz
+man/man1/fixscribeps.1.gz
+man/man1/fixtpps.1.gz
+man/man1/fixwfwps.1.gz
+man/man1/fixwpps.1.gz
+man/man1/fixwwps.1.gz
+man/man1/getafm.1.gz
+man/man1/includeres.1.gz
+man/man1/psbook.1.gz
+man/man1/psmerge.1.gz
+man/man1/psnup.1.gz
+man/man1/psresize.1.gz
+man/man1/psselect.1.gz
+man/man1/pstops.1.gz
+%%DATADIR%%/md68_0.ps
+%%DATADIR%%/md71_0.ps


Property changes on: trunk/print/psutils/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list