summaryrefslogtreecommitdiff
blob: 01264358ea3e3b1ca1eefb0c2d75f17ce454c06a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-fonts/baekmuk-fonts/baekmuk-fonts-2.2.ebuild,v 1.4 2004/10/08 21:22:22 gustavoz Exp $

inherit font

IUSE="unicode X"

TTF_P="${P/fonts/ttf}"
BDF_P="${P/fonts/bdf}"
UNI_P="20020418"

DESCRIPTION="Korean Baekmuk Font"
HOMEPAGE="http://kldp.net/projects/baekmuk/"
SRC_URI="X? ( http://kldp.net/download.php/1429/${TTF_P}.tar.gz )
	http://kldp.net/download.php/1428/${BDF_P}.tar.gz
	unicode? ( http://chem.skku.ac.kr/~wkpark/baekmuk/iso10646/${UNI_P}.tar.bz2 )"

LICENSE="BSD"
KEYWORDS="~ia64 x86 alpha ppc sparc ~hppa ~amd64 ~mips ~ppc64"
SLOT="0"

S="${WORKDIR}"

src_unpack() {
	unpack ${BDF_P}.tar.gz
	use X && unpack ${TTF_P}.tar.gz

	if use unicode ; then
		cd ${WORKDIR}/${BDF_P}/bdf
		unpack ${UNI_P}.tar.bz2
	fi
}

src_compile() {
	cd ${BDF_P}
	mkdir pcf
	for i in bdf/*.bdf ; do
		echo "Converting ${i##*/} into pcf format ..."
		bdftopcf $i | gzip -c -9 > ${i//bdf/pcf}.gz || die
	done
}

src_install () {

	if use X ; then
		FONT_S=${S}/${TTF_P}/ttf FONT_SUFFIX="ttf" font_src_install
	fi

	FONT_S=${S}/${BDF_P}/pcf FONT_SUFFIX="pcf.gz" font_src_install
}