noto-fonts-cjk: make into metapackage

done with doing the weird versioning for sans/serif
This commit is contained in:
classabbyamp 2024-08-08 05:37:48 -04:00 committed by classabbyamp
parent ef96f05924
commit 802e27f025
4 changed files with 13 additions and 211 deletions

View File

@ -0,0 +1 @@
noto-fonts-cjk

View File

@ -1,184 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<description>Properly match Noto CJK font languages</description>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Serif CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Serif CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans Mono CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans Mono CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Mono CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Mono CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-hk</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Mono CJK HK</string>
</edit>
</match>
</fontconfig>

View File

@ -1,31 +1,18 @@
# Template file for 'noto-fonts-cjk'
pkgname=noto-fonts-cjk
# set to the date of the latest release packaged
version=20230817
reverts="20150616_1 20170601_1 20170601_2 20170601_3 20190416_1 20190416_2
20220127_1 20220127_2 20230817_1"
version=1
revision=1
# the sans and serif variants are released on separate tags
_sans_version=2.004
_serif_version=2.002
create_wrksrc=yes
depends="font-util"
short_desc="Google Noto CJK Fonts"
build_style=meta
depends="noto-fonts-cjk-sans noto-fonts-cjk-serif"
short_desc="Google Noto CJK fonts (meta package)"
maintainer="classabbyamp <void@placeviolette.net>"
license="OFL-1.1"
homepage="https://www.google.com/get/noto/help/cjk/"
changelog="https://raw.githubusercontent.com/googlefonts/noto-cjk/main/Sans/NEWS.md
https://raw.githubusercontent.com/googlefonts/noto-cjk/main/Serif/NEWS.md"
distfiles="https://github.com/googlefonts/noto-cjk/releases/download/Sans${_sans_version}/03_NotoSansCJK-OTC.zip
https://github.com/googlefonts/noto-cjk/releases/download/Serif${_serif_version}/04_NotoSerifCJKOTC.zip"
checksum="528f4e1b25ff3badb0321b38d015d954c4c0de926c7830ef50e4a1948f6a3eed
941985d9fd860492d15640b53edc9668d568877140c524ccd83deb3d9b7a2950"
font_dirs="/usr/share/fonts/noto"
homepage="https://github.com/notofonts/noto-cjk"
do_install() {
vmkdir usr/share/fonts/noto
vcopy "*.ttc" usr/share/fonts/noto
vcopy "OTC/*.ttc" usr/share/fonts/noto
vinstall ${FILESDIR}/70-noto-fonts-cjk.conf 644 usr/share/fontconfig/conf.avail
vmkdir etc/fonts/conf.d
ln -sf /usr/share/fontconfig/conf.avail/70-noto-fonts-cjk.conf ${DESTDIR}/etc/fonts/conf.d/
vlicense LICENSE
noto-fonts-cjk-variable_package() {
build_style=meta
short_desc="${short_desc/fonts/variable weight &}"
depends="noto-fonts-cjk-sans-variable noto-fonts-cjk-serif-variable"
}

View File

@ -1,3 +1 @@
# not perfect, but good enough
version="${_sans_version}"
pattern='/archive/refs/tags/Sans\K[\d.]+(?=\.tar\.gz")'
disabled="metapackage"