ports/80129: First-cut port of cups-pstoraster for espgs 8.15.
Frank Mayhar
frank at exit.com
Wed Apr 20 04:50:27 UTC 2005
>Number: 80129
>Category: ports
>Synopsis: First-cut port of cups-pstoraster for espgs 8.15.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Apr 20 04:50:25 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Frank Mayhar
>Release: FreeBSD 6.0-CURRENT i386
>Organization:
Exit Consulting
>Environment:
N/A
>Description:
I've done a first-cut port of the new espgs that uses ghostscript 8.15, as
available from the CUPS folks. I've been using it for quite a while now; it
solves some problems I was having with failing Postscript print jobs and has
given me no trouble at all. It may not _quite_ be in the best shape for a
port, but I thought I would pass it on so others can get the benefit of it.
Unfortunately, I have no time to clean it up.
I sent email to ports at one point, but got no response. Here's the email:
The CUPS folks have made their new integration of espgs with ghostscript
8.15 available as an initial release candidate. Having run into a problem
this weekend that a newer ghostscript would solve (having to do with getting
an -invalidfont- error), I found it and hacked up a quick-and-dirty port.
I'm not opening a PR because this thing is definitely _not_ ready for prime
time and I have no time at the moment to make it so, having started a new
job last week. I'm therefore making the patch (and distfile, just in case)
available on my website; the patch is 'cups-pstoraster-espgs815.patch' at
http://www.exit.com/Archives/ and the distfile is in the Distfiles directory
below that.
Most notably, this thing installs espgs as a regular ghostscript port, but
the pkg-plist is still the cups-pstoraster port. I just thought that this
might make a reasonable starting place for whoever wants to pick it up from
here.
>How-To-Repeat:
>Fix:
--- cups-pstoraster-espgs815.patch begins here ---
Index: cups-pstoraster/Makefile
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- cups-pstoraster/Makefile 16 Dec 2004 19:18:02 -0000 1.17
+++ cups-pstoraster/Makefile 14 Feb 2005 17:24:29 -0000
@@ -6,25 +6,18 @@
#
PORTNAME= cups-pstoraster
-PORTVERSION= 7.07
-PORTREVISION= 3
+PORTVERSION= 8.15rc1
CATEGORIES= print
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
- ftp://ftp.easysw.com/pub/ghostscript/
-MASTER_SITE_SUBDIR= ghostscript espgs
-DISTFILES= ghostscript-${PORTVERSION}${EXTRACT_SUFX} \
- espgs-${ESPGS_VER}-source${EXTRACT_SUFX}
+MASTER_SITES= ftp://ftp.easysw.com/pub/ghostscript/test/
+DISTFILES= espgs-${PORTVERSION}-source${EXTRACT_SUFX}
DIST_SUBDIR= ghostscript
MAINTAINER= ports at FreeBSD.org
COMMENT= GNU Postscript interpreter for CUPS printing to non-PS printers
LIB_DEPENDS= cups.2:${PORTSDIR}/print/cups-base
-RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/${PORTVERSION}/lib/gs_init.ps:${PORTSDIR}/print/ghostscript-gnu
-ESPGS_VER= 7.07.1
-ESPGS_WRKSRC= ${WRKDIR}/espgs-${ESPGS_VER}/pstoraster
-WRKSRC= ${WRKDIR}/ghostscript-${PORTVERSION}
+WRKSRC= ${WRKDIR}/espgs-${PORTVERSION}
USE_BZIP2= yes
USE_REINPLACE= yes
@@ -33,8 +26,7 @@
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --without-x --without-ijs --without-gimp-print \
- --with-gs=espgs
+CONFIGURE_ARGS= --without-x --with-gs=espgs
MAKE_ARGS= CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
DEVICE_DEVS="\$$(DD)cups.dev \$$(DD)pxlcolor.dev \$$(DD)pxlmono.dev"
@@ -42,15 +34,19 @@
libexec/cups/filter/pstopxl libexec/cups/filter/pstoraster \
share/cups/model/pxlcolor.ppd share/cups/model/pxlmono.ppd
+pre-configure:
+ ${RM} -f ${WRKSRC}/ijs/config.guess ${WRKSRC}/ijs/missing ${WRKSRC}/ijs/config.sub ${WRKSRC}/ijs/install-sh ${WRKSRC}/ijs/ltmain.sh
+ ${RM} -f ${WRKSRC}/trunk/ijs/config.guess ${WRKSRC}/trunk/ijs/missing ${WRKSRC}/trunk/ijs/config.sub ${WRKSRC}/trunk/ijs/install-sh ${WRKSRC}/trunk/ijs/ltmain.sh
+
post-patch:
- ${LN} -sf ${ESPGS_WRKSRC}/gdevcups.c ${WRKSRC}/src
+ ${LN} -sf ${WRKSRC}/pstoraster/gdevcups.c ${WRKSRC}/src
${CAT} ${FILESDIR}/cups.contrib.mak >> ${WRKSRC}/src/contrib.mak
.for file in pstopxl pstoraster
${SED} -e 's:@prefix@:${PREFIX}:g ; \
s:@exec_prefix@:${PREFIX}:g ; \
s:@bindir@:${PREFIX}/bin:g ; \
s:@GS@:espgs:g' \
- ${ESPGS_WRKSRC}/${file}.in > ${ESPGS_WRKSRC}/${file}
+ ${WRKSRC}/pstoraster/${file}.in > ${WRKSRC}/pstoraster/${file}
.endfor
${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS=@CPPFLAGS@ |g ; \
s|^LDFLAGS=|LDFLAGS=@LDFLAGS@ |g ; \
@@ -60,15 +56,15 @@
${MKDIR} ${WRKSRC}/bin
${MKDIR} ${WRKSRC}/obj
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/espgs ${PREFIX}/bin
- ${INSTALL_DATA} ${ESPGS_WRKSRC}/pstoraster.convs ${PREFIX}/etc/cups
-.for file in pstopxl pstoraster
- ${INSTALL_SCRIPT} ${ESPGS_WRKSRC}/${file} ${PREFIX}/libexec/cups/filter
-.endfor
-.for file in pxlcolor.ppd pxlmono.ppd
- ${INSTALL_DATA} ${ESPGS_WRKSRC}/${file} ${PREFIX}/share/cups/model
-.endfor
+#post-install:
+# ${INSTALL_PROGRAM} ${WRKSRC}/bin/espgs ${PREFIX}/bin
+# ${INSTALL_DATA} ${WRKSRC}/pstoraster/pstoraster.convs ${PREFIX}/etc/cups
+#.for file in pstopxl pstoraster
+# ${INSTALL_SCRIPT} ${WRKSRC}/pstoraster/${file} ${PREFIX}/libexec/cups/filter
+#.endfor
+#.for file in pxlcolor.ppd pxlmono.ppd
+# ${INSTALL_DATA} ${WRKSRC}/pstoraster/${file} ${PREFIX}/share/cups/model
+#.endfor
.include "${.CURDIR}/../../print/cups/Makefile.common"
.include <bsd.port.pre.mk>
Index: cups-pstoraster/distinfo
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- cups-pstoraster/distinfo 15 Nov 2004 04:19:05 -0000 1.6
+++ cups-pstoraster/distinfo 14 Feb 2005 17:24:29 -0000
@@ -1,4 +1,2 @@
-MD5 (ghostscript/ghostscript-7.07.tar.bz2) = 85fd16cdc8232e5e3679a3a7e30a3359
-SIZE (ghostscript/ghostscript-7.07.tar.bz2) = 4138372
-MD5 (ghostscript/espgs-7.07.1-source.tar.bz2) = d30bf5c09f2c7caa8291f6305cf03044
-SIZE (ghostscript/espgs-7.07.1-source.tar.bz2) = 5400198
+MD5 (ghostscript/espgs-8.15rc1-source.tar.bz2) = 90bf6e4de8cfa2ac47c37b8096b6503b
+SIZE (ghostscript/espgs-8.15rc1-source.tar.bz2) = 15225662
Index: cups-pstoraster/files/patch-src:genarch.c
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/files/patch-src:genarch.c,v
retrieving revision 1.1
diff -u -r1.1 patch-src:genarch.c
--- cups-pstoraster/files/patch-src:genarch.c 25 Jul 2002 03:00:17 -0000 1.1
+++ cups-pstoraster/files/patch-src:genarch.c 14 Feb 2005 17:24:29 -0000
@@ -1,5 +1,5 @@
---- src/genarch.c.orig Tue Jun 5 15:38:57 2001
-+++ src/genarch.c Wed Jun 20 04:17:42 2001
+--- src/genarch.c.orig Sun Feb 13 11:26:57 2005
++++ src/genarch.c Sun Feb 13 11:28:13 2005
@@ -41,6 +41,7 @@
fprintf(f, "\n\t /* ---------------- %s ---------------- */\n\n", str);
}
@@ -16,7 +16,7 @@
private void
define(FILE *f, const char *str)
-@@ -181,6 +183,7 @@
+@@ -212,6 +214,7 @@
fprintf(f, "((unsigned long)~0L + (unsigned long)0)\n");
#undef PRINT_MAX
@@ -24,7 +24,7 @@
section(f, "Cache sizes");
/*
-@@ -241,6 +244,7 @@
+@@ -273,6 +276,7 @@
}
define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1);
}
Index: cups-pstoraster/files/patch-src:gxobj.h
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/files/patch-src:gxobj.h,v
retrieving revision 1.2
diff -u -r1.2 patch-src:gxobj.h
--- cups-pstoraster/files/patch-src:gxobj.h 26 Nov 2004 21:05:46 -0000 1.2
+++ cups-pstoraster/files/patch-src:gxobj.h 14 Feb 2005 17:24:29 -0000
@@ -1,17 +1,17 @@
---- src/gxobj.h.orig Fri Feb 22 19:45:59 2002
-+++ src/gxobj.h Thu Dec 19 00:16:57 2002
-@@ -99,10 +99,14 @@
- * The final | is because back pointer values are divided by obj_back_scale,
- * so objects must be aligned at least 0 mod obj_back_scale.
+--- src/gxobj.h.orig Sun Feb 13 11:29:10 2005
++++ src/gxobj.h Sun Feb 13 11:29:15 2005
+@@ -103,10 +103,14 @@
+ * required by the hardware, regardless of the value of obj_align_mod.
+ * See gsmemraw.h for more information about this.
*/
+#if !defined(__ia64__) && !defined(__amd64__)
#define obj_align_mod\
- (((arch_align_long_mod - 1) | (arch_align_ptr_mod - 1) |\
- (arch_align_double_mod - 1) | (align_bitmap_mod - 1) |\
+ (((arch_align_memory_mod - 1) |\
+ (align_bitmap_mod - 1) |\
(obj_back_scale - 1)) + 1)
+#else
-+#define obj_align_mod 16
-+#endif
++#define obj_align_mod 16
++#endif
/* The only possible values for obj_align_mod are 4, 8, or 16.... */
#if obj_align_mod == 4
# define log2_obj_align_mod 2
--- cups-pstoraster-espgs815.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list