Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 717206
Collapse All | Expand All

(-)terminus-font-4.48.ebuild (-3 / +13 lines)
Lines 1-31 Link Here
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2020 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=6
4
EAPI=7
5
5
6
PYTHON_COMPAT=( python3_{6,7,8} )
6
PYTHON_COMPAT=( python3_{6,7,8} )
7
inherit font python-any-r1
7
inherit font python-any-r1
8
8
9
DESCRIPTION="A clean fixed font for the console and X11"
9
DESCRIPTION="A clean fixed font for the console and X11"
10
HOMEPAGE="http://terminus-font.sourceforge.net/"
10
HOMEPAGE="http://terminus-font.sourceforge.net/"
11
SRC_URI="mirror://sourceforge/${PN}/${P}/${P}.tar.gz"
11
SRC_URI="mirror://sourceforge/${PN}/${P}/${P}.tar.gz"
12
12
13
LICENSE="OFL-1.1 GPL-2"
13
LICENSE="OFL-1.1 GPL-2"
14
SLOT="0"
14
SLOT="0"
15
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
15
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
16
IUSE="a-like-o +center-tilde distinct-l +pcf +pcf-unicode-only +psf quote
16
IUSE="a-like-o +center-tilde distinct-l otf +pcf +pcf-unicode-only +psf quote
17
	ru-dv +ru-g ru-i ru-k"
17
	ru-dv +ru-g ru-i ru-k"
18
18
19
DEPEND="app-arch/gzip
19
DEPEND="app-arch/gzip
20
	${PYTHON_DEPS}
20
	${PYTHON_DEPS}
21
	virtual/awk
21
	virtual/awk
22
	otf? ( x11-apps/fonttosfnt )
22
	pcf? ( x11-apps/bdftopcf )"
23
	pcf? ( x11-apps/bdftopcf )"
23
RDEPEND=""
24
RDEPEND=""
24
25
25
FONTDIR=/usr/share/fonts/terminus
26
FONTDIR=/usr/share/fonts/terminus
26
FONT_CONF=( 75-yes-terminus.conf )
27
FONT_CONF=( 75-yes-terminus.conf )
27
DOCS=( README README-BG AUTHORS CHANGES )
28
DOCS=( README README-BG AUTHORS CHANGES )
28
29
29
REQUIRED_USE="X? ( pcf )"
30
REQUIRED_USE="X? ( pcf )"
30
31
31
pkg_setup() {
32
pkg_setup() {
Lines 59-91 Link Here
59
	# selfwritten configure script
60
	# selfwritten configure script
60
	./configure "${configure_args[@]}" || die
61
	./configure "${configure_args[@]}" || die
61
}
62
}
62
63
63
src_compile() {
64
src_compile() {
64
	local args=(
65
	local args=(
65
		$(usex psf 'psf psf-vgaw' '')
66
		$(usex psf 'psf psf-vgaw' '')
66
		$(usex pcf 'pcf pcf-8bit' '')
67
		$(usex pcf 'pcf pcf-8bit' '')
67
	)
68
	)
68
	[[ ${#args[@]} -gt 0 ]] && emake "${args[@]}"
69
	[[ ${#args[@]} -gt 0 ]] && emake "${args[@]}"
70
71
	# Follow https://fedoraproject.org/wiki/BitmapFontConversion#Steps:
72
	# build ".otf" (bitmap-only) fonts out of .bdf ones
73
	if use otf; then
74
			# use unicode only bitmaps
75
			fonttosfnt -v -b -c -g 2 -m 2 -o Terminus.otb      ter-u*n.bdf || die
76
			fonttosfnt -v -b -c -g 2 -m 2 -o Terminus-Bold.otb ter-u*b.bdf || die
77
	fi
69
}
78
}
70
79
71
src_install() {
80
src_install() {
72
	local args=(
81
	local args=(
73
		$(usex psf 'install-psf install-psf-vgaw install-psf-ref' '')
82
		$(usex psf 'install-psf install-psf-vgaw install-psf-ref' '')
74
		$(usex pcf 'install-pcf' '')
83
		$(usex pcf 'install-pcf' '')
75
	)
84
	)
76
	# Set the CHECKDIR to a dummy location so we always get the same set of
85
	# Set the CHECKDIR to a dummy location so we always get the same set of
77
	# files installed regardless of what is in / or ROOT or wherever.
86
	# files installed regardless of what is in / or ROOT or wherever.
78
	[[ ${#args[@]} -gt 0 ]] && emake DESTDIR="${D}" CHECKDIR="${D}" "${args[@]}"
87
	[[ ${#args[@]} -gt 0 ]] && emake DESTDIR="${D}" CHECKDIR="${D}" "${args[@]}"
79
88
80
	# Remove trans files that the kbd package takes care of installing.
89
	# Remove trans files that the kbd package takes care of installing.
81
	rm -f "${ED}"/usr/share/consoletrans/*.trans
90
	rm -f "${ED}"/usr/share/consoletrans/*.trans
82
91
83
	if use pcf-unicode-only; then
92
	if use pcf-unicode-only; then
84
		# Only the ter-x* fonts are unicode (ISO-10646-1) based
93
		# Only the ter-x* fonts are unicode (ISO-10646-1) based
85
		rm -f "${ED}"/usr/share/fonts/terminus/ter-[0-9a-wy-z]* || die
94
		rm -f "${ED}"/usr/share/fonts/terminus/ter-[0-9a-wy-z]* || die
86
	fi
95
	fi
87
96
97
	use otf && FONT_SUFFIX=otb
88
	font_src_install
98
	font_src_install
89
99
90
	einstalldocs
100
	einstalldocs
91
}
101
}

Return to bug 717206