OCaml 4.14.0 rebuild
[arch-packages.git] / noto-fonts / repos / extra-any / PKGBUILD
blobdf991dfc0f0918b658df6b4e170ecebdefbff5b4
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
3 pkgbase=noto-fonts
4 pkgname=(noto-fonts noto-fonts-extra ttf-croscore)
5 pkgver=20220607
6 _commit=c971829a87e7920f960e7277c3dafd9bedd3c601
7 pkgrel=1
8 pkgdesc='Google Noto TTF fonts'
9 arch=(any)
10 url='https://fonts.google.com/noto'
11 license=(custom:SIL)
12 makedepends=(git python-fonttools)
13 source=(git+https://github.com/notofonts/noto-fonts#commit=$_commit
14         66-noto-sans.conf 66-noto-serif.conf 66-noto-mono.conf
15         46-noto-sans.conf 46-noto-serif.conf 46-noto-mono.conf)
16 sha256sums=('SKIP'
17             '52684bebf6447be22618d2a04ff37623ec92f9d8ccf6b6f972e5bcbcfee90d69'
18             '4459944b63dc083107280f5d7375c69746bf80a09416a4a4909a100e58e5a33a'
19             '4526289f59654e2a81dc734669a1ae4e416f9a56d0896ec3741c6bf065baf8a8'
20             '83a8faf6a47954075f97a2d555048e2a6689c38603b2ca00150157bf645f4593'
21             'c94368b24506770767d003e5bcba589a8e402e489c240ee52453bf3ac7e9b5fa'
22             'f5c09b37280d7569b6c99a78511639be4ae25b8c5406464422fe0421fe13a884')
24 prepare() {
25 # Fix weight of Arimo-BoldItalic.ttf https://github.com/googlefonts/noto-fonts/issues/2350
26   cd $pkgbase/hinted/ttf/Arimo
27   ttx Arimo-BoldItalic.ttf
28   sed -e 's|usWeightClass value=\"400\"|usWeightClass value=\"700\"|' -i Arimo-BoldItalic.ttx
29   ttx -f Arimo-BoldItalic.ttx
32 package_noto-fonts() {
33   optdepends=('noto-fonts-cjk: CJK characters' 'noto-fonts-emoji: Emoji characters'
34               'noto-fonts-extra: additional variants (condensed, semi-bold, extra-light)')
35   provides=(ttf-font)
37   cd $pkgbase
38   # Remove duplicated fonts
39   rm {un,}hinted/ttf/NotoSansTifinagh/NotoSansTifinagh[AGHRST]*.ttf
41   install -Dm644 unhinted/ttf/Noto*/*.tt[fc] -t "$pkgdir"/usr/share/fonts/noto
42   install -Dm644 hinted/ttf/Noto*/*.tt[fc] -t "$pkgdir"/usr/share/fonts/noto
43   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/noto-fonts
45   # Move to noto-fonts-extra
46   rm -f "$pkgdir"/usr/share/fonts/noto/Noto*{Condensed,SemiBold,Extra}*.ttf
48   # Install fontconfig files
49   install -Dm644 "$srcdir"/*.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail/
50   install -d "$pkgdir"/usr/share/fontconfig/conf.default
51   ln -rs "$pkgdir"/usr/share/fontconfig/conf.avail/* "$pkgdir"/usr/share/fontconfig/conf.default
53   # Remove duplicate Display fonts https://github.com/googlefonts/noto-fonts/issues/2315
54   rm "$pkgdir"/usr/share/fonts/noto/NotoSans-Display*
57 package_noto-fonts-extra() {
58   pkgdesc+=' - additional variants'
59   depends=(noto-fonts)
60   
61   cd $pkgbase
62   mkdir -p "$pkgdir"/usr/share/fonts/noto
63   cp hinted/ttf/Noto*/*{Condensed,SemiBold,Extra}*.tt[fc] "$pkgdir"/usr/share/fonts/noto
65   # Remove duplicate Display fonts https://github.com/googlefonts/noto-fonts/issues/2315
66   rm "$pkgdir"/usr/share/fonts/noto/NotoSans-Display*
69 package_ttf-croscore() {
70   pkgdesc='Chrome OS core fonts'
71   provides=(ttf-font)
73   cd $pkgbase
74   install -Dm644 hinted/ttf/{Arimo,Cousine,Tinos}/*.ttf -t "$pkgdir"/usr/share/fonts/croscore
75   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/ttf-croscore