commit:     5bde541c1bddce075f9dbc4d8440799bd39eedcf
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Sun Jan 11 21:38:05 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 12 15:15:46 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bde541c

media-fonts/unifont: add 17.0.03

update EAPI 7->8
update HOMEPAGE http+S
update license
default is now precompiled opentype fonts
compile ttf optionally

deps :
add fontconfig for functions from font.eclass
add virtual/perl-Getopt-Long for binaries

Makefile is patched to allow custom targets in ./font and avoid
rename/mv many files
manpages and html_docs are installed if utils is enabled

use optfeature for dev-perl/Wx used by unifont-viewer

Closes: https://bugs.gentoo.org/880295
Closes: https://bugs.gentoo.org/946003
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/45341
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-fonts/unifont/Manifest                       |   1 +
 .../unifont/files/unifont-17.0.03-Makefile.patch   |  27 ++++++
 media-fonts/unifont/unifont-17.0.03.ebuild         | 102 +++++++++++++++++++++
 3 files changed, 130 insertions(+)

diff --git a/media-fonts/unifont/Manifest b/media-fonts/unifont/Manifest
index 924b69baf3f1..29690ddeb88a 100644
--- a/media-fonts/unifont/Manifest
+++ b/media-fonts/unifont/Manifest
@@ -1 +1,2 @@
 DIST unifont-14.0.03.tar.gz 27451330 BLAKE2B 
f0ae933fc493d7e724b0526968d63fb4209e28526346a835b918aa6a31cd1a31c15a0c00f89196f6fd42cf2a0b2db8c51d9b6f9d7648938609e8b7e4122078a3
 SHA512 
de80097a4e1751c6ca21775c8ffe19716a910a0d110749017eacaa50a9f8f02d80e0b402426f3c2309e64e129a0386e29015d1116ad5fd64f97e5dc7fb75bdce
+DIST unifont-17.0.03.tar.gz 31749332 BLAKE2B 
db9030ea8a4fc072858d8532a0f27513258aa46ab5c43144ef9993066644637676ee0b88cd3a0626b48e9c5b75998dc97dbd26548140a47b1a7bc5b5de4b2498
 SHA512 
70ebb98fe81b8e89d887002be5bdcd7e396cdc21f6404013f9a4b667c61c7c5967c905039d55c45f2455e653c6dfe3284dd62841697a17d4d2d6ef9c9b5ad464

diff --git a/media-fonts/unifont/files/unifont-17.0.03-Makefile.patch 
b/media-fonts/unifont/files/unifont-17.0.03-Makefile.patch
new file mode 100644
index 000000000000..3154d7816b53
--- /dev/null
+++ b/media-fonts/unifont/files/unifont-17.0.03-Makefile.patch
@@ -0,0 +1,27 @@
+it's easier to install manually manpages and doc (html)
+targets in ./font are handled by the ebuild
+--- a/Makefile
++++ b/Makefile
+@@ -140,21 +140,11 @@ lib/wchardata.c: $(HEXWIDTH) $(ZEROWIDTH) bin
+       \rm -f unifonttemp.hex combiningtemp.txt
+ #     (cd lib && $(CC) $(CFLAGS) -c wchardata.c && chmod 644 wchardata.o )
+ 
+-install: bindir libdir docdir doxdir
++install: bindir libdir
+       $(MAKE) -C src  install PREFIX=$(PREFIX)
+-      $(MAKE) -C man  install PREFIX=$(PREFIX) COMPRESS=$(COMPRESS)
+-      $(MAKE) -C doc  install PREFIX=$(PREFIX) COMPRESS=$(COMPRESS)
+-      $(MAKE) -C font install PREFIX=$(PREFIX) DESTDIR=$(DESTDIR)
+       install -m0755 -d $(PKGDEST)
+-      install -m0644 -p $(TEXTFILES) doc/unifont.txt doc/unifont.pdf \
+-              $(PKGDEST)
+-      for i in $(TEXTFILES) unifont.txt ; do \
+-          gzip $(GZFLAGS) $(PKGDEST)/$$i ; \
+-      done
+       install -m0644 -p lib/wchardata.c $(PKGDEST)
+       install -m0644 -p font/plane00/plane00-combining.txt $(PKGDEST)
+-      (cd doxygen ; tar chf - html unifont-doxy.pdf) | \
+-         (cd $(PKGDEST) ; tar xpf -)
+       # If "make" wasn't run before, font/compiled won't exist.
+       if [ ! -d font/compiled ] ; then \
+          install -m0644 -p font/precompiled/unifont-$(VERSION).hex     
$(PKGDEST)/unifont.hex     && \

