Bug 107207 - cups-pstoraster misses PostScript fonts
Summary: cups-pstoraster misses PostScript fonts
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-26 15:00 UTC by Eygene Ryabinkin
Modified: 2006-12-28 19:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eygene Ryabinkin 2006-12-26 15:00:36 UTC
Fresh install of cups-base + cups-pstoraster reveals that any files, but
plain-text ones are not printed. A glance through error_log revealed
that espgs misses PostScript fonts. If ghostscript-gnu port is installed
afterwards, things are OK, since ghoscsript provides fonts for espgs.

Seems that cups-pstoraster misses the Ghostscript as a dependency.

Fix: 

Add Ghostscript port to the dependency list.
How-To-Repeat: Install cups (or cups-base + cups-pstoraster) from ports, but do not
install Ghostscript. Start CUPS system and try to print the test page.
It won't print. Change LogLevel to debug and restart cupsd. Print
test page again and you will see errors like this:
-----
E [26/Dec/2006:16:20:38 +0300] [Job 3] /invalidfont in findfont
D [26/Dec/2006:16:20:38 +0300] [Job 3] Operand stack:
D [26/Dec/2006:16:20:38 +0300] Discarding unused printer-state-changed event...
D [26/Dec/2006:16:20:38 +0300] [Job 3] bigFont   Helvetica-Bold   Font   Helveti
ca-Bold   631567   Helvetica-Bold   --nostringval--   Helvetica-Bold   NimbusSan
L-Bold
D [26/Dec/2006:16:20:38 +0300] [Job 3] Execution stack:
D [26/Dec/2006:16:20:38 +0300] [Job 3] %interp_exit   .runexec2   --nostringval-
-   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --
nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_p
op   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   .runex
ec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push
--nostringval--   2   3   %oparray_pop   3   3   %oparray_pop   --nostringval--
  --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nost
ringval--   false   1   %stopped_push   6   4   %oparray_pop   --nostringval--
 --nostringval--   --nostringval--   1   -1   1   --nostringval--   %for_neg_int
_continue
D [26/Dec/2006:16:20:38 +0300] [Job 3] Dictionary stack:
D [26/Dec/2006:16:20:38 +0300] [Job 3] --dict:1089/1123(ro)(G)--   --dict:0/20(G
)--   --dict:123/200(L)--   --dict:47/65(ro)(G)--   --dict:1089/1123(ro)(G)--
D [26/Dec/2006:16:20:38 +0300] [Job 3] Current allocation mode is local
D [26/Dec/2006:16:20:38 +0300] [Job 3] Last OS error: 2
D [26/Dec/2006:16:20:38 +0300] [Job 3] ESP Ghostscript 815.03: Unrecoverable err
or, exit code 1
E [26/Dec/2006:16:20:38 +0300] [Job 3] No pages found!
-----
Comment 1 Edwin Groothuis freebsd_committer 2006-12-26 20:06:44 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 frank 2006-12-26 20:54:52 UTC
Yep, it's a problem.  Sorry about that.

Here's a patch that fixes this as well as removes an unneeded file:

--- cups-pstoraster.diff begins here ---
Index: cups-pstoraster/Makefile
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- cups-pstoraster/Makefile	6 Dec 2006 07:46:57 -0000	1.24
+++ cups-pstoraster/Makefile	26 Dec 2006 20:50:53 -0000
@@ -32,6 +32,7 @@
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
+USE_GHOSTSCRIPT_RUN= yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
@@ -44,10 +45,6 @@
 		libexec/cups/filter/pstopxl libexec/cups/filter/pstoraster \
 		share/cups/model/pxlcolor.ppd share/cups/model/pxlmono.ppd
 
-.ifdef(WITH_GHOSTSCRIPT_AFPL)
-IGNORE=		doesn't build with AFPL version of Ghostscript; please use gnu
ghostscript instead
-.endif
-
 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
