/[gentoo-x86]/media-fonts/culmus/culmus-0.120.ebuild
Gentoo

Contents of /media-fonts/culmus/culmus-0.120.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Apr 17 15:26:24 2011 UTC (3 years, 3 months ago) by fauli
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +2 -2 lines
x86 stable per bug 349268

(Portage version: 2.1.9.42/cvs/Linux i686)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-fonts/culmus/culmus-0.120.ebuild,v 1.7 2011/02/19 14:16:01 xarthisius Exp $
4
5 EAPI="2"
6
7 inherit font
8
9 # Maintainer: also check culmus.conf file in ${P}.tar.gz
10
11 MY_A_P=AncientSemiticFonts-0.06-1
12
13 DESCRIPTION="Hebrew Type1 fonts"
14 HOMEPAGE="http://culmus.sourceforge.net/"
15
16 FANCY_FONTS="journal hillel anka comix gan ozrad ktav-yad dorian gladia"
17 FANCY_YG_FONTS="ShmuelCLM MakabiYG"
18 TAAMEY_FONTS="TaameyDavidCLM TaameyFrankCLM KeterAramTsova KeterYG"
19
20 SRC_URI="mirror://sourceforge/culmus/${P}.tar.gz
21 fontforge? ( mirror://sourceforge/culmus/${PN}-src-${PV}.tar.gz )
22 ancient? ( !fontforge? ( mirror://sourceforge/culmus/${MY_A_P}.TTF.tgz )
23 fontforge? ( mirror://sourceforge/culmus/${MY_A_P}.tgz ) )"
24 SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy/%s.tar.gz " ${FANCY_FONTS}) )"
25 SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy-yg/%s.zip " ${FANCY_YG_FONTS}) )"
26 SRC_URI+=" taamey? ( $(printf "http://culmus.sourceforge.net/taamim/%s.zip " ${TAAMEY_FONTS}) )"
27
28 # Some fonts are available in otf format too. Do we need them?
29 # http://culmus.sourceforge.net/fancy/anka-otf.zip
30 # http://culmus.sourceforge.net/fancy/hillel-otf.zip
31 # http://culmus.sourceforge.net/fancy/journal-otf.zip
32
33 LICENSE="|| ( GPL-2 LICENSE-BITSTREAM ) ancient? ( MIT ) fancy? ( GPL-2 )"
34 SLOT="0"
35 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
36 IUSE="ancient fancy fontforge taamey"
37
38 FONT_CONF=( "${FILESDIR}/65-culmus.conf" )
39
40 RDEPEND="!media-fonts/culmus-ancient"
41 DEPEND="${RDEPEND}
42 fontforge? ( media-gfx/fontforge )"
43
44 S=${WORKDIR}
45 # Put all fonts, generated or not here
46 FONT_S=${S}/FONTS
47
48 src_unpack() {
49 unpack ${P}.tar.gz # For type1 fonts...
50 use fontforge && unpack ${PN}-src-${PV}.tar.gz
51
52 use ancient && unpack ${MY_A_P}$(use fontforge || echo .TTF).tgz
53
54 if use fancy; then
55 unpack $(printf "%s.tar.gz " ${FANCY_FONTS})
56 unpack $(printf "%s.zip " ${FANCY_YG_FONTS})
57 mv TTF/* .
58 fi
59
60 if use taamey; then
61 for font in ${TAAMEY_FONTS}; do
62 mkdir ${font}
63 pushd ${font}
64 unpack ${font}.zip
65 popd >/dev/null
66 done
67 fi
68 }
69
70 src_compile() {
71 mkdir -p "${FONT_S}"
72 if use fontforge; then
73 pushd ${P}
74 mv *.afm *.pfa "${FONT_S}"
75 rm *.ttf
76 popd >/dev/null
77 pushd ${PN}-src-${PV}
78 for f in *.sfd; do
79 "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
80 done
81 popd >/dev/null
82
83 if use ancient; then
84 pushd ${MY_A_P}/src
85 export FONTFORGE_LANGUAGE=ff
86 make clean
87 make all || die "Failed to build fonts"
88 mv *.ttf "${FONT_S}"
89 popd >/dev/null
90 fi
91
92 if use taamey; then
93 for font in ${TAAMEY_FONTS}; do
94 rm -rf ${font}/TTF
95 pushd ${font}/SFD
96 for f in *.sfd; do
97 "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
98 done
99 popd >/dev/null
100 done
101 fi
102 else
103 pushd ${P}
104 mv *.afm *.pfa *.ttf "${FONT_S}"
105 popd >/dev/null
106
107 if use ancient; then
108 pushd ${MY_A_P}$(use fontforge || echo .TTF)/fonts
109 mv *.ttf "${FONT_S}"
110 popd >/dev/null
111 fi
112
113 if use taamey; then
114 for font in ${TAAMEY_FONTS}; do
115 pushd ${font}/TTF
116 mv *.ttf "${FONT_S}"
117 popd >/dev/null
118 done
119 fi
120 fi
121
122 use fancy && mv *.afm *.pfa *.ttf "${FONT_S}"
123 }
124
125 src_install() {
126 FONT_SUFFIX="pfa $(use fancy && echo afm ttf)" \
127 font_src_install
128
129 rm -rf "${FONT_S}"
130 find "${WORKDIR}" -name '*.ttf' -o -name '*.pfa' -o -name '*.pfm' |
131 while read font; do
132 ewarn "QA: missed font file: ${font}"
133 done
134
135 pushd ${PN}$(use fontforge && echo -src)-${PV}
136 dodoc CHANGES || die
137 popd >/dev/null
138
139 if use ancient; then
140 pushd "${WORKDIR}/${MY_A_P}$(use fontforge || echo .TTF)/"
141 newdoc CHANGES{,.ancient} || die
142 newdoc README{,.ancient} || die
143 popd >/dev/null
144 fi
145
146 if use taamey; then
147 for font in ${TAAMEY_FONTS}; do
148 pushd ${font}
149 [[ -f ChangeLog ]] && { newdoc ChangeLog{,.${font}} || die; }
150 newdoc README{,.${font}} || die
151 insinto /usr/share/doc/${PF}/${font}
152 doins -r Samples
153 popd >/dev/null
154 done
155 fi
156 }

  ViewVC Help
Powered by ViewVC 1.1.20