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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat Mar 31 17:20:48 2012 UTC (2 years ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +2 -2 lines
alpha/ia64/s390/sh/sparc stable wrt #400369

(Portage version: 2.1.10.49/cvs/Linux ia64)

1 # Copyright 1999-2012 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-r3.ebuild,v 1.7 2012/03/09 11:12:35 phajdan.jr 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 # The Type 1 fonts are just a stripped version of TrueType fonts and they are
13 # not updated unless there is a meaningful change and we need them for
14 # culmus-latex, see bug #350657
15 TYPE1_PV=0.105
16
17 DESCRIPTION="Hebrew Type1 fonts"
18 HOMEPAGE="http://culmus.sourceforge.net/"
19
20 FANCY_FONTS="journal hillel anka comix gan ozrad ktav-yad dorian gladia horev"
21 FANCY_YG_FONTS="ShmuelCLM MakabiYG"
22 TAAMEY_FONTS="TaameyDavidCLM TaameyFrankCLM KeterAramTsova KeterYG"
23
24 SRC_URI="mirror://sourceforge/culmus/${P}.tar.gz
25 mirror://sourceforge/culmus/${PN}-type1-${TYPE1_PV}.tar.gz
26 fontforge? ( mirror://sourceforge/culmus/${PN}-src-${PV}.tar.gz )
27 ancient? ( !fontforge? ( mirror://sourceforge/culmus/${MY_A_P}.TTF.tgz )
28 fontforge? ( mirror://sourceforge/culmus/${MY_A_P}.tgz ) )"
29 SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy/%s.tar.gz " ${FANCY_FONTS}) )"
30 SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy-yg/%s.zip " ${FANCY_YG_FONTS}) )"
31 SRC_URI+=" taamey? ( $(printf "http://culmus.sourceforge.net/taamim/%s.zip " ${TAAMEY_FONTS}) )"
32
33 # Some fonts are available in otf format too. Do we need them?
34 # http://culmus.sourceforge.net/fancy/anka-otf.zip
35 # http://culmus.sourceforge.net/fancy/hillel-otf.zip
36 # http://culmus.sourceforge.net/fancy/journal-otf.zip
37
38 LICENSE="|| ( GPL-2 LICENSE-BITSTREAM ) ancient? ( MIT ) fancy? ( GPL-2 )"
39 SLOT="0"
40 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
41 IUSE="ancient fancy fontforge taamey"
42
43 FONT_CONF=( "${FILESDIR}/65-culmus.conf" )
44
45 RDEPEND="!media-fonts/culmus-ancient"
46 # >=x11-apps/mkfontscale-1.0.9-r1 as Heavy weight support is required
47 DEPEND="${RDEPEND}
48 >=x11-apps/mkfontscale-1.0.9-r1
49 fontforge? ( media-gfx/fontforge )"
50
51 S=${WORKDIR}
52 # Put all fonts, generated or not here
53 FONT_S=${S}/FONTS
54
55 src_unpack() {
56 unpack ${P}.tar.gz # For type1 fonts...
57 unpack ${PN}-type1-${TYPE1_PV}.tar.gz
58 use fontforge && unpack ${PN}-src-${PV}.tar.gz
59
60 use ancient && unpack ${MY_A_P}$(use fontforge || echo .TTF).tgz
61
62 if use fancy; then
63 unpack $(printf "%s.tar.gz " ${FANCY_FONTS})
64 unpack $(printf "%s.zip " ${FANCY_YG_FONTS})
65 mv TTF/* .
66 fi
67
68 if use taamey; then
69 for font in ${TAAMEY_FONTS}; do
70 mkdir ${font}
71 pushd ${font}
72 unpack ${font}.zip
73 popd >/dev/null
74 done
75 fi
76 }
77
78 src_compile() {
79 mkdir -p "${FONT_S}"
80 if use fontforge; then
81 pushd ${P}
82 mv *.afm *.pfa "${FONT_S}"
83 rm *.ttf
84 popd >/dev/null
85
86 pushd ${PN}-type1-${TYPE1_PV}
87 mv *.afm *.pfa "${FONT_S}"
88 popd >/dev/null
89
90 pushd ${PN}-src-${PV}
91 for f in *.sfd; do
92 "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
93 done
94 popd >/dev/null
95
96 if use ancient; then
97 pushd ${MY_A_P}/src
98 export FONTFORGE_LANGUAGE=ff
99 make clean
100 make all || die "Failed to build fonts"
101 mv *.ttf "${FONT_S}"
102 popd >/dev/null
103 fi
104
105 if use taamey; then
106 for font in ${TAAMEY_FONTS}; do
107 rm -rf ${font}/TTF
108 pushd ${font}/SFD
109 for f in *.sfd; do
110 "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
111 done
112 popd >/dev/null
113 done
114 fi
115 else
116 pushd ${P}
117 mv *.afm *.pfa *.ttf "${FONT_S}"
118 popd >/dev/null
119
120 pushd ${PN}-type1-${TYPE1_PV}
121 mv *.afm *.pfa "${FONT_S}"
122 popd >/dev/null
123
124 if use ancient; then
125 pushd ${MY_A_P}$(use fontforge || echo .TTF)/fonts
126 mv *.ttf "${FONT_S}"
127 popd >/dev/null
128 fi
129
130 if use taamey; then
131 for font in ${TAAMEY_FONTS}; do
132 pushd ${font}/TTF
133 mv *.ttf "${FONT_S}"
134 popd >/dev/null
135 done
136 fi
137 fi
138
139 use fancy && mv *.afm *.pfa *.ttf "${FONT_S}"
140 }
141
142 src_install() {
143 FONT_SUFFIX="pfa $(use fancy && echo afm ttf)" \
144 font_src_install
145
146 rm -rf "${FONT_S}"
147 find "${WORKDIR}" -name '*.ttf' -o -name '*.pfa' -o -name '*.pfm' |
148 while read font; do
149 ewarn "QA: missed font file: ${font}"
150 done
151
152 pushd ${PN}$(use fontforge && echo -src)-${PV}
153 dodoc CHANGES || die
154 popd >/dev/null
155
156 if use ancient; then
157 pushd "${WORKDIR}/${MY_A_P}$(use fontforge || echo .TTF)/"
158 newdoc CHANGES{,.ancient} || die
159 newdoc README{,.ancient} || die
160 popd >/dev/null
161 fi
162
163 if use taamey; then
164 for font in ${TAAMEY_FONTS}; do
165 pushd ${font}
166 [[ -f ChangeLog ]] && { newdoc ChangeLog{,.${font}} || die; }
167 newdoc README{,.${font}} || die
168 insinto /usr/share/doc/${PF}/${font}
169 doins -r Samples
170 popd >/dev/null
171 done
172 fi
173 }

  ViewVC Help
Powered by ViewVC 1.1.20