summaryrefslogtreecommitdiff
blob: b6afb791d1b289e81ddcf0b0df347f5c00ce5acd (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
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-fonts/baekmuk-fonts/baekmuk-fonts-2.1-r1.ebuild,v 1.1 2003/07/30 20:29:44 usata Exp $

IUSE="X truetype"

DESCRIPTION="Korean Baekmuk Font"
SRC_URI="http://gentoo.or.kr/distfiles/baekmuk-fonts/${P}.tar.gz"
HOMEPAGE="http://www.mizi.co.kr/ko/prod/etc/mos-pro2.htm"

SLOT="0"
LICENSE="BAEKMUK"
KEYWORDS="~x86 ~alpha ~ppc ~sparc hppa amd64"

DEPEND="virtual/x11 
	truetype? ( virtual/xft )"
RDEPEND="X? ( virtual/x11
	truetype? ( virtual/xft ) )"

S=${WORKDIR}/${P}
FONTDIR="/usr/share/fonts/baekmuk"
TTFONTDIR="/usr/share/fonts/ttf/korean/baekmuk"

src_compile() {
	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 () {

	insinto ${FONTDIR}
	doins pcf/* || die

	if [ -n "`use X`" ] ; then
		mkfontdir ${D}${FONTDIR}
		if [ -n "`use truetype`" ] ; then
			insinto ${TTFONTDIR}
			doins ttf/* || die
			mkfontscale ${D}${TTFONTDIR}
			fc-cache ${D}${TTFONTDIR}
		fi
	fi

	# these files seem to be 0 byte??
	#dodoc README COPYRIGHT COPYRIGHT.ks hconfig.ps
}

pkg_postinst() {
	if [ -n "`use X`" ] ; then
		einfo
		einfo "You MUST add the path of Baekmuk fonts in /etc/X11/XF86Config"
		einfo ""
		einfo "Section \"Files\""
		einfo "\tFontPath \"${FONTDIR}\""
		use truetype >/dev/null 2>&1 && \
			einfo "\tFontPath \"${TTFONTDIR}\""
		einfo ""
		einfo "And you must restart your X server."
		einfo ""
	fi
}