public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-fonts/noto-emoji/, media-fonts/noto-emoji/files/
@ 2018-10-20 11:39 Pacho Ramos
  0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2018-10-20 11:39 UTC (permalink / raw
  To: gentoo-commits

commit:     a3a00933657efc59adb45c0a1e89f030be5de83f
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 20 09:11:32 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Oct 20 11:38:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3a00933

media-fonts/noto-emoji: Allow to build with graphicsmagick

Thanks-to: Albert W. Hopkins
Thanks-to: Anthony Parsons
Closes: https://bugs.gentoo.org/668718
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../noto-emoji/files/noto-emoji-use-gm.patch       | 30 ++++++++++++++++++++++
 media-fonts/noto-emoji/noto-emoji-20180814.ebuild  |  6 +++++
 2 files changed, 36 insertions(+)

diff --git a/media-fonts/noto-emoji/files/noto-emoji-use-gm.patch b/media-fonts/noto-emoji/files/noto-emoji-use-gm.patch
new file mode 100644
index 00000000000..5710fd53dc5
--- /dev/null
+++ b/media-fonts/noto-emoji/files/noto-emoji-use-gm.patch
@@ -0,0 +1,30 @@
+Index: noto-emoji-352632eb1935fd2b732f6f3ca0a24e9754c3eccf/Makefile
+===================================================================
+--- noto-emoji-352632eb1935fd2b732f6f3ca0a24e9754c3eccf.orig/Makefile
++++ noto-emoji-352632eb1935fd2b732f6f3ca0a24e9754c3eccf/Makefile
+@@ -20,7 +20,8 @@ LDFLAGS = -lm `pkg-config --libs cairo`
+ 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 $(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.
+@@ -172,13 +173,13 @@ waveflag: waveflag.c
+ # 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 $(PNGQUANT) | $(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 ^, ,                                  \

diff --git a/media-fonts/noto-emoji/noto-emoji-20180814.ebuild b/media-fonts/noto-emoji/noto-emoji-20180814.ebuild
index 7d76d22e0b8..7dd40de2811 100644
--- a/media-fonts/noto-emoji/noto-emoji-20180814.ebuild
+++ b/media-fonts/noto-emoji/noto-emoji-20180814.ebuild
@@ -23,6 +23,7 @@ DEPEND="${PYTHON_DEPS}
 	dev-python/nototools
 	media-gfx/pngquant
 	x11-libs/cairo
+	|| ( media-gfx/imagemagick media-gfx/graphicsmagick )
 "
 RDEPEND=""
 
@@ -43,4 +44,9 @@ src_prepare() {
 	default
 	# Use system pngquant
 	rm -rf third_party/pngquant
+
+	# Fedora patch to allow graphicsmagick usage
+	if has_version media-gfx/graphicsmagick; then
+		eapply "${FILESDIR}/${PN}-use-gm.patch"
+	fi
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-fonts/noto-emoji/, media-fonts/noto-emoji/files/
@ 2020-04-23  0:29 Pacho Ramos
  0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2020-04-23  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     de0a5a2897c83cfc6522a84a571d758ef3dc8ecb
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 00:27:28 2020 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 00:27:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0a5a28

media-fonts/noto-emoji: Install pre-built font by default

As suggested in bug #717654 install prebuilt font by default, even still
allowing to optionally built it with supplied images as they contain more
updated images and, sometimes, more emojis.

Also be more verbose while building

Closes: https://bugs.gentoo.org/717654
Thanks-to: Kent Fredric
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 .../noto-emoji/files/noto-emoji-pngquant.patch     | 11 +++
 .../noto-emoji/files/noto-emoji-zopflipng.patch    | 11 +++
 media-fonts/noto-emoji/metadata.xml                |  3 +
 .../noto-emoji/noto-emoji-20200317-r1.ebuild       | 96 ++++++++++++++++++++++
 4 files changed, 121 insertions(+)

diff --git a/media-fonts/noto-emoji/files/noto-emoji-pngquant.patch b/media-fonts/noto-emoji/files/noto-emoji-pngquant.patch
new file mode 100644
index 00000000000..8a152bea23d
--- /dev/null
+++ b/media-fonts/noto-emoji/files/noto-emoji-pngquant.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
+ 

diff --git a/media-fonts/noto-emoji/files/noto-emoji-zopflipng.patch b/media-fonts/noto-emoji/files/noto-emoji-zopflipng.patch
new file mode 100644
index 00000000000..0cb272994aa
--- /dev/null
+++ b/media-fonts/noto-emoji/files/noto-emoji-zopflipng.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
+ 
+ 

diff --git a/media-fonts/noto-emoji/metadata.xml b/media-fonts/noto-emoji/metadata.xml
index 3da97a9953c..18a049a172d 100644
--- a/media-fonts/noto-emoji/metadata.xml
+++ b/media-fonts/noto-emoji/metadata.xml
@@ -5,4 +5,7 @@
 		<email>pacho@gentoo.org</email>
 		<name>Pacho Ramos</name>
 	</maintainer>
+<use>
+	<flag name="buildfont">Build Noto Emoji font with supplied images.</flag>
+</use>
 </pkgmetadata>

diff --git a/media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild b/media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild
new file mode 100644
index 00000000000..15394e1f453
--- /dev/null
+++ b/media-fonts/noto-emoji/noto-emoji-20200317-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,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"
+IUSE="buildfont"
+
+DEPEND="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] )
+	)
+"
+RDEPEND=""
+
+RESTRICT="binchecks strip"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+python_check_deps() {
+	has_version "dev-python/fonttools[${PYTHON_USEDEP}]" && \
+        has_version "dev-python/nototools[${PYTHON_USEDEP}]"
+}
+
+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.patch
+		eapply "${FILESDIR}"/${PN}-zopflipng.patch
+
+		# Based on Fedora patch to allow graphicsmagick usage
+		if has_version 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
+		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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-fonts/noto-emoji/, media-fonts/noto-emoji/files/
@ 2023-03-19 16:56 Pacho Ramos
  0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2023-03-19 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     70234672c7fb2716c2284bb17f0798c5488d49ab
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 19 16:34:39 2023 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Mar 19 16:56:32 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70234672

media-fonts/noto-emoji: drop 20220912

Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 .../files/noto-emoji-20180823-build-path.patch     |  11 --
 .../files/noto-emoji-20190328-use-gm.patch         |  27 -----
 .../files/noto-emoji-build-all-flags.patch         |  11 --
 .../files/noto-emoji-pngquant-verbose.patch        |  11 --
 media-fonts/noto-emoji/noto-emoji-20220912.ebuild  | 116 ---------------------
 5 files changed, 176 deletions(-)

diff --git a/media-fonts/noto-emoji/files/noto-emoji-20180823-build-path.patch b/media-fonts/noto-emoji/files/noto-emoji-20180823-build-path.patch
deleted file mode 100644
index 151f88251524..000000000000
--- a/media-fonts/noto-emoji/files/noto-emoji-20180823-build-path.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
- 

diff --git a/media-fonts/noto-emoji/files/noto-emoji-20190328-use-gm.patch b/media-fonts/noto-emoji/files/noto-emoji-20190328-use-gm.patch
deleted file mode 100644
index 6b51d0f52168..000000000000
--- a/media-fonts/noto-emoji/files/noto-emoji-20190328-use-gm.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- 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 ^, ,                                  \

diff --git a/media-fonts/noto-emoji/files/noto-emoji-build-all-flags.patch b/media-fonts/noto-emoji/files/noto-emoji-build-all-flags.patch
deleted file mode 100644
index 564b08a59078..000000000000
--- a/media-fonts/noto-emoji/files/noto-emoji-build-all-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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))

