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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Sep 3 11:37:16 2011 UTC (3 years ago) by pva
Branch: MAIN
CVS Tags: HEAD
Bump revision to update dorian fonts. Drop old.

(Portage version: 2.1.10.11/cvs/Linux x86_64)

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-r1.ebuild,v 1.6 2011/08/07 17:40:39 armin76 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"
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 DEPEND="${RDEPEND}
47 fontforge? ( media-gfx/fontforge )"
48
49 S=${WORKDIR}
50 # Put all fonts, generated or not here
51 FONT_S=${S}/FONTS
52
53 src_unpack() {
54 unpack ${P}.tar.gz # For type1 fonts...
55 unpack ${PN}-type1-${TYPE1_PV}.tar.gz
56 use fontforge && unpack ${PN}-src-${PV}.tar.gz
57
58 use ancient && unpack ${MY_A_P}$(use fontforge || echo .TTF).tgz
59
60 if use fancy; then
61 unpack $(printf "%s.tar.gz " ${FANCY_FONTS})
62 unpack $(printf "%s.zip " ${FANCY_YG_FONTS})
63 mv TTF/* .
64 fi
65
66 if use taamey; then
67 for font in ${TAAMEY_FONTS}; do
68 mkdir ${font}
69 pushd ${font}
70 unpack ${font}.zip
71 popd >/dev/null
72 done
73 fi
74 }
75
76 src_compile() {
77 mkdir -p "${FONT_S}"
78 if use fontforge; then
79 pushd ${P}
80 mv *.afm *.pfa "${FONT_S}"
81 rm *.ttf
82 popd >/dev/null
83
84 pushd ${PN}-type1-${TYPE1_PV}
85 mv *.afm *.pfa "${FONT_S}"
86 popd >/dev/null
87
88 pushd ${PN}-src-${PV}
89 for f in *.sfd; do
90 "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
91 done
92 popd >/dev/null
93
94 if use ancient; then
95 pushd ${MY_A_P}/src
96 export FONTFORGE_LANGUAGE=ff
97 make clean
98 make all || die "Failed to build fonts"
99 mv *.ttf "${FONT_S}"
100 popd >/dev/null
101 fi
102
103 if use taamey; then
104 for font in ${TAAMEY_FONTS}; do
105 rm -rf ${font}/TTF
106 pushd ${font}/SFD
107 for f in *.sfd; do
108 "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
109 done
110 popd >/dev/null
111 done
112 fi
113 else
114 pushd ${P}
115 mv *.afm *.pfa *.ttf "${FONT_S}"
116 popd >/dev/null
117
118 pushd ${PN}-type1-${TYPE1_PV}
119 mv *.afm *.pfa "${FONT_S}"
120 popd >/dev/null
121
122 if use ancient; then
123 pushd ${MY_A_P}$(use fontforge || echo .TTF)/fonts
124 mv *.ttf "${FONT_S}"
125 popd >/dev/null
126 fi
127
128 if use taamey; then
129 for font in ${TAAMEY_FONTS}; do
130 pushd ${font}/TTF
131 mv *.ttf "${FONT_S}"
132 popd >/dev/null
133 done
134 fi
135 fi
136
137 use fancy && mv *.afm *.pfa *.ttf "${FONT_S}"
138 }
139
140 src_install() {
141 FONT_SUFFIX="pfa $(use fancy && echo afm ttf)" \
142 font_src_install
143
144 rm -rf "${FONT_S}"
145 find "${WORKDIR}" -name '*.ttf' -o -name '*.pfa' -o -name '*.pfm' |
146 while read font; do
147 ewarn "QA: missed font file: ${font}"
148 done
149
150 pushd ${PN}$(use fontforge && echo -src)-${PV}
151 dodoc CHANGES || die
152 popd >/dev/null
153
154 if use ancient; then
155 pushd "${WORKDIR}/${MY_A_P}$(use fontforge || echo .TTF)/"
156 newdoc CHANGES{,.ancient} || die
157 newdoc README{,.ancient} || die
158 popd >/dev/null
159 fi
160
161 if use taamey; then
162 for font in ${TAAMEY_FONTS}; do
163 pushd ${font}
164 [[ -f ChangeLog ]] && { newdoc ChangeLog{,.${font}} || die; }
165 newdoc README{,.${font}} || die
166 insinto /usr/share/doc/${PF}/${font}
167 doins -r Samples
168 popd >/dev/null
169 done
170 fi
171 }

  ViewVC Help
Powered by ViewVC 1.1.20