37 |
37 |
|
38 |
38 |
LICENSE="|| ( GPL-2 LICENSE-BITSTREAM ) ancient? ( MIT ) fancy? ( GPL-2 )"
|
39 |
39 |
SLOT="0"
|
40 |
|
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
|
|
40 |
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~loong ppc ppc64 ~s390 sparc x86"
|
41 |
41 |
IUSE="ancient fancy fontforge taamey"
|
42 |
42 |
|
43 |
43 |
RDEPEND="!media-fonts/culmus-ancient"
|
... | ... | |
48 |
48 |
fontforge? ( media-gfx/fontforge )
|
49 |
49 |
"
|
50 |
50 |
|
51 |
|
FONT_CONF=( "${T}/65-culmus.conf" )
|
|
51 |
FONT_CONF=( "${T}"/65-culmus.conf )
|
52 |
52 |
# Put all fonts, generated or not here
|
53 |
|
FONT_S=${S}/FONTS
|
|
53 |
FONT_S="${S}/FONTS"
|
|
54 |
|
|
55 |
PATCHES=( "${FILESDIR}/${P}-fontconfig-test.patch" ) # bug 695708
|
54 |
56 |
|
55 |
57 |
src_unpack() {
|
56 |
58 |
unpack ${P}.tar.gz # For type1 fonts...
|
57 |
59 |
unpack ${PN}-type1-${TYPE1_PV}.tar.gz
|
58 |
|
use fontforge && unpack ${PN}-src-${PV}.tar.gz
|
59 |
60 |
|
60 |
|
use ancient && unpack ${MY_A_P}$(use fontforge || echo .TTF).tgz
|
|
61 |
use fontforge && unpack ${PN}-src-${PV}.tar.gz
|
|
62 |
use ancient && unpack ${MY_A_P}$(usex fontforge '' .TTF).tgz
|
61 |
63 |
|
62 |
64 |
if use fancy; then
|
63 |
65 |
unpack $(printf "%s.tar.gz " ${FANCY_FONTS})
|
... | ... | |
68 |
70 |
if use taamey; then
|
69 |
71 |
for font in ${TAAMEY_FONTS}; do
|
70 |
72 |
mkdir ${font} || die
|
71 |
|
pushd ${font} || die
|
|
73 |
|
|
74 |
pushd ${font} > /dev/null || die
|
|
75 |
|
72 |
76 |
unpack ${font}.zip
|
73 |
|
popd >/dev/null || die
|
|
77 |
|
|
78 |
popd > /dev/null || die
|
74 |
79 |
done
|
75 |
80 |
fi
|
76 |
81 |
}
|
77 |
82 |
|
78 |
83 |
src_prepare() {
|
79 |
84 |
default
|
80 |
|
cp "${P}/culmus.conf" "${T}/65-culmus.conf" || die
|
|
85 |
cp "${P}"/culmus.conf "${T}"/65-culmus.conf || die
|
81 |
86 |
}
|
82 |
87 |
|
83 |
88 |
src_compile() {
|
84 |
|
mkdir -p "${FONT_S}"
|
|
89 |
mkdir -p "${FONT_S}" || die
|
|
90 |
|
85 |
91 |
if use fontforge; then
|
86 |
|
pushd ${P} || die
|
|
92 |
pushd ${P} > /dev/null || die
|
87 |
93 |
|
88 |
94 |
mv *.afm *.pfa "${FONT_S}" || die
|
89 |
95 |
rm *.ttf || die
|
90 |
96 |
|
91 |
|
popd >/dev/null || die
|
|
97 |
popd > /dev/null || die
|
92 |
98 |
|
93 |
|
pushd ${PN}-type1-${TYPE1_PV} || die
|
|
99 |
pushd ${PN}-type1-${TYPE1_PV} > /dev/null || die
|
94 |
100 |
|
95 |
101 |
mv *.afm *.pfa "${FONT_S}" || die
|
96 |
102 |
|
97 |
|
popd >/dev/null || die
|
|
103 |
popd > /dev/null || die
|
98 |
104 |
|
99 |
|
pushd ${PN}-src-${PV} || die
|
|
105 |
pushd ${PN}-src-${PV} > /dev/null || die
|
100 |
106 |
|
101 |
107 |
for f in *.sfd; do
|
102 |
108 |
"${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
|
103 |
109 |
done
|
104 |
110 |
|
105 |
|
popd >/dev/null || die
|
|
111 |
popd > /dev/null || die
|
106 |
112 |
|
107 |
113 |
if use ancient; then
|
108 |
|
pushd ${MY_A_P}/src || die
|
|
114 |
pushd ${MY_A_P}/src > /dev/null || die
|
109 |
115 |
|
110 |
116 |
export FONTFORGE_LANGUAGE=ff
|
111 |
117 |
|
... | ... | |
114 |
120 |
|
115 |
121 |
mv *.ttf "${FONT_S}" || die
|
116 |
122 |
|
117 |
|
popd >/dev/null || die
|
|
123 |
popd > /dev/null || die
|
118 |
124 |
fi
|
119 |
125 |
|
120 |
126 |
if use taamey; then
|
121 |
127 |
for font in ${TAAMEY_FONTS}; do
|
122 |
128 |
rm -rf ${font}/TTF || die
|
123 |
129 |
|
124 |
|
pushd ${font}/SFD || die
|
|
130 |
pushd ${font}/SFD > /dev/null || die
|
125 |
131 |
|
126 |
132 |
for f in *.sfd; do
|
127 |
133 |
"${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die
|
128 |
134 |
done
|
129 |
135 |
|
130 |
|
popd >/dev/null || die
|
|
136 |
popd > /dev/null || die
|
131 |
137 |
done
|
132 |
138 |
fi
|
133 |
139 |
else
|
134 |
|
pushd ${P} || die
|
135 |
|
|
|
140 |
pushd ${P} > /dev/null || die
|
136 |
141 |
mv *.afm *.pfa *.ttf "${FONT_S}" || die
|
137 |
|
|
138 |
142 |
popd >/dev/null || die
|
139 |
143 |
|
140 |
|
pushd ${PN}-type1-${TYPE1_PV} || die
|
141 |
|
|
|
144 |
pushd ${PN}-type1-${TYPE1_PV} > /dev/null || die
|
142 |
145 |
mv *.afm *.pfa "${FONT_S}" || die
|
143 |
|
|
144 |
|
popd >/dev/null || die
|
|
146 |
popd > /dev/null || die
|
145 |
147 |
|
146 |
148 |
if use ancient; then
|
147 |
|
pushd ${MY_A_P}$(use fontforge || echo .TTF)/fonts || die
|
|
149 |
pushd ${MY_A_P}$(usex fontforge '' .TTF)/fonts > /dev/null || die
|
148 |
150 |
|
149 |
151 |
mv *.ttf "${FONT_S}" || die
|
150 |
152 |
|
151 |
|
popd >/dev/null || die
|
|
153 |
popd > /dev/null || die
|
152 |
154 |
fi
|
153 |
155 |
|
154 |
156 |
if use taamey; then
|
155 |
157 |
for font in ${TAAMEY_FONTS}; do
|
156 |
|
pushd ${font}/TTF || die
|
|
158 |
pushd ${font}/TTF > /dev/null || die
|
157 |
159 |
|
158 |
160 |
mv *.ttf "${FONT_S}" || die
|
159 |
161 |
|
160 |
|
popd >/dev/null || die
|
|
162 |
popd > /dev/null || die
|
161 |
163 |
done
|
162 |
164 |
fi
|
163 |
165 |
fi
|
... | ... | |
179 |
181 |
eqawarn "Missed font file: ${font}"
|
180 |
182 |
done
|
181 |
183 |
|
182 |
|
pushd ${PN}$(use fontforge && echo -src)-${PV} || die
|
183 |
|
|
|
184 |
pushd ${PN}$(usex fontforge -src '')-${PV} > /dev/null || die
|
184 |
185 |
dodoc CHANGES
|
185 |
|
|
186 |
|
popd >/dev/null || die
|
|
186 |
popd > /dev/null || die
|
187 |
187 |
|
188 |
188 |
if use ancient; then
|
189 |
|
pushd "${WORKDIR}/${MY_A_P}$(use fontforge || echo .TTF)/" || die
|
|
189 |
pushd "${WORKDIR}/${MY_A_P}$(usex fontforge '' .TTF)/" > /dev/null || die
|
190 |
190 |
|
191 |
191 |
newdoc CHANGES{,.ancient}
|
192 |
192 |
newdoc README{,.ancient}
|
193 |
193 |
|
194 |
|
popd >/dev/null || die
|
|
194 |
popd > /dev/null || die
|
195 |
195 |
fi
|
196 |
196 |
|
197 |
197 |
if use taamey; then
|
198 |
198 |
for font in ${TAAMEY_FONTS}; do
|
199 |
|
pushd ${font} || die
|
|
199 |
pushd ${font} > /dev/null || die
|
200 |
200 |
|
|
201 |
docinto ${font}
|
201 |
202 |
[[ -f ChangeLog ]] && newdoc ChangeLog{,.${font}}
|
202 |
203 |
newdoc README{,.${font}}
|
203 |
|
docinto ${font}
|
204 |
204 |
dodoc -r Samples
|
205 |
205 |
|
206 |
|
popd >/dev/null || die
|
|
206 |
popd > /dev/null || die
|
207 |
207 |
done
|
208 |
208 |
fi
|
209 |
209 |
}
|