Browse Source

media-fonts/noto-emoji: перенесена удаленная версия

mhiretskiy 2540
Alexander Tratsevskiy 12 months ago
parent
commit
7e4a2244ba
  1. 1
      media-fonts/noto-emoji/Manifest
  2. 11
      media-fonts/noto-emoji/files/noto-emoji-20180823-build-path.patch
  3. 27
      media-fonts/noto-emoji/files/noto-emoji-20190328-use-gm.patch
  4. 11
      media-fonts/noto-emoji/files/noto-emoji-build-all-flags.patch
  5. 11
      media-fonts/noto-emoji/files/noto-emoji-pngquant-verbose.patch
  6. 11
      media-fonts/noto-emoji/files/noto-emoji-zopflipng-verbose.patch
  7. 101
      media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild
  8. 3
      profiles/default/package.mask

1
media-fonts/noto-emoji/Manifest

@ -0,0 +1 @@
DIST noto-emoji-20200317.tar.gz 60841240 BLAKE2B aab99a5cbab6943b9e282b33dc113601489c7d02a3670db8675e6c90be615ceaf0f2900bdbc68ffaca6130f4e724b2ec1001cfccce80a181208ace0638492b7e SHA512 958a589ef7d7a0b9e4fa3eb1caa20284fa7463419a740d0ca05f850618324883c13498f92839476042cfd1daffa7eff925b2f22ec318c0726391f69c04911bfb

11
media-fonts/noto-emoji/files/noto-emoji-20180823-build-path.patch

