new blfs: media-libs/fontconfig-2.17.1
This commit is contained in:
111
media-libs/fontconfig-2.17.1.PKGBUILD
Normal file
111
media-libs/fontconfig-2.17.1.PKGBUILD
Normal file
@@ -0,0 +1,111 @@
|
||||
pkgname=fontconfig
|
||||
pkgver=2.17.1
|
||||
pkgdesc="Library for configuring and customizing font access"
|
||||
homepage=https://www.freedesktop.org/wiki/Software/fontconfig/
|
||||
arch=(x86_64)
|
||||
license=('HPND AND Unicode-DFS-2016')
|
||||
depends=(
|
||||
bash
|
||||
expat
|
||||
freetype
|
||||
glibc
|
||||
)
|
||||
makedepends=(
|
||||
gperf
|
||||
meson
|
||||
)
|
||||
_patches=("fontconfig-2.14.0-latin-update.patch"
|
||||
"fontconfig-2.17.0-skip-bubblewrap-tests.patch"
|
||||
"fontconfig-2.17.0-network-test.patch"
|
||||
"fontconfig-2.17.0-macro-preprocess.patch"
|
||||
)
|
||||
_patch_sums=("92015fbfc95fae01a0ad6f346132d215"
|
||||
"e23add7395db7d284c8557329058c694"
|
||||
"897596e23b6c42d4b15911dc70df4542"
|
||||
"886ae03ad92de457c3f3ac6aafe1fcf6"
|
||||
)
|
||||
sources=("${pkgname}-${pkgver}.tar.xz"
|
||||
"40-fontconfig-config.HOOK"
|
||||
${_patches[@]}
|
||||
)
|
||||
urls=("https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${pkgver}/${sources[0]}"
|
||||
"40-fontconfig-config.HOOK"
|
||||
${_patches[@]}
|
||||
)
|
||||
md5sums=("f68f95052c7297b98eccb7709d817f6a"
|
||||
"c873926ec895df4b46c6ef642599b271"
|
||||
${_patch_sums[@]}
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
||||
for _patch in ${_patchs[@]}; do
|
||||
patch -p1 -i ${filedir}/${_patch}
|
||||
done
|
||||
}
|
||||
|
||||
src_build() {
|
||||
local addfonts=(
|
||||
/usr/local/share/fonts
|
||||
)
|
||||
local meson_options=(
|
||||
--prefix=/usr
|
||||
--buildtype=release
|
||||
-D bitmap-conf=noinstall
|
||||
-D default-sub-pixel-rendering=noinstall
|
||||
-D doc=disabled
|
||||
-D doc-html=disabled
|
||||
-D doc-pdf=disabled
|
||||
-D doc-man=disabled
|
||||
-D doc-txt=disabled
|
||||
-D nls=enabled
|
||||
-D tests=disabled
|
||||
|
||||
-D cache-build=disabled
|
||||
-D cache-dir=/var/cache/fontconfig
|
||||
-D default-fonts-dirs=/usr/share/fonts
|
||||
-D additional-fonts-dirs=$(IFS=, ; echo "${addfonts[*]}" )
|
||||
-D template-dir=/etc/fonts/conf.avail
|
||||
-D fontations=disabled
|
||||
-D xml-backend=expat
|
||||
)
|
||||
meson setup build "${meson_options[@]}"
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson install -C build --destdir "$pkgdir"
|
||||
|
||||
install -Dvm644 build/fonts.conf "${pkgdir}/etc/fonts/"
|
||||
|
||||
install -Dvm644 fc-lang/*.orth -t "${pkgdir}/usr/share/fc-lang"
|
||||
|
||||
install -Dvm644 doc/fontconfig-user.{txt,pdf} -t "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
|
||||
|
||||
leaf_install_hook "${filedir}/${sources[1]}"
|
||||
}
|
||||
|
||||
src_preinstall() {
|
||||
echo -e "${GREEN_COLOR}Syncing fontconfig configuration to system${CLEAR_COLOR}"
|
||||
if [[ -e /etc/fonts/conf.d ]] ; then
|
||||
local file f
|
||||
for file in ""/etc/fonts/conf.avail/* ; do
|
||||
f=${file##*/}
|
||||
if [[ -L /etc/fonts/conf.d/${f} ]] ; then
|
||||
[[ -f ${pkgdir}/etc/fonts/conf.avail/${f} ]] \
|
||||
&& ln -sf ../conf.avail/"${f}" \
|
||||
"${pkgdir}"/etc/fonts/conf.d/ &>/dev/null
|
||||
else
|
||||
[[ -f ${pkgdir}/etc/fonts/conf.avail/${f} ]] \
|
||||
&& rm "${pkgdir}"/etc/fonts/conf.d/"${f}" &>/dev/null
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_postinstall() {
|
||||
echo -e "${GREEN_COLOR}Cleaning broken symlinks in /etc/fonts/conf.d/${CLEAR_COLOR}"
|
||||
find -L /etc/fonts/conf.d/ -type l -delete
|
||||
}
|
||||
|
||||
# vim:ft=sh syn=sh et sw=2:
|
||||
7
media-libs/fontconfig-2.17.1/40-fontconfig-config.HOOK
Normal file
7
media-libs/fontconfig-2.17.1/40-fontconfig-config.HOOK
Normal file
@@ -0,0 +1,7 @@
|
||||
target=(/usr/share/fontconfig/conf.default/*
|
||||
/etc/fonts/conf.d/*
|
||||
)
|
||||
triggers=("install" "remove")
|
||||
operation() {
|
||||
/usr/bin/fc-cache -rs
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
https://bugs.gentoo.org/130466
|
||||
--- a/conf.d/60-latin.conf
|
||||
+++ b/conf.d/60-latin.conf
|
||||
@@ -5,47 +5,50 @@
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
+ <family>Liberation Serif</family>
|
||||
<family>Noto Serif</family>
|
||||
<family>DejaVu Serif</family>
|
||||
<family>Times New Roman</family>
|
||||
- <family>Thorndale AMT</family>
|
||||
<family>Luxi Serif</family>
|
||||
<family>Nimbus Roman No9 L</family>
|
||||
<family>Nimbus Roman</family>
|
||||
<family>Times</family>
|
||||
+ <family>Thorndale AMT</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
+ <family>Liberation Sans</family>
|
||||
<family>Noto Sans</family>
|
||||
<family>DejaVu Sans</family>
|
||||
- <family>Verdana</family>
|
||||
<family>Arial</family>
|
||||
- <family>Albany AMT</family>
|
||||
<family>Luxi Sans</family>
|
||||
<family>Nimbus Sans L</family>
|
||||
<family>Nimbus Sans</family>
|
||||
<family>Helvetica</family>
|
||||
<family>Lucida Sans Unicode</family>
|
||||
<family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
|
||||
+ <family>Verdana</family>
|
||||
<family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
|
||||
+ <family>Albany AMT</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
+ <family>Liberation Mono</family>
|
||||
<family>Noto Sans Mono</family>
|
||||
<family>DejaVu Sans Mono</family>
|
||||
<family>Inconsolata</family>
|
||||
<family>Andale Mono</family>
|
||||
<family>Courier New</family>
|
||||
- <family>Cumberland AMT</family>
|
||||
<family>Luxi Mono</family>
|
||||
<family>Nimbus Mono L</family>
|
||||
<family>Nimbus Mono</family>
|
||||
<family>Nimbus Mono PS</family>
|
||||
<family>Courier</family>
|
||||
+ <family>Cumberland AMT</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<!--
|
||||
@@ -66,6 +69,7 @@
|
||||
<alias>
|
||||
<family>cursive</family>
|
||||
<prefer>
|
||||
+ <family>Comic Neue</family>
|
||||
<family>ITC Zapf Chancery Std</family>
|
||||
<family>Zapfino</family>
|
||||
<family>Comic Sans MS</family>
|
||||
@@ -0,0 +1,13 @@
|
||||
https://github.com/mesonbuild/meson/issues/14201
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -49,7 +49,7 @@ fc_sources = files([
|
||||
|
||||
|
||||
|
||||
-fcobjshash_h = cc.preprocess('fcobjshash.gperf.h', include_directories: incbase)
|
||||
+fcobjshash_h = cc.preprocess('fcobjshash.gperf.h', include_directories: incbase, compile_args: '-g0')
|
||||
fcobjshash_gperf = custom_target(
|
||||
input: fcobjshash_h,
|
||||
output: 'fcobjshash.gperf',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
If pytest is found, it tries to use pytest-tap (which is currently unpackaged).
|
||||
|
||||
But as of fontconfig-2.16.0, this only runs test_issue431.py which needs
|
||||
network access, so we can't run it anyway. Stub it out.
|
||||
--- a/test/meson.build
|
||||
+++ b/test/meson.build
|
||||
@@ -91,7 +91,7 @@ if host_machine.system() != 'windows'
|
||||
|
||||
test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1'])
|
||||
|
||||
- if pytest.found()
|
||||
+ if false
|
||||
test('pytest', pytest, args: ['--tap'],
|
||||
workdir: meson.current_source_dir(),
|
||||
env: ['builddir=@0@'.format(meson.project_build_root())],
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/320
|
||||
--- a/test/run-test.sh
|
||||
+++ b/test/run-test.sh
|
||||
@@ -44,9 +44,7 @@ EXPECTED=${EXPECTED-"out.expected"}
|
||||
FCLIST="$LOG_COMPILER $BUILDTESTDIR/../fc-list/fc-list$EXEEXT"
|
||||
FCCACHE="$LOG_COMPILER $BUILDTESTDIR/../fc-cache/fc-cache$EXEEXT"
|
||||
|
||||
-if [ -x "$(command -v bwrap)" ]; then
|
||||
- BWRAP="$(command -v bwrap)"
|
||||
-fi
|
||||
+BWRAP=""
|
||||
|
||||
if [ -x "$(command -v md5sum)" ]; then
|
||||
MD5SUM="$(command -v md5sum)"
|
||||
Reference in New Issue
Block a user