blob: 7eafbb0751ce23196f844b7fc3046e24cf98911f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgbase=freetype2-git
pkgname=(
freetype2-git
freetype2-demos-git
)
pkgver=2.13.3+p1+gc4e6791f8
pkgrel=1
epoch=1
pkgdesc="Font rasterization library (from git)"
url="https://www.freetype.org/"
arch=(x86_64)
license=('FTL OR GPL-2.0-or-later')
depends=(
brotli
bzip2
libpng
sh
zlib
# creates a dependency cycle harfbuzz <-> freetype, wanted by upstream
harfbuzz
)
makedepends=(
git
librsvg
libx11
meson
qt5-base
)
source=(
git+https://gitlab.freedesktop.org/freetype/freetype.git
git+https://gitlab.freedesktop.org/freetype/freetype-demos.git
0001-Enable-table-validation-modules.patch
0002-Enable-subpixel-rendering.patch
0003-Enable-long-PCF-family-names.patch
freetype2.sh
)
b2sums=('SKIP'
'SKIP'
'b7e3b72e2d6aed548c1762a16ee08ac47a05caf29c5d37ef03c6791e6dbd109fdfef0b246540c35e968d54f2103b70e80eccff72ac54d34224c6d064aa53d720'
'd2b507830adf1bb9db619cd2e0bbb0dfe5b16ba7d4467ad503e954cf91715c5aa5b52b1d3865abc9841990cda56f223eb6f282d4baf7f31fd525cc90aa96b884'
'b83a599da8eef1c39a268482db8e82f03a2c9b68850a0ec782e9839e7b45a3b0f989d997647eb55e5b18f2fe0c988e73f0ec6c4eb4c0787689f9e0213faa4320'
'a964f46886b5017a5c180f29408f72ae8aba29f37404c48b4681ff12ca0a2cfa2a8e219480e98d63d45fb5c266a6e5826df170c9a0d701cd866e395c5ac6e87d')
validpgpkeys=(
E30674707856409FF1948010BE6C3AAC63AD8E3F # Werner Lemberg <wl@gnu.org>
)
pkgver() {
local _tag _count
cd freetype
_tag=$(git describe --abbrev=0 )
_count=$(git rev-list --count $_tag..HEAD)
_tag=${_tag#VER-}
echo ${_tag//-/.}+p$_count+g$(git rev-parse --short HEAD)
}
prepare() {
# Build FreeType as part of the demos
ln -sr freetype freetype2
cd freetype
patch -Np1 -i ../0001-Enable-table-validation-modules.patch
patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
patch -Np1 -i ../0003-Enable-long-PCF-family-names.patch
}
build() {
local meson_options=(
-D freetype2:default_library=shared
)
# Build FreeType as part of the demos
export MESON_PACKAGE_CACHE_DIR="$srcdir"
arch-meson freetype-demos build "${meson_options[@]}"
meson compile -C build
}
check() {
meson test -C build --print-errorlogs
}
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
package_freetype2-git() {
provides=(
libfreetype.so
"freetype2=$pkgver"
)
conflicts=(freetype2)
install=freetype2.install
backup=(etc/profile.d/freetype2.sh)
meson install -C build --destdir="$pkgdir"
_pick demos "$pkgdir"/usr/bin
_pick demos "$pkgdir"/usr/share/man/man1
install -Dm644 freetype2.sh -t "$pkgdir/etc/profile.d"
install -Dm644 freetype/docs/FTL.TXT \
-t "$pkgdir/usr/share/licenses/$pkgname"
}
package_freetype2-demos-git() {
pkgdesc="Freetype tools and demos (from git)"
depends=(
freetype2-git
librsvg
libx11
)
optdepends=('qt5-base: ftinspect')
provides=("freetype2-demos=$pkgver")
conflicts=(freetype2-demos)
mv demos/* "$pkgdir"
install -Dm644 freetype/docs/FTL.TXT \
-t "$pkgdir/usr/share/licenses/$pkgname"
}
# vim:set sw=2 sts=-1 et:
|