summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Grande2021-03-24 11:38:18 -0400
committerVincent Grande2021-03-24 11:38:18 -0400
commitac4e782624225d2df003f45382f9012646687acb (patch)
treee1bb23406d66737f4cc4b6b178e2cef710e283b0
parentb0936519e66f81b7d11a037cfac6d91fe7f5a235 (diff)
downloadaur-ac4e782624225d2df003f45382f9012646687acb.tar.gz
cherrypick official PKGBUILD updates
-rwxr-xr-x[-rw-r--r--].SRCINFO13
-rw-r--r--40-fontconfig-config.hook11
-rw-r--r--40-fontconfig-config.script12
-rwxr-xr-x[-rw-r--r--]PKGBUILD36
-rw-r--r--fontconfig.hook3
-rw-r--r--fontconfig.install18
6 files changed, 73 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c32ede375cd5..7150bff082aa 100644..100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,19 +6,21 @@ pkgbase = fontconfig-minimal-git
arch = x86_64
license = custom
makedepends = git
- makedepends = autoconf-archive
+ makedepends = meson
makedepends = gperf
- makedepends = python-lxml
- makedepends = python-six
- makedepends = json-c
makedepends = expat
makedepends = freetype2
optdepends = docbook-utils: docs
optdepends = docbook-sgml: docs
+ optdepends = perl-sgmls: docs
source = git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git
+ source = 40-fontconfig-config.script
+ source = 40-fontconfig-config.hook
source = fontconfig.hook
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = fontconfig-minimal-git
install = fontconfig.install
@@ -26,6 +28,9 @@ pkgname = fontconfig-minimal-git
depends = libfreetype.so
provides = libfontconfig.so
provides = fontconfig
+ provides = fontconfig-docs
conflicts = fontconfig
+ conflicts = fontconfig-docs
+ replaces = fontconfig-docs<2:2.13.93-1
backup = etc/fonts/fonts.conf
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 b89480f6ab07..1ef6f09d3efa 100644..100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,18 +5,21 @@
pkgname=(fontconfig-minimal-git)
pkgver=2.13.91+48+gfcb0420
pkgrel=1
-#epoch=1
pkgdesc="Library for configuring and customizing font access"
url="https://www.freedesktop.org/wiki/Software/fontconfig/"
arch=(x86_64)
license=(custom)
-makedepends=(git autoconf-archive gperf python-lxml python-six json-c expat freetype2)
+makedepends=(git meson gperf expat freetype2)
optdepends=('docbook-utils: docs'
- 'docbook-sgml: docs')
-#checkdepends=(unzip)
+ 'docbook-sgml: docs'
+ 'perl-sgmls: docs')
source=("git+https://gitlab.freedesktop.org/fontconfig/fontconfig.git"
+ 40-fontconfig-config.script
+ 40-fontconfig-config.hook
fontconfig.hook)
sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
'SKIP')
# a nice page to test font matching:
@@ -46,25 +49,30 @@ build() {
#check() {
# cd fontconfig
-# meson test -C build
+# meson test -C build --print-errorlogs
#}
package_fontconfig-minimal-git() {
depends=(expat libfreetype.so)
- provides=(libfontconfig.so fontconfig)
- conflicts=(fontconfig)
+ provides=(libfontconfig.so fontconfig fontconfig-docs)
+ conflicts=(fontconfig fontconfig-docs)
+ replaces=('fontconfig-docs<2:2.13.93-1')
install=fontconfig.install
backup=(etc/fonts/fonts.conf)
- DESTDIR="$pkgdir" ninja $NINJAFLAGS -C build install
+ DESTDIR="$pkgdir" meson install -C build
- install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 ../*.hook
-# install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
+# 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
- # Split -docs
-# mkdir -p "$srcdir/doc/usr/share/man"
-# mv {"$pkgdir","$srcdir"/doc}/usr/share/doc
-# mv {"$pkgdir","$srcdir"/doc}/usr/share/man/man3
+ install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
+ install -D 40-fontconfig-config.script \
+ "$pkgdir/usr/share/libalpm/scripts/40-fontconfig-config"
+ install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 fontconfig/COPYING
}
# vim:set sw=2 et:
diff --git a/fontconfig.hook b/fontconfig.hook
index 63be791decaf..c1d93b413b08 100644
--- a/fontconfig.hook
+++ b/fontconfig.hook
@@ -3,7 +3,10 @@ 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
index 52bd289fa5ef..f569a4a6894f 100644
--- a/fontconfig.install
+++ b/fontconfig.install
@@ -1,8 +1,22 @@
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 -n "Rebuilding fontconfig cache..."
+ echo "Rebuilding fontconfig cache..."
/usr/bin/fc-cache -rs
- echo " done."
}
post_install() {