| 1 |
fauli |
1.7 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
robbat2 |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
fauli |
1.7 |
# $Header: /var/cvsroot/gentoo-x86/eclass/font-ebdftopcf.eclass,v 1.6 2010/09/30 11:12:03 grobian Exp $
|
| 4 |
robbat2 |
1.1 |
|
| 5 |
|
|
# Author: Robin H. Johnson <robbat2@gentoo.org>
|
| 6 |
|
|
|
| 7 |
swegener |
1.3 |
# font-ebdftopcf.eclass
|
| 8 |
robbat2 |
1.1 |
# Eclass to make PCF font generator from BDF uniform and optimal
|
| 9 |
robbat2 |
1.2 |
# The manpage for this eclass is in media-gfx/ebdftopcf.
|
| 10 |
robbat2 |
1.1 |
|
| 11 |
dirtyepic |
1.5 |
# 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 |
robbat2 |
1.1 |
# Variable declarations
|
| 17 |
dirtyepic |
1.5 |
DEPEND="X? ( media-gfx/ebdftopcf )"
|
| 18 |
robbat2 |
1.1 |
RDEPEND=""
|
| 19 |
|
|
|
| 20 |
dirtyepic |
1.5 |
use X && FONT_SUFFIX="pcf.gz"
|
| 21 |
|
|
use X || FONT_SUFFIX="bdf"
|
| 22 |
|
|
|
| 23 |
robbat2 |
1.1 |
#
|
| 24 |
|
|
# Public functions
|
| 25 |
|
|
#
|
| 26 |
|
|
ebdftopcf() {
|
| 27 |
|
|
local bdffiles
|
| 28 |
|
|
bdffiles="$@"
|
| 29 |
|
|
[ -z "$bdffiles" ] && die "No BDF files specified."
|
| 30 |
grobian |
1.6 |
emake -f "${EPREFIX}"/usr/share/ebdftopcf/Makefile.ebdftopcf \
|
| 31 |
robbat2 |
1.1 |
BDFFILES="${bdffiles}" \
|
| 32 |
|
|
BDFTOPCF_PARAMS="${BDFTOPCF_PARAMS}" \
|
| 33 |
|
|
|| die "Failed to build PCF files"
|
| 34 |
|
|
}
|
| 35 |
robbat2 |
1.2 |
|
| 36 |
|
|
#
|
| 37 |
|
|
# Public inheritable functions
|
| 38 |
|
|
#
|
| 39 |
|
|
font-ebdftopcf_src_compile() {
|
| 40 |
dirtyepic |
1.5 |
if use X; then
|
| 41 |
|
|
[ -z "${BDFFILES}" ] && BDFFILES="$(find . -name '*.bdf')"
|
| 42 |
|
|
ebdftopcf ${BDFFILES}
|
| 43 |
|
|
fi
|
| 44 |
robbat2 |
1.2 |
}
|
| 45 |
|
|
|
| 46 |
|
|
EXPORT_FUNCTIONS src_compile
|