Skip to content

Commit

Permalink
media-fonts/terminus-font: fix PCF-related USE flags
Browse files Browse the repository at this point in the history
Since version 4.46 upstream build scripts no longer install PCFs for
8-bit encodings unless explicitly told to - meaning on the one one hand
both the building and the installation of Unicode and 8-bit PCF files is
now handled by separate make targets, and on the other that there is no
longer any need for "install all PCFs, then if only Unicode is requested
delete other encodings" logic.

In short: if you want Unicode PCFs set USE=pcf-unicode (ebuild default),
if you want 8-bit ones set USE=pcf-8bit (off by default).

Closes: https://bugs.gentoo.org/660966
Signed-off-by: Marek Szuba <[email protected]>
  • Loading branch information
Marek Szuba committed Jul 19, 2021
1 parent 646d13d commit b771ccd
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions media-fonts/terminus-font/terminus-font-4.49.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ SRC_URI="mirror://sourceforge/project/${PN}/${PN}-$(ver_cut 1-2)/${P}.tar.gz"
LICENSE="OFL-1.1 GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="a-like-o +center-tilde distinct-l +otf +pcf +pcf-unicode-only +psf quote
IUSE="a-like-o +center-tilde distinct-l +otf pcf-8bit +pcf-unicode +psf quote
ru-dv +ru-g ru-i ru-k"

BDEPEND="app-arch/gzip
${PYTHON_DEPS}
virtual/awk
pcf? ( x11-apps/bdftopcf )"
pcf-8bit? ( x11-apps/bdftopcf )
pcf-unicode? ( x11-apps/bdftopcf )"
RDEPEND=""

FONTDIR=/usr/share/fonts/terminus
FONT_CONF=( 75-yes-terminus.conf )
DOCS=( README README-BG AUTHORS CHANGES )

REQUIRED_USE="X? ( || ( otf pcf ) )"
REQUIRED_USE="X? ( || ( otf pcf-8bit pcf-unicode ) )"

pkg_setup() {
python_setup
Expand Down Expand Up @@ -62,33 +63,26 @@ src_configure() {

src_compile() {
local args=(
$(usex psf 'psf psf-vgaw' '')
$(usex pcf 'pcf pcf-8bit' '')
$(usex otf otb '')
$(usex otf otb "")
$(usex pcf-8bit "pcf-8bit" "")
$(usex pcf-unicode "pcf" "")
$(usex psf "psf psf-vgaw" "")
)
[[ ${#args[@]} -gt 0 ]] && emake "${args[@]}"
}

src_install() {
local args=(
$(usex psf 'install-psf install-psf-vgaw install-psf-ref' '')
$(usex pcf 'install-pcf' '')
$(usex otf 'install-otb' '')
$(usex otf "install-otb" "")
$(usex pcf-8bit "install-pcf-8bit" "")
$(usex pcf-unicode "install-pcf" "")
$(usex psf "install-psf install-psf-vgaw install-psf-ref" "")
)
# Set the CHECKDIR to a dummy location so we always get the same set of
# files installed regardless of what is in / or ROOT or wherever.
[[ ${#args[@]} -gt 0 ]] && emake DESTDIR="${D}" CHECKDIR="${D}" "${args[@]}"
[[ ${#args[@]} -gt 0 ]] && emake DESTDIR="${ED}" CHECKDIR="${ED}" "${args[@]}"

# Remove trans files that the kbd package takes care of installing.
rm -f "${ED}"/usr/share/consoletrans/*.trans

if use pcf-unicode-only; then
# Only the ter-x* fonts are unicode (ISO-10646-1) based
rm -f "${ED}"/usr/share/fonts/terminus/ter-[0-9a-wy-z]* || die
fi

use otf && FONT_SUFFIX=otb
font_src_install
use otf && FONT_SUFFIX=otb font_src_install

einstalldocs
}

0 comments on commit b771ccd

Please sign in to comment.