wok-next annotate ttf-dejavu/receipt @ rev 21360
guacamole: inserted fix libtool
author | Hans-G?nter Theisgen |
---|---|
date | Mon Apr 13 06:41:39 2020 +0100 (2020-04-13) |
parents | cd7906120828 |
children |
rev | line source |
---|---|
al@19759 | 1 # SliTaz package receipt v2. |
pankso@706 | 2 |
pankso@706 | 3 PACKAGE="ttf-dejavu" |
al@19797 | 4 VERSION="2.37" |
al@19125 | 5 CATEGORY="fonts" |
al@19759 | 6 SHORT_DESC="DejaVu TrueType fonts" |
al@19759 | 7 MAINTAINER="al.bobylev@gmail.com" |
pascal@15601 | 8 LICENSE="other" |
al@19797 | 9 WEB_SITE="https://dejavu-fonts.github.io/" |
al@20888 | 10 REPOLOGY="fonts:dejavu" |
al@19759 | 11 |
al@19303 | 12 TARBALL="dejavu-fonts-ttf-$VERSION.tar.bz2" |
pankso@706 | 13 WGET_URL="$SF_MIRROR/dejavu/$TARBALL" |
pankso@706 | 14 |
al@19788 | 15 BUILD_DEPENDS="shared-mime-info fontforge" |
al@21020 | 16 SPLIT="$PACKAGE-extra" |
al@19303 | 17 |
al@20443 | 18 compile_rules() { |
al@19759 | 19 # Install/repack fonts |
al@19759 | 20 |
al@19759 | 21 f=$install/usr/share/fonts/truetype/ttf-dejavu |
al@19759 | 22 mkdir -p $f |
al@19759 | 23 for font in $src/ttf/*.ttf; do |
al@19797 | 24 size1=$(ls -l $font | awk '{print $5}') |
al@19797 | 25 a="$a\n$(printf "%-32s" $(basename $font .ttf)): $size1 B -> " |
al@19759 | 26 echo "Processing $(basename $font):" |
al@19759 | 27 # About FontForge scripting and this command, see: |
al@19759 | 28 # https://fontforge.github.io/scripting-alpha.html#Generate |
al@19759 | 29 fontforge -quiet -lang=ff -c 'Open($1); Generate($2,"",0x90)' \ |
al@19759 | 30 $font $f/$(basename $font) |
al@19797 | 31 size2=$(ls -l $f/$(basename $font) | awk '{print $5}') |
al@19797 | 32 a="$a$size2 B ($(( $size2 - $size1 )) B)" |
al@19759 | 33 echo |
al@19759 | 34 done |
al@19759 | 35 echo -e "\nResults:\n========\n$a" |
al@19759 | 36 |
al@19759 | 37 # Install available configurations |
al@19759 | 38 |
al@19759 | 39 f=$install/usr/share/fontconfig/conf.avail |
al@19759 | 40 mkdir -p $f |
al@19759 | 41 cp $src/fontconfig/*.conf $f |
al@19759 | 42 |
al@19759 | 43 tmp=$(mktemp) |
al@19759 | 44 |
al@19759 | 45 # Strip *.conf files |
al@19759 | 46 for i in $install/usr/share/fontconfig/conf.avail/*; do |
al@19759 | 47 # <?xml version="1.0" encoding="UTF-8"?> |
al@19759 | 48 sed -i 's| encoding="UTF-8"||' $i # remove needless encoding |
al@19759 | 49 # <!DOCTYPE fontconfig SYSTEM "../fonts.dtd"> |
al@19759 | 50 sed -i 's|\.\./||' $i # remove "../" |
al@19759 | 51 |
al@19759 | 52 tr -d '\n' < $i | sed 's|[ \t][ \t]*| |g' | \ |
al@19759 | 53 sed 's|<!--|\n&|g; s|-->|&\n|g' | sed '/<!--/d' | \ |
al@19759 | 54 tr -d '\n' | sed 's|> *<|><|g' > $tmp |
al@19759 | 55 cat $tmp > $i |
al@19759 | 56 done |
al@19759 | 57 |
al@19759 | 58 rm $tmp |
al@19759 | 59 |
al@19759 | 60 # Use the configurations |
al@19759 | 61 f=$install/etc/fonts/conf.d |
al@19759 | 62 mkdir -p $f |
al@19759 | 63 for i in $src/fontconfig/*.conf; do |
al@19759 | 64 ln -s /usr/share/fontconfig/conf.avail/$(basename $i) $f/$(basename $i) |
al@19759 | 65 done |
al@19303 | 66 } |
al@19303 | 67 |
al@20443 | 68 genpkg_rules() { |
al@19759 | 69 case $PACKAGE in |
al@19759 | 70 ttf-dejavu) |
al@19759 | 71 copy DejaVuSans.ttf DejaVuSans-Bold.ttf DejaVuSansMono.ttf \ |
al@19759 | 72 *sans.conf *mono.conf |
al@19759 | 73 TAGS="font" |
al@19759 | 74 ;; |
al@19759 | 75 ttf-dejavu-extra) |
al@20443 | 76 copy @std @rm |
al@19759 | 77 CAT="fonts|extra font styles" |
al@19759 | 78 TAGS="font" |
al@19759 | 79 ;; |
al@19759 | 80 esac |
pankso@706 | 81 } |