diff --git a/media-fonts/noto-emoji/files/noto-emoji-pngquant-verbose.patch b/media-fonts/noto-emoji/files/noto-emoji-pngquant-verbose.patch
deleted file mode 100644
index 8a152bea23d9..000000000000
--- a/media-fonts/noto-emoji/files/noto-emoji-pngquant-verbose.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
- 

diff --git a/media-fonts/noto-emoji/noto-emoji-20220912.ebuild b/media-fonts/noto-emoji/noto-emoji-20220912.ebuild
deleted file mode 100644
index 2d31c4c23a4f..000000000000
--- a/media-fonts/noto-emoji/noto-emoji-20220912.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_COMPAT=( python3_{9..10} )
-
-inherit font python-any-r1
-
-DESCRIPTION="Google Noto Emoji fonts"
-HOMEPAGE="https://www.google.com/get/noto/ https://github.com/googlefonts/noto-emoji"
-
-COMMIT="e8073ab740292f8d5f19b5de144087ac58044d06"
-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 ~loong ~ppc64 ~riscv x86"
-IUSE="buildfont"
-
-BDEPEND="
-	buildfont? (
-		${PYTHON_DEPS}
-		app-arch/zopfli
-		$(python_gen_any_dep '
-			>=dev-python/fonttools-4.7.0[${PYTHON_USEDEP}]
-			>=dev-python/nototools-0.2.13[${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() {
-	python_has_version ">=dev-python/fonttools-4.7.0[${PYTHON_USEDEP}]" \
-		">=dev-python/nototools-0.2.13[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	font_pkg_setup
-	use buildfont && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	# Drop font for Windows 10
-	rm fonts/NotoColorEmoji_WindowsCompatible.ttf || die
-
-	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
-		sed -i -e 's:@$(ZOPFLIPNG) -y "$<" "$@" 1> /dev/null 2>&1:@$(ZOPFLIPNG) -y "$<" "$@":g' Makefile || die
-
-		# Based on Fedora patch to allow graphicsmagick usage
-		if has_version -b media-gfx/graphicsmagick[png]; 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..."
-
-		# From Debian:
-		# The build requires a VIRTUAL_ENV variable and sequence check isn't working
-		VIRTUAL_ENV=true \
-		BYPASS_SEQUENCE_CHECK=true \
-		default
-	fi
-}
-
-src_install() {
-	if ! use buildfont; then
-		FONT_S="${S}/fonts"
-		# Drop non used fonts
-		rm -f fonts/*COLR*.ttf || die
-	else
-		# Drop Windows compatible fonts and temporal files
-		rm -f *tmpl.ttf *Windows*.ttf *COLR*.ttf || die
-
-		# Built fonts
-		FONT_S="${S}"
-
-		# Don't lose fancy emoji icons
-		for i in 32 72 128 512; do
-			insinto "/usr/share/icons/${PN}/${i}/emotes/"
-			doins png/"${i}"/*.png
-		done
-
-		insinto /usr/share/icons/"${PN}"/scalable/emotes/
-		doins svg/*.svg
-	fi
-
-	FONT_SUFFIX="ttf"
-	font_src_install
-
-	dodoc README.md
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-19 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-20 11:39 [gentoo-commits] repo/gentoo:master commit in: media-fonts/noto-emoji/, media-fonts/noto-emoji/files/ Pacho Ramos
  -- strict thread matches above, loose matches on Subject: below --
2020-04-23  0:29 Pacho Ramos
2023-03-19 16:56 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox