Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 13:15:29 -0400 (EDT)
From:      Mikhail Teterin <mi@misha.cisco.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        jack@gpi.ru
Subject:   ports/12871: koi8r-ps port adds KOI8 True Type fonts
Message-ID:  <199907291715.NAA81647@misha.cisco.com>

next in thread | raw e-mail | index | archive | help

>Number:         12871
>Category:       ports
>Synopsis:       koi8r-ps port adds KOI8 True Type fonts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 10:20:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail Teterin
>Release:        FreeBSD 3.2-STABLE i386
>Organization:
Virtual Estates, Inc.
>Environment:

>Description:
	The port, basicly, automates the instructions posted in
	   ftp://ftp.kapella.gpi.ru/pub/cyrillic/psfonts/README.html

	It tries  to patch  the GhostScript's Fontmap  automaticly, so
	unless you  have non-standard GhostScript installation  (or if
	you installed GhostScript afterwards),  you should not have to
	do  anything with it. Deinstalling  the port will  reverse the
	patch.

	For  your X-server  to  use the  fonts, you  have  to add  the
	${PREFIX}/share/CyrPS (usually, /usr/local/share/CyrPS) to the
	server's  font-path.  Use ``xset  fp+''  to  do this  for  the
	current X-session and consult your X-server's documentation to
	make this permanent.

	For gv to  use the newly installed KOI8 fonts,  it may need to
	start GhostScript  with the ``-dNOPLATFONTS'' option.  One way
	to ensure this  is to add -dNOPLATFONTS  to the GV.gsX11Device
	resource -- either  in the /usr/X11R6/lib/X11/app-defaults/GV,
	or in  individual's ~/.Xdefaults. An individual  user can also
	put  this into  his  or her  ~/.gv file,  by  starting up  gv,
	choosing  the menu  option  ``Ghostscript  Options'' from  the
	``State''  menu  and  typing  in  ``-dNOPLATFONTS''  into  the
	``Device'' entry.

	This package  will NOT  by itself help  you print  Cyrillic on
	PostScript printers  -- they use their  own PostScript engines
	(not GhostScript).  The port  russian/koify may help  you with
	those.

	I'll submit the russian/koify after I come back from vacation.

>How-To-Repeat:

