Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717654 - media-fonts/noto-emoji : USE flags to control icon generation
Summary: media-fonts/noto-emoji : USE flags to control icon generation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-16 06:42 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2020-04-23 08:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-04-16 06:42:53 UTC
For people like myself who are installing this in light of the symbola debacle, the expectation is this package simply installs a font.

But currently, two things make this package a less palatable option than expected:

1. The install time is huge, for a font.

>  qlop -vH noto-emoji
> 2020-04-16T11:17:30 >>> media-fonts/noto-emoji-20200317: 1 hour, 36 minutes, 14 seconds

2. The vast bulk of this build looks like a bug, because no progress on the tty happens for most of that time

So, for at least an hour, this was the contents of my log:

> make -j3 --load-average=4 
> mkdir -p "build/emoji"
> mkdir -p "build/quantized_pngs"
> using zopflipng
> mkdir -p "build/compressed_pngs"
> cc waveflag.c -o waveflag -std=c99 -Wall -Wextra `pkg-config --cflags --libs > > cairo` -lm `pkg-config --libs cairo`
> mkdir -p "build/flags"
> mkdir -p "build/resized_flags"
> mkdir -p "build/renamed_flags"
> reuse build/emoji/emoji_u1f3fc.png
> reuse build/emoji/emoji_u1f3fb.png
> reuse build/emoji/emoji_u1f3fd.png
> reuse build/emoji/emoji_u1f3fe.png
> reuse build/emoji/emoji_u1f578.png
> reuse build/emoji/emoji_u1f7e5.png
> reuse build/emoji/emoji_u1f7e6.png
> reuse build/emoji/emoji_u1f7e8.png
> reuse build/emoji/emoji_u1f7e9.png
> reuse build/emoji/emoji_u1fa82.png

Sure, the overhead of having a bunch of png files I don't need is not great, but that's not something I'm going to actually complain about:

>  * Final size of installed tree:   77276 KiB ( 75.4 MiB)

Again, not ideal, but I can live with that.

Ideally, it would be very nice if there was a USE flag that defaulted to "off" that skipped the extensive generation and compression phases ( which spends most of its time in zopflipng ), so only people who needed the icon sets paid that install time price.

If this is not viable as a result of some weird process that somehow *needs* the compressed PNG's to generate the ttf files, then best I can ask for is some sort of useful progress report in the tty output, and at a minimum, and "einfo" notice inside src_compile that advises that yes, it will take a long time and output can be expected to stall for an hour.

Myself, I took to running: 

> while true; do 
>   perl -e 'printf qq[%8.3f%%\n], $ARGV[0] / $ARGV[1] * 100' \
>      $( find compressed_pngs/ | wc -l  )  \
>      $( find quantized_pngs/ | wc -l );
>  sleep 60;
> done

Inside ${WORKDIR}/build to get *some* idea of what was happening (averaging ~1% a minute), its better than nothing, but also flawed as some part of the build process goes back, generates more quantized pngs, and then continues compressing, so the progress hits 95% and goes back to 90% a few times...

But if the "don't spend an hour compressing PNG's" is not something that is avoidable, you may start to hear clamoring for a noto-emoji-bin ;)
Comment 1 Larry the Git Cow gentoo-dev 2020-04-23 00:29:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0a5a2897c83cfc6522a84a571d758ef3dc8ecb

commit de0a5a2897c83cfc6522a84a571d758ef3dc8ecb
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2020-04-23 00:27:28 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2020-04-23 00:27:28 +0000

    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@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(+)
Comment 2 Sok Ann Yap 2020-04-23 07:49:57 UTC
I think this causes a regression, such that the legacy black-and-white font (/usr/share/fonts/noto-emoji/NotoEmoji-Regular.ttf) got installed when the buildfont flag is disabled.
Comment 3 Pacho Ramos gentoo-dev 2020-04-23 08:53:31 UTC
Both get installed, what is the problem with that? I have both and I still see the colorized ones over B&W for example in Gedit or Epiphany. Also other distros are installing both