diff options
author | felix | 2015-06-08 14:44:44 +0200 |
---|---|---|
committer | felix | 2015-06-08 15:05:30 +0200 |
commit | 102f7cde6f3aab6bdf50a77964f247fbb87c38c6 (patch) | |
tree | 58abf3efddddf1e54466feb6b5ca1087ddeb1f2c | |
download | aur-102f7cde6f3aab6bdf50a77964f247fbb87c38c6.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 184 | ||||
-rw-r--r-- | fontconfig-noaa.conf | 50 | ||||
-rw-r--r-- | fontconfig-noautohint.conf | 16 | ||||
-rw-r--r-- | fontconfig-upper.conf | 49 | ||||
-rw-r--r-- | ttf.install | 34 |
6 files changed, 368 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9191df8b880d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +pkgbase = unifont + pkgdesc = A free bitmap font with wide Unicode support (split package with accompanying utilities, TrueType, PCF and BDF versions) + pkgver = 7.0.06 + pkgrel = 1 + url = http://unifoundry.com/ + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = perl + makedepends = xorg-bdftopcf + makedepends = fontforge + makedepends = bdf2psf + source = http://unifoundry.com/pub/unifont-7.0.06/unifont-7.0.06.tar.gz + source = http://unifoundry.com/pub/unifont-7.0.06/unifont-7.0.06.tar.gz.sig + source = fontconfig-noaa.conf + source = fontconfig-upper.conf + source = ttf.install + sha512sums = c53f47d11673c8856a7efd410819c845bc25273f4ddc1a535d59253342b319d53b8336ef97b5ec01cbbf3d2596ab7138c4a03d1302bfda70a3f7e1796f412447 + sha512sums = SKIP + sha512sums = d5f31a8f218f3f2b70ee74dddd0c1c1ad21fe38659fc3880fe8749e3e694a2cc7fea69361ec28aa8d5602fb57e7416f0669a2bb165703232e6f02922838e5437 + sha512sums = 4eb2703bea9af264a8beac2f7605666f7a96a7a36a06dcd4357ad77c99378d99a266aeb54b79bd14a7718a3ceddd8a44b2d4d44e442c02ff4e6cb6f4035cd6a8 + sha512sums = ebd43afce78a08d4e868e84bd60f89c896e984c31edca7da29ceddc867565f3b7d1d373515ccd288037e6ce18e650677702649a2bc2d2d26f5ab5a5f976a1f6e + +pkgname = psf-unifont + pkgdesc = A free bitmap font with wide Unicode support (PSF version, for APL) + arch = any + +pkgname = unifont-utils + pkgdesc = A free bitmap font with wide Unicode support - utilities + arch = i686 + arch = x86_64 + depends = perl + optdepends = + optdepends = perl-wx: for the unifont-viewer utility + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..66fafddfc63e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,184 @@ +# Maintainer: felix <at yandex dot com, local part is isaev, preceded by m dot p dot> +pkgbase=unifont +pkgname=( + ttf-unifont + pcf-unifont + bdf-unifont + psf-unifont + unifont-utils +) +pkgver=7.0.06 +pkgrel=1 +epoch= +pkgdesc="A free bitmap font with wide Unicode support (split package with accompanying utilities, TrueType, PCF and BDF versions)" +arch=(i686 x86_64) +url="http://unifoundry.com/" +license=('GPL2') +groups=() +depends=() +makedepends=('perl') +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=( + "http://unifoundry.com/pub/unifont-$pkgver/unifont-$pkgver.tar.gz" + "http://unifoundry.com/pub/unifont-$pkgver/unifont-$pkgver.tar.gz.sig" + fontconfig-noaa.conf + fontconfig-upper.conf + ttf.install +) +noextract=() +sha512sums=('c53f47d11673c8856a7efd410819c845bc25273f4ddc1a535d59253342b319d53b8336ef97b5ec01cbbf3d2596ab7138c4a03d1302bfda70a3f7e1796f412447' + 'SKIP' + 'd5f31a8f218f3f2b70ee74dddd0c1c1ad21fe38659fc3880fe8749e3e694a2cc7fea69361ec28aa8d5602fb57e7416f0669a2bb165703232e6f02922838e5437' + '4eb2703bea9af264a8beac2f7605666f7a96a7a36a06dcd4357ad77c99378d99a266aeb54b79bd14a7718a3ceddd8a44b2d4d44e442c02ff4e6cb6f4035cd6a8' + 'ebd43afce78a08d4e868e84bd60f89c896e984c31edca7da29ceddc867565f3b7d1d373515ccd288037e6ce18e650677702649a2bc2d2d26f5ab5a5f976a1f6e') +validpgpkeys=('95D2E9AB8740D8046387FD151A09227B1F435A33') + +# _use_precompiled=1 + +### build instructions + +_compiled="${_use_precompiled:+pre}compiled" + +_wanted() { + for _item in "${pkgname[@]}"; do + [[ "$_item" = "$1" ]] && return 0 + done + return 1 +} + +if [[ -z "$_use_precompiled" ]]; then + _wanted pcf-unifont && makedepends+=(xorg-bdftopcf) + _wanted ttf-unifont && makedepends+=(fontforge) + _wanted psf-unifont && makedepends+=(bdf2psf) +fi + +prepare() { + msg2 "Patching out U+202F" + sed -i -e 's/^202F:.*/202F:00000000000000000000000000000000/' "$srcdir/unifont-$pkgver/font/plane00/nonprinting.hex" + msg2 "Restoring the old hex2sfd" + cp "$srcdir/unifont-$pkgver/src/hex2sfd-old" "$srcdir/unifont-$pkgver/src/hex2sfd" +} + +build() { + cd "$srcdir/unifont-$pkgver" + make -j1 distclean + make -j1 clean + + cd "$srcdir/unifont-$pkgver/src" + msg2 "Building utilities" + make -j1 + + cd "$srcdir/unifont-$pkgver/font" + if _wanted bdf-unifont; then + # always building it, because the _csur variants + # are missing in the precompiled font + msg2 "Building the BDF version" + make -j1 bdf -o distclean + fi + + if [[ -z "$_use_precompiled" ]]; then + if _wanted psf-unifont; then + msg2 "Building the PSF version" + make -j1 psf -o distclean + fi + if _wanted pcf-unifont; then + msg2 "Building the PCF version" + make -j1 pcf -o distclean + fi + if _wanted ttf-unifont; then + msg2 "Building the TTF version" + make -j1 ttf csurttf upperttf uppercsurttf -o distclean + fi + fi +} + +# warning: below i pretty much bypass the whole build system, +# because it's not flexible enough to handle this kind of packaging + +package_ttf-unifont() { + pkgdesc="A free bitmap font with wide Unicode support (TrueType version)" + provides=(ttf-unifont ttf-unifont-csur) + arch=(any) + install=ttf.install + + _ttfdir=/usr/share/fonts/TTF + + cd "$srcdir/unifont-$pkgver/font/$_compiled" + install -D -m0644 "unifont-${pkgver}.ttf" \ + "${pkgdir}${_ttfdir}/unifont.ttf" + install -D -m0644 "unifont_csur-${pkgver}.ttf" \ + "${pkgdir}${_ttfdir}/unifont_csur.ttf" + install -D -m0644 "unifont_sample-${pkgver}.ttf" \ + "${pkgdir}${_ttfdir}/unifont_sample.ttf" + install -D -m0644 "unifont_upper-${pkgver}.ttf" \ + "${pkgdir}${_ttfdir}/unifont_upper.ttf" + install -D -m0644 "unifont_upper_csur-${pkgver}.ttf" \ + "${pkgdir}${_ttfdir}/unifont_upper_csur.ttf" + + cd "$srcdir" + install -D -m0644 fontconfig-noaa.conf \ + "$pkgdir/etc/fonts/conf.avail/20-unifont-noaa.conf" + install -D -m0644 fontconfig-upper.conf \ + "$pkgdir/etc/fonts/conf.avail/20-unifont-upper.conf" +} + +package_pcf-unifont() { + pkgdesc="A free bitmap font with wide Unicode support (PCF version)" + provides=(pcf-unifont) + arch=(any) + + _pcfdir=/usr/share/fonts/misc + + cd "$srcdir/unifont-$pkgver/font/$_compiled" + install -D -m0644 "unifont-${pkgver}.pcf.gz" \ + "${pkgdir}${_pcfdir}/unifont.pcf.gz" + install -D -m0644 "unifont_csur-${pkgver}.pcf.gz" \ + "${pkgdir}${_pcfdir}/unifont_csur.pcf.gz" + install -D -m0644 "unifont_sample-${pkgver}.pcf.gz" \ + "${pkgdir}${_pcfdir}/unifont_sample.pcf.gz" +} + +package_bdf-unifont() { + pkgdesc="A free bitmap font with wide Unicode support (BDF version)" + arch=(any) + + _bdfdir=/usr/share/fonts/misc + + # always use the compiled version, see build() above + cd "$srcdir/unifont-$pkgver/font/compiled" + install -D -m0644 "unifont-${pkgver}.bdf.gz" \ + "${pkgdir}${_bdfdir}/unifont.bdf.gz" + install -D -m0644 "unifont_csur-${pkgver}.bdf.gz" \ + "${pkgdir}${_bdfdir}/unifont_csur.bdf.gz" + install -D -m0644 "unifont_sample-${pkgver}.bdf.gz" \ + "${pkgdir}${_bdfdir}/unifont_sample.bdf.gz" +} + +package_psf-unifont() { + pkgdesc="A free bitmap font with wide Unicode support (PSF version, for APL)" + arch=(any) + + cd "$srcdir/unifont-$pkgver/font/$_compiled" + install -D -m 0644 "Unifont-APL8x16-${pkgver}.psf.gz" \ + "${pkgdir}/usr/share/kbd/consolefonts/Unifont-APL8x16.psf.gz" +} + +package_unifont-utils() { + pkgdesc="A free bitmap font with wide Unicode support - utilities" + depends=('perl') + optdepends+=('perl-wx: for the unifont-viewer utility') + arch=(i686 x86_64) + + cd "$srcdir/unifont-$pkgver/src" + make install PREFIX="$pkgdir/usr" + cd "$srcdir/unifont-$pkgver/man" + make install PREFIX="$pkgdir/usr" COMPRESS=1 +} diff --git a/fontconfig-noaa.conf b/fontconfig-noaa.conf new file mode 100644 index 000000000000..823e2e571cbc --- /dev/null +++ b/fontconfig-noaa.conf @@ -0,0 +1,50 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- + Antialiased TTF Unifont is a bit blurry at the "native" pixel size, + which may strain eyes. Disable antialiasing in this case. + --> + + <match target="font"> + <test name="file" compare="contains"> + <string>unifont</string> + </test> + <test name="file" compare="contains"> + <string>.ttf</string> + </test> + <test name="pixelsize" compare="eq" qual="any"> + <double>16</double> + </test> + <test target="pattern" name="slant" compare="eq"> + <const>roman</const> + </test> + <edit name="antialias" mode="assign"> + <bool>false</bool> + </edit> + </match> + + <!-- + Hinting uglifies the TTF Unifont a lot. Disable it. + (For some reason it never happened before 7.0.04.) + Unfortunately, libcairo will not respect this setting without being patched. + See <https://bugs.freedesktop.org/show_bug.cgi?id=11838>. + --> + <match target="font"> + <test name="file" compare="contains"> + <string>unifont</string> + </test> + <test name="file" compare="contains"> + <string>.ttf</string> + </test> + <edit name="hinting" mode="assign"> + <bool>false</bool> + </edit> + <edit name="autohint" mode="assign"> + <bool>false</bool> + </edit> + <edit name="hintstyle" mode="assign"> + <const>hintnone</const> + </edit> + </match> +</fontconfig> diff --git a/fontconfig-noautohint.conf b/fontconfig-noautohint.conf new file mode 100644 index 000000000000..409cc67a4380 --- /dev/null +++ b/fontconfig-noautohint.conf @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- + FreeType's autohinter introduces bizarre-looking artifacts. + --> + + <match target="font"> + <test name="file" compare="contains"> + <string>unifont</string> + </test> + <test name="file" compare="contains"> + <string>.ttf</string> + </test> + </match> +</fontconfig> diff --git a/fontconfig-upper.conf b/fontconfig-upper.conf new file mode 100644 index 000000000000..d9a5d18f7b62 --- /dev/null +++ b/fontconfig-upper.conf @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- this file makes fontconfig consider "Unifont" and "Unifont Upper" parts of the same font --> + + <match target="scan"> + <test name="file" compare="contains"> + <string>unifont_upper.ttf</string> + </test> + <edit name="family"> + <string>Unifont</string> + </edit> + <edit name="fullname"> + <string>Unifont</string> + </edit> + <edit name="fontversion"> + <int>8</int> + </edit> + </match> + + <match target="scan"> + <test name="file" compare="contains"> + <string>unifont_upper_csur.ttf</string> + </test> + <edit name="family"> + <string>Unifont CSUR</string> + </edit> + <edit name="fullname"> + <string>Unifont CSUR</string> + </edit> + <edit name="fontversion"> + <int>8</int> + </edit> + </match> + + <alias binding="same"> + <family>Unifont Upper</family> + <accept> + <family>Unifont</family> + </accept> + </alias> + + <alias binding="same"> + <family>Unifont Upper CSUR</family> + <accept> + <family>Unifont CSUR</family> + </accept> + </alias> +</fontconfig> diff --git a/ttf.install b/ttf.install new file mode 100644 index 000000000000..eda6636619aa --- /dev/null +++ b/ttf.install @@ -0,0 +1,34 @@ +_update_font_cache() { + echo -n "Updating font cache... " + fc-cache -f > /dev/null + mkfontscale /usr/share/fonts/TTF + mkfontdir /usr/share/fonts/TTF + echo "done." +} + +_warn_11838() { + cat <<EOM + *** WARNING: due to cairo developers being lazy*, Unifont may display incorrectly + *** in some applications when antialiasing is turned off by fontconfig. + *** + *** * see <https://bugs.freedesktop.org/show_bug.cgi?id=11838> +EOM +} + +post_install() { + ln -fs ../conf.avail/20-unifont-noaa.conf /etc/fonts/conf.d + ln -fs ../conf.avail/20-unifont-upper.conf /etc/fonts/conf.d + _update_font_cache + _warn_11838 +} + +post_remove() { + rm -f /etc/fonts/conf.d/20-unifont-noaa.conf + rm -f /etc/fonts/conf.d/20-unifont-upper.conf + _update_font_cache +} + +post_upgrade() { + _update_font_cache + _warn_11838 +} |