Date: Wed, 13 Nov 2013 19:10:24 +0000 (UTC) From: Mikhail Teterin <mi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r333715 - in head/russian/koi8r-ps: . files Message-ID: <201311131910.rADJAOlN055571@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mi Date: Wed Nov 13 19:10:24 2013 New Revision: 333715 URL: http://svnweb.freebsd.org/changeset/ports/333715 Log: . 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@ Added: head/russian/koi8r-ps/files/find-fontmap.sh (contents, props changed) Modified: head/russian/koi8r-ps/Makefile (contents, props changed) head/russian/koi8r-ps/files/Fontmap.diff (contents, props changed) head/russian/koi8r-ps/pkg-descr (contents, props changed) Modified: head/russian/koi8r-ps/Makefile ============================================================================== --- head/russian/koi8r-ps/Makefile Wed Nov 13 19:09:26 2013 (r333714) +++ head/russian/koi8r-ps/Makefile Wed Nov 13 19:10:24 2013 (r333715) @@ -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 Modified: head/russian/koi8r-ps/files/Fontmap.diff ============================================================================== --- head/russian/koi8r-ps/files/Fontmap.diff Wed Nov 13 19:09:26 2013 (r333714) +++ head/russian/koi8r-ps/files/Fontmap.diff Wed Nov 13 19:10:24 2013 (r333715) @@ -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 ; Added: head/russian/koi8r-ps/files/find-fontmap.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/russian/koi8r-ps/files/find-fontmap.sh Wed Nov 13 19:10:24 2013 (r333715) @@ -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 Modified: head/russian/koi8r-ps/pkg-descr ============================================================================== --- head/russian/koi8r-ps/pkg-descr Wed Nov 13 19:09:26 2013 (r333714) +++ head/russian/koi8r-ps/pkg-descr Wed Nov 13 19:10:24 2013 (r333715) @@ -13,4 +13,4 @@ Fontmap file to print/display with this 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311131910.rADJAOlN055571>