Index: cups-pstoraster/files/patch-src:gxobj.h
===================================================================
RCS
file: /cvs/repos/ports/print/cups-pstoraster/files/Attic/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	26 Dec 2006 20:48:15 -0000
@@ -1,17 +0,0 @@
---- 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.
-  */
-+#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) |\
-     (obj_back_scale - 1)) + 1)
-+#else
-+#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.diff ends here ---
Comment 3 Eygene Ryabinkin 2006-12-27 09:52:40 UTC
Frank, good day!

> Here's a patch that fixes this as well as removes an unneeded file:
An unneeded file disappeared at the revision 1.3, so I don't see it
in the ports tree updated yesterday. So the second patch section is
not needed.

The first section works for me and it cures one more subtle issue:
since espgs does not need the original Ghostscript sources anymore
the warning about AFPL GS can be removed. It is not for you, Frank,
but for the possible readers of this PR.

There is a problem with the broken lines in your mail, so here is
the patch with the good lineup.

--- cups-pstoraster.diff begins here ---
--- cups-pstoraster/Makefile	6 Dec 2006 07:46:57 -0000	1.24
+++ cups-pstoraster/Makefile	26 Dec 2006 20:50:53 -0000
@@ -32,6 +32,7 @@
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
+USE_GHOSTSCRIPT_RUN= yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
@@ -44,10 +45,6 @@
 		libexec/cups/filter/pstopxl libexec/cups/filter/pstoraster \
 		share/cups/model/pxlcolor.ppd share/cups/model/pxlmono.ppd
 
-.ifdef(WITH_GHOSTSCRIPT_AFPL)
-IGNORE=		doesn't build with AFPL version of Ghostscript; please use gnu ghostscript instead
-.endif
-
 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
--- cups-pstoraster.diff ends here ---

But there is another problem: espgs and ghostscript-gpl are installing
Their files into the same places, so they remove each other's files
upon reinstallation. May be one should rename shared directory to
PREFIX/share/espgs/GS_VERSION? I am attaching the patch that does
such change. It should applied on top of the previous patch. And
the patch works for me ;)

Additionally it fixes the double-counted files in the pkg-plist
(those already in the PLIST_FILES). And it exchanges SED to REINPLACE_CMD
for building 'pstopxl' and 'pstoraster' utilities: espgs's Makefile
produces these files from their '.in' templates at the end of the
configure stage, so the editing on the post-patch stage that transforms
'psto{pxl,raster}.in' files 'psto{pxl,raster}' effectively does nothing.

--- relocate-espgs-fix-pkglist.diff begins here ---
--- Makefile.orig	Wed Dec 27 10:32:03 2006
+++ Makefile	Wed Dec 27 12:31:01 2006
@@ -28,10 +28,11 @@
 DISTNAME=	espgs-${ESPGS_VER}-source
 WRKSRC=		${WRKDIR}/espgs-${PORTVERSION}
 