@ -0,0 +1,11 @@
--- a/add_glyphs.py.old 2018-11-18 11:11:56.387323302 +0100
+++ b/add_glyphs.py 2018-11-18 11:12:18.203529159 +0100
@@ -22,7 +22,7 @@
import add_emoji_gsub
import add_aliases
-sys.path.append(
+sys.path.insert(0,
path.join(os.path.dirname(__file__), 'third_party', 'color_emoji'))
from png import PNG

27
media-fonts/noto-emoji/files/noto-emoji-20190328-use-gm.patch

@ -0,0 +1,27 @@
--- a/Makefile~ 2019-03-28 17:45:53.000000000 +0100
+++ b/Makefile 2019-06-02 10:36:55.587055453 +0200
@@ -21,7 +21,7 @@
PNGQUANT = pngquant
PNGQUANTFLAGS = --speed 1 --skip-if-larger --quality 85-95 --force
BODY_DIMENSIONS = 136x128
-IMOPS := -size $(BODY_DIMENSIONS) canvas:none -compose copy -gravity center
+IMOPS = -size 136x128 -background none -gravity center -extent 136x128 -compose copy
# zopflipng is better (about 5-10%) but much slower. it will be used if
# present. pass ZOPFLIPNG= as an arg to make to use optipng instead.
@@ -165,13 +165,13 @@
# imagemagick packaged with ubuntu trusty (6.7.7-10) by using -composite.
$(EMOJI_DIR)/%.png: $(EMOJI_SRC_DIR)/%.png | $(EMOJI_DIR)
- @convert $(IMOPS) "$<" -composite "PNG32:$@"
+ @gm convert $(IMOPS) "$<" "PNG32:$@"
$(FLAGS_DIR)/%.png: $(FLAGS_SRC_DIR)/%.png ./waveflag | $(FLAGS_DIR)
@./waveflag $(FLAGS_DIR)/ "$<"
$(RESIZED_FLAGS_DIR)/%.png: $(FLAGS_DIR)/%.png | $(RESIZED_FLAGS_DIR)
- @convert $(IMOPS) "$<" -composite "PNG32:$@"
+ @gm convert $(IMOPS) "$<" "PNG32:$@"
flag-symlinks: $(RESIZED_FLAG_FILES) | $(RENAMED_FLAGS_DIR)
@$(subst ^, , \

11
media-fonts/noto-emoji/files/noto-emoji-build-all-flags.patch

@ -0,0 +1,11 @@
--- old/Makefile 2018-05-03 20:32:14.000000000 +0200
+++ new/Makefile 2018-05-08 11:48:20.811073447 +0200
@@ -78,7 +78,7 @@
ALL_FLAGS = $(basename $(notdir $(wildcard $(FLAGS_SRC_DIR)/*.png)))
-FLAGS = $(SELECTED_FLAGS)
+FLAGS = $(ALL_FLAGS)
FLAG_NAMES = $(FLAGS:%=%.png)
FLAG_FILES = $(addprefix $(FLAGS_DIR)/, $(FLAG_NAMES))

11
media-fonts/noto-emoji/files/noto-emoji-pngquant-verbose.patch

@ -0,0 +1,11 @@
--- a/Makefile~ 2020-04-22 23:04:44.000000000 +0200
+++ b/Makefile 2020-04-22 23:06:42.069275340 +0200
@@ -20,7 +20,7 @@
PNGQUANT = pngquant
PYTHON = python3
-PNGQUANTFLAGS = --speed 1 --skip-if-larger --quality 85-95 --force
+PNGQUANTFLAGS = --speed 1 --skip-if-larger --quality 85-95 --force -v
BODY_DIMENSIONS = 136x128
IMOPS := -size $(BODY_DIMENSIONS) canvas:none -compose copy -gravity center

11
media-fonts/noto-emoji/files/noto-emoji-zopflipng-verbose.patch

@ -0,0 +1,11 @@
--- a/Makefile~ 2020-04-22 23:07:33.000000000 +0200
+++ b/Makefile 2020-04-22 23:11:46.356767595 +0200
@@ -194,7 +194,7 @@
ifdef MISSING_ZOPFLI
@$(OPTIPNG) -quiet -o7 -clobber -force -out "$@" "$<"
else
- @$(ZOPFLIPNG) -y "$<" "$@" 1> /dev/null 2>&1
+ @$(ZOPFLIPNG) -y "$<" "$@" 2>&1
endif

101
media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild

@ -0,0 +1,101 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8} )
inherit font python-any-r1
DESCRIPTION="Google Noto Emoji fonts"
HOMEPAGE="https://www.google.com/get/noto/ https://github.com/googlefonts/noto-emoji"
COMMIT="ac1703e9d7feebbf5443a986e08332b1e1c5afcf"
SRC_URI="https://github.com/googlefonts/noto-emoji/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0 OFL-1.1"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
IUSE="buildfont"
BDEPEND="
buildfont? (
${PYTHON_DEPS}
app-arch/zopfli
$(python_gen_any_dep '
dev-python/fonttools[${PYTHON_USEDEP}]
dev-python/nototools[${PYTHON_USEDEP}]
')
media-gfx/pngquant
x11-libs/cairo
|| ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[png] )
)
"
RESTRICT="binchecks strip"
S="${WORKDIR}/${PN}-${COMMIT}"
python_check_deps() {
has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/nototools[${PYTHON_USEDEP}]"
}
pkg_setup() {
font_pkg_setup
}
src_prepare() {
default
if use buildfont; then
# From Fedora
eapply "${FILESDIR}/${PN}-build-all-flags.patch"
# https://github.com/googlei18n/noto-emoji/issues/240
eapply "${FILESDIR}/${PN}-20180823-build-path.patch"
# Be more verbose, bug #717654
eapply "${FILESDIR}"/${PN}-pngquant-verbose.patch
eapply "${FILESDIR}"/${PN}-zopflipng-verbose.patch
# Based on Fedora patch to allow graphicsmagick usage
if has_version -b media-gfx/graphicsmagick; then
eapply "${FILESDIR}/${PN}-20190328-use-gm.patch"
fi
fi
}
src_compile() {
if ! use buildfont; then
einfo "Installing pre-built fonts provided by upstream."
einfo "They could be not fully updated or miss some items."
einfo "To build fonts based on latest images enable 'buildfont'"
einfo "USE (that will require more time and resources too)."
else
python_setup
einfo "Building fonts..."
default
fi
}
src_install() {
if ! use buildfont; then
FONT_S="${S}/fonts"
else
mv -i fonts/NotoEmoji-Regular.ttf "${S}" || die
# Built font and Regular font
FONT_S="${S}"
# Don't lose fancy emoji icons
insinto /usr/share/icons/"${PN}"/128x128/emotes/
doins png/128/*.png
insinto /usr/share/icons/"${PN}"/scalable/emotes/
doins svg/*.svg
fi
FONT_SUFFIX="ttf"
font_src_install
dodoc README.md
}

3
profiles/default/package.mask

@ -8,6 +8,9 @@ sys-libs/db:6.0
=media-libs/allegro-4.4.3.1
=sci-libs/cifparse-obj-7.105
# removed cool emoji
=media-fonts/noto-emoji-20201214
# no support in CDS yet
=net-dns/bind-9.16.12

Loading…
Cancel
Save