media-fonts/twemoji: unmask, add 15.1.0, drop 14.0.2

Use prebuilt TTF files instead of whatever monstruosity notofonttools
are.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova 2025-03-25 19:38:27 +05:00
parent 901a4fb4b2
commit 6f3cd8e35a
No known key found for this signature in database
GPG Key ID: E7B76EDC50864BB1
6 changed files with 36 additions and 146 deletions

View File

@ -1,2 +1 @@
DIST twemoji-14.0.2-noto.tar.gz 170352518 BLAKE2B 545e58d47b247998c0f376bbc9ec43fcb2ac4c1d24465420ae43a168987dcb7c4eba873b9cc64cfc6ffce3290551242d7e44ed69606f9c3d8a59dbeeddc3cdb2 SHA512 a7ea0c33f4703749d8a30f4be2fac5971429dcec7b6feed2645854d9ae1eebb428597a56ad148c3732e320a65d4133da30c0003ed39f07c5270462e31fdf3d0b
DIST twemoji-14.0.2.tar.gz 4758975 BLAKE2B d339dd65d176888391195393137d295ffd5d5b9f98fed77268935f07445a2f505838fa74ae724f4a10f1dc9cffa7ef1f85b2652a50182713a4af500e90979cf8 SHA512 2256c473888817b4802f4b26069f4d04eccff1621ec9595bb0696f1be54664add8c2d56f87cee06451eb2cbb8969d29cccdd56d10d5f11bcff08881c96d4ead2
DIST Twemoji-15.1.0.ttf 3372220 BLAKE2B fb8fac919201cd6effdd31eed89d5462fec9677289b1130af9af37f5e58168096c0b03d91baaf76ec3691af6123d60edd6ada2def36a66d3060b426c32a9044c SHA512 df2b128e27f6a798f9ea870cf0903e94c1b9be01d37da3ce46e42fcf109a064bcc1856df8f35bd408349dcacfdfc49508c42027974813df1fe719b17ad545984

View File

@ -3,13 +3,11 @@
<fontconfig>
<!--
Treat this file as a reference and modify as necessary if you are not satisfied with the results.
This configuration attempts to guarantee that colorful emojis from Twemoji
will be displayed, no matter how badly the apps and websites are written.
This config attempts to guarantee that colorful emojis from Twemoji will be displayed,
no matter how badly the apps and websites are written.
It uses a few different tricks, some of which introduce conflicts with other fonts.
It uses a few different tricks, some of which MAY introduce conflicts with
other fonts.
-->
@ -50,8 +48,10 @@
</match>
<!--
If other fonts contain emoji glyphs, they could interfere and make some emojis rendered in wrong font (often in black-and-white).
For example, DejaVu Sans contains black-and-white emojis, which we can remove using the following trick:
If other fonts contain emoji glyphs, they could interfere and make some
emojis rendered in wrong font (often in black-and-white).
For example, DejaVu Sans contains black-and-white emojis, which we can
remove using the following trick:
-->
<match target="scan">
<test name="family" compare="contains">

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<remote-id type="github">twitter/twemoji</remote-id>
</upstream>
<maintainer type="person">
<email>cyber+gentoo@sysrq.in</email>
<name>Anna</name>
</maintainer>
</pkgmetadata>

View File

