EAPI=6 support; removed support befor media-video/vdr-2
[gentoo.git] / eclass / font-ebdftopcf.eclass
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 # Author: Robin H. Johnson <robbat2@gentoo.org>
6
7 # font-ebdftopcf.eclass
8 # Eclass to make PCF font generator from BDF uniform and optimal
9 # The manpage for this eclass is in media-gfx/ebdftopcf.
10
11 # inherit this eclass after font.eclass
12
13 # if USE="-X", this eclass is basically a no-op, since bdftopcf requires Xorg.
14 IUSE="X"
15
16 # Variable declarations
17 DEPEND="X? ( media-gfx/ebdftopcf )"
18 RDEPEND=""
19
20 #
21 # Public functions
22 #
23 ebdftopcf() {
24         local bdffiles
25         bdffiles="$@"
26         [ -z "$bdffiles" ] && die "No BDF files specified."
27         emake -f "${EPREFIX}"/usr/share/ebdftopcf/Makefile.ebdftopcf \
28                 BDFFILES="${bdffiles}" \
29                 BDFTOPCF_PARAMS="${BDFTOPCF_PARAMS}" \
30                 || die "Failed to build PCF files"
31 }
32
33 #
34 # Public inheritable functions
35 #
36 font-ebdftopcf_src_compile() {
37         use X && FONT_SUFFIX="pcf.gz"
38         use X || FONT_SUFFIX="bdf"
39
40         if use X; then
41                 [ -z "${BDFFILES}" ] && BDFFILES="$(find . -name '*.bdf')"
42                 ebdftopcf ${BDFFILES}
43         fi
44 }
45
46 EXPORT_FUNCTIONS src_compile