>Fix:
	
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	koi8r-ps
#	koi8r-ps/Makefile
#	koi8r-ps/pkg
#	koi8r-ps/pkg/COMMENT
#	koi8r-ps/pkg/DESCR
#	koi8r-ps/pkg/PLIST
#	koi8r-ps/pkg/DEINSTALL
#	koi8r-ps/pkg/MESSAGE
#	koi8r-ps/pkg/MESSAGE.bak
#	koi8r-ps/files
#	koi8r-ps/files/Fontmap.diff
#	koi8r-ps/files/md5
#
echo c - koi8r-ps
mkdir -p koi8r-ps > /dev/null 2>&1
echo x - koi8r-ps/Makefile
sed 's/^X//' >koi8r-ps/Makefile << 'END-of-koi8r-ps/Makefile'
X# New ports collection makefile for: koi8rPS
X# Version required:     1.0
X# Date created:         22 July 1999
X# Whom:                 mi@aldan.algebra.com
X#
X# $Id$
X
XDISTNAME=	koi8rPS-1.0
XCATEGORIES=	russian print
XMASTER_SITES=	ftp://ftp.ziplink.net/users/kot/CyrPS/ \
X		ftp://ftp.kapella.gpi.ru/pub/cyrillic/psfonts/
XDISTFILES=	gs-type1_koi8_fonts.tgz gs-type1_koi8_afm.tgz \
X		XFree86-Type1_fonts.dir.scale.gz
X
XMAINTAINER=	mi@aldan.algebra.com
X
XEXTRACT_ONLY=
X
XDIST_SUBDIR=	koi8r-ps
X
X.if !defined(FONTMAP)
XFONTMAP!=	if which gs > /dev/null 2>&1 ; then \
X			d=`gs -h  | awk '/^Search path:$$/ { nl=1; next } \
X					nl { print $$3; exit }'`; \
X			if [ -e $$d/Fontmap ] ; then \
X				${ECHO} $$d/Fontmap; \
X			else \
X				logger $$d/Fontmap; \
X				${ECHO} /nicht/ ; \
X			fi; \
X		else \
X			${ECHO} /nicht/ ; \
X		fi
X.endif
X
XMAINTAINER=	mi@aldan.algebra.com
X
XNO_PACKAGE=	Nothing to build, configurations only
XNO_WRKSUBDIR=	Yes
X
XCPS_DIR=	${PREFIX}/share/koi8r-ps
X
Xdo-extract:
X	${MKDIR} ${WRKSRC}
X	${GZIP_CMD} -d < ${DISTDIR}/${DIST_SUBDIR}/XFree86-Type1_fonts.dir.scale.gz \
X		> ${WRKSRC}/XFree86-Type1_fonts.dir.scale
X
Xdo-build:
X	${ECHO} `${GREP} koi8 ${WRKSRC}/XFree86-Type1_fonts.dir.scale | wc -l` \
X		> ${WRKSRC}/fonts.dir
X	${GREP} koi8 ${WRKSRC}/XFree86-Type1_fonts.dir.scale \
X		>> ${WRKSRC}/fonts.dir
X
Xdo-configure:
X	${SED} 's=(\(.*\.pfb\))=\(${CPS_DIR}/\1\)=' \
X		< ${FILESDIR}/Fontmap.diff > ${WRKSRC}/Fontmap.diff
X
Xdo-install:
X	${MKDIR} ${CPS_DIR}
X	${TAR} -C ${CPS_DIR} -xzpf \
X		${DISTDIR}/${DIST_SUBDIR}/gs-type1_koi8_fonts.tgz
X	${TAR} -C ${CPS_DIR} -xzpf \
X		${DISTDIR}/${DIST_SUBDIR}/gs-type1_koi8_afm.tgz
X.if ${FONTMAP} == "/nicht/"
X	#################################################################
X	### You do not appear to have GhostScript installed. The file
X	###	${CPS_DIR}/Fontmap.diff
X	### needs to be merged into GhostScript's Fontmap -- usually
X	### located in something like
X	###	${PREFIX}/share/ghostscript/5.50/Fontmap
X	### for GhostScript to use cyrillic fonts.
X	#################################################################
X	@test -t 0 && test -t 1 && ${ECHO} -n "Press enter" && read junk || true
X.else
X	@if ${GREP} -q ArialCyrMT-BoldItalic "${FONTMAP}" ; then \
X		${ECHO} Apparently, Fontmap already lists this fonts. Ok. \
X			You can always merge ${CPS_DIR}/Fontmap.diff into \
X			${FONTMAP} manually. ; \
X		else \
X			env SIMPLE_BACKUP_SUFFIX=.CyrPS VERSION_CONTROL= \
X				${PATCH} "${FONTMAP}" ${WRKSRC}/Fontmap.diff ; \
X			${RM} -f "${FONTMAP}".CyrPS ; \
X	fi
X.endif
X	${ECHO} ${FONTMAP} > ${CPS_DIR}/fontmap.path
X	${INSTALL_DATA} ${WRKSRC}/Fontmap.diff ${CPS_DIR}
X	${INSTALL_DATA} ${WRKSRC}/fonts.dir ${CPS_DIR}
X	${LN} -s fonts.dir ${CPS_DIR}/fonts.scale
X	${CAT} ${PKGDIR}/MESSAGE
X
X.include <bsd.port.mk>
END-of-koi8r-ps/Makefile
echo c - koi8r-ps/pkg
mkdir -p koi8r-ps/pkg > /dev/null 2>&1
echo x - koi8r-ps/pkg/COMMENT
sed 's/^X//' >koi8r-ps/pkg/COMMENT << 'END-of-koi8r-ps/pkg/COMMENT'
XAdd Russian (KOI8) fonts to your PostScript fonts collection.
END-of-koi8r-ps/pkg/COMMENT
echo x - koi8r-ps/pkg/DESCR
sed 's/^X//' >koi8r-ps/pkg/DESCR << 'END-of-koi8r-ps/pkg/DESCR'
XThis port tries to follow numerous  suggestions and HOWTOs posted on the
Xweb  about  printing and  viewing  PostScript  files containing  Russian
Xcharacters (in KOI8 encoding, are there others?).
X
XIn installs the fonts taken from
X	ftp://ftp.kapella.gpi.ru/pub/cyrillic/psfonts/
X
Xinto   their    own   ${PREFIX}/CyrPS   directory,   and    places   the
Xinfonts.dir/fonts.scale there for your X-server's perusal.
X
XIf you  happen to have  ghostscript installed,  it will also  append its
XFontmap file to print/display with this fonts by default.
X
XNote, however, that this will NOT make your PostScript printers print in
XRussian, since they have their own PostScript interpreters built in. Use
X`koify' port for to deal with those.
END-of-koi8r-ps/pkg/DESCR
echo x - koi8r-ps/pkg/PLIST
sed 's/^X//' >koi8r-ps/pkg/PLIST << 'END-of-koi8r-ps/pkg/PLIST'
Xshare/koi8r-ps/fontmap.path
Xshare/koi8r-ps/Fontmap.diff
Xshare/koi8r-ps/fonts.dir
Xshare/koi8r-ps/fonts.scale
Xshare/koi8r-ps/arial8.afm
Xshare/koi8r-ps/arialbd8.afm
Xshare/koi8r-ps/arialbi8.afm
Xshare/koi8r-ps/ariali8.afm
Xshare/koi8r-ps/cokoi8b.afm
Xshare/koi8r-ps/cokoi8bi.afm
Xshare/koi8r-ps/cokoi8i.afm
Xshare/koi8r-ps/cokoi8n.afm
Xshare/koi8r-ps/cour8.afm
Xshare/koi8r-ps/courbd8.afm
Xshare/koi8r-ps/courbi8.afm
Xshare/koi8r-ps/couri8.afm
Xshare/koi8r-ps/times8.afm
Xshare/koi8r-ps/timesbd8.afm
Xshare/koi8r-ps/timesbi8.afm
Xshare/koi8r-ps/timesi8.afm
Xshare/koi8r-ps/arial8.pfb
Xshare/koi8r-ps/arial8.pfm
Xshare/koi8r-ps/arialbd8.pfb
Xshare/koi8r-ps/arialbd8.pfm
Xshare/koi8r-ps/arialbi8.pfb
Xshare/koi8r-ps/arialbi8.pfm
Xshare/koi8r-ps/ariali8.pfb
Xshare/koi8r-ps/ariali8.pfm
Xshare/koi8r-ps/cokoi8b.pfb
Xshare/koi8r-ps/cokoi8b.pfm
Xshare/koi8r-ps/cokoi8bi.pfb
Xshare/koi8r-ps/cokoi8bi.pfm
Xshare/koi8r-ps/cokoi8i.pfb
Xshare/koi8r-ps/cokoi8i.pfm
Xshare/koi8r-ps/cokoi8n.pfb
Xshare/koi8r-ps/cokoi8n.pfm
Xshare/koi8r-ps/cour8.pfb
Xshare/koi8r-ps/cour8.pfm
Xshare/koi8r-ps/courbd8.pfb
Xshare/koi8r-ps/courbd8.pfm
Xshare/koi8r-ps/courbi8.pfb
Xshare/koi8r-ps/courbi8.pfm
Xshare/koi8r-ps/couri8.pfb
Xshare/koi8r-ps/couri8.pfm
Xshare/koi8r-ps/times8.pfb
Xshare/koi8r-ps/times8.pfm
Xshare/koi8r-ps/timesbd8.pfb
Xshare/koi8r-ps/timesbd8.pfm
Xshare/koi8r-ps/timesbi8.pfb
Xshare/koi8r-ps/timesbi8.pfm
Xshare/koi8r-ps/timesi8.pfb
Xshare/koi8r-ps/timesi8.pfm
X@dirrm share/koi8r-ps
END-of-koi8r-ps/pkg/PLIST
echo x - koi8r-ps/pkg/DEINSTALL
sed 's/^X//' >koi8r-ps/pkg/DEINSTALL << 'END-of-koi8r-ps/pkg/DEINSTALL'
X#!/bin/sh
Xif [ "$2" = "POST-DEINSTALL" ] ; then exit ; fi
Xif ! [ -e "${PKG_PREFIX}"/share/koi8r-ps/fontmap.path ] ; then
X	cat << END_WARNING
X	The file "${PKG_PREFIX}"/share/koi8r-ps/fontmap.path does not exist.
X	Unable to patch the GhostScript's Fontmap to stop using the
X	Cyrillic fonts, which you are removing, yb default.
XEND_WARNING
X	exit
Xfi
X
X
XFONTMAP=`cat "${PKG_PREFIX}"/share/koi8r-ps/fontmap.path`
Xif [ -e "$FONTMAP" ] ; then
X	cat << EXPLANATION
X	Patching the file
X		$FONTMAP
X	to tell GhostScript to stop looking for the fonts in this package.
XEXPLANATION
X	env SIMPLE_BACKUP_SUFFIX=.CyrPS VERSION_CONTROL= \
X		patch -l -N -R "$FONTMAP" "${PKG_PREFIX}/share/koi8r-ps/Fontmap.diff" \
X			&& rm -f "$FONTMAP".CyrPS
Xelse
X	if [ "$FONTMAP" != "/nicht/" ] ; then
X		cat << END_WARNING
X
X	The file
X		$FONTMAP
X	is recorded as  the one patched during the  isntallation of this
X	package. However,  the file does  not exist  now, so we  can not
X	reverse the patch. You _may_ have problem using GhostScript now.
X
XEND_WARNING
X	fi
Xfi
END-of-koi8r-ps/pkg/DEINSTALL
echo x - koi8r-ps/pkg/MESSAGE
sed 's/^X//' >koi8r-ps/pkg/MESSAGE << 'END-of-koi8r-ps/pkg/MESSAGE'
XThis  port tries  to  patch the  GhostScript's  Fontmap automaticly,  so
Xunless  you  have  non-standard  GhostScript  installation  (or  if  you
Xinstalled GhostScript afterwards), you should not have to do anything.
X
XFor   your  X-server   to  use   the  fonts,   you  have   to  add   the
X${PREFIX}/share/CyrPS (usually, /usr/local/share/CyrPS)  to the server's
Xfont-path. Use  ``xset fp+'' to  do this  for the current  X-session and
Xconsult your X-server's documentation to make this permanent.
X
XFor gv  to use  the newly  installed KOI8  fonts, it  may have  to start
XGhostScript with the ``-dNOPLATFONTS'' option. One way to ensure this is
Xto add  -dNOPLATFONTS to  the GV.gsX11Device resource  -- either  in the
X/usr/X11R6/lib/X11/app-defaults/GV, or in  individual's ~/.Xdefaults. An
Xindividual  user can  also  put this  into  his or  her  ~/.gv file,  by
Xstarting up  gv, choosing the  menu option ``Ghostscript  Options'' from
Xthe ``State'' menu  and typing in ``-dNOPLATFONTS''  into the ``Device''
Xentry.
X
XThis package  will NOT by itself  help you print Cyrillic  on PostScript
Xprinters -- they use their own PostScript engines (not GhostScript). The
Xport russian/koify may help you with those.
END-of-koi8r-ps/pkg/MESSAGE
echo x - koi8r-ps/pkg/MESSAGE.bak
sed 's/^X//' >koi8r-ps/pkg/MESSAGE.bak << 'END-of-koi8r-ps/pkg/MESSAGE.bak'
XThis  port tries  to  patch the  GhostScript's  Fontmap automaticly,  so
Xunless  you  have  non-standard  GhostScript  installation  (or  if  you
Xinstalled GhostScript afterwards), you should not have to do anything.
X
XFor   your  X-server   to  use   the  fonts,   you  have   to  add   the
X${PREFIX}/share/CyrPS (usually, /usr/local/share/CyrPS)  to the server's
Xfont-path. Use  ``xset fp+'' to  do this  for the current  X-session and
Xconsult your X-server's documentation to make this permanent.
X
XFor gv  to use  the newly  installed KOI8  fonts, it  may have  to start
XGhostScript with the ``-dNOPLATFONTS'' option. One way to ensure this is
Xto add  -dNOPLATFONTS to  the GV.gsX11Device resource  -- either  in the
X/usr/X11R6/lib/X11/app-defaults/GV, or in  individual's ~/.Xdefaults. An
Xindividual  user can  also  put this  into  his or  her  ~/.gv file,  by
Xstarting up  gv, choosing the  menu option ``Ghostscript  Options'' from
Xthe ``State'' menu  and typing in ``-dNOPLATFONTS''  into the ``Device''
Xentry.
X
XThis package will  NOT by itself help you print  cyrillics on PostScript
Xprinters -- they use their own PostScript engines (not GhostScript). The
Xport russian/koify may help you with those.
END-of-koi8r-ps/pkg/MESSAGE.bak
echo c - koi8r-ps/files
mkdir -p koi8r-ps/files > /dev/null 2>&1
echo x - koi8r-ps/files/Fontmap.diff
sed 's/^X//' >koi8r-ps/files/Fontmap.diff << 'END-of-koi8r-ps/files/Fontmap.diff'
X--- Fontmap.orig	Mon Jan 25 12:39:01 1999
X+++ Fontmap	Fri Jul 23 16:48:39 1999
X@@ -400,0 +401,42 @@
X+
X+% Cyrrillic koi8 fonts/aliases
X+
X+/ArialCyrMT				(arial8.pfb)	;
X+/Arial			/ArialCyrMT			;
X+/Helvetica		/ArialCyrMT			;
X+/ArialCyrMT-Bold			(arialbd8.pfb)	;
X+/Arial-Bold		/ArialCyrMT-Bold		;
X+/Helvetica-Bold	/ArialCyrMT-Bold		;
X+/ArialCyrMT-Italic			(ariali8.pfb)	;
X+/Arial-Italic		/ArialCyrMT-Italic		;
X+/Helvetica-Oblique	/ArialCyrMT-Italic		;
X+/ArialCyrMT-BoldItalic			(arialbi8.pfb)	;
X+/Arial-BoldItalic	/ArialCyrMT-BoldItalic		;
X+/Helvetica-BoldOblique	/ArialCyrMT-BoldItalic	;
X+
X+/CourierCyrPS				(cour8.pfb)	;
X+% /Courier		/CourierCyrPS			;
X+/CourierCyrPS-Bold			(courbd8.pfb)	;
X+% /Courier-Bold		/CourierCyrPS-Bold		;
X+/CourierCyrPS-Inclined			(couri8.pfb)	;
X+% /Courier-Oblique	/CourierCyrPS-Inclined		;
X+/CourierCyrPS-BoldInclined		(courbi8.pfb)	;
X+% /Courier-BoldOblique	/CourierCyrPS-BoldInclined	;
X+
X+/TimesNRCyrMT				(times8.pfb)	;
X+/Times-Roman		/TimesNRCyrMT			;
X+/TimesNRCyrMT-Bold			(timesbd8.pfb)	;
X+/Times-Bold		/TimesNRCyrMT-Bold		;
X+/TimesNRCyrMT-Inclined			(timesi8.pfb)	;
X+/Times-Italic		/TimesNRCyrMT-Inclined		;
X+/TimesNRCyrMT-BoldInclined		(timesbi8.pfb)	;
X+/Times-BoldItalic	/TimesNRCyrMT-BoldInclined	;
X+
X+/ERKurierKOI8RRegular			(cokoi8n.pfb)	;
X+/Courier		/ERKurierKOI8RRegular		;
X+/ERKurierKOI8RBold			(cokoi8b.pfb)	;
X+/Courier-Bold		/ERKurierKOI8RBold		;
X+/ERKurierKOI8RItalic			(cokoi8i.pfb)	;
X+/Courier-Oblique	/ERKurierKOI8RItalic		;
X+/ERKurierKOI8RBoldItalic 		(cokoi8bi.pfb)	;
X+/Courier-BoldOblique	/ERKurierKOI8RBoldItalic	;
END-of-koi8r-ps/files/Fontmap.diff
echo x - koi8r-ps/files/md5
sed 's/^X//' >koi8r-ps/files/md5 << 'END-of-koi8r-ps/files/md5'
XMD5 (koi8r-ps/gs-type1_koi8_fonts.tgz) = 3dfc8059e5ddca75054bf8684bcc9f5c
XMD5 (koi8r-ps/gs-type1_koi8_afm.tgz) = 6b2a937ffeac0665ab3de3f6da627962
XMD5 (koi8r-ps/XFree86-Type1_fonts.dir.scale.gz) = 6bc1a0e6e2c3443f1d5dc753beca6522
END-of-koi8r-ps/files/md5
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907291715.NAA81647>