ports/107207: cups-pstoraster misses PostScript fonts
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Wed Dec 27 10:30:27 UTC 2006
The following reply was made to PR ports/107207; it has been noted by GNATS.
From: Eygene Ryabinkin <rea-fbsd at codelabs.ru>
To: Frank Mayhar <frank at exit.com>
Cc: bug-followup at FreeBSD.org
Subject: Re: ports/107207: cups-pstoraster misses PostScript fonts
Date: Wed, 27 Dec 2006 12:52:40 +0300
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/
- at 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
- at dirrmtry %%DATADIR%%/%%GS_VERSION%%
+ at 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
More information about the freebsd-ports-bugs
mailing list