Diff unifont-14.0.03 with a unifont-17.0.03

/usr/portage/media-fonts/unifont/unifont-17.0.03.ebuild 2026-02-19 11:18:07.427980309 +0300
1 1
# Copyright 2003-2026 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit font toolchain-funcs
6
inherit font optfeature toolchain-funcs
7 7

  
8 8
DESCRIPTION="GNU Unifont - a Pan-Unicode X11 bitmap iso10646 font"
9
HOMEPAGE="http://unifoundry.com/"
9
HOMEPAGE="https://unifoundry.com/"
10 10
SRC_URI="mirror://gnu/${PN}/${P}/${P}.tar.gz"
11 11

  
12
LICENSE="GPL-2"
12
LICENSE="GPL-2+ || ( GPL-2+-with-font-exception OFL-1.1 ) public-domain utils? ( FDL-1.3+ )"
13 13
SLOT="0"
14 14
KEYWORDS="~alpha amd64 arm ~loong ppc ppc64 ~riscv ~s390 ~sparc x86"
15
IUSE="fontforge utils"
15
IUSE="fontforge ttf utils"
16
REQUIRED_USE="ttf? ( fontforge )"
16 17

  
17 18
BDEPEND="
19
	media-libs/fontconfig
18 20
	fontforge? (
19 21
		app-text/bdf2psf
20 22
		dev-lang/perl
......
27 29
	utils? (
28 30
		dev-lang/perl
29 31
		dev-perl/GD[png(+)]
32
		virtual/perl-Getopt-Long
30 33
	)
31 34
"
32 35

  
33
src_compile() {
34
	buildargs=(
35
		BUILDFONT=$(usex fontforge 1 '')
36
		CC="$(tc-getCC)"
37
		# see bug #946003 for gnu17
38
		CFLAGS="${CFLAGS} -std=gnu17"
39
		INSTALL="${INSTALL-install}"
40
	)
36
PATCHES=(
37
	"${FILESDIR}"/${PN}-17.0.03-Makefile.patch
38
)
41 39

  
40
src_compile() {
42 41
	if use fontforge || use utils; then
42
		local buildargs=(
43
			CC="$(tc-getCC)"
44
			CFLAGS="${CFLAGS}"
45
		)
46
		emake "${buildargs[@]}" bindir libdir
47
	fi
48

  
49
	if use fontforge; then
50
		local font_targets=(
51
			opentype
52
			pcf
53
			psf
54
			$(usev ttf truetype)
55
			# compile unifont.bmp
56
			$(usev utils bigpic)
57
			# compile unifont_all.hex
58
			$(usev utils coverage)
59
		)
43 60
		# -j1 for bug #843584
44
		emake -j1 "${buildargs[@]}"
61
		emake -j1 -C font "${font_targets[@]}"
45 62
	fi
46 63
}
47 64

  
48 65
src_install() {
49 66
	local installargs=(
50
		COMPRESS=0
51 67
		DESTDIR="${ED}"
68
		OTFDEST="${ED}${FONTDIR}"
52 69
		PCFDEST="${ED}${FONTDIR}"
53
		TTFDEST="${ED}${FONTDIR}"
54 70
	)
55
	use utils || installargs+=( -C font )
56
	emake "${buildargs[@]}" "${installargs[@]}" install
71
	emake "${installargs[@]}" -C font install
72

  
73
	if use ttf; then
74
		pushd "${S}"/font/compiled >/dev/null || die
75
		insinto /usr/share/fonts/unifont
76
		local files
77
		for files in *.ttf; do
78
			newins "${files}" "${files/-${PV}/}"
79
		done
80
		popd >/dev/null || die
81
	fi
82

  
83
	if use utils; then
84
		emake DESTDIR="${ED}" install
85

  
86
		local HTML_DOCS=( doxygen/html/. )
87
		find "${HTML_DOCS[@]}" \( -iname '*.md5' -o -iname '*.map' \) -delete || die
88

  
89
		doman man/*.{1,5}
90
	fi
91

  
92
	einstalldocs
93

  
57 94
	font_xfont_config
58 95
	font_fontconfig
59 96
}
97

  
98
pkg_postinst() {
99
	font_pkg_postinst
100

  
101
	use utils && optfeature "unifont-viewer" dev-perl/Wx
102
}
Thank you!