aboutsummaryrefslogtreecommitdiffstats
path: root/print/ghostscript-gnu-commfont
diff options
context:
space:
mode:
authormita <mita@FreeBSD.org>2002-01-18 23:23:54 +0800
committermita <mita@FreeBSD.org>2002-01-18 23:23:54 +0800
commit12d2dd9b91fcd7e09b0b0cfccc80b8ac418b3ccd (patch)
treea9e0ee394e2ecb5bc3149eb955474d3b3e481a26 /print/ghostscript-gnu-commfont
parentdba58398c02942c6cf1d92e8e51f98182f1db7aa (diff)
downloadfreebsd-ports-graphics-12d2dd9b91fcd7e09b0b0cfccc80b8ac418b3ccd.tar.gz
freebsd-ports-graphics-12d2dd9b91fcd7e09b0b0cfccc80b8ac418b3ccd.tar.zst
freebsd-ports-graphics-12d2dd9b91fcd7e09b0b0cfccc80b8ac418b3ccd.zip
Add ghostscript-gnu-cjk 6.52,
gNU Postscript interpreter CJK fonts adding port. This is a GNU version of ghostscript with features below: 1. CJK internationalization ready. 2. Depends on print/ghostscript-gnu and replace only necessary files. 3. -DA4 default as is standard in CJK countries. 4. Includes many additional printer drivers sold in japan. PR: ports/33116 Submitted by: Tomokatsu SAITO <saito@a2z.co.jp>
Diffstat (limited to 'print/ghostscript-gnu-commfont')
-rw-r--r--print/ghostscript-gnu-commfont/Makefile388
-rw-r--r--print/ghostscript-gnu-commfont/distinfo13
-rw-r--r--print/ghostscript-gnu-commfont/files/CIDFnmaps.patch100
-rw-r--r--print/ghostscript-gnu-commfont/files/gs_cidcm.ps.patch25
-rw-r--r--print/ghostscript-gnu-commfont/files/gs_res.ps.patch28
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-gdev10v.mak.patch22
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-gdevalps:gdevalps.mak25
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-gdevlips:gdevlips.mak30
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-gdevmd2k.mak.patch19
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-gdevmjc.c335
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-gdevmjc.mak43
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-src:gdevlbp8.c70
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-src:gdevxini.c14
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-src:genarch.c34
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-src:gp_unifs.c60
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-src:unix-gcc.mak163
-rw-r--r--print/ghostscript-gnu-commfont/files/patch-src:zmedia2.c25
-rw-r--r--print/ghostscript-gnu-commfont/pkg-comment1
-rw-r--r--print/ghostscript-gnu-commfont/pkg-descr12
-rw-r--r--print/ghostscript-gnu-commfont/pkg-plist526
-rw-r--r--print/ghostscript-gnu-commfont/scripts/configure252
-rw-r--r--print/ghostscript-gnu-commfont/scripts/configure.batch14
22 files changed, 2199 insertions, 0 deletions
diff --git a/print/ghostscript-gnu-commfont/Makefile b/print/ghostscript-gnu-commfont/Makefile
new file mode 100644
index 00000000000..46e086dc154
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/Makefile
@@ -0,0 +1,388 @@
+# New ports collection makefile for: ghostscript-cjk
+# Date created: Dec 24 2001
+# Whom: Tomokatsu SAITO <saito@a2z.co.jp>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ghostscript
+PORTVERSION= 6.52
+CATEGORIES= print
+MASTER_SITES= ftp://ftp.gyve.org/pub/gs-cjk/M2/ \
+ ftp://ftp.gyve.org/pub/gs-cjk/ \
+ ${GPRINT_SITE} ${HPIJS_SITE} ${NPDL_SITE} ${EPAG_SITE} \
+ ${ALPS_SITE} ${LIPS_SITE} ${EPLASER_SITE} \
+ ${MASTER_SITE_GNU} \
+ ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+PKGNAMESUFFIX= -gnu-cjk
+DISTFILES= ${GS_SRC} ${GS_CJK_PATCH} ${CMAP} ${CJKFONTS} \
+ ${GPRINT_SRC} ${HPIJS_SRC} ${NPDL_SRC} ${EPAG_SRC} \
+ ${ALPS_SRC} ${LIPS_SRC} ${EPLASER_SRC} ${BJ_SRC} ${MD2K_SRC} \
+ ${MJC_SRC}
+DIST_SUBDIR= ghostscript
+EXTRACT_ONLY= ${GS_SRC}
+
+MAINTAINER= saito@a2z.co.jp
+
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/graphics/jpeg:extract
+LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
+RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu
+
+USE_BZIP2= yes
+USE_XLIB= yes
+USE_GMAKE= yes
+MAKE_ENV= CC="${CC}" CXX="${CXX}" XCFLAGS="${XCFLAGS}"
+MAKEFILE= src/unix-gcc.mak
+PLIST_SUB= GS_VERSION=${PORTVERSION}
+
+XCFLAGS= -DUPD_SIGNAL=0
+
+GS_SRC= ${DISTNAME}${EXTRACT_SUFX}
+GS_CJK= gs6.51-cjk-M2-R3
+GS_CJK_PATCH= ${GS_CJK}.tar.gz
+CMAP= adobe-cmaps-200109.tar.gz
+RESOURCE= ${DATADIR}/Resource
+PRINTER_DOC= ${DOCSDIR}/${PORTVERSION}/printers
+
+CJKLIB= CIDFnmap.ARP CIDFnmap.Bae CIDFnmap.CJK CIDFnmap.Koc \
+ CIDFnmap.Ore CIDFnmap.Sol CIDFnmap
+CJKLIB2= gs_cff.ps gs_cidfn.ps gs_cmap.ps gs_init.ps gs_ttf.ps
+CJKLIB3= gs_cidcm.ps gs_res.ps
+
+CJKEXM= all_ac1.ps gscjk_ac.ps all_ag1.ps gscjk_ag.ps all_aj1.ps \
+ gscjk_aj.ps all_aj2.ps gscjk_ak.ps all_ak1.ps iso2022.ps
+
+################# Printer driver stuffs #################
+# GPRINT, HPIJS, CONTRIB_UPP are taken from print/ghostscript-gnu
+# Other printer drivers are for those sold in Japan.
+# Addition for Chinese, Korean printers are welcome.
+#
+# gimp-print - very high quality driver for Epson, HPs,...
+GPRINT= gimp-print
+GPRINT_VERS= 4.2.0
+GPRINT_NAME= ${GPRINT}-${GPRINT_VERS}
+GPRINT_SRC= ${GPRINT_NAME}.tar.gz
+GPRINT_SITE= ${MASTER_SITE_SOURCEFORGE:S,%SUBDIR%,gimp-print,}
+
+# HPinkjet - HP developed printer driver for PhotoSmart/DeskJet series
+HPIJS= hpijs
+HPIJS_VERS= 1.0
+HPIJS_NAME= ${HPIJS}-${HPIJS_VERS}
+HPIJS_SRC= ${HPIJS_NAME}.tar.gz
+HPIJS_SITE= ${MASTER_SITE_SOURCEFORGE:S,%SUBDIR%,hpinkjet,}
+
+# contributed uniprint profiles
+CONTRIB_UPP= lqx70ch.upp lqx70cl.upp lqx70cm.upp \
+ stc740ih.upp stc740p.upp stc740pl.upp
+
+# NPDL - NEC Printer Description Language driver
+NPDL= gdevnpdl
+NPDL_VERS= 1.6.3
+NPDL_NAME= ${NPDL}-${NPDL_VERS}
+NPDL_SRC= ${NPDL_NAME}.tar.gz
+NPDL_SITE= http://www.ceres.dti.ne.jp/~owatanab/gdevnpdl/
+
+# EPAG - Epson ESC/Page Language driver
+EPAG= epag
+EPAG_VERS= 3.09
+EPAG_NAME= ${EPAG}-${EPAG_VERS}
+EPAG_SRC= ${EPAG_NAME}.tar.gz
+EPAG_SITE= http://www.humblesoft.com/pub/
+
+# ALPS - Alps MD-5000 printer driver
+ALPS= gdevalps
+ALPS_VERS= 0.2
+ALPS_NAME= ${ALPS}-${ALPS_VERS}
+ALPS_SRC= ${ALPS}-0.21.tar.gz
+ALPS_SITE= ${MASTER_SITE_PORTS_JP}
+
+# LIPS - Canon LIPS II+/III/IVc/IV printer driver
+LIPS= gdevlips
+LIPS_VERS= 2.4.0
+LIPS_NAME= ${LIPS}-${LIPS_VERS}
+LIPS_SRC= ${LIPS_NAME}.tar.gz
+LIPS_SITE= ${MASTER_SITE_PORTS_JP}
+
+# EPLASER - Epson Kowa developed printer driver for ESC/Page Laser printers
+EPLASER= eplaser
+EPLASER_VERS= 3.0.1
+EPLASER_NAME= ${EPLASER}-${EPLASER_VERS}
+EPLASER_SRC= ${EPLASER_NAME}-651.tgz
+EPLASER_SITE= http://www.epkowa.on.arena.ne.jp/pips/data/gs65_301/
+
+# bj10v driver
+BJ= gdev10v
+BJ_NAME= ${BJ}
+BJ_SRC= ${BJ_NAME}.tar.gz
+
+# md2k driver
+MD2K= gdevmd2k
+MD2K_VERS= 0.2a
+MD2K_NAME= ${MD2K}-${MD2K_VERS}
+MD2K_SRC= ${MD2K_NAME}.tar.gz
+
+# mjc driver
+MJC= gdevmjc
+MJC_VERS= 0.8
+MJC_NAME= ${MJC}-${MJC_VERS}
+MJC_SRC= ${MJC_NAME}.tar.gz
+
+.if defined(NO_A4)
+.else
+XCFLAGS+= -DA4
+.endif
+
+pre-fetch:
+.if !defined(NO_A4)
+ @${ECHO_MSG} "Type \"make NO_A4=yes\" if you want not set A4 paper default."
+.endif
+
+.SILENT:
+
+post-extract:
+ ${ECHO_MSG} ">>> in post-extract ..."
+ ${LN} -sf `cd ${PORTSDIR}/graphics/jpeg && ${MAKE} -V WRKSRC` \
+ ${WRKSRC}/jpeg
+ ${TAR} -C ${WRKDIR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${GS_CJK_PATCH}
+ cd ${WRKDIR}/${GS_CJK} ; \
+ ${RM} -f src_time_.h.patch src_unix-gcc.mak.patch
+# ** 3rd party driver **
+# Note: don't forget to add those devices in scripts/configure and
+# configure.batch, which update unix-gcc.mak to build gs with these
+# new devices !
+#
+# for Gimp-Print driver
+ ${ECHO_MSG} ">>> extracting ${GPRINT_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${GPRINT_SRC}
+# for HPinkjet driver
+ ${ECHO_MSG} ">>> extracting ${HPIJS_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${HPIJS_SRC}
+# for NPDL driver
+ ${ECHO_MSG} ">>> extracting ${NPDL_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${NPDL_SRC}
+# for EPAG driver
+ ${ECHO_MSG} ">>> extracting ${EPAG_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${EPAG_SRC}
+# for ALPS driver
+ ${ECHO_MSG} ">>> extracting ${ALPS_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${ALPS_SRC}
+ ${LN} -sf ${ALPS_NAME} ${WRKSRC}/${ALPS}
+# for LIPS driver
+ ${ECHO_MSG} ">>> extracting ${LIPS_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${LIPS_SRC}
+ ${LN} -sf ${LIPS_NAME} ${WRKSRC}/${LIPS}
+# for EPLASER driver
+ ${ECHO_MSG} ">>> extracting ${EPLASER_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${EPLASER_SRC}
+# for bj10v driver
+ ${ECHO_MSG} ">>> extracting ${BJ_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${_DISTDIR}/${BJ_SRC}
+ ${CP} ${WRKSRC}/${BJ_NAME}/gdev10v.c ${WRKSRC}/src
+# for md2k driver
+ ${ECHO_MSG} ">>> extracting ${MD2K_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${_DISTDIR}/${MD2K_SRC}
+ ${CP} ${WRKSRC}/${MD2K_NAME}/gdevmd2k.c ${WRKSRC}/src
+# for mjc driver
+ ${ECHO_MSG} ">>> extracting ${MJC_SRC} ..."
+ ${TAR} -C ${WRKSRC} -xzf ${_DISTDIR}/${MJC_SRC}
+ ${CP} ${WRKSRC}/${MJC_NAME}/*.[ch] ${WRKSRC}/src
+
+post-patch:
+ ${ECHO_MSG} ">>> in post-patch ..."
+ ${ECHO_MSG} ">>> applying gs-cjk patchset ..."
+ ${CAT} ${WRKDIR}/${GS_CJK}/src*patch | ${PATCH} -s -p0 -d ${WRKSRC}
+.for i in ${CJKLIB} ${CJKLIB2}
+ ${PATCH} -s -d ${WRKSRC}/lib < ${WRKDIR}/${GS_CJK}/lib_${i}.patch
+.endfor
+.for i in ${CJKLIB3}
+ ${PATCH} -s -d ${WRKSRC}/lib < ${FILESDIR}/${i}.patch
+.endfor
+.for i in ${CJKEXM}
+ ${PATCH} -s -d ${WRKSRC}/examples < \
+ ${WRKDIR}/${GS_CJK}/examples_${i}.patch
+.endfor
+# for HPinkjet driver
+ find ${WRKSRC}/${HPIJS_NAME} -name '*.h' | xargs ${PERL} -pi -e \
+ 's|#include <malloc.h>||g'
+
+pre-configure:
+ ${ECHO_MSG} ">>> in pre-configure ..."
+ ${PERL} -pi -e 's|^DEVICE_DEVS|#DEVICE_DEVS|g' \
+ ${WRKSRC}/src/unix-gcc.mak
+# for Gimp-Print driver
+ ${ECHO_MSG} ">>> adding ${GPRINT} driver to contrib.mak ..."
+ ${CAT} ${PORTSDIR}/print/ghostscript-gnu/files/stp.contrib.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for HPinkjet driver
+ ${ECHO_MSG} ">>> adding ${HPIJS} driver to contrib.mak ..."
+ ${CAT} ${PORTSDIR}/print/ghostscript-gnu/files/hpijs.contrib.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for NPDL driver
+ ${ECHO_MSG} ">>> adding ${NPDL} driver to contrib.mak ..."
+ ${CAT} ${WRKSRC}/${NPDL_NAME}/gdevnpdl.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for EPAG driver
+ ${ECHO_MSG} ">>> adding ${EPAG} driver to contrib.mak ..."
+ ${SED} -e 's:npdl:epag:g' ${WRKSRC}/${NPDL_NAME}/gdevnpdl.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for ALPS driver
+ ${ECHO_MSG} ">>> adding ${ALPS} driver to contrib.mak ..."
+ ${CAT} ${WRKSRC}/${ALPS_NAME}/gdevalps.mak-5.50 \
+ >> ${WRKSRC}/src/contrib.mak
+# for LIPS driver
+ ${CAT} ${WRKSRC}/${LIPS_NAME}/gdevlips.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for EPLASER driver
+ ${CAT} ${WRKSRC}/${EPLASER_NAME}/gdevescv6.mak \
+ >> ${WRKSRC}/src/contrib.mak
+ ${CAT} ${WRKSRC}/${EPLASER_NAME}/gdevesmv6.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for bj10v driver
+ ${ECHO_MSG} ">>> adding ${BJ} driver to contrib.mak ..."
+ ${CAT} ${WRKSRC}/${BJ_NAME}/gdev10v.mak \
+ >> ${WRKSRC}/src/contrib.mak
+# for md2k driver
+ ${ECHO_MSG} ">>> adding ${MD2K} driver to contrib.mak ..."
+ ${CAT} ${WRKSRC}/${MD2K_NAME}/gdevmd2k.mak-5.50 \
+ >> ${WRKSRC}/src/contrib.mak
+# for mjc driver
+ ${ECHO_MSG} ">>> adding ${MJC} driver to contrib.mak ..."
+ ${CAT} ${WRKSRC}/${MJC_NAME}/gdevmjc.mak \
+ >> ${WRKSRC}/src/contrib.mak
+
+do-configure:
+ ${ECHO_MSG} ">>> in do-configure ..."
+.if defined(BATCH) || defined(PACKAGE_BUILDING)
+ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.batch
+.else
+ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure
+.endif
+
+post-configure:
+ ${ECHO_MSG} ">>> in post-configure ..."
+# for Gimp-Print driver
+ ${ECHO_MSG} ">>> running configure script for ${GPRINT} driver ..."
+ cd ${WRKSRC}/${GPRINT_NAME} ; \
+ ${SETENV} ${MAKE_ENV} ${SH} ./configure \
+ --without-cups --without-translated-ppds \
+ --with-ghost --without-foomatic \
+ --without-gimp --without-samples \
+ --without-user-guide --disable-escputil \
+ --disable-nls --disable-shared \
+ --prefix=${PREFIX}
+
+pre-build:
+ ${ECHO_MSG} ">>> in pre-build ..."
+ ${ECHO_MSG} ">>> creating directories for compilation ..."
+ ${MKDIR} ${WRKSRC}/obj
+ ${MKDIR} ${WRKSRC}/bin
+# for Gimp-Print driver
+ ${ECHO_MSG} ">>> building ${GPRINT} library ..."
+ cd ${WRKSRC}/${GPRINT_NAME} ; \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} Makefile
+ ${ECHO_MSG} ">>> creating symlinks for ${GPRINT} ..."
+ ${LN} -sf ${WRKSRC}/${GPRINT_NAME}/include/gimp-print ${WRKSRC}/src
+ ${LN} -sf ${WRKSRC}/${GPRINT_NAME}/src/ghost/*.[ch] ${WRKSRC}/src
+ ${LN} -sf ${WRKSRC}/${GPRINT_NAME}/src/main/.libs/libgimpprint.a \
+ ${WRKSRC}/obj
+# for HPinkjet driver
+ ${ECHO_MSG} ">>> creating symlinks for ${HPIJS} ..."
+.for file in gdevijs.[ch] ijs.[ch] ijs_client.[ch] ijs_exec_unix.c unistd_.h
+ ${LN} -sf ${WRKSRC}/${HPIJS_NAME}/${file} ${WRKSRC}/src
+.endfor
+# for NPDL driver
+ ${ECHO_MSG} ">>> creating symlinks for ${NPDL} ..."
+ ${LN} -sf ${WRKSRC}/${NPDL_NAME}/gdevnpdl.c ${WRKSRC}/src
+# for EPAG driver
+ ${ECHO_MSG} ">>> building ert (Epson printer utility)..."
+ cd ${WRKSRC}/${EPAG_NAME} ; \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} Makefile
+ ${ECHO_MSG} ">>> creating symlinks for ${EPAG} ..."
+ ${LN} -sf ${WRKSRC}/${EPAG_NAME}/gdevepag.c ${WRKSRC}/src
+# for ALPS driver
+ ${ECHO_MSG} ">>> creating symlinks for ${ALPS} ..."
+ ${LN} -sf ${WRKSRC}/${ALPS_NAME}/gdevalps.c ${WRKSRC}/src
+# for LIPS driver
+ ${ECHO_MSG} ">>> creating symlinks for ${LIPS} ..."
+.for file in gdevlips.[ch] gdevlprn.[ch] gdevl4r.c gdevl4v.c gdevrpdl.c
+ ${LN} -sf ${WRKSRC}/${LIPS_NAME}/${file} ${WRKSRC}/src
+.endfor
+# for EPLASER driver
+ ${ECHO_MSG} ">>> creating symlinks for ${EPLASER} ..."
+.for file in gdevescv.[ch] gdevesmv.c
+ ${LN} -sf ${WRKSRC}/${EPLASER_NAME}/${file} ${WRKSRC}/src
+.endfor
+
+do-install:
+ ${ECHO_MSG} ">>> in do-install ..."
+ ${ECHO_MSG} ">>> overwriting ghostscript executable ..."
+ ${MV} ${PREFIX}/bin/gs ${PREFIX}/bin/gs.orig
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/gs ${PREFIX}/bin
+ ${ECHO_MSG} ">>> installing ert (Epson printer utility)..."
+ ${INSTALL_PROGRAM} ${WRKSRC}/${EPAG_NAME}/ert ${PREFIX}/bin
+
+ ${ECHO_MSG} ">>> installing font files ..."
+.for i in ${CJKLIB}
+ ${INSTALL_DATA} ${WRKSRC}/lib/${i} ${DATADIR}/${PORTVERSION}/lib
+.endfor
+.for i in ${CJKLIB2} ${CJKLIB3}
+ diff -c ${DATADIR}/${PORTVERSION}/lib/${i} ${WRKSRC}/lib/${i} | \
+ ${PATCH} -s -d ${DATADIR}/${PORTVERSION}/lib
+.endfor
+
+ ${ECHO_MSG} ">>> installing example files ..."
+.for i in ${CJKEXM}
+ ${INSTALL_DATA} ${WRKSRC}/examples/${i} \
+ ${DATADIR}/${PORTVERSION}/examples
+.endfor
+
+ ${ECHO_MSG} ">>> installing font resources ..."
+ ${MKDIR} ${RESOURCE}
+ ${MKDIR} ${RESOURCE}/CIDFont
+ ${MKDIR} ${RESOURCE}/Font
+ ${TAR} -C ${RESOURCE} -xzf ${DISTDIR}/${DIST_SUBDIR}/${CMAP}
+ ${TAR} -C ${RESOURCE} -xzf ${WRKDIR}/${GS_CJK}/install-cid.tar.gz
+
+# documents how to setup this package
+.if !defined(NOPORTDOCS)
+ ${ECHO_MSG} ">>> installing documents ..."
+ ${MKDIR} ${DOCSDIR}/${PORTVERSION}/CJK
+.for i in ANNOUNCE COPYING ChangeLog HACKING NEWS README.cn README.en \
+ README.jp README.kr README.tw
+ ${INSTALL_DATA} ${WRKDIR}/${GS_CJK}/${i} \
+ ${DOCSDIR}/${PORTVERSION}/CJK
+.endfor
+# EPAG documents
+ ${MKDIR} ${PRINTER_DOC}/${EPAG_NAME}
+.for i in ert.txt gdevepag.txt ChangeLog
+ ${INSTALL_DATA} ${WRKSRC}/${EPAG_NAME}/${i} \
+ ${PRINTER_DOC}/${EPAG_NAME}
+.endfor
+.for i in psprint gsepagif.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/${EPAG_NAME}/${i} \
+ ${PRINTER_DOC}/${EPAG_NAME}
+.endfor
+# NPDL document
+ ${INSTALL_DATA} ${WRKSRC}/${NPDL_NAME}/gdevnpdl.jis ${PRINTER_DOC}
+# ALPS document
+ ${INSTALL_DATA} ${WRKSRC}/${ALPS_NAME}/README.gdevalps ${PRINTER_DOC}
+# LIPS document
+ ${INSTALL_DATA} ${WRKSRC}/${LIPS_NAME}/Gdevlips.htm ${PRINTER_DOC}
+# EPLASER document
+ ${INSTALL_DATA} ${WRKSRC}/${EPLASER_NAME}/readme-eplaser-651.euc \
+ ${PRINTER_DOC}
+# bj10v document
+ ${INSTALL_DATA} ${WRKSRC}/${BJ_NAME}/gdev10v.jis ${PRINTER_DOC}
+# md2k document
+ ${INSTALL_DATA} ${WRKSRC}/${MD2K_NAME}/README.jis \
+ ${PRINTER_DOC}/README.${MD2K}
+# MJC document
+ ${MKDIR} ${PRINTER_DOC}/${MJC}
+.for i in MJ700V2C.FAQ README.mjc README.mje README.noz cpem.doc
+ ${INSTALL_DATA} ${WRKSRC}/${MJC_NAME}/${i} \
+ ${PRINTER_DOC}/${MJC}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/print/ghostscript-gnu-commfont/distinfo b/print/ghostscript-gnu-commfont/distinfo
new file mode 100644
index 00000000000..25a79b2d13e
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/distinfo
@@ -0,0 +1,13 @@
+MD5 (ghostscript/ghostscript-6.52.tar.bz2) = 5a1b698b8fbece1e23e4d8d9ff552762
+MD5 (ghostscript/gs6.51-cjk-M2-R3.tar.gz) = 6f8e90effe12527a4c3b36ea4ce47b3c
+MD5 (ghostscript/adobe-cmaps-200109.tar.gz) = 95ced0f35e107899ce11e8689e9cbdff
+MD5 (ghostscript/gimp-print-4.2.0.tar.gz) = 4350e2ac1f27eccad0d7ce2aab90cdf6
+MD5 (ghostscript/hpijs-1.0.tar.gz) = 9ec7d86d2cc2dd613f8829891b02104b
+MD5 (ghostscript/gdevnpdl-1.6.3.tar.gz) = 6c8dad13d07bbaf6e951d6d2d6b8a9f2
+MD5 (ghostscript/epag-3.09.tar.gz) = 63304a6afe44842124d2d880bf24dbe3
+MD5 (ghostscript/gdevalps-0.21.tar.gz) = 553bee251b96105eb7d1d7f4027ac0e9
+MD5 (ghostscript/gdevlips-2.4.0.tar.gz) = 89327cac37665f3fdbae0da5f2c8a89f
+MD5 (ghostscript/eplaser-3.0.1-651.tgz) = 3baf7b0ba2fea5ea354906ab43caf254
+MD5 (ghostscript/gdevmjc-0.8.tar.gz) = 228f41c3cccce22c8f477c7a9407527c
+MD5 (ghostscript/gdev10v.tar.gz) = 1486bb54c214ce215044a6c606280d73
+MD5 (ghostscript/gdevmd2k-0.2a.tar.gz) = 5ed2b4218b8f77cb411f3d2e4509ed24
diff --git a/print/ghostscript-gnu-commfont/files/CIDFnmaps.patch b/print/ghostscript-gnu-commfont/files/CIDFnmaps.patch
new file mode 100644
index 00000000000..e350c93fda5
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/CIDFnmaps.patch
@@ -0,0 +1,100 @@
+*** lib/CIDFnmap.orig Mon Jan 14 16:20:06 2002
+--- lib/CIDFnmap Mon Jan 14 16:26:34 2002
+***************
+*** 121,130 ****
+ % in particular, you must leave at least one space or tab between each
+ % field in the entry.
+
+! %(CIDFnmap.Ore) .runlibfile
+ %(CIDFnmap.ARP) .runlibfile
+ %(CIDFnmap.Bae) .runlibfile
+ %(CIDFnmap.Koc) .runlibfile
+ %(CIDFnmap.Sol) .runlibfile
+
+ %(CIDFnmap.CJK) .runlibfile
+--- 121,131 ----
+ % in particular, you must leave at least one space or tab between each
+ % field in the entry.
+
+! (CIDFnmap.Ore) .runlibfile
+ %(CIDFnmap.ARP) .runlibfile
+ %(CIDFnmap.Bae) .runlibfile
+ %(CIDFnmap.Koc) .runlibfile
+ %(CIDFnmap.Sol) .runlibfile
+
+ %(CIDFnmap.CJK) .runlibfile
++ (CIDFnmap.ports) .runlibfile
+*** lib/CIDFnmap.Ore.orig Mon Jan 14 16:29:32 2002
+--- lib/CIDFnmap.Ore Mon Jan 14 16:30:09 2002
+***************
+*** 9,18 ****
+
+ % Adobe-Japan1
+
+- /WadaGo-Bold (WadaGo-Bold) ;
+ /WadaMaruGo-Regular (WadaMaruGo-Regular) ;
+ /WadaMin-Bold (WadaMin-Bold) ;
+- /WadaMin-Regular (WadaMin-Regular) ;
+
+ % Adobe-Japan2
+
+--- 9,16 ----
+*** /dev/null Mon Jan 14 16:14:11 2002
+--- lib/CIDFnmap.ports Mon Jan 14 16:27:11 2002
+***************
+*** 0 ****
+--- 1,54 ----
++ % Japanese Truetype Fonts (Kochi)
++ /Kochi-Mincho (/usr/X11R6/lib/X11/fonts/TrueType/kochi-mincho.ttf) 1 /Adobe-Japan1 ;
++ /Kochi-Gothic (/usr/X11R6/lib/X11/fonts/TrueType/kochi-gothic.ttf) 1 /Adobe-Japan1 ;
++
++ %
++ % Fallback aliases for CJK PDF files
++ %
++ /Adobe-CNS1 /MOESung-Regular ; % CIDFnmap.Ore
++ /Adobe-Korea1 /Munhwa-Regular ; % CIDFnmap.Ore
++
++ %
++ % Convenient aliases for PS files on Traditional Chinese PostScript printer
++ %
++ /MSung-Light /MOESung-Regular ; % CIDFnmap.Ore
++ %/MSung-Medium /ShanHeiSun-Light ; % CIDFnmap.ARP
++ %/MHei-Medium /ShanHeiSun-Light ; % CIDFnmap.ARP
++ %/MHei-Medium /hei ; % CIDFnmap.Sol
++ %/MKai-Medium /ZenKai-Medium ; % CIDFnmap.ARP
++ /MKai-Medium /MOEKai-Regular ; % CIDFnmap.Ore
++
++ %
++ % Convenient aliases for PS files on Simplified Chinese PostScript printer
++ %
++ %/STSong-Light /BousungEG-Light-GB ; % CIDFnmap.ARP
++ %/STSong-Light /zycjksun ; % CIDFnmap.Sol
++ %/STFangsong-Light /zycjkfangs ; % CIDFnmap.Sol
++ %/STHeiti-Regular /zycjkhei ; % CIDFnmap.Sol
++ %/STKaiti-Regular /GBZenKai-Medium ; % CIDFnmap.ARP
++ %/STKaiti-Regular /zycjkkai ; % CIDFnmap.Sol
++
++ %
++ % Convenient aliases for PS files on Japanese PostScript printer
++ %
++ /Ryumin-Light /Kochi-Mincho ; % CIDFnmap.Koc
++ /Ryumin-Light-H /Kochi-Mincho ; % CIDFnmap.Koc
++ /Ryumin-Light-V /Kochi-Mincho ; % CIDFnmap.Koc
++ /GothicBBB-Medium /Kochi-Gothic ; % CIDFnmap.Koc
++ /GothicBBB-Medium-H /Kochi-Gothic ; % CIDFnmap.Koc
++ /GothicBBB-Medium-V /Kochi-Gothic ; % CIDFnmap.Koc
++ /HeiseiMin-W3H /WadaMin-RegularH ; % CIDFnmap.Ore
++ /HeiseiKakuGo-W5H /WadaMaruGo-RegularH ; % CIDFnmap.Ore
++
++ %
++ % Convenient aliases for PS files on Korean PostScript printer
++ %
++ /HYGoThic-Medium /MunhwaGothic-Regular ; % CIDFnmap.Ore
++ %/HYGoThic-Medium /Baekmuk-Dotum ; % CIDFnmap.Bae
++ %/HYGoThic-Medium /Gothic ; % CIDFnmap.Sol
++ /HYSMyeongJo-Medium /Munhwa-Regular ; % CIDFnmap.Ore
++ %/HYSMyeongJo-Medium /Baekmuk-Batang ; % CIDFnmap.Bae
++ %/HYSMyeongJo-Medium /Myeongjo ; % CIDFnmap.Sol
++ %/HYRGoThic-Medium /Baekmuk-Gulim ; % CIDFnmap.Bae
++ %/HYRGoThic-Medium /RoundedGothic ; % CIDFnmap.Sol
++ /HYRGoThic-Medium /MunhwaGungSeo-Bold ; % CIDFnmap.Ore
diff --git a/print/ghostscript-gnu-commfont/files/gs_cidcm.ps.patch b/print/ghostscript-gnu-commfont/files/gs_cidcm.ps.patch
new file mode 100644
index 00000000000..4bea4d3e1c8
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/gs_cidcm.ps.patch
@@ -0,0 +1,25 @@
+--- lib/gs_cidcm.ps.orig Sun Jul 1 17:57:04 2001
++++ lib/gs_cidcm.ps Sun Dec 23 02:05:48 2001
+@@ -164,7 +164,21 @@
+ { (r) file % CSIs /InstName g [ file
+ //GetCIDSystemInfoFromFile exec % CSIs /InstName g [ CSI
+ } stopped {
+- cleartomark //.prs_empty
++ % Cannot find file from Resource directory
++ cleartomark
++ % Try to find file from CIDFontmap
++ % Stack: CSIs /InstName g
++ 1 index dup .CIDFontmapKnownget {
++ % Stack: CSIs /InstName g /InstName ValueInCIDFontmap
++ % We do look at CIDFontmap in global space.
++ % (When stopped, the space is set to local.)
++ true setglobal
++ 1 index 3 1 roll
++ .CIDFontmapRunHandler
++ /CIDFont findresource /CIDSystemInfo get
++ } {
++ pop //.prs_empty
++ } ifelse
+ } {
+ exch pop
+ } ifelse % CSIs /InstName g CSI
diff --git a/print/ghostscript-gnu-commfont/files/gs_res.ps.patch b/print/ghostscript-gnu-commfont/files/gs_res.ps.patch
new file mode 100644
index 00000000000..0119f16f220
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/gs_res.ps.patch
@@ -0,0 +1,28 @@
+--- lib/gs_res.ps.orig Mon Jul 16 01:09:41 2001
++++ lib/gs_res.ps Sun Dec 23 02:14:03 2001
+@@ -248,8 +248,8 @@
+ /pssystemparams 10 dict readonly def
+ } if
+ pssystemparams begin
+- /FontResourceDir (/Resource/Font/) readonly .forcedef % pssys'params is r-o
+- /GenericResourceDir (/Resource/) readonly .forcedef % pssys'params is r-o
++ /FontResourceDir (/usr/local/share/ghostscript/Resource/Font/) readonly .forcedef % pssys'params is r-o
++ /GenericResourceDir (/usr/local/share/ghostscript/Resource/) readonly .forcedef % pssys'params is r-o
+ /GenericResourcePathSep (/) readonly .forcedef % pssys'params is r-o
+ end
+ end
+@@ -457,10 +457,10 @@
+ /.vmused {
+ % - .vmused <usedvalue>
+ % usedvalue = vmstatus in global + vmstatus in local.
+- 0 2 {
+- .currentglobal not .setglobal
+- vmstatus pop exch pop add
+- } repeat
++ 0 2 {
++ .currentglobal not .setglobal
++ vmstatus pop exch pop add
++ } repeat
+ } bind def
+ /.DoLoadResource {
+ % .LoadResource may push entries on the operand stack.
diff --git a/print/ghostscript-gnu-commfont/files/patch-gdev10v.mak.patch b/print/ghostscript-gnu-commfont/files/patch-gdev10v.mak.patch
new file mode 100644
index 00000000000..25a8317379b
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-gdev10v.mak.patch
@@ -0,0 +1,22 @@
+--- gdev10v/gdev10v.mak.orig Thu Oct 12 11:17:50 2000
++++ gdev10v/gdev10v.mak Thu Oct 12 11:21:12 2000
+@@ -1,12 +1,13 @@
+ ### ----------------- The Canon BubbleJet BJ10v device ----------------- ###
+
+-bj10v_=gdev10v.$(OBJ) gdevprn.$(OBJ)
+-bj10v.dev: $(bj10v_)
+- $(SHP)gssetdev bj10v $(bj10v_)
+-bj10vh.dev: $(bj10v_)
+- $(SHP)gssetdev bj10vh $(bj10v_)
++bj10v_=$(GLOBJ)gdev10v.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
++$(DD)bj10v.dev: $(bj10v_) $(DD)page.dev
++ $(SETPDEV) $(DD)bj10v $(bj10v_)
++$(DD)bj10vh.dev: $(bj10v_) $(DD)page.dev
++ $(SETPDEV) $(DD)bj10vh $(bj10v_)
+
+ # Uncomment the following line if you are using MS-DOS on PC9801 series.
+
+-gdev10v.$(OBJ): gdevbj10.c $(PDEVH)
++$(GLOBJ)gdev10v.$(OBJ): $(GLSRC)gdevbj10.c $(PDEVH)
++ $(GLCC) $(GLO_)gdev10v.$(OBJ) $(C_) $(GLSRC)gdev10v.c
+ # $(CCC) -DPC9801 gdev10v.c
diff --git a/print/ghostscript-gnu-commfont/files/patch-gdevalps:gdevalps.mak b/print/ghostscript-gnu-commfont/files/patch-gdevalps:gdevalps.mak
new file mode 100644
index 00000000000..6d7abd905d1
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-gdevalps:gdevalps.mak
@@ -0,0 +1,25 @@
+--- gdevalps/gdevalps.mak-5.50.orig Sat Jan 12 13:21:12 2002
++++ gdevalps/gdevalps.mak-5.50 Sat Jan 12 13:23:45 2002
+@@ -2,15 +2,15 @@
+
+ alps_=$(GLOBJ)gdevalps.$(OBJ)
+
+-md50Mono.dev: $(alps_) page.dev
+- $(SETPDEV) md50Mono $(alps_)
++$(DD)md50Mono.dev: $(alps_) $(DD)page.dev
++ $(SETPDEV) $(DD)md50Mono $(alps_)
+
+-md50Eco.dev: $(alps_) page.dev
+- $(SETPDEV) md50Eco $(alps_)
++$(DD)md50Eco.dev: $(alps_) $(DD)page.dev
++ $(SETPDEV) $(DD)md50Eco $(alps_)
+
+-md1xMono.dev: $(alps_) page.dev
+- $(SETPDEV) md1xMono $(alps_)
++$(DD)md1xMono.dev: $(alps_) $(DD)page.dev
++ $(SETPDEV) $(DD)md1xMono $(alps_)
+
+-$(GLOBJ)gdevalps.$(OBJ): $(GLSRC)gdevalps.c $(PDEVH)
++$(GLOBJ)gdevalps.$(OBJ): $(GLSRC)gdevalps.c $(gdevprn_h) $(PDEVH)
+ $(GLCC) $(GLO_)gdevalps.$(OBJ) $(C_) $(GLSRC)gdevalps.c
+
diff --git a/print/ghostscript-gnu-commfont/files/patch-gdevlips:gdevlips.mak b/print/ghostscript-gnu-commfont/files/patch-gdevlips:gdevlips.mak
new file mode 100644
index 00000000000..9ad602542f6
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-gdevlips:gdevlips.mak
@@ -0,0 +1,30 @@
+--- gdevlips/gdevlips.mak.orig Thu Nov 2 12:12:13 2000
++++ gdevlips/gdevlips.mak Thu Jan 17 01:29:06 2002
+@@ -30,27 +30,6 @@
+ $(gscspace_h) $(gsutil_h) $(gsparam_h) $(gsmatrix_h) $(gdevvec_h)\
+ $(ghost_h) $(gzstate_h) $(igstate_h)
+ $(GLCC) -DA4 $(GLO_)gdevl4v.$(OBJ) $(C_) $(GLSRC)gdevl4v.c
+-
+-### ------- Epson ESC/Page printer device ----------------- ###
+-
+-escpage_=$(GLOBJ)gdevespg.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ)
+-$(GLOBJ)gdevespg.$(OBJ): $(GLSRC)gdevespg.c $(GLSRC)gdevlprn.h $(PDEVH)
+- $(GLCC) -DA4 $(GLO_)gdevespg.$(OBJ) $(C_) $(GLSRC)gdevespg.c
+-
+-$(GLOBJ)escpage.dev: $(escpage_) $(DD)page.dev
+- $(SETPDEV) $(DD)escpage $(escpage_)
+-
+-$(GLOBJ)lp2000.dev: $(escpage_) $(DD)page.dev
+- $(SETPDEV) $(DD)lp2000 $(escpage_)
+-
+-### --- The NEC NPDL language printer device ------ ###
+-
+-npdl_=$(GLOBJ)gdevnpdl.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ)
+-$(GLOBJ)gdevnpdl.$(OBJ): $(GLSRC)gdevnpdl.c $(GLSRC)gdevlprn.h $(PDEVH)
+- $(GLCC) -DA4 $(GLO_)gdevnpdl.$(OBJ) $(C_) $(GLSRC)gdevnpdl.c
+-
+-$(GLOBJ)npdl.dev: $(npdl_) $(DD)page.dev
+- $(SETPDEV) $(DD)npdl $(npdl_)
+
+ ### --- The RICOH RPDL language printer device ------ ###
+
diff --git a/print/ghostscript-gnu-commfont/files/patch-gdevmd2k.mak.patch b/print/ghostscript-gnu-commfont/files/patch-gdevmd2k.mak.patch
new file mode 100644
index 00000000000..713377c8290
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-gdevmd2k.mak.patch
@@ -0,0 +1,19 @@
+--- gdevmd2k-0.2a/gdevmd2k.mak-5.50.orig Sun Nov 19 18:42:20 2000
++++ gdevmd2k-0.2a/gdevmd2k.mak-5.50 Sun Nov 19 18:52:14 2000
+@@ -3,11 +3,11 @@
+
+ md2k_=$(GLOBJ)gdevmd2k.$(OBJ)
+
+-md2k.dev: $(md2k_) page.dev
+- $(SETPDEV) md2k $(md2k_)
++$(DD)md2k.dev: $(md2k_) $(DD)page.dev
++ $(SETPDEV) $(DD)md2k $(md2k_)
+
+-md5k.dev: $(md2k_) page.dev
+- $(SETPDEV) md5k $(md2k_)
++$(DD)md5k.dev: $(md2k_) $(DD)page.dev
++ $(SETPDEV) $(DD)md5k $(md2k_)
+
+-$(GLOBJ)gdevmd2k.$(OBJ): gdevmd2k.c $(PDEVH) $(gsparam_h)
++$(GLOBJ)gdevmd2k.$(OBJ): $(GLSRC)gdevmd2k.c $(PDEVH) $(gsparam_h)
+ $(GLCC) $(GLO_)gdevmd2k.$(OBJ) $(C_) $(GLSRC)gdevmd2k.c
diff --git a/print/ghostscript-gnu-commfont/files/patch-gdevmjc.c b/print/ghostscript-gnu-commfont/files/patch-gdevmjc.c
new file mode 100644
index 00000000000..8188c0d142d
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-gdevmjc.c
@@ -0,0 +1,335 @@
+--- src/gdevmjc.c.orig Tue May 23 19:16:52 2000
++++ src/gdevmjc.c Tue May 23 19:17:44 2000
+@@ -43,7 +43,8 @@
+ #include <limits.h>
+ #include "gdevprn.h"
+ #include "gdevpcl.h"
+-#include "gsprops.h"
++#include "gsparam.h"
++#include "gsstate.h"
+
+ #include "mjmtx2.c"
+ #include "mjbksep.c"
+@@ -150,7 +151,9 @@
+
+ /* Undefined macros expected to be defined in gdevpcl.h */
+ #define PAPER_SIZE_A3_NOBI 28
++#ifndef PAPER_SIZE_A2
+ #define PAPER_SIZE_A2 29
++#endif
+ #define PAPER_SIZE_B4 30
+ #define PAPER_SIZE_B5 31
+
+@@ -190,14 +193,12 @@
+ private dev_proc_print_page(mjc720_print_page);
+ private dev_proc_print_page(mj500c_print_page);
+
+-private dev_proc_get_props(mj_get_props);
+-private dev_proc_put_props(mj_put_props);
++private dev_proc_get_params(mj_get_params);
++private dev_proc_put_params(mj_put_params);
+
+ private void expand_line(P4(word*, int, int, int));
+-private int put_prop_float(P5(gs_prop_item *, float *, float, float, int));
+-private int put_prop_int(P5(gs_prop_item *, int *, int, int, int));
+-
+-private void set_bpp(P2(gx_device *, int));
++private int mj_put_param_int(P6(gs_param_list *, gs_param_name, int *, int, int, int));
++private void mj_set_bpp(P2(gx_device *, int));
+
+ private uint gdev_prn_rasterwidth(P2(const gx_device_printer *, int ));
+
+@@ -224,7 +225,7 @@
+ #define mj ((gx_device_mj *) pdev)
+
+ #define prn_hp_colour_device(procs, dev_name, x_dpi, y_dpi, bpp, print_page)\
+- prn_device_body(gx_device_printer, procs, dev_name,\
++ prn_device_body(gx_device_mj, procs, dev_name,\
+ WIDTH_10THS, HEIGHT_10THS, x_dpi, y_dpi, 0, 0, 0, 0, 0,\
+ bpp, 0, 0, 0, 0, print_page)
+
+@@ -235,9 +236,9 @@
+ }
+
+
+-#define mj_colour_procs(proc_colour_open, proc_get_props, proc_put_props) {\
++#define mj_colour_procs(proc_colour_open, proc_get_params, proc_put_params) {\
+ proc_colour_open,\
+- gdev_pcl_get_initial_matrix,\
++ gx_default_get_initial_matrix,\
+ gx_default_sync_output,\
+ gdev_prn_output_page,\
+ gdev_prn_close,\
+@@ -249,15 +250,15 @@
+ NULL, /* copy_color */\
+ NULL, /* draw_line */\
+ gx_default_get_bits,\
+- proc_get_props,\
+- proc_put_props\
++ proc_get_params,\
++ proc_put_params\
+ }
+
+ private int mjc_open(P1(gx_device *));
+ private int mj_colour_open(P1(gx_device *));
+
+ private gx_device_procs mj_procs =
+-mj_colour_procs(mjc_open, mj_get_props, mj_put_props);
++mj_colour_procs(mjc_open, mj_get_params, mj_put_params);
+
+ gx_device_mj far_data gs_mjc180_device =
+ mj_device(mj_procs, "mjc180", 180, 180, BITSPERPIXEL,
+@@ -306,14 +307,14 @@
+ static const float mj_b4[4] = { MJ700V2C_MARGINS_B4 };
+ static const float mj_b5[4] = { MJ700V2C_MARGINS_B5 };
+ static const float mj_letter[4] = { MJ700V2C_MARGINS_LETTER };
+- const float _ds *m;
++ const float *m;
+ int psize;
+
+ int paper_size;
+
+ /* Set up colour params if put_props has not already done so */
+ if (pdev->color_info.num_components == 0)
+- set_bpp(pdev, pdev->color_info.depth);
++ mj_set_bpp(pdev, pdev->color_info.depth);
+
+ paper_size = gdev_mjc_paper_size(pdev);
+ if (paper_size == PAPER_SIZE_A2 ) {
+@@ -332,10 +333,7 @@
+ m = mj_letter;
+ }
+
+- pdev->l_margin = m[0];
+- pdev->b_margin = m[1];
+- pdev->r_margin = m[2];
+- pdev->t_margin = m[3];
++ gx_device_set_margins(pdev, m, true);
+
+ switch (mj->colorcomp) {
+ case 1:
+@@ -360,80 +358,74 @@
+ * and control over the bits-per-pixel used in output rendering */
+ /* Added properties for DeskJet 5xxC */
+
+-private const gs_prop_item props_mj[] = {
+- /* Read-write properties. */
+- prop_def("Density", prt_int),
+- prop_def("Cyan", prt_int),
+- prop_def("Magenta", prt_int),
+- prop_def("Yellow", prt_int),
+- prop_def("Black", prt_int),
+- prop_def("Dither", prt_int),
+- prop_def("ColorComponent", prt_int),
+- prop_def("Direction", prt_int),
+- prop_def("MicroWeave", prt_int),
+- prop_def("DotSize", prt_int),
+-};
+-
+ private int
+-mj_get_props(gx_device *pdev, gs_prop_item *plist)
+-{ int start = gdev_prn_get_props(pdev, plist);
+- if ( plist != 0 ) {
+- register gs_prop_item *pi = plist + start;
+- memcpy(pi, props_mj, sizeof(props_mj));
+- pi[0].value.i = mj->density;
+- pi[1].value.i = mj->cyan;
+- pi[2].value.i = mj->magenta;
+- pi[3].value.i = mj->yellow;
+- pi[4].value.i = mj->black;
+- pi[5].value.i = mj->dither;
+- pi[6].value.i = mj->colorcomp;
+- pi[7].value.i = mj->direction;
+- pi[8].value.i = mj->microweave;
+- pi[9].value.i = mj->dotsize;
+- }
+- return start + sizeof(props_mj) / sizeof(gs_prop_item);
++mj_get_params(gx_device *pdev, gs_param_list *plist)
++{ int code = gdev_prn_get_params(pdev, plist);
++ if ( code < 0 ||
++ (code = param_write_int(plist, "Density", &mj->density)) < 0 ||
++ (code = param_write_int(plist, "Cyan", &mj->cyan)) < 0 ||
++ (code = param_write_int(plist, "Magenta", &mj->magenta)) < 0 ||
++ (code = param_write_int(plist, "Yellow", &mj->yellow)) < 0 ||
++ (code = param_write_int(plist, "Black", &mj->black)) < 0 ||
++ (code = param_write_int(plist, "Dither", &mj->dither)) < 0 ||
++ (code = param_write_int(plist, "ColorComponent", &mj->colorcomp)) < 0 ||
++ (code = param_write_int(plist, "Direction", &mj->direction)) < 0 ||
++ (code = param_write_int(plist, "MicroWeave", &mj->microweave)) < 0 ||
++ (code = param_write_int(plist, "DotSize", &mj->dotsize)) < 0
++ )
++ return code;
++ return code;
+ }
+
+ /* Put properties. */
+ private int
+-mj_put_props(gx_device *pdev, gs_prop_item *plist, int count)
++mj_put_params(gx_device *pdev, gs_param_list *plist)
+ {
+- static const argn = 10;
+-/* gs_prop_item *known[argn]; */
+- gs_prop_item *known[10];
+ int old_bpp = mj->color_info.depth;
+ int bpp = 0;
+ int code = 0;
+-
+- props_extract(plist, count, props_mj, argn, known, 0);
+- code = gdev_prn_put_props(pdev, plist, count);
+- if ( code < 0 ) return code;
+-
+- code = put_prop_int(known[0], &mj->density, 0, INT_MAX, code);
+- code = put_prop_int(known[1], &mj->cyan, 0, INT_MAX, code);
+- code = put_prop_int(known[2], &mj->magenta, 0, INT_MAX, code);
+- code = put_prop_int(known[3], &mj->yellow, 0, INT_MAX, code);
+- code = put_prop_int(known[4], &mj->black, 0, INT_MAX, code);
+- code = put_prop_int(known[5], &mj->dither, 0, 1, code);
+- code = put_prop_int(known[6], &mj->colorcomp, 1, 4, code);
+- code = put_prop_int(known[7], &mj->direction, 1, 2, code);
+- code = put_prop_int(known[8], &mj->microweave, 0, 1, code);
+- code = put_prop_int(known[9], &mj->dotsize, 0, 1, code);
+-
++ int density = mj->density;
++ int cyan = mj->cyan;
++ int magenta = mj->magenta;
++ int yellow = mj->yellow;
++ int black = mj->black;
++ int dither = mj->dither;
++ int colorcomp = mj->colorcomp;
++ int direction = mj->direction;
++ int microweave = mj->microweave;
++ int dotsize = mj->dotsize;
++ code = mj_put_param_int(plist, "Density", &density, 0, INT_MAX, code);
++ code = mj_put_param_int(plist, "Cyan", &cyan, 0, INT_MAX, code);
++ code = mj_put_param_int(plist, "Magenta", &magenta, 0, INT_MAX, code);
++ code = mj_put_param_int(plist, "Yellow", &yellow, 0, INT_MAX, code);
++ code = mj_put_param_int(plist, "Black", &black, 0, INT_MAX, code);
++ code = mj_put_param_int(plist, "Dither", &dither, 0, 1, code);
++ code = mj_put_param_int(plist, "ColorComponent", &colorcomp, 1, 4, code);
++ code = mj_put_param_int(plist, "Direction", &direction, 1, 2, code);
++ code = mj_put_param_int(plist, "MicroWeave", &microweave, 0, 1, code);
++ code = mj_put_param_int(plist, "DotSize", &dotsize, 0, 1, code);
++ code = mj_put_param_int(plist, "BitsPerPixel", &bpp, 1, 32, code);
+ if ( code < 0 )
+- return_error(code);
+-
+- if (bpp != 0) {
+- set_bpp(pdev, bpp);
+-
+- /* Close the device; gs_putdeviceprops will reopen it. */
++ return code;
++ mj->density = density;
++ mj->cyan = cyan;
++ mj->magenta = magenta;
++ mj->yellow = yellow;
++ mj->black = black;
++ mj->dither = dither;
++ mj->colorcomp = colorcomp;
++ mj->direction = direction;
++ mj->microweave = microweave;
++ mj->dotsize = dotsize;
++ if ( bpp != 0 ) {
++ mj_set_bpp(pdev, bpp);
++ gdev_prn_put_params(pdev, plist);
+ if ( bpp != old_bpp && pdev->is_open )
+- { int ccode = gs_closedevice(pdev);
+- if ( ccode < 0 ) return ccode;
+- }
++ return gs_closedevice(pdev);
++ return 0;
+ }
+-
+- return code;
++ else
++ return gdev_prn_put_params(pdev, plist);
+ }
+
+ /* ------ Internal routines ------ */
+@@ -1163,7 +1155,8 @@
+
+ /* Send each scan line in turn */
+ {
+- long int lend = pdev->height - (pdev->t_margin + pdev->b_margin) * y_dpi;
++ long int lend = pdev->height -
++ (dev_t_margin_points(pdev) + dev_b_margin_points(pdev));
+ int cErr, mErr, yErr, kErr;
+ int this_pass, i;
+ long int lnum;
+@@ -1685,39 +1678,25 @@
+ }
+
+ private int
+-put_prop_int(gs_prop_item *pi, int *property, int minval, int maxval, int code)
+-{
+- if ( pi == 0 )
+- return (code);
+-
+- if ( pi->value.i < minval || pi->value.i > maxval )
+- { pi->status = pv_rangecheck;
+- return (gs_error_rangecheck);
+- }
+- else
+- { *property = pi->value.i;
+- return (code ? code : 1);
+- }
+-}
+-
+-private int
+-put_prop_float(gs_prop_item *pi, float *property, float minval, float maxval, int code)
+-{
+- if ( pi == 0 )
+- return (code);
+-
+- if ( pi->value.f < minval || pi->value.f > maxval )
+- { pi->status = pv_rangecheck;
+- return (gs_error_rangecheck);
+- }
+- else
+- { *property = pi->value.f;
+- return (code ? code : 1);
+- }
++mj_put_param_int(gs_param_list *plist, gs_param_name pname, int *pvalue,
++ int minval, int maxval, int ecode)
++{ int code, value;
++ switch ( code = param_read_int(plist, pname, &value) )
++ {
++ default:
++ return code;
++ case 1:
++ return ecode;
++ case 0:
++ if ( value < minval || value > maxval )
++ param_signal_error(plist, pname, gs_error_rangecheck);
++ *pvalue = value;
++ return (ecode < 0 ? ecode : 1);
++ }
+ }
+
+ private void
+-set_bpp(gx_device *pdev, int bits_per_pixel)
++mj_set_bpp(gx_device *pdev, int bits_per_pixel)
+ { gx_device_color_info *ci = &pdev->color_info;
+ /* Only valid bits-per-pixel are 1, 3, 8, 16, 24, 32 */
+ int bpp = bits_per_pixel < 3 ? 1 : bits_per_pixel < 8 ? 3 :
+@@ -1725,9 +1704,9 @@
+ ci->num_components = ((bpp == 1) || (bpp == 8) ? 1 : 3);
+ ci->depth = ((bpp > 1) && (bpp < 8) ? 8 : bpp);
+ ci->max_gray = (bpp >= 8 ? 255 : 1);
+- ci->max_rgb = (bpp >= 8 ? 255 : bpp > 1 ? 1 : 0);
+- ci->dither_gray = (bpp >= 8 ? 5 : 2);
+- ci->dither_rgb = (bpp >= 8 ? 5 : bpp > 1 ? 2 : 0);
++ ci->max_color = (bpp >= 8 ? 255 : bpp > 1 ? 1 : 0);
++ ci->dither_grays = (bpp >= 8 ? 5 : 2);
++ ci->dither_colors = (bpp >= 8 ? 5 : bpp > 1 ? 2 : 0);
+ }
+
+ /* This returns either the number of pixels in a scan line, or the number
+@@ -1736,7 +1715,7 @@
+ gdev_prn_rasterwidth(const gx_device_printer *pdev, int pixelcount)
+ {
+ word raster_width =
+- pdev->width - pdev->x_pixels_per_inch * (pdev->l_margin + pdev->r_margin);
++ pdev->width - (pdev->HWMargins[0] + pdev->HWMargins[2]);
+ return (pixelcount ?
+ (uint)raster_width :
+ (uint)((raster_width * pdev->color_info.depth + 7) >> 3));
diff --git a/print/ghostscript-gnu-commfont/files/patch-gdevmjc.mak b/print/ghostscript-gnu-commfont/files/patch-gdevmjc.mak
new file mode 100644
index 00000000000..f54213e3035
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-gdevmjc.mak
@@ -0,0 +1,43 @@
+--- gdevmjc-0.8/gdevmjc.mak.orig Tue May 23 19:19:13 2000
++++ gdevmjc-0.8/gdevmjc.mak Tue May 23 19:19:40 2000
+@@ -4,25 +4,22 @@
+ # Supports MJ-700V2C, MJ-5000C, MJ-900C, MJ-800C, MJ-500C
+ #
+ ##
+-#
+-# Append this file to Makefile
+-#
+-##
+-MJCSRC = gdevmjc.c mjmtx2.c mjbksep.c mjhtocmy.c mjvtbl.c \
+- mjgrnsp.c mjgrnsp2.c mjespdtc.c mjespdtm.c mjespdty.c mjbarrie.c
++MJCSRC = $(GLSRC)gdevmjc.c $(GLSRC)mjmtx2.c $(GLSRC)mjbksep.c \
++ $(GLSRC)mjhtocmy.c $(GLSRC)mjvtbl.c $(GLSRC)mjgrnsp.c \
++ $(GLSRC)mjgrnsp2.c $(GLSRC)mjespdtc.c $(GLSRC)mjespdtm.c \
++ $(GLSRC)mjespdty.c $(GLSRC)mjbarrie.c
+
+-mj700v2c_=gdevmjc.$(OBJ) $(HPPCL)
++mj700v2c_=$(GLOBJ)gdevmjc.$(OBJ) $(HPPCL)
+
+ # To make A4 paper the default, change the second line below this to
+-gdevmjc.$(OBJ): $(MJCSRC) $(PDEVH) $(gdevpcl_h)
+- $(CCC) -DA4 gdevmjc.c
+-
+-mjc180.dev: $(mj700v2c_)
+- $(SHP)gssetdev mjc180 $(mj700v2c_)
+-mjc360.dev: $(mj700v2c_)
+- $(SHP)gssetdev mjc360 $(mj700v2c_)
+-mjc720.dev: $(mj700v2c_)
+- $(SHP)gssetdev mjc720 $(mj700v2c_)
+-mj500c.dev: $(mj700v2c_)
+- $(SHP)gssetdev mj500c $(mj700v2c_)
++$(GLOBJ)gdevmjc.$(OBJ): $(MJCSRC) $(PDEVH) $(gdevpcl_h)
++ $(GLCC) -DA4 $(GLO_)gdevmjc.$(OBJ) $(C_) $(GLSRC)gdevmjc.c
+
++$(GLOBJ)mjc180.dev: $(mj700v2c_) $(DD)page.dev
++ $(SETPDEV) $(DD)mjc180 $(mj700v2c_)
++$(GLOBJ)mjc360.dev: $(mj700v2c_) $(DD)page.dev
++ $(SETPDEV) $(DD)mjc360 $(mj700v2c_)
++$(GLOBJ)mjc720.dev: $(mj700v2c_) $(DD)page.dev
++ $(SETPDEV) $(DD)mjc720 $(mj700v2c_)
++$(GLOBJ)mj500c.dev: $(mj700v2c_) $(DD)page.dev
++ $(SETPDEV) $(DD)mj500c $(mj700v2c_)
diff --git a/print/ghostscript-gnu-commfont/files/patch-src:gdevlbp8.c b/print/ghostscript-gnu-commfont/files/patch-src:gdevlbp8.c
new file mode 100644
index 00000000000..6e5b29da573
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-src:gdevlbp8.c
@@ -0,0 +1,70 @@
+--- src/gdevlbp8.c.orig Thu Mar 9 03:40:41 2000
++++ src/gdevlbp8.c
+@@ -22,6 +22,8 @@
+
+ /*
+ Modifications:
++ 3.10.00 Johnny Lam
++ Removed LIPS III code, as it's obsoleted by gdevlips driver.
+ 2.2.97 Lauri Paatero
+ Changed CSI command into ESC [. DCS commands may still need to be changed
+ (to ESC P).
+@@ -49,7 +51,6 @@
+
+ /* The device descriptors */
+ private dev_proc_print_page(lbp8_print_page);
+-private dev_proc_print_page(lips3_print_page);
+
+ gx_device_printer far_data gs_lbp8_device =
+ prn_device(prn_std_procs, "lbp8",
+@@ -58,14 +59,6 @@
+ 0.16, 0.2, 0.32, 0.21, /* margins: left, bottom, right, top */
+ 1, lbp8_print_page);
+
+-gx_device_printer far_data gs_lips3_device =
+- prn_device(prn_std_procs, "lips3",
+- 82, /* width_10ths, 8.3" */
+- 117, /* height_10ths, 11.7" */
+- X_DPI, Y_DPI,
+- 0.16, 0.27, 0.23, 0.27, /* margins */
+- 1, lips3_print_page);
+-
+ /* ------ Internal routines ------ */
+
+ #define ESC 0x1b
+@@ -84,23 +77,6 @@
+
+ static const char *lbp8_end = NULL;
+
+-static const char lips3_init[] = {
+- ESC, '<', /* soft reset */
+- DCS, '0', 'J', ST, /* JOB END */
+- DCS, '3', '1', ';', '3', '0', '0', ';', '2', 'J', ST, /* 300dpi, LIPS3 JOB START */
+- ESC, '<', /* soft reset */
+- DCS, '2', 'y', 'P', 'r', 'i', 'n', 't', 'i', 'n', 'g', '(', 'g', 's', ')', ST, /* Printing (gs) display */
+- ESC, '[', '?', '1', 'l', /* auto cr-lf disable */
+- ESC, '[', '?', '2', 'h', /* auto ff disable */
+- ESC, '[', '1', '1', 'h', /* set mode */
+- ESC, '[', '7', ' ', 'I', /* select unit size (300dpi)*/
+- ESC, '[', 'f' /* move to home position */
+-};
+-
+-static const char lips3_end[] = {
+- DCS, '0', 'J', ST /* JOB END */
+-};
+-
+ /* Send the page to the printer. */
+ private int
+ can_print_page(gx_device_printer *pdev, FILE *prn_stream,
+@@ -203,11 +179,4 @@
+ lbp8_print_page(gx_device_printer *pdev, FILE *prn_stream)
+ { return can_print_page(pdev, prn_stream, lbp8_init, sizeof(lbp8_init),
+ lbp8_end, sizeof(lbp8_end));
+-}
+-
+-/* Print a LIPS III page. */
+-private int
+-lips3_print_page(gx_device_printer *pdev, FILE *prn_stream)
+-{ return can_print_page(pdev, prn_stream, lips3_init, sizeof(lips3_init),
+- lips3_end, sizeof(lips3_end));
+ }
diff --git a/print/ghostscript-gnu-commfont/files/patch-src:gdevxini.c b/print/ghostscript-gnu-commfont/files/patch-src:gdevxini.c
new file mode 100644
index 00000000000..44bb6b3984f
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-src:gdevxini.c
@@ -0,0 +1,14 @@
+--- src/gdevxini.c.orig Tue Jun 5 15:38:57 2001
++++ src/gdevxini.c Wed Jun 20 04:17:15 2001
+@@ -655,8 +655,10 @@
+ }
+ x_set_buffer(xdev);
+ /* Clear the destination pixmap to avoid initializing with garbage. */
+- xdev->dest = (xdev->bpixmap != (Pixmap) 0 ?
++ if (xdev->dest == (Pixmap) 0) {
++ xdev->dest = (xdev->bpixmap != (Pixmap) 0 ?
+ xdev->bpixmap : (Pixmap) xdev->win);
++ }
+ if (xdev->dest != (Pixmap) 0) {
+ XSetForeground(xdev->dpy, xdev->gc, xdev->background);
+ XFillRectangle(xdev->dpy, xdev->dest, xdev->gc,
diff --git a/print/ghostscript-gnu-commfont/files/patch-src:genarch.c b/print/ghostscript-gnu-commfont/files/patch-src:genarch.c
new file mode 100644
index 00000000000..a015e69e758
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-src:genarch.c
@@ -0,0 +1,34 @@
+--- src/genarch.c.orig Tue Jun 5 15:38:57 2001
++++ src/genarch.c Wed Jun 20 04:17:42 2001
+@@ -41,6 +41,7 @@
+ fprintf(f, "\n\t /* ---------------- %s ---------------- */\n\n", str);
+ }
+
++#ifndef __FreeBSD__
+ private clock_t
+ time_clear(char *buf, int bsize, int nreps)
+ {
+@@ -51,6 +52,7 @@
+ memset(buf, 0, bsize);
+ return clock() - t;
+ }
++#endif /* __FreeBSD__ */
+
+ private void
+ define(FILE *f, const char *str)
+@@ -181,6 +183,7 @@
+ fprintf(f, "((unsigned long)~0L + (unsigned long)0)\n");
+ #undef PRINT_MAX
+
++#ifndef __FreeBSD__
+ section(f, "Cache sizes");
+
+ /*
+@@ -241,6 +244,7 @@
+ }
+ define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1);
+ }
++#endif /* __FreeBSD__ */
+
+ section(f, "Miscellaneous");
+
diff --git a/print/ghostscript-gnu-commfont/files/patch-src:gp_unifs.c b/print/ghostscript-gnu-commfont/files/patch-src:gp_unifs.c
new file mode 100644
index 00000000000..ba0f9597e6e
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-src:gp_unifs.c
@@ -0,0 +1,60 @@
+--- src/gp_unifs.c.orig Tue Jun 5 15:31:44 2001
++++ src/gp_unifs.c Sun Jul 15 22:57:50 2001
+@@ -28,6 +27,8 @@
+ #include "gsutil.h" /* for string_match */
+ #include "stat_.h"
+ #include "dirent_.h"
++#include "unistd_.h"
++#include <stdlib.h> /* for mkstemp/mktemp */
+ #include <sys/param.h> /* for MAXPATHLEN */
+
+ /* Some systems (Interactive for example) don't define MAXPATHLEN,
+@@ -57,22 +58,44 @@
+ FILE *
+ gp_open_scratch_file(const char *prefix, char fname[gp_file_name_sizeof],
+ const char *mode)
+-{ /* The -8 is for XXXXXX plus a possible final / and -. */
+- int len = gp_file_name_sizeof - strlen(prefix) - 8;
+-
+- if (gp_gettmpdir(fname, &len) != 0)
++{ /* The -8 is for XXXXXX plus a possible final / and -. */
++ int prefix_length = strlen(prefix);
++ int len = gp_file_name_sizeof - prefix_length - 8;
++
++ if (gp_file_name_is_absolute(prefix, prefix_length))
++ *fname = 0;
++ else if (gp_gettmpdir(fname, &len) != 0)
+ strcpy(fname, "/tmp/");
+ else {
+ if (strlen(fname) != 0 && fname[strlen(fname) - 1] != '/')
+ strcat(fname, "/");
+ }
++ if (strlen(fname) + prefix_length + 8 >= gp_file_name_sizeof)
++ return 0; /* file name too long */
+ strcat(fname, prefix);
+ /* Prevent trailing X's in path from being converted by mktemp. */
+ if (*fname != 0 && fname[strlen(fname) - 1] == 'X')
+ strcat(fname, "-");
+ strcat(fname, "XXXXXX");
++
++#ifdef HAVE_MKSTEMP
++ {
++ int file;
++ FILE *fp;
++
++ file = mkstemp(fname);
++ if (file < -1)
++ return NULL;
++ fp = fdopen(file, mode);
++ if (fp == NULL)
++ close(file);
++
++ return fp;
++ }
++#else
+ mktemp(fname);
+ return gp_fopentemp(fname, mode);
++#endif
+ }
+
+ /* Open a file with the given name, as a stream of uninterpreted bytes. */
diff --git a/print/ghostscript-gnu-commfont/files/patch-src:unix-gcc.mak b/print/ghostscript-gnu-commfont/files/patch-src:unix-gcc.mak
new file mode 100644
index 00000000000..2143001118a
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-src:unix-gcc.mak
@@ -0,0 +1,163 @@
+--- src/unix-gcc.mak.orig Tue Jul 10 12:01:06 2001
++++ src/unix-gcc.mak Sat Dec 15 04:22:49 2001
+@@ -27,14 +27,15 @@
+ # source, generated intermediate file, and object directories
+ # for the graphics library (GL) and the PostScript/PDF interpreter (PS).
+
+-BINDIR=./bin
+-GLSRCDIR=./src
+-GLGENDIR=./obj
+-GLOBJDIR=./obj
+-PSSRCDIR=./src
+-PSLIBDIR=./lib
+-PSGENDIR=./obj
+-PSOBJDIR=./obj
++.CURDIR?=.
++BINDIR=${.CURDIR}/bin
++GLSRCDIR=${.CURDIR}/src
++GLGENDIR=${.CURDIR}/obj
++GLOBJDIR=${.CURDIR}/obj
++PSSRCDIR=${.CURDIR}/src
++PSLIBDIR=${.CURDIR}/lib
++PSGENDIR=${.CURDIR}/obj
++PSOBJDIR=${.CURDIR}/obj
+
+ # Do not edit the next group of lines.
+
+@@ -53,17 +54,17 @@
+ # the directories also define the default search path for the
+ # initialization files (gs_*.ps) and the fonts.
+
+-INSTALL = $(GLSRCDIR)/instcopy -c
+-INSTALL_PROGRAM = $(INSTALL) -m 755
+-INSTALL_DATA = $(INSTALL) -m 644
++INSTALL_PROGRAM = $(BSD_INSTALL_SCRIPT)
++INSTALL_DATA = $(BSD_INSTALL_DATA)
+
+-prefix = /usr/local
++prefix = $(PREFIX)
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+ scriptdir = $(bindir)
+ libdir = $(exec_prefix)/lib
+ mandir = $(prefix)/man
+ man1ext = 1
++man1dir = $(mandir)/man$(man1ext)
+ datadir = $(prefix)/share
+ gsdir = $(datadir)/ghostscript
+ gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
+@@ -104,6 +105,15 @@
+
+ GENOPT=
+
++# Choose capability options.
++
++# -DHAVE_MKSTEMP
++# uses mkstemp instead of mktemp
++# This gets rid of several security warnings that look
++# ominous. Enable this if you wish to get rid of them.
++
++CAPOPT= -DHAVE_MKSTEMP
++
+ # Define the name of the executable file.
+
+ GS=gs
+@@ -129,7 +139,7 @@
+ # You may need to change this if the IJG library version changes.
+ # See jpeg.mak for more information.
+
+-JSRCDIR=jpeg
++JSRCDIR=${.CURDIR}/jpeg
+ JVERSION=6
+
+ # Choose whether to use a shared version of the IJG JPEG library (-ljpeg).
+@@ -149,14 +159,14 @@
+ # You may need to change this if the libpng version changes.
+ # See libpng.mak for more information.
+
+-PSRCDIR=libpng
++PSRCDIR=${LOCALBASE}/include
+ PVERSION=10012
+
+ # Choose whether to use a shared version of the PNG library, and if so,
+ # what its name is.
+ # See gs.mak and Make.htm for more information.
+
+-SHARE_LIBPNG=0
++SHARE_LIBPNG=1
+ LIBPNG_NAME=png
+
+ # Define the directory where the zlib sources are stored.
+@@ -168,7 +178,7 @@
+ # what its name is (usually libz, but sometimes libgz).
+ # See gs.mak and Make.htm for more information.
+
+-SHARE_ZLIB=0
++SHARE_ZLIB=1
+ #ZLIB_NAME=gz
+ ZLIB_NAME=z
+
+@@ -183,7 +193,7 @@
+
+ # Define the name of the C compiler.
+
+-CC=gcc
++CC?=cc
+
+ # Define the name of the linker for the final link step.
+ # Normally this is the same as the C compiler.
+@@ -216,9 +226,9 @@
+ # We don't include -ansi, because this gets in the way of the platform-
+ # specific stuff that <math.h> typically needs; nevertheless, we expect
+ # gcc to accept ANSI-style function prototypes and function definitions.
+-XCFLAGS=
++#XCFLAGS=
+
+-CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
++CFLAGS+=$(XCFLAGS)
+
+ # Define platform flags for ld.
+ # SunOS 4.n may need -Bstatic.
+@@ -227,7 +237,7 @@
+ # -R /usr/local/xxx/lib:/usr/local/lib
+ # giving the full path names of the shared library directories.
+ # XLDFLAGS can be set from the command line.
+-XLDFLAGS=
++XLDFLAGS=-L${LOCALBASE}/lib
+
+ LDFLAGS=$(XLDFLAGS) -fno-common
+
+@@ -260,7 +270,7 @@
+ # Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
+ # not in $(XINCLUDE).
+
+-XINCLUDE=-I/X11R6/include
++XINCLUDE=-I${X11BASE}/include
+
+ # Define the directory/ies and library names for the X11 library files.
+ # XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
+@@ -272,12 +282,12 @@
+ # Solaris and other SVR4 systems with dynamic linking probably want
+ #XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
+ # X11R6 (on any platform) may need
+-#XLIBS=Xt SM ICE Xext X11
++XLIBS=Xt SM ICE Xext X11
+
+ #XLIBDIRS=-L/usr/local/X/lib
+-XLIBDIRS=-L/usr/X11R6/lib
++XLIBDIRS=-L${X11BASE}/lib
+ XLIBDIR=
+-XLIBS=Xt Xext X11
++#XLIBS=Xt Xext X11
+
+ # Define whether this platform has floating point hardware:
+ # FPU_TYPE=2 means floating point is faster than fixed point.
+@@ -406,7 +416,7 @@
+
+ # Define the compilation rules and flags.
+
+-CCFLAGS=$(GENOPT) $(CFLAGS)
++CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
+ CC_=$(CC) `cat $(AK)` $(CCFLAGS)
+ CCAUX=$(CC) `cat $(AK)`
+ CC_LEAF=$(CC_) -fomit-frame-pointer
diff --git a/print/ghostscript-gnu-commfont/files/patch-src:zmedia2.c b/print/ghostscript-gnu-commfont/files/patch-src:zmedia2.c
new file mode 100644
index 00000000000..6e19c2ddfd8
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/patch-src:zmedia2.c
@@ -0,0 +1,25 @@
+--- src/zmedia2.c.orig Tue Jun 5 15:39:08 2001
++++ src/zmedia2.c Wed Jun 20 04:18:27 2001
+@@ -430,11 +430,17 @@
+
+ rx = ry, ry = temp;
+ }
+- /* Adjust the medium size if flexible. */
+- if (medium->p.x < MIN_MEDIA_SIZE && mx > rx)
+- mx = rx;
+- if (medium->p.y < MIN_MEDIA_SIZE && my > ry)
+- my = ry;
++ /* If 'medium' is flexible, adjust 'mx' and 'my' towards 'rx' and 'ry',
++ respectively. Note that 'mx' and 'my' have just acquired the largest
++ permissible value, medium->q. */
++ if (medium->p.x < mx) /* non-empty width range */
++ if (rx < medium->p.x) mx = medium->p.x; /* minimum */
++ else if (mx > rx) mx = rx; /* fits */
++ /* else use medium->q.x, i.e., the maximum */
++ if (medium->p.y < my) /* non-empty height range */
++ if (ry < medium->p.y) my = medium->p.y; /* minimum */
++ else if (my > ry) my = ry; /* fits */
++ /* else use medium->q.y, i.e., the maximum */
+
+ /* Translate to align the centers. */
+ gs_make_translation(mx / 2, my / 2, pmat);
diff --git a/print/ghostscript-gnu-commfont/pkg-comment b/print/ghostscript-gnu-commfont/pkg-comment
new file mode 100644
index 00000000000..f342c9e842c
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/pkg-comment
@@ -0,0 +1 @@
+GNU Postscript interpreter CJK fonts adding port
diff --git a/print/ghostscript-gnu-commfont/pkg-descr b/print/ghostscript-gnu-commfont/pkg-descr
new file mode 100644
index 00000000000..a19450c7582
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/pkg-descr
@@ -0,0 +1,12 @@
+This port CJK TTF on the fly, CIDFnmap, MDRC & GC patch for GNU Ghostscript.
+
+Copyright (C) 2001 gs-cjk project. All rights reserved.
+
+Versions entitled "GNU Ghostscript" are distributed with the GNU General
+Public License, which allows free use, and free copying and redistribution
+under certain conditions (including, in some cases, commercial distribution).
+
+License
+The CJK patches and files in this pacakge are provided under "BSD" license.
+
+WWW: http://www.gyve.org/gs-cjk/
diff --git a/print/ghostscript-gnu-commfont/pkg-plist b/print/ghostscript-gnu-commfont/pkg-plist
new file mode 100644
index 00000000000..1c2fc0efc17
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/pkg-plist
@@ -0,0 +1,526 @@
+bin/ert
+@exec mv -f %D/bin/gs %D/bin/gs.orig
+bin/gs
+@unexec mv -f %D/bin/gs.orig %D/bin/gs
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/ANNOUNCE
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/COPYING
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/ChangeLog
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/HACKING
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/NEWS
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/README.cn
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/README.en
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/README.jp
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/README.kr
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/CJK/README.tw
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/Gdevlips.htm
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/README.gdevalps
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/README.gdevmd2k
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/epag-3.09/ert.txt
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/epag-3.09/gdevepag.txt
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/epag-3.09/ChangeLog
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/epag-3.09/psprint
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/epag-3.09/gsepagif.sh
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmjc/MJ700V2C.FAQ
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmjc/README.mjc
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmjc/README.mje
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmjc/README.noz
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmjc/cpem.doc
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdevnpdl.jis
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/gdev10v.jis
+%%PORTDOCS%%share/doc/ghostscript/%%GS_VERSION%%/printers/readme-eplaser-651.euc
+share/ghostscript/%%GS_VERSION%%/examples/all_ac1.ps
+share/ghostscript/%%GS_VERSION%%/examples/all_ag1.ps
+share/ghostscript/%%GS_VERSION%%/examples/all_aj1.ps
+share/ghostscript/%%GS_VERSION%%/examples/all_aj2.ps
+share/ghostscript/%%GS_VERSION%%/examples/all_ak1.ps
+share/ghostscript/%%GS_VERSION%%/examples/gscjk_ac.ps
+share/ghostscript/%%GS_VERSION%%/examples/gscjk_ag.ps
+share/ghostscript/%%GS_VERSION%%/examples/gscjk_aj.ps
+share/ghostscript/%%GS_VERSION%%/examples/gscjk_ak.ps
+share/ghostscript/%%GS_VERSION%%/examples/iso2022.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cff.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cff.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_cff.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cff.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cff.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidcm.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidcm.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_cidcm.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidcm.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidcm.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidfn.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidfn.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_cidfn.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidfn.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cidfn.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cmap.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cmap.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_cmap.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cmap.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_cmap.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_init.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_init.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_init.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_init.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_init.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_res.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_res.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_res.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_res.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_res.ps
+@exec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_ttf.ps %D/share/ghostscript/%%GS_VERSION%%/lib/gs_ttf.ps.orig
+share/ghostscript/%%GS_VERSION%%/lib/gs_ttf.ps
+@unexec mv -f %D/share/ghostscript/%%GS_VERSION%%/lib/gs_ttf.ps.orig %D/share/ghostscript/%%GS_VERSION%%/lib/gs_ttf.ps
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap.ARP
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap.Bae
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap.CJK
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap.Koc
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap.Ore
+share/ghostscript/%%GS_VERSION%%/lib/CIDFnmap.Sol
+share/ghostscript/Resource/CMap/78-EUC-H
+share/ghostscript/Resource/CMap/78-EUC-V
+share/ghostscript/Resource/CMap/78-H
+share/ghostscript/Resource/CMap/78-RKSJ-H
+share/ghostscript/Resource/CMap/78-RKSJ-V
+share/ghostscript/Resource/CMap/78-V
+share/ghostscript/Resource/CMap/78ms-RKSJ-H
+share/ghostscript/Resource/CMap/78ms-RKSJ-V
+share/ghostscript/Resource/CMap/83pv-RKSJ-H
+share/ghostscript/Resource/CMap/90ms-RKSJ-H
+share/ghostscript/Resource/CMap/90ms-RKSJ-UCS2
+share/ghostscript/Resource/CMap/90ms-RKSJ-V
+share/ghostscript/Resource/CMap/90msp-RKSJ-H
+share/ghostscript/Resource/CMap/90msp-RKSJ-V
+share/ghostscript/Resource/CMap/90pv-RKSJ-H
+share/ghostscript/Resource/CMap/90pv-RKSJ-UCS2
+share/ghostscript/Resource/CMap/90pv-RKSJ-UCS2C
+share/ghostscript/Resource/CMap/90pv-RKSJ-V
+share/ghostscript/Resource/CMap/Add-H
+share/ghostscript/Resource/CMap/Add-RKSJ-H
+share/ghostscript/Resource/CMap/Add-RKSJ-V
+share/ghostscript/Resource/CMap/Add-V
+share/ghostscript/Resource/CMap/Adobe-CNS1-0
+share/ghostscript/Resource/CMap/Adobe-CNS1-1
+share/ghostscript/Resource/CMap/Adobe-CNS1-2
+share/ghostscript/Resource/CMap/Adobe-CNS1-3
+share/ghostscript/Resource/CMap/Adobe-CNS1-4
+share/ghostscript/Resource/CMap/Adobe-CNS1-UCS2
+share/ghostscript/Resource/CMap/Adobe-GB1-0
+share/ghostscript/Resource/CMap/Adobe-GB1-1
+share/ghostscript/Resource/CMap/Adobe-GB1-2
+share/ghostscript/Resource/CMap/Adobe-GB1-3
+share/ghostscript/Resource/CMap/Adobe-GB1-UCS2
+share/ghostscript/Resource/CMap/Adobe-Japan1-0
+share/ghostscript/Resource/CMap/Adobe-Japan1-1
+share/ghostscript/Resource/CMap/Adobe-Japan1-2
+share/ghostscript/Resource/CMap/Adobe-Japan1-3
+share/ghostscript/Resource/CMap/Adobe-Japan1-4
+share/ghostscript/Resource/CMap/Adobe-Japan1-UCS2
+share/ghostscript/Resource/CMap/Adobe-Japan2-0
+share/ghostscript/Resource/CMap/Adobe-Korea1-0
+share/ghostscript/Resource/CMap/Adobe-Korea1-1
+share/ghostscript/Resource/CMap/Adobe-Korea1-2
+share/ghostscript/Resource/CMap/Adobe-Korea1-UCS2
+share/ghostscript/Resource/CMap/B5-H
+share/ghostscript/Resource/CMap/B5-V
+share/ghostscript/Resource/CMap/B5pc-H
+share/ghostscript/Resource/CMap/B5pc-UCS2
+share/ghostscript/Resource/CMap/B5pc-UCS2C
+share/ghostscript/Resource/CMap/B5pc-V
+share/ghostscript/Resource/CMap/CNS-EUC-H
+share/ghostscript/Resource/CMap/CNS-EUC-V
+share/ghostscript/Resource/CMap/CNS1-H
+share/ghostscript/Resource/CMap/CNS1-V
+share/ghostscript/Resource/CMap/CNS2-H
+share/ghostscript/Resource/CMap/CNS2-V
+share/ghostscript/Resource/CMap/ETHK-B5-H
+share/ghostscript/Resource/CMap/ETHK-B5-V
+share/ghostscript/Resource/CMap/ETen-B5-H
+share/ghostscript/Resource/CMap/ETen-B5-UCS2
+share/ghostscript/Resource/CMap/ETen-B5-V
+share/ghostscript/Resource/CMap/ETenms-B5-H
+share/ghostscript/Resource/CMap/ETenms-B5-V
+share/ghostscript/Resource/CMap/EUC-H
+share/ghostscript/Resource/CMap/EUC-V
+share/ghostscript/Resource/CMap/Ext-RKSJ-H
+share/ghostscript/Resource/CMap/Ext-RKSJ-V
+share/ghostscript/Resource/CMap/Ext-H
+share/ghostscript/Resource/CMap/Ext-V
+share/ghostscript/Resource/CMap/GB-EUC-H
+share/ghostscript/Resource/CMap/GB-EUC-V
+share/ghostscript/Resource/CMap/GB-H
+share/ghostscript/Resource/CMap/GB-V
+share/ghostscript/Resource/CMap/GBK-EUC-H
+share/ghostscript/Resource/CMap/GBK-EUC-UCS2
+share/ghostscript/Resource/CMap/GBK-EUC-V
+share/ghostscript/Resource/CMap/GBKp-EUC-H
+share/ghostscript/Resource/CMap/GBKp-EUC-V
+share/ghostscript/Resource/CMap/GBT-EUC-H
+share/ghostscript/Resource/CMap/GBT-EUC-V
+share/ghostscript/Resource/CMap/GBT-H
+share/ghostscript/Resource/CMap/GBT-V
+share/ghostscript/Resource/CMap/GBTpc-EUC-H
+share/ghostscript/Resource/CMap/GBTpc-EUC-V
+share/ghostscript/Resource/CMap/GBpc-EUC-H
+share/ghostscript/Resource/CMap/GBpc-EUC-UCS2
+share/ghostscript/Resource/CMap/GBpc-EUC-UCS2C
+share/ghostscript/Resource/CMap/GBpc-EUC-V
+share/ghostscript/Resource/CMap/H
+share/ghostscript/Resource/CMap/HKdla-B5-H
+share/ghostscript/Resource/CMap/HKdla-B5-V
+share/ghostscript/Resource/CMap/HKdlb-B5-H
+share/ghostscript/Resource/CMap/HKdlb-B5-V
+share/ghostscript/Resource/CMap/HKgccs-B5-H
+share/ghostscript/Resource/CMap/HKgccs-B5-V
+share/ghostscript/Resource/CMap/HKm314-B5-H
+share/ghostscript/Resource/CMap/HKm314-B5-V
+share/ghostscript/Resource/CMap/HKm471-B5-H
+share/ghostscript/Resource/CMap/HKm471-B5-V
+share/ghostscript/Resource/CMap/HKscs-B5-H
+share/ghostscript/Resource/CMap/HKscs-B5-V
+share/ghostscript/Resource/CMap/Hankaku
+share/ghostscript/Resource/CMap/Hiragana
+share/ghostscript/Resource/CMap/Hojo-EUC-H
+share/ghostscript/Resource/CMap/Hojo-EUC-V
+share/ghostscript/Resource/CMap/Hojo-H
+share/ghostscript/Resource/CMap/Hojo-V
+share/ghostscript/Resource/CMap/Identity-H
+share/ghostscript/Resource/CMap/Identity-V
+share/ghostscript/Resource/CMap/KSC-EUC-H
+share/ghostscript/Resource/CMap/KSC-EUC-V
+share/ghostscript/Resource/CMap/KSC-H
+share/ghostscript/Resource/CMap/KSC-Johab-H
+share/ghostscript/Resource/CMap/KSC-Johab-V
+share/ghostscript/Resource/CMap/KSC-V
+share/ghostscript/Resource/CMap/KSCms-UHC-HW-H
+share/ghostscript/Resource/CMap/KSCms-UHC-HW-V
+share/ghostscript/Resource/CMap/KSCms-UHC-UCS2
+share/ghostscript/Resource/CMap/KSCms-UHC-V
+share/ghostscript/Resource/CMap/KSCms-UHC-H
+share/ghostscript/Resource/CMap/KSCpc-EUC-UCS2C
+share/ghostscript/Resource/CMap/KSCpc-EUC-H
+share/ghostscript/Resource/CMap/KSCpc-EUC-V
+share/ghostscript/Resource/CMap/Katakana
+share/ghostscript/Resource/CMap/NWP-H
+share/ghostscript/Resource/CMap/NWP-V
+share/ghostscript/Resource/CMap/RKSJ-H
+share/ghostscript/Resource/CMap/RKSJ-V
+share/ghostscript/Resource/CMap/Roman
+share/ghostscript/Resource/CMap/UniCNS-UCS2-H
+share/ghostscript/Resource/CMap/UniCNS-UCS2-V
+share/ghostscript/Resource/CMap/UniCNS-UTF8-H
+share/ghostscript/Resource/CMap/UniCNS-UTF8-V
+share/ghostscript/Resource/CMap/UniCNS-UTF16-H
+share/ghostscript/Resource/CMap/UniCNS-UTF16-V
+share/ghostscript/Resource/CMap/UniCNS-UTF32-H
+share/ghostscript/Resource/CMap/UniCNS-UTF32-V
+share/ghostscript/Resource/CMap/UniGB-UCS2-H
+share/ghostscript/Resource/CMap/UniGB-UCS2-V
+share/ghostscript/Resource/CMap/UniGB-UTF8-H
+share/ghostscript/Resource/CMap/UniGB-UTF8-V
+share/ghostscript/Resource/CMap/UniHojo-UCS2-H
+share/ghostscript/Resource/CMap/UniHojo-UCS2-V
+share/ghostscript/Resource/CMap/UniHojo-UTF8-H
+share/ghostscript/Resource/CMap/UniHojo-UTF8-V
+share/ghostscript/Resource/CMap/UniJIS-UCS2-H
+share/ghostscript/Resource/CMap/UniJIS-UCS2-HW-H
+share/ghostscript/Resource/CMap/UniJIS-UCS2-HW-V
+share/ghostscript/Resource/CMap/UniJIS-UCS2-V
+share/ghostscript/Resource/CMap/UniJIS-UTF8-H
+share/ghostscript/Resource/CMap/UniJIS-UTF8-V
+share/ghostscript/Resource/CMap/UniJISPro-UCS2-HW-V
+share/ghostscript/Resource/CMap/UniJISPro-UCS2-V
+share/ghostscript/Resource/CMap/UniJISPro-UTF8-V
+share/ghostscript/Resource/CMap/UniKS-UCS2-H
+share/ghostscript/Resource/CMap/UniKS-UCS2-V
+share/ghostscript/Resource/CMap/UniKS-UTF8-H
+share/ghostscript/Resource/CMap/UniKS-UTF8-V
+share/ghostscript/Resource/CMap/V
+share/ghostscript/Resource/CMap/WP-Symbol
+share/ghostscript/Resource/CMap/Adobe-GB1-4
+share/ghostscript/Resource/CMap/CNS01-RKSJ-H
+share/ghostscript/Resource/CMap/CNS02-RKSJ-H
+share/ghostscript/Resource/CMap/CNS03-RKSJ-H
+share/ghostscript/Resource/CMap/CNS04-RKSJ-H
+share/ghostscript/Resource/CMap/CNS05-RKSJ-H
+share/ghostscript/Resource/CMap/CNS06-RKSJ-H
+share/ghostscript/Resource/CMap/CNS07-RKSJ-H
+share/ghostscript/Resource/CMap/CNS15-RKSJ-H
+share/ghostscript/Resource/CMap/GB-RKSJ-H
+share/ghostscript/Resource/CMap/GBK2K-H
+share/ghostscript/Resource/CMap/GBK2K-V
+share/ghostscript/Resource/CMap/GBT-RKSJ-H
+share/ghostscript/Resource/CMap/HK-RKSJ-H
+share/ghostscript/Resource/CMap/Hojo-RKSJ-H
+share/ghostscript/Resource/CMap/KSC-RKSJ-H
+share/ghostscript/Resource/CMap/KSC2-RKSJ-H
+share/ghostscript/Resource/CMap/TCVN-RKSJ-H
+share/ghostscript/Resource/ac14/cid2code.txt
+share/ghostscript/Resource/ac14/CMap/Adobe-CNS1-0
+share/ghostscript/Resource/ac14/CMap/Adobe-CNS1-1
+share/ghostscript/Resource/ac14/CMap/Adobe-CNS1-2
+share/ghostscript/Resource/ac14/CMap/Adobe-CNS1-3
+share/ghostscript/Resource/ac14/CMap/Adobe-CNS1-4
+share/ghostscript/Resource/ac14/CMap/B5-H
+share/ghostscript/Resource/ac14/CMap/B5-V
+share/ghostscript/Resource/ac14/CMap/B5pc-H
+share/ghostscript/Resource/ac14/CMap/B5pc-V
+share/ghostscript/Resource/ac14/CMap/CNS-EUC-H
+share/ghostscript/Resource/ac14/CMap/CNS-EUC-V
+share/ghostscript/Resource/ac14/CMap/CNS1-H
+share/ghostscript/Resource/ac14/CMap/CNS1-V
+share/ghostscript/Resource/ac14/CMap/CNS2-H
+share/ghostscript/Resource/ac14/CMap/CNS2-V
+share/ghostscript/Resource/ac14/CMap/ETHK-B5-H
+share/ghostscript/Resource/ac14/CMap/ETHK-B5-V
+share/ghostscript/Resource/ac14/CMap/ETen-B5-H
+share/ghostscript/Resource/ac14/CMap/ETen-B5-V
+share/ghostscript/Resource/ac14/CMap/HKdla-B5-H
+share/ghostscript/Resource/ac14/CMap/HKdla-B5-V
+share/ghostscript/Resource/ac14/CMap/HKdlb-B5-H
+share/ghostscript/Resource/ac14/CMap/HKdlb-B5-V
+share/ghostscript/Resource/ac14/CMap/HKgccs-B5-H
+share/ghostscript/Resource/ac14/CMap/HKgccs-B5-V
+share/ghostscript/Resource/ac14/CMap/HKm314-B5-H
+share/ghostscript/Resource/ac14/CMap/HKm314-B5-V
+share/ghostscript/Resource/ac14/CMap/HKm471-B5-H
+share/ghostscript/Resource/ac14/CMap/HKm471-B5-V
+share/ghostscript/Resource/ac14/CMap/HKscs-B5-H
+share/ghostscript/Resource/ac14/CMap/HKscs-B5-V
+share/ghostscript/Resource/ac14/CMap/UniCNS-UCS2-H
+share/ghostscript/Resource/ac14/CMap/UniCNS-UCS2-V
+share/ghostscript/Resource/ac14/CMap/UniCNS-UTF16-H
+share/ghostscript/Resource/ac14/CMap/UniCNS-UTF16-V
+share/ghostscript/Resource/ac14/CMap/UniCNS-UTF32-H
+share/ghostscript/Resource/ac14/CMap/UniCNS-UTF32-V
+share/ghostscript/Resource/ac14/CMap/UniCNS-UTF8-H
+share/ghostscript/Resource/ac14/CMap/UniCNS-UTF8-V
+share/ghostscript/Resource/ai0/CMap/Identity-H
+share/ghostscript/Resource/ai0/CMap/Identity-V
+share/ghostscript/Resource/aj14/cid2code.txt
+share/ghostscript/Resource/aj14/CMap/78-EUC-H
+share/ghostscript/Resource/aj14/CMap/78-EUC-V
+share/ghostscript/Resource/aj14/CMap/78-H
+share/ghostscript/Resource/aj14/CMap/78-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/78-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/78-V
+share/ghostscript/Resource/aj14/CMap/78ms-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/78ms-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/83pv-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/90ms-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/90ms-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/90msp-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/90msp-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/90pv-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/90pv-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/Add-H
+share/ghostscript/Resource/aj14/CMap/Add-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/Add-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/Add-V
+share/ghostscript/Resource/aj14/CMap/Adobe-Japan1-0
+share/ghostscript/Resource/aj14/CMap/Adobe-Japan1-1
+share/ghostscript/Resource/aj14/CMap/Adobe-Japan1-2
+share/ghostscript/Resource/aj14/CMap/Adobe-Japan1-3
+share/ghostscript/Resource/aj14/CMap/Adobe-Japan1-4
+share/ghostscript/Resource/aj14/CMap/EUC-H
+share/ghostscript/Resource/aj14/CMap/EUC-V
+share/ghostscript/Resource/aj14/CMap/Ext-H
+share/ghostscript/Resource/aj14/CMap/Ext-RKSJ-H
+share/ghostscript/Resource/aj14/CMap/Ext-RKSJ-V
+share/ghostscript/Resource/aj14/CMap/Ext-V
+share/ghostscript/Resource/aj14/CMap/H
+share/ghostscript/Resource/aj14/CMap/Hankaku
+share/ghostscript/Resource/aj14/CMap/Hiragana
+share/ghostscript/Resource/aj14/CMap/Katakana
+share/ghostscript/Resource/aj14/CMap/NWP-H
+share/ghostscript/Resource/aj14/CMap/NWP-V
+share/ghostscript/Resource/aj14/CMap/RKSJ-H
+share/ghostscript/Resource/aj14/CMap/RKSJ-V
+share/ghostscript/Resource/aj14/CMap/Roman
+share/ghostscript/Resource/aj14/CMap/UniJIS-UCS2-H
+share/ghostscript/Resource/aj14/CMap/UniJIS-UCS2-HW-H
+share/ghostscript/Resource/aj14/CMap/UniJIS-UCS2-HW-V
+share/ghostscript/Resource/aj14/CMap/UniJIS-UCS2-V
+share/ghostscript/Resource/aj14/CMap/UniJIS-UTF8-H
+share/ghostscript/Resource/aj14/CMap/UniJIS-UTF8-V
+share/ghostscript/Resource/aj14/CMap/UniJISPro-UCS2-HW-V
+share/ghostscript/Resource/aj14/CMap/UniJISPro-UCS2-V
+share/ghostscript/Resource/aj14/CMap/UniJISPro-UTF8-V
+share/ghostscript/Resource/aj14/CMap/V
+share/ghostscript/Resource/aj14/CMap/WP-Symbol
+share/ghostscript/Resource/aj20/cid2code.txt
+share/ghostscript/Resource/aj20/CMap/Adobe-Japan2-0
+share/ghostscript/Resource/aj20/CMap/Hojo-EUC-H
+share/ghostscript/Resource/aj20/CMap/Hojo-EUC-V
+share/ghostscript/Resource/aj20/CMap/Hojo-H
+share/ghostscript/Resource/aj20/CMap/Hojo-V
+share/ghostscript/Resource/aj20/CMap/UniHojo-UCS2-H
+share/ghostscript/Resource/aj20/CMap/UniHojo-UCS2-V
+share/ghostscript/Resource/aj20/CMap/UniHojo-UTF8-H
+share/ghostscript/Resource/aj20/CMap/UniHojo-UTF8-V
+share/ghostscript/Resource/ak12/cid2code.txt
+share/ghostscript/Resource/ak12/CMap/Adobe-Korea1-0
+share/ghostscript/Resource/ak12/CMap/Adobe-Korea1-1
+share/ghostscript/Resource/ak12/CMap/Adobe-Korea1-2
+share/ghostscript/Resource/ak12/CMap/KSC-EUC-H
+share/ghostscript/Resource/ak12/CMap/KSC-EUC-V
+share/ghostscript/Resource/ak12/CMap/KSC-H
+share/ghostscript/Resource/ak12/CMap/KSC-Johab-H
+share/ghostscript/Resource/ak12/CMap/KSC-Johab-V
+share/ghostscript/Resource/ak12/CMap/KSC-V
+share/ghostscript/Resource/ak12/CMap/KSCms-UHC-H
+share/ghostscript/Resource/ak12/CMap/KSCms-UHC-HW-H
+share/ghostscript/Resource/ak12/CMap/KSCms-UHC-HW-V
+share/ghostscript/Resource/ak12/CMap/KSCms-UHC-V
+share/ghostscript/Resource/ak12/CMap/KSCpc-EUC-H
+share/ghostscript/Resource/ak12/CMap/KSCpc-EUC-V
+share/ghostscript/Resource/ak12/CMap/UniKS-UCS2-H
+share/ghostscript/Resource/ak12/CMap/UniKS-UCS2-V
+share/ghostscript/Resource/ak12/CMap/UniKS-UTF8-H
+share/ghostscript/Resource/ak12/CMap/UniKS-UTF8-V
+share/ghostscript/Resource/pdfcorefont/chinese_s/Adobe-GB1-UCS2
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBK-EUC-UCS2
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBpc-EUC-UCS2
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBpc-EUC-UCS2C
+share/ghostscript/Resource/pdfcorefont/chinese_s/ReadMe.html
+share/ghostscript/Resource/pdfcorefont/chinese_s/GB-EUC-H
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBK-EUC-V
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBpc-EUC-H
+share/ghostscript/Resource/pdfcorefont/chinese_s/Identity-V
+share/ghostscript/Resource/pdfcorefont/chinese_s/GB-EUC-V
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBT-EUC-H
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBpc-EUC-V
+share/ghostscript/Resource/pdfcorefont/chinese_s/UniGB-UCS2-H
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBK-EUC-H
+share/ghostscript/Resource/pdfcorefont/chinese_s/GBT-EUC-V
+share/ghostscript/Resource/pdfcorefont/chinese_s/Identity-H
+share/ghostscript/Resource/pdfcorefont/chinese_s/UniGB-UCS2-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/Adobe-CNS1-UCS2
+share/ghostscript/Resource/pdfcorefont/chinese_t/B5pc-UCS2
+share/ghostscript/Resource/pdfcorefont/chinese_t/B5pc-UCS2C
+share/ghostscript/Resource/pdfcorefont/chinese_t/ETen-B5-H
+share/ghostscript/Resource/pdfcorefont/chinese_t/ETen-B5-UCS2
+share/ghostscript/Resource/pdfcorefont/chinese_t/ETenms-B5-H
+share/ghostscript/Resource/pdfcorefont/chinese_t/ETenms-B5-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/ReadMe.html
+share/ghostscript/Resource/pdfcorefont/chinese_t/B5pc-H
+share/ghostscript/Resource/pdfcorefont/chinese_t/CNS-EUC-H
+share/ghostscript/Resource/pdfcorefont/chinese_t/ETen-B5-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/Identity-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/UniCNS-UCS2-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/B5pc-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/CNS-EUC-V
+share/ghostscript/Resource/pdfcorefont/chinese_t/Identity-H
+share/ghostscript/Resource/pdfcorefont/chinese_t/UniCNS-UCS2-H
+share/ghostscript/Resource/pdfcorefont/japanese/90ms-RKSJ-UCS2
+share/ghostscript/Resource/pdfcorefont/japanese/90pv-RKSJ-UCS2
+share/ghostscript/Resource/pdfcorefont/japanese/90pv-RKSJ-UCS2C
+share/ghostscript/Resource/pdfcorefont/japanese/Adobe-Japan1-UCS2
+share/ghostscript/Resource/pdfcorefont/japanese/ReadMe.html
+share/ghostscript/Resource/pdfcorefont/japanese/83pv-RKSJ-H
+share/ghostscript/Resource/pdfcorefont/japanese/Add-RKSJ-V
+share/ghostscript/Resource/pdfcorefont/japanese/Identity-V
+share/ghostscript/Resource/pdfcorefont/japanese/90ms-RKSJ-H
+share/ghostscript/Resource/pdfcorefont/japanese/EUC-H
+share/ghostscript/Resource/pdfcorefont/japanese/UniJIS-UCS2-H
+share/ghostscript/Resource/pdfcorefont/japanese/90ms-RKSJ-V
+share/ghostscript/Resource/pdfcorefont/japanese/EUC-V
+share/ghostscript/Resource/pdfcorefont/japanese/UniJIS-UCS2-HW-H
+share/ghostscript/Resource/pdfcorefont/japanese/90msp-RKSJ-H
+share/ghostscript/Resource/pdfcorefont/japanese/Ext-RKSJ-H
+share/ghostscript/Resource/pdfcorefont/japanese/UniJIS-UCS2-HW-V
+share/ghostscript/Resource/pdfcorefont/japanese/90msp-RKSJ-V
+share/ghostscript/Resource/pdfcorefont/japanese/Ext-RKSJ-V
+share/ghostscript/Resource/pdfcorefont/japanese/UniJIS-UCS2-V
+share/ghostscript/Resource/pdfcorefont/japanese/90pv-RKSJ-H
+share/ghostscript/Resource/pdfcorefont/japanese/H
+share/ghostscript/Resource/pdfcorefont/japanese/V
+share/ghostscript/Resource/pdfcorefont/japanese/Add-RKSJ-H
+share/ghostscript/Resource/pdfcorefont/japanese/Identity-H
+share/ghostscript/Resource/pdfcorefont/korean/Adobe-Korea1-UCS2
+share/ghostscript/Resource/pdfcorefont/korean/KSCms-UHC-UCS2
+share/ghostscript/Resource/pdfcorefont/korean/KSCpc-EUC-UCS2C
+share/ghostscript/Resource/pdfcorefont/korean/ReadMe.html
+share/ghostscript/Resource/pdfcorefont/korean/Identity-H
+share/ghostscript/Resource/pdfcorefont/korean/KSC-EUC-V
+share/ghostscript/Resource/pdfcorefont/korean/KSCms-UHC-HW-V
+share/ghostscript/Resource/pdfcorefont/korean/KSCpc-EUC-V
+share/ghostscript/Resource/pdfcorefont/korean/Identity-V
+share/ghostscript/Resource/pdfcorefont/korean/KSCms-UHC-H
+share/ghostscript/Resource/pdfcorefont/korean/KSCms-UHC-V
+share/ghostscript/Resource/pdfcorefont/korean/UniKS-UCS2-H
+share/ghostscript/Resource/pdfcorefont/korean/KSC-EUC-H
+share/ghostscript/Resource/pdfcorefont/korean/KSCms-UHC-HW-H
+share/ghostscript/Resource/pdfcorefont/korean/KSCpc-EUC-H
+share/ghostscript/Resource/pdfcorefont/korean/UniKS-UCS2-V
+share/ghostscript/Resource/rksj-cmaps/CNS01-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS02-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS03-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS04-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS05-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS06-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS07-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/CNS15-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/GB-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/GBT-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/HK-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/Hojo-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/KSC-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/KSC2-RKSJ-H
+share/ghostscript/Resource/rksj-cmaps/TCVN-RKSJ-H
+share/ghostscript/Resource/alias-cid.sh
+share/ghostscript/Resource/cid.sh
+share/ghostscript/Resource/ac1.sh
+share/ghostscript/Resource/ag1.sh
+share/ghostscript/Resource/aj1.sh
+share/ghostscript/Resource/aj2.sh
+share/ghostscript/Resource/ak1.sh
+share/ghostscript/Resource/alias-ac1.sh
+share/ghostscript/Resource/alias-ag1.sh
+share/ghostscript/Resource/alias-aj1.sh
+share/ghostscript/Resource/alias-aj2.sh
+share/ghostscript/Resource/alias-ak1.sh
+share/ghostscript/Resource/ag14/cid2code.txt
+share/ghostscript/Resource/ag14/CMap/Adobe-GB1-0
+share/ghostscript/Resource/ag14/CMap/GB-EUC-V
+share/ghostscript/Resource/ag14/CMap/GBK2K-V
+share/ghostscript/Resource/ag14/CMap/GBT-V
+share/ghostscript/Resource/ag14/CMap/UniGB-UCS2-V
+share/ghostscript/Resource/ag14/CMap/Adobe-GB1-1
+share/ghostscript/Resource/ag14/CMap/GB-H
+share/ghostscript/Resource/ag14/CMap/GBKp-EUC-H
+share/ghostscript/Resource/ag14/CMap/GBTpc-EUC-H
+share/ghostscript/Resource/ag14/CMap/UniGB-UTF8-H
+share/ghostscript/Resource/ag14/CMap/Adobe-GB1-2
+share/ghostscript/Resource/ag14/CMap/GB-V
+share/ghostscript/Resource/ag14/CMap/GBKp-EUC-V
+share/ghostscript/Resource/ag14/CMap/GBTpc-EUC-V
+share/ghostscript/Resource/ag14/CMap/UniGB-UTF8-V
+share/ghostscript/Resource/ag14/CMap/Adobe-GB1-3
+share/ghostscript/Resource/ag14/CMap/GBK-EUC-H
+share/ghostscript/Resource/ag14/CMap/GBT-EUC-H
+share/ghostscript/Resource/ag14/CMap/GBpc-EUC-H
+share/ghostscript/Resource/ag14/CMap/Adobe-GB1-4
+share/ghostscript/Resource/ag14/CMap/GBK-EUC-V
+share/ghostscript/Resource/ag14/CMap/GBT-EUC-V
+share/ghostscript/Resource/ag14/CMap/GBpc-EUC-V
+share/ghostscript/Resource/ag14/CMap/GB-EUC-H
+share/ghostscript/Resource/ag14/CMap/GBK2K-H
+share/ghostscript/Resource/ag14/CMap/GBT-H
+share/ghostscript/Resource/ag14/CMap/UniGB-UCS2-H
+@unexec rmdir %D/share/ghostscript/Resource/Font 2>/dev/null || true
+@dirrm share/ghostscript/Resource/CIDFont
+@dirrm share/ghostscript/Resource/CMap
+@dirrm share/ghostscript/Resource/ac14/CMap
+@dirrm share/ghostscript/Resource/ac14
+@dirrm share/ghostscript/Resource/ag14/CMap
+@dirrm share/ghostscript/Resource/ag14
+@dirrm share/ghostscript/Resource/ai0/CMap
+@dirrm share/ghostscript/Resource/ai0
+@dirrm share/ghostscript/Resource/aj14/CMap
+@dirrm share/ghostscript/Resource/aj14
+@dirrm share/ghostscript/Resource/aj20/CMap
+@dirrm share/ghostscript/Resource/aj20
+@dirrm share/ghostscript/Resource/ak12/CMap
+@dirrm share/ghostscript/Resource/ak12
+@dirrm share/ghostscript/Resource/pdfcorefont/chinese_s
+@dirrm share/ghostscript/Resource/pdfcorefont/chinese_t
+@dirrm share/ghostscript/Resource/pdfcorefont/japanese
+@dirrm share/ghostscript/Resource/pdfcorefont/korean
+@dirrm share/ghostscript/Resource/pdfcorefont
+@dirrm share/ghostscript/Resource/rksj-cmaps
+@dirrm share/ghostscript/Resource
+%%PORTDOCS%%@dirrm share/doc/ghostscript/%%GS_VERSION%%/CJK
+%%PORTDOCS%%@dirrm share/doc/ghostscript/%%GS_VERSION%%/printers/epag-3.09
+%%PORTDOCS%%@dirrm share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmd2k
+%%PORTDOCS%%@dirrm share/doc/ghostscript/%%GS_VERSION%%/printers/gdevmjc
+%%PORTDOCS%%@dirrm share/doc/ghostscript/%%GS_VERSION%%/printers
diff --git a/print/ghostscript-gnu-commfont/scripts/configure b/print/ghostscript-gnu-commfont/scripts/configure
new file mode 100644
index 00000000000..cce57674897
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/scripts/configure
@@ -0,0 +1,252 @@
+#! /bin/sh
+
+# driverselection
+/usr/bin/dialog --title "GNU Ghostscript driver configuration" --clear \
+ --checklist "\n\
+This new ghostscript driver configuration dialog allows you to choose \n\
+only those gs drivers, you really need. Don't think too economical, since \n\
+other programs in the ports collection might need some of the default gs \n\
+file format drivers. The gs5 default drivers are preselected. \n\
+Have fun with this new configuration style ! -andreas \n\n\
+ Please choose options by pressing SPACE to TOGGLE an option ON/OFF ?" -1 -1 9\
+ "x11" "X Window System version 11, release >=4" ON \
+ "x11alpha" "X Window System masquer. as device with alpha capability" ON \
+ "x11cmyk" "X Window System masquer. as 1-bit-per-plane CMYK device" ON \
+ "x11cmyk2" "X Window System as a 2-bit-per-plane CMYK device" OFF \
+ "x11cmyk4" "X Window System as a 4-bit-per-plane CMYK device" OFF \
+ "x11cmyk8" "X Window System as an 8-bit-per-plane CMYK device" OFF \
+ "x11gray2" "X Window System as a 2-bit gray-scale device" ON \
+ "x11gray4" "X Window System as a 4-bit gray-scale device" ON \
+ "x11mono" "X Window System masquer. as black-and-white device" ON \
+ "x11rg16x" "X Window System with G5/B5/R6 pixel layout for testing" ON \
+ "x11rg32x" "X Window System with G11/B10/R11 pixel layout for testing" ON \
+ "md2k" "ALPS MD2000/2010/4000/1300/1500/5000 driver" ON \
+ "md5k" "ALPS MD5000 driver" ON \
+ "md50Mono" "ALPS MD-5000 Monochrome [ALPS]" ON \
+ "md50Eco" "ALPS MD-5000 Eco Mode [ALPS]" ON \
+ "md1xMono" "ALPS MD-1x Monochrome [ALPS]" ON \
+ "appledmp" "Apple Dot Matrix Printer / Imagewriter" OFF \
+ "iwhi" "Apple Imagewriter, high-resolution mode" OFF \
+ "iwlo" "Apple Imagewriter, low-resolution mode" OFF \
+ "iwlq" "Apple Imagewriter LQ in 320 x 216 dpi mode" OFF \
+ "hl7x0" "Brother HL720 and HL730 (HL760=PCL), MFC6550MC Fax Machine" OFF \
+ "bj10e" "Canon BubbleJet BJ10e" ON \
+ "bj10v" "Canon BubbleJet BJ10v" ON \
+ "bj10vh" "Canon BubbleJet BJ10vh" ON \
+ "bj200" "Canon BubbleJet BJ200 and BJC-240(b&w)" ON \
+ "bjc600" "Canon Color BJC-600/4xxx/70 + Apple StyleWriter 2x00" ON \
+ "bjc800" "Canon Color BubbleJet BJC-240/800" ON \
+ "lbp8" "Canon LBP-8II laser printer" OFF \
+ "lips2p" "Canon LIPS II+ [LIPS]" ON \
+ "lips3" "Canon LIPS III [LIPS]" ON \
+ "lips4" "Canon LIPS IV [LIPS]" ON \
+ "bjc880j" "Canon LIPS IVc (BJC-680J/880J) [LIPS]" ON \
+ "lips4v" "Canon LIPS IV, vector output mode [LIPS]" ON \
+ "m8510" "C.Itoh M8510 printer" OFF \
+ "coslw2p" "CoStar LabelWriter II II/Plus" OFF \
+ "coslwxl" "CoStar LabelWriter XL" OFF \
+ "stp" "Configurable Canon/Epson/Lexmark/HP driver [Gimp-Print]" ON \
+ "uniprint" "Configurable ESC/P,ESC/P2,HP-RTL/PCL,P2X mono/color driver" ON \
+ "dl2100" "DEClaser 2100" OFF \
+ "la50" "DEC LA50" OFF \
+ "la70" "DEC LA70" OFF \
+ "la75" "DEC LA75" OFF \
+ "la75plus" "DEC LA75plus" OFF \
+ "lj250" "DEC LJ250 Companion color printer" OFF \
+ "declj250" "DEC LJ250 driver (alternate)" OFF \
+ "ln03" "DEC LN03" OFF \
+ "ap3250" "Epson ActionPrinter 3250" OFF \
+ "epag" "Epson ESC/Page LASER printer (generic) [EPAG]" ON \
+ "epson" "Epson-compatible dot matrix, 9/24-pin" OFF \
+ "eps9mid" "Epson-compatible 9-pin, interleaved lines, medium resol" OFF \
+ "eps9high" "Epson-compatible 9-pin, interleaved lines, triple resol" OFF \
+ "lp8000" "Epson LP-8000 line printer" OFF \
+ "lp8800c" "Epson LP-8800C color laser printer [EPLASER]" ON \
+ "lp8300c" "Epson LP-8300C color laser printer [EPLASER]" ON \
+ "lp8500c" "Epson LP-8500C color laser printer [EPLASER]" ON \
+ "lp3000c" "Epson LP-3000C color laser printer [EPLASER]" ON \
+ "lp8200c" "Epson LP-8200C color laser printer [EPLASER]" ON \
+ "lp8000c" "Epson LP-8000C color laser printer [EPLASER]" ON \
+ "lp2200" "Epson LP-2200 laser printer [EPLASER]" ON \
+ "lp9400" "Epson LP-9400(R) laser printer [EPLASER]" ON \
+ "lp8700" "Epson LP-8700(R) laser printer [EPLASER]" ON \
+ "lp8100" "Epson LP-8100(R) laser printer [EPLASER]" ON \
+ "lp8600f" "Epson LP-8600FX(N) laser printer [EPLASER]" ON \
+ "lp8400f" "Epson LP-8400FX(N) laser printer [EPLASER]" ON \
+ "lp8300f" "Epson LP-8300F laser printer [EPLASER]" ON \
+ "lp1900" "Epson LP-1900(N) laser printer [EPLASER]" ON \
+ "lp9600s" "Epson LP-9600S laser printer [EPLASER]" ON \
+ "lp9600" "Epson LP-9600 laser printer [EPLASER]" ON \
+ "lp9300" "Epson LP-9300 laser printer [EPLASER]" ON \
+ "lp8600" "Epson LP-8600FX(N) laser printer [EPLASER]" ON \
+ "lp1800" "Epson LP-1800 laser printer [EPLASER]" ON \
+ "lq850" "Epson LQ-850 (360x360), ok for Canon BJ300 in LQ850 emul" OFF \
+ "epsonc" "Epson LQ-2550 and Fujitsu 3400/2400/1200 color" OFF \
+ "mjc180" "Epson MachJet series 180dpi, CMYK" ON \
+ "mjc360" "Epson MachJet series 360dpi, CMYK" ON \
+ "mjc720" "Epson MachJet series 720dpi, CMYK" ON \
+ "mj500c" "Epson MachJet MJ-500C 360dpi, CMY or mono" ON \
+ "st800" "Epson Stylus 800 printer" OFF \
+ "stcolor" "Epson Stylus Color and II/IIs/1500 (see driver docu)" OFF \
+ "photoex" "Epson Stylus Color Photo, Photo EX, Photo 700" OFF \
+ "lp2563" "HP 2563B line printer" OFF \
+ "dnj650c" "HP DesignJet 650C" OFF \
+ "deskjet" "HP DeskJet and DeskJet Plus" ON \
+ "djet500" "HP DeskJet 500 (for DeskJet 600 use -r600)" ON \
+ "cdeskjet" "HP DeskJet 500C, 1 bit/pixel color" ON \
+ "djet500c" "HP DeskJet 500C alternate driver, not for 550/560C" OFF \
+ "cdjcolor" "HP DeskJet 500C/540C, 24bit/pxl+FS dith, Citizen Projet IIc" ON \
+ "cdjmono" "HP DeskJet 500/510/520/540C b/w printing" ON \
+ "cdj500" "HP DeskJet 500/540C (same as cdjcolor)" OFF \
+ "cdj550" "HP DeskJet 550C/560C/660C/660Cse" ON \
+ "laserjet" "HP LaserJet" ON \
+ "ljetplus" "HP LaserJet Plus" ON \
+ "ljet2p" "HP LaserJet IId/IIp/III* with TIFF compression" ON \
+ "ljet3" "HP LaserJet III* with Delta Row compression" ON \
+ "ljet3d" "HP LaserJet IIID with duplex capability" ON \
+ "ljet4" "HP LaserJet 4 and 5L/5P (not real LJ5), defaults to 600 dpi" ON \
+ "ljet4d" "HP LaserJet 4 (defaults to 600 dpi) with duplex" ON \
+ "lj4dith" "HP LaserJet 4 with Floyd-Steinberg dithering" OFF \
+ "cljet5" "HP LaserJet 5/5M Color (new driver, old=cljet5pr)" ON \
+ "cljet5c" "HP LaserJet 5/5M Color Simple" ON \
+ "cljet5pr" "HP LaserJet 5/5M Color (old drv. with rotation hacks/flaws)" ON \
+ "lj5mono" "HP LaserJet 5 and 6 family (PCL5 / PCL XL), bitmap" ON \
+ "lj5gray" "HP LaserJet 5 and 6 family, gray-scale bitmap" ON \
+ "pj" "HP PaintJet XL driver " ON \
+ "pjetxl" "HP PaintJet XL driver (alternate)" OFF \
+ "pjxl" "HP PaintJet XL color printer" ON \
+ "paintjet" "HP PaintJet color printer (alternate)" OFF \
+ "pjxl300" "HP PaintJet XL300, DeskJet 1200C color printer, HP CopyJet" ON \
+ "pxlmono" "HP PCL XL black-and-white printers (LaserJet 5 and 6 family)" ON \
+ "pxlcolor" "HP PCL XL color printers (Color LaserJet 4500/5000)" ON \
+ "ijs" "HP PhotoSmart/DeskJet series (HP developed driver) [HPinkjet]" ON \
+ "ibmpro" "IBM 9-pin Proprinter" OFF \
+ "jetp3852" "IBM Jetprinter ink-jet color (Model #3852)" OFF \
+ "imagen" "Imagen ImPress printers" OFF \
+ "fs600" "Kyocera FS-600 (600 dpi)" OFF \
+ "lxm5700m" "Lexmark 5700 monotone" OFF \
+ "cp50" "Mitsubishi CP50 color" OFF \
+ "necp6" "NEC PinWriter P6/P6+/P60, 360x360 DPI resol" OFF \
+ "npdl" "NEC Printer Description Language [NPDL]" ON \
+ "oce9050" "OCE 9050 printer" OFF \
+ "oki182" "Okidata MicroLine 182" OFF \
+ "okiibm" "Okidata MicroLine IBM-compatible printers" OFF \
+ "atx23" "Practical Automation ATX-23 label printer" OFF \
+ "atx24" "Practical Automation ATX-24 label printer" OFF \
+ "atx38" "Practical Automation ATX-38 label printer" OFF \
+ "r4081" "Ricoh 4081 laser printer" OFF \
+ "rpdl" "Ricoh Printer Description Language [RPDL]" ON \
+ "sj48" "StarJet 48 inkjet printer" OFF \
+ "t4693d2" "Tektronix 4693d color, 2 bits per R/G/B component" OFF \
+ "t4693d4" "Tektronix 4693d color, 4 bits per R/G/B component" OFF \
+ "t4693d8" "Tektronix 4693d color, 8 bits per R/G/B component" OFF \
+ "tek4696" "Tektronix 4695/4696 inkjet plotter" OFF \
+ "xes" "Xerox XES 2700/3700/4045" OFF \
+ "bmpmono" "BMP Monochrome" ON \
+ "bmpgray" "BMP 8-bit gray" ON \
+ "bmp16" "BMP 4-bit EGA/VGA" ON \
+ "bmp256" "BMP 8-bit 256-color" ON \
+ "bmp16m" "BMP 24-bit" ON \
+ "bmp32b" "BMP 32-bit pseudo-.BMP" ON \
+ "bmpsep1" "BMP Separated 1-bit CMYK" ON \
+ "bmpsep8" "BMP Separated 8-bit CMYK" ON \
+ "ccr" "CalComp Raster format" OFF \
+ "cgmmono" "CGM Monochrome -- LOW LEVEL OUTPUT ONLY" OFF \
+ "cgm8" "CGM 8-bit 256-color -- DITTO" OFF \
+ "cgm24" "CGM 24-bit color -- DITTO" OFF \
+ "cif" "CIF file format for VLSI" OFF \
+ "sxlcrt" "CRT sixels, e.g. for VT240-like terminals" OFF \
+ "dfaxhigh" "DigiBoard, DigiFAX software format (high resol)" OFF \
+ "dfaxlow" "DigiFAX low (normal) resol" OFF \
+ "faxg3" "Group 3 fax, with EOLs but no header or EOD" ON \
+ "faxg32d" "Group 3 2-D fax, with EOLs but no header or EOD" ON \
+ "faxg4" "Group 4 fax, with EOLs but no header or EOD" ON \
+ "miff24" "ImageMagick MIFF, 24-bit direct color, RLE compressed" OFF \
+ "inferno" "Inferno bitmaps" OFF \
+ "jpeg" "JPEG format, RGB output" ON \
+ "jpeggray" "JPEG format, gray output" ON \
+ "mgrmono" "MGR devices 1-bit monochrome" OFF \
+ "mgrgray2" "MGR devices 2-bit gray scale" OFF \
+ "mgrgray4" "MGR devices 4-bit gray scale" OFF \
+ "mgrgray8" "MGR devices 8-bit gray scale" OFF \
+ "mgr4" "MGR devices 4-bit (VGA) color" OFF \
+ "mgr8" "MGR devices 8-bit color" OFF \
+ "pcxmono" "PCX file format, monochrome 1-bit b/w" ON \
+ "pcxgray" "PCX file format, 8-bit gray scale" ON \
+ "pcx16" "PCX file format, 4-bit planar EGA/VGA color" ON \
+ "pcx256" "PCX file format, 8-bit chunky color" ON \
+ "pcx24b" "PCX file format, 24-bit color 3x8-bit planes" ON \
+ "pcxcmyk" "PCX file format, 4-bit chunky CMYK color" ON \
+ "pdfwrite" "PDF output (like Adobe Acrobat Distiller)" ON \
+ "bit" "Plain bits, monochrome" ON \
+ "bitrgb" "Plain bits, RGB" ON \
+ "bitcmyk" "Plain bits, CMYK" ON \
+ "plan9bm" "Plan 9 bitmap format" OFF \
+ "pbm" "Portable Bitmap, plain format" ON \
+ "pbmraw" "Portable Bitmap, raw format" ON \
+ "pgm" "Portable Graymap, plain format" ON \
+ "pgmraw" "Portable Graymap, raw format" ON \
+ "pgnm" "Portable Graymap, plain format, optim. to PBM" ON \
+ "pgnmraw" "Portable Graymap, raw format, optim. to PBM" ON \
+ "pnm" "Portable Pixmap, plain format RGB, optim. to PGM/PBM" ON \
+ "pnmraw" "Portable Pixmap, raw format RGB, optim. to PGM/PBM" ON \
+ "ppm" "Portable Pixmap, plain format RGB" ON \
+ "ppmraw" "Portable Pixmap, raw format RGB" ON \
+ "pkm" "Portable inKmap (plain format) (4-bit CMYK => RGB)" ON \
+ "pkmraw" "Portable inKmap (raw format) (4-bit CMYK => RGB)" ON \
+ "pksm" "Portable Separated map (plain) (4-bit CMYK => 4 pages)" ON \
+ "pksmraw" "Portable Separated map (raw) (4-bit CMYK => 4 pages)" ON \
+ "pngmono" "PNG Monochrome Portable Network Graphics" ON \
+ "pnggray" "PNG 8-bit gray Portable Network Graphics" ON \
+ "png16" "PNG 4-bit color Portable Network Graphics" ON \
+ "png256" "PNG 8-bit color Portable Network Graphics" ON \
+ "png16m" "PNG 24-bit color Portable Network Graphics" ON \
+ "psmono" "PostScript (Level 1) monochrome image" ON \
+ "psgray" "PostScript (Level 1) 8-bit gray image" ON \
+ "psrgb" "PostScript (Level 2) 24-bit color image" ON \
+ "pswrite" "PostScript output (like PostScript Distillery)" ON \
+ "epswrite" "EPS output (like PostScript Distillery)" ON \
+ "sgirgb" "SGI RGB pixmap format" OFF \
+ "sunhmono" "Harlequin variant of 1-bit Sun raster file" OFF \
+ "tiffcrle" "TIFF CCITT RLE 1 dim = Group 3 fax with no EOLs" ON \
+ "tiffg3" "TIFF Group 3 fax with EOLs" ON \
+ "tiffg32d" "TIFF Group 3 2-D fax" ON \
+ "tiffg4" "TIFF Group 4 fax" ON \
+ "tiff12nc" "TIFF 12-bit RGB, no compression" ON \
+ "tiff24nc" "TIFF 24-bit RGB, no compression, NeXT std. format" ON \
+ "tifflzw" "TIFF LZW, tag = 5, mono" ON \
+ "tiffpack" "TIFF PackBits, tag = 32773, mono" ON \
+2> /tmp/checklist.tmp.$$
+
+retval=$?
+
+choice=`cat /tmp/checklist.tmp.$$`
+rm -f /tmp/checklist.tmp.$$
+
+case $retval in
+ 0) if [ -z "$choice" ]; then
+ echo "Nothing selected"
+ exit 1;
+ fi
+ ;;
+ 1) echo "Cancel pressed."
+ exit 1
+ ;;
+esac
+
+# bring it into the right format with '.dev' appended to each driver name
+#old:
+#echo "DEVICE_DEVS=$choice" \
+# | sed -e "s/\"//g" \
+# | sed -e "s/ /.dev /g" \
+# | sed -e "s/$/.dev/g" \
+# > ${WRKSRC}/src/unix-gcc.mak.new
+# XXX new:
+echo "DEVICE_DEVS=$choice" \
+ | perl -pe 's|"([A-Za-z0-9]+)"|\$(DD)\1.dev|g' \
+ > ${WRKSRC}/src/unix-gcc.mak.new
+
+# create one new Makefile, where DEVICE_DEVS contains all wanted devices
+sed -e '/^DEVICE_DEVS=/d' ${WRKSRC}/src/unix-gcc.mak \
+ >> ${WRKSRC}/src/unix-gcc.mak.new
+mv ${WRKSRC}/src/unix-gcc.mak.new ${WRKSRC}/src/unix-gcc.mak
diff --git a/print/ghostscript-gnu-commfont/scripts/configure.batch b/print/ghostscript-gnu-commfont/scripts/configure.batch
new file mode 100644
index 00000000000..cc8f4ff7084
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/scripts/configure.batch
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+cat - > ${WRKSRC}/src/unix-gcc.mak.new << !EOT
+ifndef WITHOUT_X11
+DEVICE_DEVS= \$(DD)x11.dev \$(DD)x11alpha.dev \$(DD)x11cmyk.dev \$(DD)x11cmyk2.dev \$(DD)x11cmyk4.dev \$(DD)x11cmyk8.dev \$(DD)x11gray2.dev \$(DD)x11gray4.dev \$(DD)x11mono.dev \$(DD)x11rg16x.dev \$(DD)x11rg32x.dev
+endif
+
+DEVICE_DEVS+= \$(DD)md2k.dev \$(DD)md5k.dev \$(DD)md50Mono.dev \$(DD)md50Eco.dev \$(DD)md1xMono.dev \$(DD)appledmp.dev \$(DD)iwhi.dev \$(DD)iwlo.dev \$(DD)iwlq.dev \$(DD)hl7x0.dev \$(DD)bj10e.dev \$(DD)bj10v.dev \$(DD)bj10vh.dev \$(DD)bj200.dev \$(DD)bjc600.dev \$(DD)bjc800.dev \$(DD)lbp8.dev \$(DD)lips2p.dev \$(DD)lips3.dev \$(DD)lips4.dev \$(DD)bjc880j.dev \$(DD)lips4v.dev \$(DD)m8510.dev \$(DD)coslw2p.dev \$(DD)coslwxl.dev \$(DD)stp.dev \$(DD)uniprint.dev \$(DD)dl2100.dev \$(DD)la50.dev \$(DD)la70.dev \$(DD)la75.dev \$(DD)la75plus.dev \$(DD)lj250.dev \$(DD)declj250.dev \$(DD)ln03.dev \$(DD)ap3250.dev \$(DD)epag.dev \$(DD)epson.dev \$(DD)eps9mid.dev \$(DD)eps9high.dev \$(DD)lp8000.dev \$(DD)lp8800c.dev \$(DD)lp8000c.dev \$(DD)lp8300c.dev \$(DD)lp8500c.dev \$(DD)lp3000c.dev \$(DD)lp8200c.dev \$(DD)lp8000c.dev \$(DD)lp2200.dev \$(DD)lp9400.dev \$(DD)lp8700.dev \$(DD)lp8100.dev \$(DD)lp8600f.dev \$(DD)lp8400f.dev \$(DD)lp8300f.dev \$(DD)lp1900.dev \$(DD)lp9600s.dev \$(DD)lp9600.dev \$(DD)lp9300.dev \$(DD)lp8600.dev \$(DD)lp1800.dev \$(DD)lq850.dev \$(DD)epsonc.dev \$(DD)mjc180.dev \$(DD)mjc360.dev \$(DD)mjc720.dev \$(DD)mj500c.dev \$(DD)st800.dev \$(DD)stcolor.dev \$(DD)photoex.dev \$(DD)lp2563.dev \$(DD)dnj650c.dev \$(DD)deskjet.dev \$(DD)djet500.dev \$(DD)cdeskjet.dev \$(DD)djet500c.dev \$(DD)cdjcolor.dev \$(DD)cdjmono.dev \$(DD)cdj500.dev \$(DD)cdj550.dev \$(DD)laserjet.dev \$(DD)ljetplus.dev \$(DD)ljet2p.dev \$(DD)ljet3.dev \$(DD)ljet3d.dev \$(DD)ljet4.dev \$(DD)ljet4d.dev \$(DD)lj4dith.dev \$(DD)cljet5.dev \$(DD)cljet5c.dev \$(DD)cljet5pr.dev \$(DD)lj5mono.dev \$(DD)lj5gray.dev \$(DD)pj.dev \$(DD)pjetxl.dev \$(DD)pjxl.dev \$(DD)paintjet.dev \$(DD)pjxl300.dev \$(DD)pxlmono.dev \$(DD)pxlcolor.dev \$(DD)ijs.dev \$(DD)ibmpro.dev \$(DD)jetp3852.dev \$(DD)imagen.dev \$(DD)fs600.dev \$(DD)lxm5700m.dev \$(DD)cp50.dev \$(DD)necp6.dev \$(DD)npdl.dev \$(DD)oce9050.dev \$(DD)oki182.dev \$(DD)okiibm.dev \$(DD)atx23.dev \$(DD)atx24.dev \$(DD)atx38.dev \$(DD)r4081.dev \$(DD)rpdl.dev \$(DD)sj48.dev \$(DD)t4693d2.dev \$(DD)t4693d4.dev \$(DD)t4693d8.dev \$(DD)tek4696.dev \$(DD)xes.dev \$(DD)bmpmono.dev \$(DD)bmpgray.dev \$(DD)bmp16.dev \$(DD)bmp256.dev \$(DD)bmp16m.dev \$(DD)bmp32b.dev \$(DD)bmpsep1.dev \$(DD)bmpsep8.dev \$(DD)ccr.dev \$(DD)cgmmono.dev \$(DD)cgm8.dev \$(DD)cgm24.dev \$(DD)cif.dev \$(DD)sxlcrt.dev \$(DD)dfaxhigh.dev \$(DD)dfaxlow.dev \$(DD)faxg3.dev \$(DD)faxg32d.dev \$(DD)faxg4.dev \$(DD)miff24.dev \$(DD)inferno.dev \$(DD)jpeg.dev \$(DD)jpeggray.dev \$(DD)mgrmono.dev \$(DD)mgrgray2.dev \$(DD)mgrgray4.dev \$(DD)mgrgray8.dev \$(DD)mgr4.dev \$(DD)mgr8.dev \$(DD)pcxmono.dev \$(DD)pcxgray.dev \$(DD)pcx16.dev \$(DD)pcx256.dev \$(DD)pcx24b.dev \$(DD)pcxcmyk.dev \$(DD)pdfwrite.dev \$(DD)bit.dev \$(DD)bitrgb.dev \$(DD)bitcmyk.dev \$(DD)plan9bm.dev \$(DD)pbm.dev \$(DD)pbmraw.dev \$(DD)pgm.dev \$(DD)pgmraw.dev \$(DD)pgnm.dev \$(DD)pgnmraw.dev \$(DD)pnm.dev \$(DD)pnmraw.dev \$(DD)ppm.dev \$(DD)ppmraw.dev \$(DD)pkm.dev \$(DD)pkmraw.dev \$(DD)pksm.dev \$(DD)pksmraw.dev \$(DD)pngmono.dev \$(DD)pnggray.dev \$(DD)png16.dev \$(DD)png256.dev \$(DD)png16m.dev \$(DD)psmono.dev \$(DD)psgray.dev \$(DD)psrgb.dev \$(DD)pswrite.dev \$(DD)epswrite.dev \$(DD)sgirgb.dev \$(DD)sunhmono.dev \$(DD)tiffcrle.dev \$(DD)tiffg3.dev \$(DD)tiffg32d.dev \$(DD)tiffg4.dev \$(DD)tiff12nc.dev \$(DD)tiff24nc.dev \$(DD)tifflzw.dev \$(DD)tiffpack.dev
+!EOT
+
+# create one new Makefile, where DEVICE_DEVS contains all wanted devices
+sed -e '/^DEVICE_DEVS=/d' ${WRKSRC}/src/unix-gcc.mak \
+ >> ${WRKSRC}/src/unix-gcc.mak.new
+mv ${WRKSRC}/src/unix-gcc.mak.new ${WRKSRC}/src/unix-gcc.mak