~q3cpma/portage-overlay

2a3d524c561c0cbccb8fbd94a7cb4e7a4e3af8a8 — q3cpma 2 months ago 851bfac
Bump source-han-{sans,serif} and add source-han-mono
4 files changed, 103 insertions(+), 34 deletions(-)

A media-fonts/source-han-mono/source-han-mono-1.002.ebuild
A media-fonts/source-han-sans/source-han-sans-2.004.ebuild
D media-fonts/source-han-serif/source-han-serif-1.001.ebuild
A media-fonts/source-han-serif/source-han-serif-2.001.ebuild
A media-fonts/source-han-mono/source-han-mono-1.002.ebuild => media-fonts/source-han-mono/source-han-mono-1.002.ebuild +25 -0
@@ 0,0 1,25 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit font

DESCRIPTION="Pan-CJK OpenType/CFF monospace font family"
HOMEPAGE="https://github.com/adobe-fonts/source-han-mono/"
SRC_URI="https://github.com/adobe-fonts/${PN}/releases/download/${PV}/SourceHanMono.ttc"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"

S=${WORKDIR}
FONT_SUFFIX="ttc"
RESTRICT="binchecks strip"

src_install() {
	insinto "${FONTDIR}"
	doins "$DISTDIR/$A"
	font_xfont_config
	font_fontconfig
	einstalldocs
}

A media-fonts/source-han-sans/source-han-sans-2.004.ebuild => media-fonts/source-han-sans/source-han-sans-2.004.ebuild +39 -0
@@ 0,0 1,39 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit font

# Note to maintainers:
# The upstream tarball is huge (over 820 MB), so we use the
# regional subset OTF fonts per region, for the user's convenience.

DESCRIPTION="Pan-CJK OpenType/CFF font family"
HOMEPAGE="https://github.com/adobe-fonts/source-han-sans/"
SRC_URI="
	l10n_ja? (    https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/SourceHanSansJP.zip -> ${PN}-ja-${PV}.zip )
	l10n_ko? (    https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/SourceHanSansKR.zip -> ${PN}-ko-${PV}.zip )
	l10n_zh-CN? ( https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/SourceHanSansCN.zip -> ${PN}-zh_CN-${PV}.zip )
	l10n_zh-HK? ( https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/SourceHanSansHK.zip -> ${PN}-zh_HK-${PV}.zip )
	l10n_zh-TW? ( https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/SourceHanSansTW.zip -> ${PN}-zh_TW-${PV}.zip )"
S="${WORKDIR}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~riscv sparc x86 ~x64-macos"
IUSE="l10n_ja l10n_ko +l10n_zh-CN l10n_zh-HK l10n_zh-TW"
REQUIRED_USE="|| ( l10n_ja l10n_ko l10n_zh-CN l10n_zh-HK l10n_zh-TW )"
RESTRICT="binchecks strip"

FONT_SUFFIX="otf"

BDEPEND="app-arch/unzip"

src_install() {
	declare -A map=(ja JP ko KR zh-CN CN zh-HK HK zh-TW TW)
	for u in ${IUSE//+/}; do
		! [[ $u =~ ^l10n_ ]] && continue
		use $u && FONT_S="$S/SubsetOTF/${map[${u#l10n_}]}/" font_src_install
	done
}

D media-fonts/source-han-serif/source-han-serif-1.001.ebuild => media-fonts/source-han-serif/source-han-serif-1.001.ebuild +0 -34
@@ 1,34 0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit font

# Note to maintainers:
# The upstream tarball is huge (over 780 MB), so we use the
# regional subset OTF fonts per region, for the user's convenience.

DESCRIPTION="Pan-CJK OpenType/CFF font family"
HOMEPAGE="https://github.com/adobe-fonts/source-han-serif/"
SRC_URI="
	l10n_ja? ( https://github.com/adobe-fonts/${PN}/raw/${PV}R/SubsetOTF/SourceHanSerifJP.zip -> ${PN}-ja-${PV}.zip )
	l10n_ko? ( https://github.com/adobe-fonts/${PN}/raw/${PV}R/SubsetOTF/SourceHanSerifKR.zip -> ${PN}-ko-${PV}.zip )
	l10n_zh-CN? ( https://github.com/adobe-fonts/${PN}/raw/${PV}R/SubsetOTF/SourceHanSerifCN.zip -> ${PN}-zh_CN-${PV}.zip )
	l10n_zh-TW? ( https://github.com/adobe-fonts/${PN}/raw/${PV}R/SubsetOTF/SourceHanSerifTW.zip -> ${PN}-zh_TW-${PV}.zip )"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
IUSE="l10n_ja l10n_ko +l10n_zh-CN l10n_zh-TW"
REQUIRED_USE="|| ( l10n_ja l10n_ko l10n_zh-CN l10n_zh-TW )"

S=${WORKDIR}
FONT_SUFFIX="otf"
RESTRICT="binchecks strip"

src_install() {
	use l10n_ja && FONT_S="${S}/SourceHanSerifJP" font_src_install
	use l10n_ko && FONT_S="${S}/SourceHanSerifKR" font_src_install
	use l10n_zh-CN && FONT_S="${S}/SourceHanSerifCN" font_src_install
	use l10n_zh-TW && FONT_S="${S}/SourceHanSerifTW" font_src_install
}

A media-fonts/source-han-serif/source-han-serif-2.001.ebuild => media-fonts/source-han-serif/source-han-serif-2.001.ebuild +39 -0
@@ 0,0 1,39 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit font

# Note to maintainers:
# The upstream tarball is huge (over 700 MB), so we use the
# regional subset OTF fonts per region, for the user's convenience.

DESCRIPTION="Pan-CJK OpenType/CFF serif font family"
HOMEPAGE="https://github.com/adobe-fonts/source-han-serif/"
SRC_URI="
	l10n_ja? (    https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/12_SourceHanSerifJP.zip -> ${PN}-ja-${PV}.zip )
	l10n_ko? (    https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/13_SourceHanSerifKR.zip -> ${PN}-ko-${PV}.zip )
	l10n_zh-CN? ( https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/14_SourceHanSerifCN.zip -> ${PN}-zh_CN-${PV}.zip )
	l10n_zh-HK? ( https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/16_SourceHanSerifHK.zip -> ${PN}-zh_HK-${PV}.zip )
	l10n_zh-TW? ( https://github.com/adobe-fonts/${PN}/releases/download/${PV}R/15_SourceHanSerifTW.zip -> ${PN}-zh_TW-${PV}.zip )"
S="${WORKDIR}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ppc ppc64 ~riscv sparc x86 ~x64-macos"
IUSE="l10n_ja l10n_ko +l10n_zh-CN l10n_zh-HK l10n_zh-TW"
REQUIRED_USE="|| ( l10n_ja l10n_ko l10n_zh-CN l10n_zh-HK l10n_zh-TW )"
RESTRICT="binchecks strip"

FONT_SUFFIX="otf"

BDEPEND="app-arch/unzip"

src_install() {
	declare -A map=(ja JP ko KR zh-CN CN zh-HK HK zh-TW TW)
	for u in ${IUSE//+/}; do
		! [[ $u =~ ^l10n_ ]] && continue
		use $u && FONT_S="$S/SubsetOTF/${map[${u#l10n_}]}/" font_src_install
	done
}