summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO38
-rw-r--r--.gitignore15
-rw-r--r--40-fontconfig-config.hook11
-rw-r--r--40-fontconfig-config.script12
-rw-r--r--[-rwxr-xr-x]PKGBUILD115
-rwxr-xr-xfontconfig-git.install37
-rw-r--r--[-rwxr-xr-x]fontconfig.hook (renamed from fontconfig-git.hook)5
-rw-r--r--fontconfig.install26
8 files changed, 151 insertions, 108 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 543988d3de4c..f7d83a352a3a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,39 @@
pkgbase = fontconfig-git
- pkgdesc = A library for configuring and customizing font access (from git)
- pkgver = 2.13.91+18+g01e4f08
+ pkgdesc = Library for configuring and customizing font access (from git)
+ pkgver = 2.14.1+r40+g842f09c
pkgrel = 1
url = https://www.freedesktop.org/wiki/Software/fontconfig/
- install = fontconfig-git.install
+ install = fontconfig.install
arch = x86_64
license = custom
+ makedepends = docbook-sgml
+ makedepends = docbook-utils
makedepends = git
- makedepends = autoconf-archive
makedepends = gperf
- makedepends = python-lxml
- makedepends = python-six
- makedepends = json-c
+ makedepends = meson
+ makedepends = perl-sgmls
depends = expat
depends = freetype2
provides = fontconfig
+ provides = fontconfig-docs
conflicts = fontconfig
- source = git+https://anongit.freedesktop.org/git/fontconfig
- source = fontconfig-git.hook
- sha256sums = SKIP
- sha256sums = 672f6a1c5e164671955ce807e670306194142a1794ce88df653aa717a972e274
+ conflicts = fontconfig-docs
+ replaces = fontconfig-docs<2:2.13.93-1
+ backup = etc/fonts/fonts.conf
+ source = git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git
+ source = 40-fontconfig-config.script
+ source = 40-fontconfig-config.hook
+ source = fontconfig.hook
+ b2sums = SKIP
+ b2sums = 7fb63e76ab126bc0a7decfd74c53429ad1ce6d13de2f14037259616d8d4150b8fa4601c7f02b75918ccd5995d424816dc9d01a5fe7e39dc3dd1fcc83dfdb0fe8
+ b2sums = b06b3f2b8c0c38139a9247c26a641e6dc01d50b530478dd14133175a603f60b0af901af16c9fcf1ce73d23786ea14bfdbacd39f1dcfd88f6382965ad22be1411
+ b2sums = dfbf47c069c88da7687511356cef5bb94b7190e558a6f08390d6976fa7065ba7137ccb0a5ca1defdef655091afe74eb8a3d33fb9f3e0633409aa79f753ad276d
pkgname = fontconfig-git
-
+ depends = expat
+ depends = freetype2
+ depends = libexpat.so
+ depends = libfreetype.so
+ provides = fontconfig
+ provides = fontconfig-docs
+ provides = libfontconfig.so
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index d4d9f6c48346..000000000000
--- a/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-*~
-pkg/
-src/
-*.gz
-*.bz2
-*.xz
-*.lzo
-*.xz4
-*.tgz
-*.tbz
-*.txz
-*.tar
-*.jar
-*.zip
-fontconfig-git
diff --git a/40-fontconfig-config.hook b/40-fontconfig-config.hook
new file mode 100644
index 000000000000..41c058cd66c2
--- /dev/null
+++ b/40-fontconfig-config.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Remove
+Target = usr/share/fontconfig/conf.default/*
+
+[Action]
+Description = Updating fontconfig configuration...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/40-fontconfig-config /etc/fonts/conf.d
+NeedsTargets
diff --git a/40-fontconfig-config.script b/40-fontconfig-config.script
new file mode 100644
index 000000000000..132f0f9f9daa
--- /dev/null
+++ b/40-fontconfig-config.script
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+while read -r f; do
+ link="${1:?}/${f##*/}"
+ if [[ -e $f && ! -e $link ]]; then
+ ln -sT "/$f" "$link"
+ elif [[ ! -e $f && -L $link ]]; then
+ rm -f "$link"
+ fi
+done
+
+# vim:set sw=2 et:
diff --git a/PKGBUILD b/PKGBUILD
index d480fc87c2ee..79c839294daa 100755..100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,64 +1,93 @@
-# Maintainer: Vincent Grande <shoober420@gmail.com>
-# Contributor: Amanoel Dawod <amanoel at outlook dot com>
+# Maintainer: Amanoel Dawod <amoka at amanoel dot com>
+# Contributor: Vincent Grande <shoober420@gmail.com>
# Contributor: Yichao Yu <yyc1992@gmail.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
-# Contributor: Vincent Grande <shoober420@gmail.com>
pkgname=fontconfig-git
-pkgver=2.13.91+18+g01e4f08
+pkgver=2.14.1+r40+g842f09c
pkgrel=1
-pkgdesc="A library for configuring and customizing font access (from git)"
+pkgdesc="Library for configuring and customizing font access (from git)"
+url=https://www.freedesktop.org/wiki/Software/fontconfig/
arch=(x86_64)
-url="https://www.freedesktop.org/wiki/Software/fontconfig/"
license=(custom)
-depends=(expat freetype2)
-makedepends=(git autoconf-archive gperf python-lxml python-six json-c)
-conflicts=(fontconfig)
-provides=(fontconfig)
-install=fontconfig-git.install
-source=("git+https://anongit.freedesktop.org/git/fontconfig"
- fontconfig-git.hook)
-sha256sums=('SKIP'
- '672f6a1c5e164671955ce807e670306194142a1794ce88df653aa717a972e274')
+depends=(
+ expat
+ freetype2
+)
+makedepends=(
+ docbook-sgml
+ docbook-utils
+ git
+ gperf
+ meson
+ perl-sgmls
+)
+provides=(
+ fontconfig
+ fontconfig-docs
+)
+conflicts=(
+ fontconfig
+ fontconfig-docs
+)
+replaces=('fontconfig-docs<2:2.13.93-1')
+backup=(etc/fonts/fonts.conf)
+install=fontconfig.install
+source=(
+ "git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git"
+ 40-fontconfig-config.script
+ 40-fontconfig-config.hook
+ fontconfig.hook
+)
+b2sums=('SKIP'
+ '7fb63e76ab126bc0a7decfd74c53429ad1ce6d13de2f14037259616d8d4150b8fa4601c7f02b75918ccd5995d424816dc9d01a5fe7e39dc3dd1fcc83dfdb0fe8'
+ 'b06b3f2b8c0c38139a9247c26a641e6dc01d50b530478dd14133175a603f60b0af901af16c9fcf1ce73d23786ea14bfdbacd39f1dcfd88f6382965ad22be1411'
+ 'dfbf47c069c88da7687511356cef5bb94b7190e558a6f08390d6976fa7065ba7137ccb0a5ca1defdef655091afe74eb8a3d33fb9f3e0633409aa79f753ad276d')
-pkgver() {
+prepare() {
cd fontconfig
- git describe --tags | sed 's/-/+/g'
}
-prepare() {
- cd fontconfig
- NOCONFIGURE=1 ./autogen.sh
+pkgver() {
+ cd fontconfig
+ git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
build() {
- cd fontconfig
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --with-templatedir=/etc/fonts/conf.avail \
- --with-xmldir=/etc/fonts \
- --localstatedir=/var \
- --disable-static \
- --disable-docs \
- --with-default-fonts=/usr/share/fonts \
- --with-add-fonts=/usr/local/share/fonts
- make
+ local meson_options=(
+ -D default-hinting=slight
+ -D default-sub-pixel-rendering=rgb
+ -D doc-html=enabled
+ -D doc-pdf=disabled
+ -D doc-txt=disabled
+ )
+ arch-meson fontconfig build "${meson_options[@]}"
+ meson compile -C build
}
-#check() {
-# cd fontconfig
-# make -k check
-#}
-
-_install_conf() {
- install -m644 "$1" "$pkgdir/etc/fonts/conf.avail"
- ln -s "../conf.avail/${1##*/}" "$pkgdir/etc/fonts/conf.d"
+check() {
+ meson test -C build --print-errorlogs
}
package() {
- cd fontconfig
- make DESTDIR="$pkgdir" install
- install -Dm644 COPYING "$pkgdir/usr/share/licenses/fontconfig/COPYING"
- install -Dm644 ../fontconfig-git.hook "$pkgdir/usr/share/libalpm/hooks/fontconfig-git.hook"
+ depends+=(
+ libexpat.so
+ libfreetype.so
+ )
+ provides+=(libfontconfig.so)
+
+ meson install -C build --destdir "$pkgdir"
+
+ # Handle conf.d using the hook to avoid overwriting the symlinks on upgrade
+ mkdir -p "$pkgdir/usr/share/fontconfig/conf.default"
+ for _f in "$pkgdir"/etc/fonts/conf.d/*.conf; do
+ ln -sr "$pkgdir"/usr/share/fontconfig/conf.{avail,default}/"${_f##*/}"
+ rm "$_f"
+ done
+
+ install -Dm644 *.hook -t "$pkgdir/usr/share/libalpm/hooks"
+ install -D 40-fontconfig-config.script \
+ "$pkgdir/usr/share/libalpm/scripts/40-fontconfig-config"
+ install -Dm644 fontconfig/COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}
diff --git a/fontconfig-git.install b/fontconfig-git.install
deleted file mode 100755
index cc7341f128f7..000000000000
--- a/fontconfig-git.install
+++ /dev/null
@@ -1,37 +0,0 @@
-post_install() {
- cat << _EOF
-
- Fontconfig configuration is done via /etc/fonts/conf.avail and conf.d.
- Read /etc/fonts/conf.d/README for more information.
-
- Configuration via /etc/fonts/local.conf is still possible,
- but is no longer recommended for options available in conf.avail.
-
- Main systemwide configuration should be done by symlinks
- (especially for autohinting, sub-pixel and lcdfilter):
-
- cd /etc/fonts/conf.d
- ln -s ../conf.avail/XX-foo.conf
-
- Check also https://wiki.archlinux.org/index.php/Font_Configuration
- and https://wiki.archlinux.org/index.php/Fonts.
-
-_EOF
-
- post_upgrade $1
-}
-
-post_upgrade() {
- echo -n "updating font cache... "
- /usr/bin/fc-cache -rs
- echo "done."
-}
-
-post_remove() {
- cat << _EOF
-
- Check for dead symlinks and leftover files
- in /etc/fonts/conf.d/
-
-_EOF
-}
diff --git a/fontconfig-git.hook b/fontconfig.hook
index 0f24bc4e86f2..c1d93b413b08 100755..100644
--- a/fontconfig-git.hook
+++ b/fontconfig.hook
@@ -1,9 +1,12 @@
[Trigger]
-Type = File
+Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
+Target = etc/fonts/conf.d/*
Target = usr/share/fonts/*
+Target = usr/share/fontconfig/conf.avail/*
+Target = usr/share/fontconfig/conf.default/*
[Action]
Description = Updating fontconfig cache...
diff --git a/fontconfig.install b/fontconfig.install
new file mode 100644
index 000000000000..f569a4a6894f
--- /dev/null
+++ b/fontconfig.install
@@ -0,0 +1,26 @@
+post_upgrade() {
+ if (( $(vercmp $2 2:2.13.93-1) < 0 )); then
+ echo "Creating fontconfig configuration..."
+ find usr/share/fontconfig/conf.default -mindepth 1 |
+ /usr/share/libalpm/scripts/40-fontconfig-config /etc/fonts/conf.d
+
+ (( $(vercmp $2 0) > 0 )) && cat <<END
+
+>>> If you have configured NoExtract to prevent symlinks in /etc/fonts/conf.d/
+ from being restored, these symlinks have been recreated one last time. You
+ can now delete the symlinks and remove the paths from NoExtract and they
+ will not be created again.
+
+END
+ fi
+
+ # a full forced directory scan is required here
+ echo "Rebuilding fontconfig cache..."
+ /usr/bin/fc-cache -rs
+}
+
+post_install() {
+ post_upgrade $1 0
+}
+
+# vim:set sw=2 et: