diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2002-01-09 04:48:20 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2002-01-09 04:48:20 +0000 |
commit | 1a79aa32053b3c12ed1557c417687cdad57ef5f8 (patch) | |
tree | 466336e44ac0dc7a8ac5aa44c92827385e19206b /graphics/gd2/scripts | |
parent | 60d97317d274d147ba7a6f1b7d59c2285de0df7e (diff) |
Notes
Diffstat (limited to 'graphics/gd2/scripts')
-rw-r--r-- | graphics/gd2/scripts/configure | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/graphics/gd2/scripts/configure b/graphics/gd2/scripts/configure new file mode 100644 index 000000000000..c49a4f0a254e --- /dev/null +++ b/graphics/gd2/scripts/configure @@ -0,0 +1,44 @@ +#!/bin/sh +# $FreeBSD$ + +# The GD_FONTS environment variable can be set to specify the gzipped +# tar-ball containing the fonts in bdf format and the bdf file names. +# +# For example: +# GD_FONTS="/usr/ports/distfiles/x-koi8u.tgz koi6x10.bdf koi8x13.bdf \ +# koi9x15.bdf koi12x24.bdf koi10x20.bdf" +# +# This can be usefull for slave ports, like ukrainian/gd, which may +# now provide alternative fonts easily. + +# TODO: . handle multiple archiving formats: tgz, tar.bz2, zip +# . allow for passing already extracted font-files + +if [ -z "$GD_FONTS" ] +then + echo "GD_FONTS can be set to specify an alternative list of .bdf files" + echo "See $0 for details..." + exit 0 +fi + +set $GD_FONTS +# +# The tarball is the first argument, the tiny, small, medium-bold, +# large, and giant fonts follow. +# + +tarball=$1 +shift +tar -xvzpf $tarball -C $WRKSRC $@ + +rm -f $WRKSRC/Makefile.fonts + +for font in Tiny Small MediumBold Large Giant +do + f=`echo $font | tr -d [[:lower:]] | tr [[:upper:]] [[:lower:]]` + rm -f $WRKSRC/gdfont$font.[ch] + printf 'gdfont%s.c gdfont%s.h: %s\ + perl ${.CURDIR}/bdftogd gdFont%s font%s < %s\n' \ + $f $f $1 $font $f $1 >> $WRKSRC/Makefile.fonts + shift +done |