Skip to content

Commit

Permalink
fix var
Browse files Browse the repository at this point in the history
* Simplify installation
* Add move to handle package name change
* Use shorter var name to pass pkgcheck
* Update maintainer to the real user of this font
  • Loading branch information
curlingchimpanzeeowl authored and Linerre committed Nov 28, 2024
1 parent ed42a7c commit 7d8b7f7
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/overlay.toml
Original file line number Diff line number Diff line change
Expand Up @@ -817,12 +817,12 @@ use_latest_release = true
prefix = "v"
github_account = "Linerre"

["media-fonts/Shanggu"]
["media-fonts/shanggu"]
source = "github"
github = "GuiWonder/Shanggu"
use_latest_release = true
prefix = "v"
github_account = "Linerre"
github_account = "curlingchimpanzeeowl"

# TODO: version not found: https://sites.google.com/view/jtfoundry/zh-tw/downloads
#["media-fonts/taipei-sans-tc"]
Expand Down
80 changes: 0 additions & 80 deletions media-fonts/Shanggu/Shanggu-1.021.ebuild

This file was deleted.

File renamed without changes.
File renamed without changes.
80 changes: 80 additions & 0 deletions media-fonts/shanggu/shanggu-1.021.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit font unpacker

DESCRIPTION="A Noto-based font for traditional Chinese characters"
HOMEPAGE="https://github.com/GuiWonder/Shanggu"

MY_PN="Shanggu"

SRC_URI="
mono? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}MonoTTFs.7z -> ${MY_PN}Mono-${PV}.7z )
round? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}RoundTTFs.7z -> ${MY_PN}Round-${PV}.7z )
sans? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}SansTTFs.7z -> ${MY_PN}Sans-${PV}.7z )
serif? ( https://github.com/GuiWonder/${MY_PN}/releases/download/${PV}/${MY_PN}SerifTTFs.7z -> ${MY_PN}Serif-${PV}.7z )
"

S="${WORKDIR}"
LICENSE="OFL-1.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="round sans +serif mono"
REQUIRED_USE="|| ( round sans serif mono )"
BDEPEND="
app-arch/p7zip
"

FONT_SUFFIX="ttf"

src_unpack() {
use mono && unpack_7z "${MY_PN}Mono-${PV}.7z"
use round && unpack_7z "${MY_PN}Round-${PV}.7z"
use sans && unpack_7z "${MY_PN}Sans-${PV}.7z"
use serif && unpack_7z "${MY_PN}Serif-${PV}.7z"
}

src_install() {
if use serif; then
FONT_S=(
"${S}/${MY_PN}Serif"
"${S}/${MY_PN}SerifFANTI"
"${S}/${MY_PN}SerifJP"
"${S}/${MY_PN}SerifSC"
"${S}/${MY_PN}SerifTC"
)
fi

if use sans; then
FONT_S+=(
"${S}/${MY_PN}Sans"
"${S}/${MY_PN}SansFANTI"
"${S}/${MY_PN}SansJP"
"${S}/${MY_PN}SansSC"
"${S}/${MY_PN}SansTC"
)
fi

if use mono; then
FONT_S+=(
"${S}/${MY_PN}Mono"
"${S}/${MY_PN}MonoJP"
"${S}/${MY_PN}MonoSC"
"${S}/${MY_PN}MonoTC"
)
fi

if use round; then
FONT_S+=(
"${S}/${MY_PN}Round"
"${S}/${MY_PN}RoundFANTI"
"${S}/${MY_PN}RoundJP"
"${S}/${MY_PN}RoundSC"
"${S}/${MY_PN}RoundTC"
)
fi

font_src_install
}
1 change: 1 addition & 0 deletions profiles/updates/4Q-2024
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
move media-fonts/Shanggu media-fonts/shanggu

0 comments on commit 7d8b7f7

Please sign in to comment.