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