-DATADIR=	${TARGETDIR}/share/ghostscript
+DATADIR=	${TARGETDIR}/share/espgs
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
+# We need just ghostscript fonts, nothing more
 USE_GHOSTSCRIPT_RUN= yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -53,15 +54,19 @@
 	${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 ; \
+	${REINPLACE_CMD} -e 's:@prefix@:${PREFIX}:g ; \
 		 s:@exec_prefix@:${PREFIX}:g ; \
 		 s:@bindir@:${PREFIX}/bin:g ; \
-		 s:@GS@:espgs:g' \
-		${WRKSRC}/pstoraster/${file}.in > ${WRKSRC}/pstoraster/${file}
+		 s:@GS@:espgs:g ; \
+		 s|^GS_LIB="|GS_LIB="${PREFIX}/share/ghostscript/fonts:|' \
+		${WRKSRC}/pstoraster/${file}.in
 .endfor
 	${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS=@CPPFLAGS@ |g ; \
 		 s|^LDFLAGS=|LDFLAGS=@LDFLAGS@ |g ; \
-		 s|^DEVICE_DEVS|#DEVICE_DEVS|g' ${WRKSRC}/Makefile.in
+		 s|^DEVICE_DEVS|#DEVICE_DEVS|g ; \
+		 s|^gssharedir = @libdir@/ghostscript|gssharedir = @libdir@/espgs| ; \
+		 s|^gsdir = @datadir@/ghostscript|gsdir = @datadir@/espgs|' \
+		 ${WRKSRC}/Makefile.in
 
 pre-build:
 	${MKDIR} ${WRKSRC}/bin
--- pkg-plist.old	Wed Dec 27 10:21:51 2006
+++ pkg-plist	Wed Dec 27 11:28:40 2006
@@ -1,4 +1,3 @@
-bin/espgs
 %%DATADIR%%/%%GS_VERSION%%/lib/Fontmap
 %%DATADIR%%/%%GS_VERSION%%/lib/Fontmap.GS
 %%DATADIR%%/%%GS_VERSION%%/lib/cidfmap
@@ -137,7 +136,6 @@
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_wl1_e.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_wl2_e.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_wl5_e.ps
-%%DATADIR%%/%%GS_VERSION%%/lib/pdf2dsc.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/pdf_base.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/pdf_draw.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/pdf_font.ps
@@ -145,7 +143,6 @@
 %%DATADIR%%/%%GS_VERSION%%/lib/pdf_ops.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/pdf_rbld.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/pdf_sec.ps
-%%DATADIR%%/%%GS_VERSION%%/lib/pdfopt.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/pdfwrite.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/cbjc600.ppd
 %%DATADIR%%/%%GS_VERSION%%/lib/cbjc800.ppd
@@ -465,19 +462,13 @@
 %%DATADIR%%/%%GS_VERSION%%/lib/s400b1.upp
 %%DATADIR%%/%%GS_VERSION%%/lib/sharp.upp
 %%DATADIR%%/%%GS_VERSION%%/lib/stc740ih.upp
-libexec/cups/filter/pstoraster
-libexec/cups/filter/pstopxl
-etc/cups/pstoraster.convs
-share/cups/model/pxlcolor.ppd
-share/cups/model/pxlmono.ppd
 @dirrm %%DATADIR%%/%%GS_VERSION%%/lib/cjkv/
 @dirrm %%DATADIR%%/%%GS_VERSION%%/lib/
-@dirrm %%DATADIR%%/%%GS_VERSION%%/lib
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/Decoding
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/ColorSpace
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/CMap
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource
-@dirrmtry %%DATADIR%%/%%GS_VERSION%%
+@dirrm %%DATADIR%%/%%GS_VERSION%%
 @dirrmtry %%DATADIR%%
 @dirrmtry libexec/cups/filter
 @dirrmtry libexec/cups
--- relocate-espgs-fix-pkglist.diff ends here ---

I've tested it on my local server with ghostscript-gpl installed:
it works fine either for CUPS test page and the ordinary printing of
Postscript and PDF files. Please, test it further!
-- 
Eygene
Comment 4 frank 2006-12-27 17:50:28 UTC
Thanks Eygene.  I've taken your patch and massaged it a bit to remove
the PLIST_FILES from the Makefile entirely and to bump the portrevision,
since the port now installs its files in a different place.  The new
patch is below; I've tested it and it seems to work fine, although
further feedback is always good.

Eygene, if you want to take maintainership of cups-pstoraster, by the
way, that would be fine with me.  I only took it because it had been
orphaned and I wanted to update it.  You definitely seem interested,
though, and if you will be following the release cycle and continuing to
update it, I urge you to consider taking maintainership.

Regardless, thanks for your work.

--- cups-pstoraster.diff begins here ---
Index: cups-pstoraster/Makefile
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- cups-pstoraster/Makefile	6 Dec 2006 07:46:57 -0000	1.24
+++ cups-pstoraster/Makefile	27 Dec 2006 17:36:22 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	cups-pstoraster
 PORTVERSION=	8.15.3
+PORTREVISION=	1
 CATEGORIES=	print
 MASTER_SITES=	\
 	ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/%SUBDIR%/ \
@@ -28,10 +29,12 @@
 DISTNAME=	espgs-${ESPGS_VER}-source
 WRKSRC=		${WRKDIR}/espgs-${PORTVERSION}
 
-DATADIR=	${TARGETDIR}/share/ghostscript
+DATADIR=	${TARGETDIR}/share/espgs
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
+# We just need the ghostscript fonts, nothing more
+USE_GHOSTSCRIPT_RUN= yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
@@ -40,13 +43,6 @@
 MAKE_ARGS=	CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
 		DEVICE_DEVS="\$$(DD)cups.dev \$$(DD)pxlcolor.dev \$$(DD)pxlmono.dev"
 PLIST_SUB=	GS_VERSION="${GS_VERSION}"
-PLIST_FILES=	bin/espgs etc/cups/pstoraster.convs \
-		libexec/cups/filter/pstopxl libexec/cups/filter/pstoraster \
-		share/cups/model/pxlcolor.ppd share/cups/model/pxlmono.ppd
-
-.ifdef(WITH_GHOSTSCRIPT_AFPL)
-IGNORE=		doesn't build with AFPL version of Ghostscript; please use gnu
ghostscript instead
-.endif
 
 pre-configure:
 	${RM} -f ${WRKSRC}/ijs/config.guess ${WRKSRC}/ijs/missing
${WRKSRC}/ijs/config.sub ${WRKSRC}/ijs/install-sh
${WRKSRC}/ijs/ltmain.sh
@@ -56,15 +52,19 @@
 	${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 ; \
+	${REINPLACE_CMD} -e 's:@prefix@:${PREFIX}:g ; \
 		 s:@exec_prefix@:${PREFIX}:g ; \
 		 s:@bindir@:${PREFIX}/bin:g ; \
-		 s:@GS@:espgs:g' \
-		${WRKSRC}/pstoraster/${file}.in > ${WRKSRC}/pstoraster/${file}
+		 s:@GS@:espgs:g ; \
+		 s|^GS_LIB="|GS_LIB="${PREFIX}/share/ghostscript/fonts:|' \
+		 ${WRKSRC}/pstoraster/${file}.in
 .endfor
 	${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS=@CPPFLAGS@ |g ; \
 		 s|^LDFLAGS=|LDFLAGS=@LDFLAGS@ |g ; \
-		 s|^DEVICE_DEVS|#DEVICE_DEVS|g' ${WRKSRC}/Makefile.in
+		 s|^DEVICE_DEVS|#DEVICE_DEVS|g ; \
+		 s|^gssharedir = @libdir@/ghostscript|gssharedir = @libdir@/espgs| ;
\
+		 s|^gsdir = @datadir@/ghostscript|gsdir = @datadir@/espgs|' \
+		 ${WRKSRC}/Makefile.in
 
 pre-build:
 	${MKDIR} ${WRKSRC}/bin
Index: cups-pstoraster/pkg-plist
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/pkg-plist,v
retrieving revision 1.3
diff -u -r1.3 pkg-plist
--- cups-pstoraster/pkg-plist	6 Dec 2006 07:46:57 -0000	1.3
+++ cups-pstoraster/pkg-plist	27 Dec 2006 17:39:07 -0000
@@ -63,8 +63,6 @@
 %%DATADIR%%/%%GS_VERSION%%/lib/wftopfa.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/wrfont.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/zeroline.ps
-%%DATADIR%%/%%GS_VERSION%%/lib/pdf2dsc.ps
-%%DATADIR%%/%%GS_VERSION%%/lib/pdfopt.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_agl.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_btokn.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_ccfnt.ps
@@ -470,14 +468,13 @@
 etc/cups/pstoraster.convs
 share/cups/model/pxlcolor.ppd
 share/cups/model/pxlmono.ppd
-@dirrm %%DATADIR%%/%%GS_VERSION%%/lib/cjkv/
-@dirrm %%DATADIR%%/%%GS_VERSION%%/lib/
+@dirrm %%DATADIR%%/%%GS_VERSION%%/lib/cjkv
 @dirrm %%DATADIR%%/%%GS_VERSION%%/lib
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/Decoding
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/ColorSpace
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/CMap
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource
-@dirrmtry %%DATADIR%%/%%GS_VERSION%%
+@dirrm %%DATADIR%%/%%GS_VERSION%%
 @dirrmtry %%DATADIR%%
 @dirrmtry libexec/cups/filter
 @dirrmtry libexec/cups
--- cups-pstoraster.diff ends here ---
-- 
Frank Mayhar frank@exit.com     http://www.exit.com/
Exit Consulting                 http://www.gpsclock.com/
                                http://www.exit.com/blog/frank/
Comment 5 Eygene Ryabinkin 2006-12-28 07:48:50 UTC
Frank, good day!

> Thanks Eygene.  I've taken your patch and massaged it a bit to remove
> the PLIST_FILES from the Makefile entirely and to bump the portrevision,
> since the port now installs its files in a different place.  The new
> patch is below; I've tested it and it seems to work fine, although
> further feedback is always good.

Broken lines again, but otherwise the patch is very good: it applies
cleanly to the port files cvsupped today, cups-pstoraster builds and
works fine. The same patch without broken lines is attached again,
just for the record.

> Eygene, if you want to take maintainership of cups-pstoraster, by the
> way, that would be fine with me.  I only took it because it had been
> orphaned and I wanted to update it.  You definitely seem interested,
> though, and if you will be following the release cycle and continuing to
> update it, I urge you to consider taking maintainership.

OK, I will try to maintain it, thanks! Should I sign something? ;)))

Thanks for your work!

--- cups-pstoraster.diff begins here ---
Index: cups-pstoraster/Makefile
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- cups-pstoraster/Makefile	6 Dec 2006 07:46:57 -0000	1.24
+++ cups-pstoraster/Makefile	27 Dec 2006 17:36:22 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	cups-pstoraster
 PORTVERSION=	8.15.3
+PORTREVISION=	1
 CATEGORIES=	print
 MASTER_SITES=	\
 	ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/%SUBDIR%/ \
@@ -28,10 +29,12 @@
 DISTNAME=	espgs-${ESPGS_VER}-source
 WRKSRC=		${WRKDIR}/espgs-${PORTVERSION}
 
-DATADIR=	${TARGETDIR}/share/ghostscript
+DATADIR=	${TARGETDIR}/share/espgs
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
+# We just need the ghostscript fonts, nothing more
+USE_GHOSTSCRIPT_RUN= yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
@@ -40,13 +43,6 @@
 MAKE_ARGS=	CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
 		DEVICE_DEVS="\$$(DD)cups.dev \$$(DD)pxlcolor.dev \$$(DD)pxlmono.dev"
 PLIST_SUB=	GS_VERSION="${GS_VERSION}"
-PLIST_FILES=	bin/espgs etc/cups/pstoraster.convs \
-		libexec/cups/filter/pstopxl libexec/cups/filter/pstoraster \
-		share/cups/model/pxlcolor.ppd share/cups/model/pxlmono.ppd
-
-.ifdef(WITH_GHOSTSCRIPT_AFPL)
-IGNORE=		doesn't build with AFPL version of Ghostscript; please use gnu ghostscript instead
-.endif
 
 pre-configure:
 	${RM} -f ${WRKSRC}/ijs/config.guess ${WRKSRC}/ijs/missing ${WRKSRC}/ijs/config.sub ${WRKSRC}/ijs/install-sh ${WRKSRC}/ijs/ltmain.sh
@@ -56,15 +52,19 @@
 	${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 ; \
+	${REINPLACE_CMD} -e 's:@prefix@:${PREFIX}:g ; \
 		 s:@exec_prefix@:${PREFIX}:g ; \
 		 s:@bindir@:${PREFIX}/bin:g ; \
-		 s:@GS@:espgs:g' \
-		${WRKSRC}/pstoraster/${file}.in > ${WRKSRC}/pstoraster/${file}
+		 s:@GS@:espgs:g ; \
+		 s|^GS_LIB="|GS_LIB="${PREFIX}/share/ghostscript/fonts:|' \
+		 ${WRKSRC}/pstoraster/${file}.in
 .endfor
 	${REINPLACE_CMD} -e 's|^CFLAGS=|CFLAGS=@CPPFLAGS@ |g ; \
 		 s|^LDFLAGS=|LDFLAGS=@LDFLAGS@ |g ; \
-		 s|^DEVICE_DEVS|#DEVICE_DEVS|g' ${WRKSRC}/Makefile.in
+		 s|^DEVICE_DEVS|#DEVICE_DEVS|g ; \
+		 s|^gssharedir = @libdir@/ghostscript|gssharedir = @libdir@/espgs| ; \
+		 s|^gsdir = @datadir@/ghostscript|gsdir = @datadir@/espgs|' \
+		 ${WRKSRC}/Makefile.in
 
 pre-build:
 	${MKDIR} ${WRKSRC}/bin
Index: cups-pstoraster/pkg-plist
===================================================================
RCS file: /cvs/repos/ports/print/cups-pstoraster/pkg-plist,v
retrieving revision 1.3
diff -u -r1.3 pkg-plist
--- cups-pstoraster/pkg-plist	6 Dec 2006 07:46:57 -0000	1.3
+++ cups-pstoraster/pkg-plist	27 Dec 2006 17:39:07 -0000
@@ -63,8 +63,6 @@
 %%DATADIR%%/%%GS_VERSION%%/lib/wftopfa.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/wrfont.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/zeroline.ps
-%%DATADIR%%/%%GS_VERSION%%/lib/pdf2dsc.ps
-%%DATADIR%%/%%GS_VERSION%%/lib/pdfopt.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_agl.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_btokn.ps
 %%DATADIR%%/%%GS_VERSION%%/lib/gs_ccfnt.ps
@@ -470,14 +468,13 @@
 etc/cups/pstoraster.convs
 share/cups/model/pxlcolor.ppd
 share/cups/model/pxlmono.ppd
-@dirrm %%DATADIR%%/%%GS_VERSION%%/lib/cjkv/
-@dirrm %%DATADIR%%/%%GS_VERSION%%/lib/
+@dirrm %%DATADIR%%/%%GS_VERSION%%/lib/cjkv
 @dirrm %%DATADIR%%/%%GS_VERSION%%/lib
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/Decoding
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/ColorSpace
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource/CMap
 @dirrm %%DATADIR%%/%%GS_VERSION%%/Resource
-@dirrmtry %%DATADIR%%/%%GS_VERSION%%
+@dirrm %%DATADIR%%/%%GS_VERSION%%
 @dirrmtry %%DATADIR%%
 @dirrmtry libexec/cups/filter
 @dirrmtry libexec/cups
--- cups-pstoraster.diff ends here ---
-- 
Eygene
Comment 6 Ion-Mihai "IOnut" Tetcu freebsd_committer 2006-12-28 18:02:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

I'll take it.
Comment 7 dfilter service freebsd_committer 2006-12-28 19:00:35 UTC
itetcu      2006-12-28 19:00:15 UTC

  FreeBSD ports repository

  Modified files:
    print/cups-pstoraster Makefile pkg-plist 
  Log:
  - RUN_DEPEND on Ghostscript which besides bringing in some needed fonts also
  takes care of the breakage with AFL Ghostscript version.
  - take care to make espgs and ghostscript-gpl not install files into the same
  places
  - bump PORTREVISION for above
  - pass maintianership to submitter, Eygene Ryabinkin.
  
  PR:             ports/107207
  Submitted by:   Eygene Ryabinkin
  Approved by:    Frank Mayhar (formaer maintaner)
  
  Revision  Changes    Path
  1.25      +18 -23    ports/print/cups-pstoraster/Makefile
  1.4       +2 -5      ports/print/cups-pstoraster/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 Ion-Mihai "IOnut" Tetcu freebsd_committer 2006-12-28 19:01:06 UTC
State Changed
From-To: feedback->closed

Commited, including the maintianership change; thanks to both of you for 
your work!
Comment 9 frank 2006-12-28 19:03:18 UTC
The last patch can be committed, it seems to do the job.  Thanks!
-- 
Frank Mayhar frank@exit.com     http://www.exit.com/
Exit Consulting                 http://www.gpsclock.com/
                                http://www.exit.com/blog/frank/