@ -1,127 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..12} )
inherit font python-any-r1
NOTO_PV="2.034"
DESCRIPTION="A color emoji font with a flat visual style, designed and used by Twitter"
HOMEPAGE="
https://twemoji.twitter.com
https://github.com/twitter/twemoji
"
SRC_URI="
https://github.com/googlefonts/noto-emoji/archive/refs/tags/v${NOTO_PV}.tar.gz -> ${P}-noto.tar.gz
https://github.com/twitter/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/noto-emoji-${NOTO_PV}"
LICENSE="Apache-2.0 CC-BY-4.0 MIT OFL-1.1"
SLOT="0"
KEYWORDS="~amd64"
BDEPEND="
${PYTHON_DEPS}
app-arch/zopfli
media-gfx/pngquant
x11-libs/cairo
|| (
media-gfx/imagemagick[png]
media-gfx/graphicsmagick[png]
)
$(python_gen_any_dep '
>=dev-python/fonttools-4.7.0[${PYTHON_USEDEP}]
>=dev-python/notofonttools-0.2.13[${PYTHON_USEDEP}]
')
"
RESTRICT="binchecks strip"
DOCS=( CONTRIBUTING.md FOLDERS.md LEGACY.md README.md )
PATCHES=(
# https://github.com/googlei18n/noto-emoji/issues/240
"${FILESDIR}"/noto-build-path.patch
# Be more verbose
"${FILESDIR}"/noto-pngquant-verbose.patch
)
FONT_S="${S}"
FONT_SUFFIX="ttf"
FONT_CONF=( "${FILESDIR}"/75-${PN}.conf )
python_check_deps() {
python_has_version "dev-python/fonttools[${PYTHON_USEDEP}]" &&
python_has_version "dev-python/notofonttools[${PYTHON_USEDEP}]"
}
pkg_setup() {
python-any-r1_pkg_setup
font_pkg_setup
}
src_unpack() {
default
mv "${WORKDIR}"/${P}/assets "${S}" || die
mv "${WORKDIR}"/${P}/*.md "${S}" || die
}
src_prepare() {
default
# Be more verbose
sed -i -e 's:\(@$(ZOPFLIPNG) -y "$<" "$@"\) 1> /dev/null 2>&1:\1:g' Makefile || die
# Based on Fedora patch to allow graphicsmagick usage
if has_version -b media-gfx/graphicsmagick; then
eapply "${FILESDIR}/noto-use-gm.patch"
fi
sed NotoColorEmoji.tmpl.ttx.tmpl \
-e "s/Noto Color Emoji/${PN^}/" \
-e "s/NotoColorEmoji/${PN^}/" \
-e "s/Copyright .* Google Inc\./Twitter, Inc and other contributors./" \
-e "s/ Version .*/ ${PV}/" \
-e "s/.*is a trademark.*//" \
-e "s/Google, Inc\./Twitter, Inc and other contributors/" \
-e "s,http://www.google.com/get/noto/,https://twemoji.twitter.com," \
-e "s/.*is licensed under.*/ Creative Commons Attribution 4.0 International/" \
-e "s,http://scripts.sil.org/OFL,http://creativecommons.org/licenses/by/4.0/," \
> ${PN^}.tmpl.ttx.tmpl || die
pushd assets/72x72 || die
for png in *.png; do
mv ${png} emoji_u${png//-/_} || die
done
}
src_compile() {
local mymakeflags=(
EMOJI="${PN^}"
EMOJI_SRC_DIR="assets/72x72"
FLAGS=""
BODY_DIMENSIONS="76x72"
BYPASS_SEQUENCE_CHECK="true"
VIRTUAL_ENV="true"
)
emake "${mymakeflags[@]}"
}
src_install() {
rm NotoColorEmoji_WindowsCompatible.ttf *.tmpl.ttf || die
# Don't lose fancy emoji icons
insinto /usr/share/icons/${PN}/72/emotes/
doins assets/72x72/*.png
insinto /usr/share/icons/${PN}/scalable/emotes/
doins assets/svg/*.svg
font_src_install
einstalldocs
}

View File

@ -0,0 +1,23 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit font
BUILD_DATE="2025-01-05_14-29"
DESCRIPTION="Color emoji font with a flat visual style, designed and used by Twitter"
HOMEPAGE="https://git.sr.ht/~whynothugo/twemoji.ttf/"
SRC_URI="https://mirror.whynothugo.nl/twemoji.ttf/${BUILD_DATE}/Twemoji-${PV}.ttf"
S="${WORKDIR}"
LICENSE="Apache-2.0 CC-BY-4.0 MIT OFL-1.1"
SLOT="0"
KEYWORDS="~amd64"
FONT_SUFFIX="ttf"
FONT_CONF=( "${FILESDIR}"/75-${PN}.conf )
src_unpack() {
cp "${DISTDIR}/${A}" "${S}/${PN}.${FONT_SUFFIX}" || die
}

View File

@ -56,11 +56,6 @@ www-misc/gorss
# Removal on 2025-04-05.
dev-debug/uscope
# Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> (2025-03-05)
# Unmaintained in GURU.
# Removal on 2025-04-05.
media-fonts/twemoji
# Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> (2025-03-05)
# Unmaintained in GURU, no revdeps left. Open bugs: #901337.
# Removal on 2025-04-05.