aboutsummaryrefslogtreecommitdiffstats
path: root/russian/koi8r-ps
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2013-11-14 03:10:24 +0800
committermi <mi@FreeBSD.org>2013-11-14 03:10:24 +0800
commite27f34d5d0008dd375226b3a26a4324e87618735 (patch)
tree72a6c579a25ac25ba301641562359d857098102b /russian/koi8r-ps
parent273707abfd3c0f839df4835be2a2aa372d6df00a (diff)
downloadfreebsd-ports-gnome-e27f34d5d0008dd375226b3a26a4324e87618735.tar.gz
freebsd-ports-gnome-e27f34d5d0008dd375226b3a26a4324e87618735.tar.zst
freebsd-ports-gnome-e27f34d5d0008dd375226b3a26a4324e87618735.zip
. Improve spelling a little.
. Use GhostScript itself to find the Fontmap.GS -- instead of trying to parse the output of `gs -h' . Other minor improvements to scripts. Submitted by: pkg-fallout@
Diffstat (limited to 'russian/koi8r-ps')
-rw-r--r--russian/koi8r-ps/Makefile18
-rw-r--r--russian/koi8r-ps/files/Fontmap.diff6
-rw-r--r--russian/koi8r-ps/files/find-fontmap.sh19
-rw-r--r--russian/koi8r-ps/pkg-descr2
4 files changed, 26 insertions, 19 deletions
diff --git a/russian/koi8r-ps/Makefile b/russian/koi8r-ps/Makefile
index 82c749db5fc0..5853e244851e 100644
--- a/russian/koi8r-ps/Makefile
+++ b/russian/koi8r-ps/Makefile
@@ -20,19 +20,7 @@ NO_STAGE= yes
.include <bsd.port.pre.mk>
.if !defined(FONTMAP)
-FONTMAP!= if which gs > /dev/null 2>&1 ; then \
- d=`gs -h | awk '/^Search path:$$/ { nl=1; next } \
- nl { print $$3; exit }'`; \
- if [ -e $$d/Fontmap.GS ] ; then \
- ${ECHO_CMD} $$d/Fontmap.GS; \
- elif [ -e $$d/Fontmap ] ; then \
- ${ECHO_CMD} $$d/Fontmap \
- else \
- ${ECHO_CMD} /nicht/ ; \
- fi; \
- else \
- ${ECHO_CMD} /nicht/ ; \
- fi; ${ECHO_CMD}
+FONTMAP!= ${SH} ${FILESDIR}/find-fontmap.sh
.endif
NO_PACKAGE= Nothing to build, configurations only
@@ -46,7 +34,7 @@ do-extract:
> ${WRKSRC}/XFree86-Type1_fonts.dir.scale
do-build:
- ${ECHO_CMD} `${GREP} koi8 ${WRKSRC}/XFree86-Type1_fonts.dir.scale | wc -l` \
+ ${GREP} -c koi8 ${WRKSRC}/XFree86-Type1_fonts.dir.scale \
> ${WRKSRC}/fonts.dir
${GREP} koi8 ${WRKSRC}/XFree86-Type1_fonts.dir.scale \
>> ${WRKSRC}/fonts.dir
@@ -61,7 +49,7 @@ do-install:
${DISTDIR}/${DIST_SUBDIR}/gs-type1_koi8_fonts.tgz
${TAR} -C ${CPS_DIR} -xzpf \
${DISTDIR}/${DIST_SUBDIR}/gs-type1_koi8_afm.tgz
-.if ${FONTMAP} == "/nicht/"
+.if !exists(${FONTMAP})
#################################################################
### You do not appear to have GhostScript installed. The file
### ${CPS_DIR}/Fontmap.diff
diff --git a/russian/koi8r-ps/files/Fontmap.diff b/russian/koi8r-ps/files/Fontmap.diff
index 4b6a03646d61..04c7018ce832 100644
--- a/russian/koi8r-ps/files/Fontmap.diff
+++ b/russian/koi8r-ps/files/Fontmap.diff
@@ -1,8 +1,8 @@
---- Fontmap.orig Mon Jan 25 12:39:01 1999
+--- Fontmap Mon Jan 25 12:39:01 1999
+++ Fontmap Fri Jul 23 16:48:39 1999
-@@ -400,0 +401,42 @@
+@@ -350,0 +350,42 @@
+
-+% Cyrrillic koi8 fonts/aliases
++% Cyrillic KOI8 fonts/aliases
+
+/ArialCyrMT (arial8.pfb) ;
+/Arial /ArialCyrMT ;
diff --git a/russian/koi8r-ps/files/find-fontmap.sh b/russian/koi8r-ps/files/find-fontmap.sh
new file mode 100644
index 000000000000..616cef2315cd
--- /dev/null
+++ b/russian/koi8r-ps/files/find-fontmap.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if ! which gs > /dev/null ; then
+ echo GhostScript not found in PATH >&2
+ exit 1
+fi
+
+# Use the method suggested here:
+# http://stackoverflow.com/questions/19958156/how-to-print-the-fontresourcedir-with-ghostscript-gs
+# until a better way is proposed..
+FONTPATH=`gs -dNODISPLAY -q -- /dev/stdin << EOSCRIPT
+%!
+/Font /Category findresource
+begin
+ / 128 string ResourceFileName =
+end
+EOSCRIPT`
+
+echo `dirname $FONTPATH`/Init/Fontmap.GS
diff --git a/russian/koi8r-ps/pkg-descr b/russian/koi8r-ps/pkg-descr
index 9e59c9f93d58..0a3801c584b2 100644
--- a/russian/koi8r-ps/pkg-descr
+++ b/russian/koi8r-ps/pkg-descr
@@ -13,4 +13,4 @@ Fontmap file to print/display with this fonts by default.
Note, however, that this will NOT make your PostScript printers print in
Russian, since they have their own PostScript interpreters built in. Use
-`koify' port for to deal with those.
+`koify' to deal with those.