logo

overlay

My own overlay for experimentations, use with caution, no support is provided

unifont-12.1.03.ebuild (1202B)


      1 # Copyright 1999-2018 Gentoo Authors
      2 # Copyright 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
      3 # Distributed under the terms of the GNU General Public License v2
      4 
      5 EAPI=6
      6 
      7 inherit font toolchain-funcs xdg-utils
      8 
      9 DESCRIPTION="GNU Unifont - a Pan-Unicode X11 bitmap iso10646 font"
     10 HOMEPAGE="http://unifoundry.com/"
     11 SRC_URI="mirror://gnu/${PN}/${P}/${P}.tar.gz"
     12 
     13 LICENSE="GPL-2"
     14 SLOT="0"
     15 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
     16 IUSE="fontforge utils"
     17 
     18 DEPEND="
     19 	fontforge? (
     20 		app-text/bdf2psf
     21 		dev-lang/perl
     22 		dev-perl/GD[png(-)]
     23 		media-gfx/fontforge
     24 		x11-apps/bdftopcf
     25 	)
     26 "
     27 RDEPEND="
     28 	utils? (
     29 		dev-lang/perl
     30 		dev-perl/GD[png(-)]
     31 	)
     32 "
     33 
     34 src_prepare() {
     35 	sed -i -e 's/install -s/install/' src/Makefile || die
     36 	default
     37 }
     38 
     39 src_compile() {
     40 	if use fontforge || use utils; then
     41 		tc-export CC
     42 		xdg_environment_reset
     43 		makeargs=(
     44 			CFLAGS="${CFLAGS}"
     45 			BUILDFONT=$(usex fontforge 1 '')
     46 		)
     47 		emake  "${makeargs[@]}"
     48 	fi
     49 }
     50 
     51 src_install() {
     52 	makeargs+=(
     53 		DESTDIR="${ED%/}"
     54 		PCFDEST="${ED%/}${FONTDIR}"
     55 		TTFDEST="${ED%/}${FONTDIR}"
     56 		USRDIR=usr
     57 	)
     58 	use utils || makeargs+=( -C font )
     59 	emake "${makeargs[@]}" install
     60 	font_xfont_config
     61 	font_fontconfig
     62 }