diff --git a/media-fonts/unifont/unifont-17.0.03.ebuild 
b/media-fonts/unifont/unifont-17.0.03.ebuild
new file mode 100644
index 000000000000..1931cb32ebff
--- /dev/null
+++ b/media-fonts/unifont/unifont-17.0.03.ebuild
@@ -0,0 +1,102 @@
+# Copyright 2003-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit font optfeature toolchain-funcs
+
+DESCRIPTION="GNU Unifont - a Pan-Unicode X11 bitmap iso10646 font"
+HOMEPAGE="https://unifoundry.com/";
+SRC_URI="mirror://gnu/${PN}/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2+ || ( GPL-2+-with-font-exception OFL-1.1 ) public-domain utils? 
( FDL-1.3+ )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="fontforge ttf utils"
+REQUIRED_USE="ttf? ( fontforge )"
+
+BDEPEND="
+       media-libs/fontconfig
+       fontforge? (
+               app-text/bdf2psf
+               dev-lang/perl
+               dev-perl/GD[png(+)]
+               media-gfx/fontforge
+               x11-apps/bdftopcf
+       )
+"
+RDEPEND="
+       utils? (
+               dev-lang/perl
+               dev-perl/GD[png(+)]
+               virtual/perl-Getopt-Long
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-17.0.03-Makefile.patch
+)
+
+src_compile() {
+       if use fontforge || use utils; then
+               local buildargs=(
+                       CC="$(tc-getCC)"
+                       CFLAGS="${CFLAGS}"
+               )
+               emake "${buildargs[@]}" bindir libdir
+       fi
+
+       if use fontforge; then
+               local font_targets=(
+                       opentype
+                       pcf
+                       psf
+                       $(usev ttf truetype)
+                       # compile unifont.bmp
+                       $(usev utils bigpic)
+                       # compile unifont_all.hex
+                       $(usev utils coverage)
+               )
+               # -j1 for bug #843584
+               emake -j1 -C font "${font_targets[@]}"
+       fi
+}
+
+src_install() {
+       local installargs=(
+               DESTDIR="${ED}"
+               OTFDEST="${ED}${FONTDIR}"
+               PCFDEST="${ED}${FONTDIR}"
+       )
+       emake "${installargs[@]}" -C font install
+
+       if use ttf; then
+               pushd "${S}"/font/compiled >/dev/null || die
+               insinto /usr/share/fonts/unifont
+               local files
+               for files in *.ttf; do
+                       newins "${files}" "${files/-${PV}/}"
+               done
+               popd >/dev/null || die
+       fi
+
+       if use utils; then
+               emake DESTDIR="${ED}" install
+
+               local HTML_DOCS=( doxygen/html/. )
+               find "${HTML_DOCS[@]}" \( -iname '*.md5' -o -iname '*.map' \) 
-delete || die
+
+               doman man/*.{1,5}
+       fi
+
+       einstalldocs
+
+       font_xfont_config
+       font_fontconfig
+}
+
+pkg_postinst() {
+       font_pkg_postinst
+
+       use utils && optfeature "unifont-viewer" dev-perl/Wx
+}

Reply via email to