File builders/fontconfig-1/contrib/x86_64-glibc-expat-gcc.sh added (mode: 100755) (index 0000000..9fbf18f) |
|
1 |
|
#/bin/sh |
|
2 |
|
|
|
3 |
|
# Look for "unset", you'll find the values you can override in $1 or |
|
4 |
|
# $build_dir/local_conf.sh file, that in order to tune the script for your |
|
5 |
|
# specific distro/needs. |
|
6 |
|
|
|
7 |
|
|
|
8 |
|
#=============================================================================== |
|
9 |
|
set -e |
|
10 |
|
version=2.13.91 |
|
11 |
|
# current = 13 |
|
12 |
|
# revision = 0 |
|
13 |
|
# age = 12 |
|
14 |
|
soname=libfontconfig.so.1 |
|
15 |
|
lib_name=$soname.13.0 |
|
16 |
|
#=============================================================================== |
|
17 |
|
|
|
18 |
|
|
|
19 |
|
#=============================================================================== |
|
20 |
|
# build dir and src dir |
|
21 |
|
build_dir=$(readlink -e .) |
|
22 |
|
echo "build_dir=$build_dir" |
|
23 |
|
# we are in contrib |
|
24 |
|
src_dir=$(readlink -e $(dirname $0)/..) |
|
25 |
|
echo "src_dir=$src_dir" |
|
26 |
|
#=============================================================================== |
|
27 |
|
|
|
28 |
|
|
|
29 |
|
#=============================================================================== |
|
30 |
|
# the current configur-able variables may be individually overridden with the |
|
31 |
|
# content of the file in $1 or $build_dir/local_conf.sh. Look for "unset" |
|
32 |
|
# in those scripts to find what you can override to tune the build. |
|
33 |
|
if test -f "$1"; then |
|
34 |
|
. "$1" |
|
35 |
|
else |
|
36 |
|
if test -f $build_dir/local_conf.sh; then |
|
37 |
|
. $build_dir/local_conf.sh |
|
38 |
|
fi |
|
39 |
|
fi |
|
40 |
|
#=============================================================================== |
|
41 |
|
|
|
42 |
|
|
|
43 |
|
#=============================================================================== |
|
44 |
|
# expat (static) |
|
45 |
|
if test "${expat_cppflags-unset}" = unset; then |
|
46 |
|
expat_cppflags='-I/nyan/expat/current/include' |
|
47 |
|
fi |
|
48 |
|
if test "${expat_archives-unset}" = unset; then |
|
49 |
|
expat_archives=libexpat.a |
|
50 |
|
fi |
|
51 |
|
if test "${expat_ldflags-unset}" = unset; then |
|
52 |
|
expat_ldflags="/nyan/expat/current/lib/$expat_archives" |
|
53 |
|
fi |
|
54 |
|
#=============================================================================== |
|
55 |
|
|
|
56 |
|
|
|
57 |
|
#=============================================================================== |
|
58 |
|
# freetype (shared) |
|
59 |
|
if test "${freetype_cppflags-unset}" = unset; then |
|
60 |
|
freetype_cppflags="\ |
|
61 |
|
-I/nyan/freetype/current/include/freetype2 \ |
|
62 |
|
\ |
|
63 |
|
-DHAVE_FT_GET_X11_FONT_FORMAT \ |
|
64 |
|
-DHAVE_FT_GET_BDF_PROPERTY \ |
|
65 |
|
-DHAVE_FT_GET_PS_FONT_INFO \ |
|
66 |
|
-DHAVE_FT_DONE_MM_VAR \ |
|
67 |
|
" |
|
68 |
|
fi |
|
69 |
|
if test "${freetype_ldflags-unset}" = unset; then |
|
70 |
|
freetype_ldflags="/nyan/freetype/current/lib/libfreetype.so" |
|
71 |
|
fi |
|
72 |
|
#=============================================================================== |
|
73 |
|
|
|
74 |
|
|
|
75 |
|
#=============================================================================== |
|
76 |
|
if test "${prefix-unset}" = unset; then |
|
77 |
|
prefix=/usr |
|
78 |
|
fi |
|
79 |
|
exec_prefix=$prefix |
|
80 |
|
echo prefix=$prefix |
|
81 |
|
echo exec_prefix=$exec_prefix |
|
82 |
|
#------------------------------------------------------------------------------- |
|
83 |
|
if test "${bin_dir-unset}" = unset; then |
|
84 |
|
bin_dir=$prefix/bin |
|
85 |
|
fi |
|
86 |
|
echo bin_dir=$bin_dir |
|
87 |
|
#------------------------------------------------------------------------------- |
|
88 |
|
if test "${lib_dir-unset}" = unset; then |
|
89 |
|
lib_dir=$prefix/lib |
|
90 |
|
fi |
|
91 |
|
echo lib_dir=$lib_dir |
|
92 |
|
#------------------------------------------------------------------------------- |
|
93 |
|
if test "${include_dir-unset}" = unset; then |
|
94 |
|
include_dir=$prefix/include |
|
95 |
|
fi |
|
96 |
|
echo include_dir=$include_dir |
|
97 |
|
#------------------------------------------------------------------------------- |
|
98 |
|
if test "${sysconf_dir-unset}" = unset; then |
|
99 |
|
if test $prefix = /usr; then |
|
100 |
|
sysconf_dir=/etc |
|
101 |
|
else |
|
102 |
|
sysconf_dir=$prefix/etc |
|
103 |
|
fi |
|
104 |
|
fi |
|
105 |
|
echo sysconf_dir=$sysconf_dir |
|
106 |
|
#------------------------------------------------------------------------------- |
|
107 |
|
if test "${localstate_dir-unset}" = unset; then |
|
108 |
|
if test $prefix = /usr; then |
|
109 |
|
localstate_dir=/var |
|
110 |
|
else |
|
111 |
|
localstate_dir=$prefix/var |
|
112 |
|
fi |
|
113 |
|
fi |
|
114 |
|
echo localstate_dir=$localstate_dir |
|
115 |
|
#------------------------------------------------------------------------------- |
|
116 |
|
if test "${default_fonts_dir-unset}" = unset; then |
|
117 |
|
default_fonts_dir=$prefix/share/fonts |
|
118 |
|
fi |
|
119 |
|
echo default_fonts_dir=$default_fonts_dir |
|
120 |
|
#------------------------------------------------------------------------------- |
|
121 |
|
if test "${default_cache_dir-unset}" = unset; then |
|
122 |
|
default_cache_dir=$localstate_dir/cache/fontconfig |
|
123 |
|
fi |
|
124 |
|
echo default_cache_dir=$default_cache_dir |
|
125 |
|
#------------------------------------------------------------------------------- |
|
126 |
|
if test "${template_dir-unset}" = unset; then |
|
127 |
|
template_dir=$prefix/share/fontconfig/conf.avail |
|
128 |
|
fi |
|
129 |
|
echo template_dir=$template_dir |
|
130 |
|
#------------------------------------------------------------------------------- |
|
131 |
|
if test "${base_config_dir-unset}" = unset; then |
|
132 |
|
base_config_dir=$sysconf_dir/fonts |
|
133 |
|
fi |
|
134 |
|
echo base_config_dir=$base_config_dir |
|
135 |
|
#=============================================================================== |
|
136 |
|
|
|
137 |
|
|
|
138 |
|
#=============================================================================== |
|
139 |
|
# meh |
|
140 |
|
mkdir -p $build_dir |
|
141 |
|
echo '#include <stdint.h>' >$build_dir/fcstdint.h |
|
142 |
|
#=============================================================================== |
|
143 |
|
|
|
144 |
|
|
|
145 |
|
#=============================================================================== |
|
146 |
|
/bin/sh $src_dir/src/makealias $src_dir/src $build_dir/fcalias.h $build_dir/fcaliastail.h \ |
|
147 |
|
$src_dir/fontconfig/fontconfig.h \ |
|
148 |
|
$src_dir/src/fcdeprecate.h \ |
|
149 |
|
$src_dir/fontconfig/fcprivate.h |
|
150 |
|
#------------------------------------------------------------------------------- |
|
151 |
|
/bin/sh $src_dir/src/makealias $src_dir/src $build_dir/fcftalias.h $build_dir/fcftaliastail.h \ |
|
152 |
|
$src_dir/fontconfig/fcfreetype.h |
|
153 |
|
#=============================================================================== |
|
154 |
|
|
|
155 |
|
|
|
156 |
|
#=============================================================================== |
|
157 |
|
if test "${host_cc-unset}" = unset; then |
|
158 |
|
host_cc="gcc -pipe -fPIC -O2 -c -static-libgcc \ |
|
159 |
|
-I/nyan/glibc/current/include-linux" |
|
160 |
|
fi |
|
161 |
|
|
|
162 |
|
if test "${host_ccld-unset}" = unset; then |
|
163 |
|
host_ccld="gcc -pipe -fPIC -static-libgcc \ |
|
164 |
|
-B/nyan/glibc/current/lib" |
|
165 |
|
fi |
|
166 |
|
|
|
167 |
|
if test "${host_rpath_link-unset}" = unset; then |
|
168 |
|
host_rpath_link="/nyan/glibc/current/lib:/nyan/freetype/current/lib" |
|
169 |
|
fi |
|
170 |
|
#=============================================================================== |
|
171 |
|
|
|
172 |
|
|
|
173 |
|
#=============================================================================== |
|
174 |
|
if test "${build_ccld-unset}" = unset; then |
|
175 |
|
build_ccld="gcc -pipe -O2 -static-libgcc \ |
|
176 |
|
-I/nyan/glibc/current/include-linux \ |
|
177 |
|
-DFLEXIBLE_ARRAY_MEMBER \ |
|
178 |
|
-B/nyan/glibc/current/lib" |
|
179 |
|
fi |
|
180 |
|
#=============================================================================== |
|
181 |
|
|
|
182 |
|
|
|
183 |
|
#=============================================================================== |
|
184 |
|
if test "${cpp-unset}" = unset; then |
|
185 |
|
cpp="cpp" |
|
186 |
|
fi |
|
187 |
|
#=============================================================================== |
|
188 |
|
|
|
189 |
|
|
|
190 |
|
#=============================================================================== |
|
191 |
|
if test "${gperf-unset}" = unset; then |
|
192 |
|
gperf="/nyan/gperf/current/bin/gperf" |
|
193 |
|
gperf_cppflags="\ |
|
194 |
|
-DFC_GPERF_SIZE_T=size_t \ |
|
195 |
|
" |
|
196 |
|
fi |
|
197 |
|
#=============================================================================== |
|
198 |
|
|
|
199 |
|
|
|
200 |
|
#=============================================================================== |
|
201 |
|
if test "${awk-unset}" = unset; then |
|
202 |
|
awk="/nyan/gawk/current/bin/awk" |
|
203 |
|
fi |
|
204 |
|
#=============================================================================== |
|
205 |
|
|
|
206 |
|
|
|
207 |
|
#=============================================================================== |
|
208 |
|
# fccase.h generation |
|
209 |
|
mkdir -p $build_dir/fc-case |
|
210 |
|
#------------------------------------------------------------------------------- |
|
211 |
|
echo "BUILD_CC fc-case.c" |
|
212 |
|
$build_ccld -o $build_dir/fc-case/fc-case $src_dir/fc-case/fc-case.c \ |
|
213 |
|
-I$build_dir \ |
|
214 |
|
-I$src_dir/src \ |
|
215 |
|
-I$src_dir |
|
216 |
|
#------------------------------------------------------------------------------- |
|
217 |
|
echo "GEN fccase.h" |
|
218 |
|
$build_dir/fc-case/fc-case $src_dir/fc-case/CaseFolding.txt \ |
|
219 |
|
<$src_dir/fc-case/fccase.tmpl.h \ |
|
220 |
|
>$build_dir/fc-case/fccase.h |
|
221 |
|
#=============================================================================== |
|
222 |
|
|
|
223 |
|
|
|
224 |
|
#=============================================================================== |
|
225 |
|
# fclang.h generation |
|
226 |
|
mkdir -p $build_dir/fc-lang |
|
227 |
|
#------------------------------------------------------------------------------- |
|
228 |
|
# meh... |
|
229 |
|
mkdir -p $build_dir/src |
|
230 |
|
OLD_PWD=$PWD |
|
231 |
|
cd $build_dir/src |
|
232 |
|
|
|
233 |
|
echo "BUILD_CC fc-lang.c" |
|
234 |
|
$build_ccld -o $build_dir/fc-lang/fc-lang $src_dir/fc-lang/fc-lang.c \ |
|
235 |
|
-I$build_dir \ |
|
236 |
|
-I$src_dir/src \ |
|
237 |
|
-I$src_dir \ |
|
238 |
|
-I. |
|
239 |
|
|
|
240 |
|
cd $OLD_PWD |
|
241 |
|
#------------------------------------------------------------------------------- |
|
242 |
|
. $src_dir/contrib/orth.sh |
|
243 |
|
|
|
244 |
|
echo "GEN fclang.h" |
|
245 |
|
$build_dir/fc-lang/fc-lang -d $src_dir/fc-lang $ORTH \ |
|
246 |
|
<$src_dir/fc-lang/fclang.tmpl.h \ |
|
247 |
|
>$build_dir/fc-lang/fclang.h |
|
248 |
|
#=============================================================================== |
|
249 |
|
|
|
250 |
|
|
|
251 |
|
#=============================================================================== |
|
252 |
|
# fcobjshash.h generation (should code one a cheap one, not expansive like this |
|
253 |
|
# one |
|
254 |
|
echo "GEN fcobjshash.h" |
|
255 |
|
$cpp -I$src_dir -I$src_dir/src <$src_dir/src/fcobjshash.gperf.h \ |
|
256 |
|
| sed 's/^ *//;s/ *, */,/' \ |
|
257 |
|
| $awk ' \ |
|
258 |
|
/CUT_OUT_BEGIN/ { no_write=1; next; }; \ |
|
259 |
|
/CUT_OUT_END/ { no_write=0; next; }; \ |
|
260 |
|
/^$/||/^#/ { next; }; \ |
|
261 |
|
{ if (!no_write) print; next; }; \ |
|
262 |
|
' - >$build_dir/fcobjshash.gperf |
|
263 |
|
$gperf --pic -m 100 $build_dir/fcobjshash.gperf >$build_dir/fcobjshash.h |
|
264 |
|
#=============================================================================== |
|
265 |
|
|
|
266 |
|
|
|
267 |
|
#=============================================================================== |
|
268 |
|
# fontconfig.map generation |
|
269 |
|
echo "GEN fontconfig.map" |
|
270 |
|
echo '{ global:' >$build_dir/fontconfig.map |
|
271 |
|
cat $src_dir/fontconfig/fontconfig.h \ |
|
272 |
|
$src_dir/src/fcdeprecate.h \ |
|
273 |
|
$src_dir/fontconfig/fcprivate.h \ |
|
274 |
|
$src_dir/fontconfig/fcfreetype.h \ |
|
275 |
|
| grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$/;/' -e 's/^/ /' | sort \ |
|
276 |
|
>>$build_dir/fontconfig.map |
|
277 |
|
echo ' local: *; };' >>$build_dir/fontconfig.map |
|
278 |
|
#=============================================================================== |
|
279 |
|
|
|
280 |
|
|
|
281 |
|
#=============================================================================== |
|
282 |
|
glibc_cppflags="\ |
|
283 |
|
-D_GNU_SOURCE \ |
|
284 |
|
-DHAVE_SYS_VFS_H \ |
|
285 |
|
-DHAVE_SYS_STATVFS_H \ |
|
286 |
|
-DHAVE_SYS_STATFS_H \ |
|
287 |
|
-DHAVE_SYS_PARAM_H \ |
|
288 |
|
-DHAVE_SYS_MOUNT_H \ |
|
289 |
|
-DHAVE_SYS_TYPES_H \ |
|
290 |
|
-DHAVE_SCHED_H \ |
|
291 |
|
-DHAVE_FCNTL_H \ |
|
292 |
|
-DHAVE_UNISTD_H \ |
|
293 |
|
\ |
|
294 |
|
-DHAVE_STRERROR_R \ |
|
295 |
|
-DHAVE_LINK \ |
|
296 |
|
-DHAVE_MMAP \ |
|
297 |
|
-DHAVE_POSIX_FADVISE -DPOSIX_FADV_WILLNEED \ |
|
298 |
|
-DHAVE_MKOSTEMP \ |
|
299 |
|
-DHAVE_MKSTEMP \ |
|
300 |
|
-DHAVE_RANDOM_R \ |
|
301 |
|
-DHAVE_READLINK \ |
|
302 |
|
-DHAVE_LSTAT \ |
|
303 |
|
-DHAVE_SCHED_YIELD \ |
|
304 |
|
\ |
|
305 |
|
-DHAVE_STRUCT_STATFS_F_FLAGS \ |
|
306 |
|
-DHAVE_STRUCT_DIRENT_D_TYPE \ |
|
307 |
|
-DHAVE_STRUCT_STAT_ST_MTIM \ |
|
308 |
|
\ |
|
309 |
|
-DUSE_ICONV \ |
|
310 |
|
-DHAVE_PTHREAD \ |
|
311 |
|
" |
|
312 |
|
|
|
313 |
|
gcc_cppflags="\ |
|
314 |
|
-DPIC \ |
|
315 |
|
-DHAVE_INTEL_ATOMIC_PRIMITIVES \ |
|
316 |
|
-DFLEXIBLE_ARRAY_MEMBER \ |
|
317 |
|
-DSIZEOF_VOID_P=8 \ |
|
318 |
|
-DALIGNOF_VOID_P=8 \ |
|
319 |
|
" |
|
320 |
|
|
|
321 |
|
fontconfig_cppflags="\ |
|
322 |
|
-DFC_DEFAULT_FONTS=\"$default_fonts_dir\" \ |
|
323 |
|
-DFC_CACHEDIR=\"$default_cache_dir\" \ |
|
324 |
|
-DFC_TEMPLATEDIR=\"$template_dir\" \ |
|
325 |
|
-DFONTCONFIG_PATH=\"$base_config_dir\" \ |
|
326 |
|
" |
|
327 |
|
|
|
328 |
|
cppflags="\ |
|
329 |
|
$glibc_cppflags \ |
|
330 |
|
$freetype_cppflags \ |
|
331 |
|
$gcc_cppflags \ |
|
332 |
|
$fontconfig_cppflags \ |
|
333 |
|
\ |
|
334 |
|
$gperf_cppflags \ |
|
335 |
|
\ |
|
336 |
|
$expat_cppflags \ |
|
337 |
|
$freetype_cppflags \ |
|
338 |
|
" |
|
339 |
|
#=============================================================================== |
|
340 |
|
|
|
341 |
|
|
|
342 |
|
#=============================================================================== |
|
343 |
|
libfontconfig_c_files="\ |
|
344 |
|
$src_dir/src/fcatomic.c \ |
|
345 |
|
$src_dir/src/fccache.c \ |
|
346 |
|
$src_dir/src/fccfg.c \ |
|
347 |
|
$src_dir/src/fccharset.c \ |
|
348 |
|
$src_dir/src/fccompat.c \ |
|
349 |
|
$src_dir/src/fcdbg.c \ |
|
350 |
|
$src_dir/src/fcdefault.c \ |
|
351 |
|
$src_dir/src/fcdir.c \ |
|
352 |
|
$src_dir/src/fcformat.c \ |
|
353 |
|
$src_dir/src/fcfreetype.c \ |
|
354 |
|
$src_dir/src/fcfs.c \ |
|
355 |
|
$src_dir/src/fcptrlist.c \ |
|
356 |
|
$src_dir/src/fchash.c \ |
|
357 |
|
$src_dir/src/fcinit.c \ |
|
358 |
|
$src_dir/src/fclang.c \ |
|
359 |
|
$src_dir/src/fclist.c \ |
|
360 |
|
$src_dir/src/fcmatch.c \ |
|
361 |
|
$src_dir/src/fcmatrix.c \ |
|
362 |
|
$src_dir/src/fcname.c \ |
|
363 |
|
$src_dir/src/fcobjs.c \ |
|
364 |
|
$src_dir/src/fcpat.c \ |
|
365 |
|
$src_dir/src/fcrange.c \ |
|
366 |
|
$src_dir/src/fcserialize.c \ |
|
367 |
|
$src_dir/src/fcstat.c \ |
|
368 |
|
$src_dir/src/fcstr.c \ |
|
369 |
|
$src_dir/src/fcweight.c \ |
|
370 |
|
$src_dir/src/fcxml.c \ |
|
371 |
|
$src_dir/src/ftglue.c \ |
|
372 |
|
" |
|
373 |
|
|
|
374 |
|
# meh... |
|
375 |
|
mkdir -p $build_dir/src |
|
376 |
|
OLD_PWD=$PWD |
|
377 |
|
cd $build_dir/src |
|
378 |
|
|
|
379 |
|
for f in $libfontconfig_c_files |
|
380 |
|
do |
|
381 |
|
libfontconfig_c_obj=$build_dir/$(basename $f .c).o |
|
382 |
|
libfontconfig_c_objs="$libfontconfig_c_obj $libfontconfig_c_objs" |
|
383 |
|
|
|
384 |
|
echo "CC $f" |
|
385 |
|
$host_cc $cppflags $f -o $libfontconfig_c_obj \ |
|
386 |
|
-I$build_dir \ |
|
387 |
|
-I$src_dir/src \ |
|
388 |
|
-I$src_dir \ |
|
389 |
|
-I. & |
|
390 |
|
done |
|
391 |
|
|
|
392 |
|
cd $OLD_PWD |
|
393 |
|
#=============================================================================== |
|
394 |
|
|
|
395 |
|
|
|
396 |
|
#=============================================================================== |
|
397 |
|
wait |
|
398 |
|
|
|
399 |
|
echo "CCLD $lib_name" |
|
400 |
|
mkdir -p $build_dir/fakeroot$lib_dir |
|
401 |
|
|
|
402 |
|
gcc -o $build_dir/fakeroot$lib_dir/$lib_name -Wl,-soname=$soname \ |
|
403 |
|
-shared -static-libgcc \ |
|
404 |
|
-B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \ |
|
405 |
|
-Wl,-rpath-link,$host_rpath_link \ |
|
406 |
|
-Wl,--no-undefined,--gc-sections,--version-script=$build_dir/fontconfig.map \ |
|
407 |
|
$libfontconfig_c_objs \ |
|
408 |
|
$expat_ldflags \ |
|
409 |
|
-Wl,--as-needed \ |
|
410 |
|
$freetype_ldflags \ |
|
411 |
|
-lpthread \ |
|
412 |
|
-Wl,--no-as-needed |
|
413 |
|
|
|
414 |
|
ln -sTf $lib_name $build_dir/fakeroot$lib_dir/$soname |
|
415 |
|
ln -sTf $soname $build_dir/fakeroot$lib_dir/libfontconfig.so |
|
416 |
|
#=============================================================================== |
|
417 |
|
|
|
418 |
|
|
|
419 |
|
#=============================================================================== |
|
420 |
|
mkdir -p $build_dir/fakeroot$bin_dir |
|
421 |
|
|
|
422 |
|
tools="\ |
|
423 |
|
cache \ |
|
424 |
|
cat \ |
|
425 |
|
conflist \ |
|
426 |
|
list \ |
|
427 |
|
match \ |
|
428 |
|
pattern \ |
|
429 |
|
query \ |
|
430 |
|
scan \ |
|
431 |
|
validate" |
|
432 |
|
|
|
433 |
|
for t in $tools |
|
434 |
|
do |
|
435 |
|
(echo "CC $t"; |
|
436 |
|
$host_cc $src_dir/fc-$t/fc-$t.c -o $build_dir/fc-$t.o \ |
|
437 |
|
-DHAVE_GETOPT=1 -DHAVE_GETOPT_LONG=1 \ |
|
438 |
|
$cppflags \ |
|
439 |
|
-I$build_dir \ |
|
440 |
|
-I$src_dir; |
|
441 |
|
|
|
442 |
|
echo "CCLD $t"; |
|
443 |
|
$host_ccld -o $build_dir/fakeroot$bin_dir/fc-$t \ |
|
444 |
|
$build_dir/fakeroot$lib_dir/$soname \ |
|
445 |
|
fc-$t.o \ |
|
446 |
|
-Wl,-rpath-link,$host_rpath_link \ |
|
447 |
|
-Wl,--as-needed \ |
|
448 |
|
$freetype_ldflags \ |
|
449 |
|
-lpthread \ |
|
450 |
|
-Wl,--no-as-needed;) & |
|
451 |
|
done |
|
452 |
|
#=============================================================================== |
|
453 |
|
|
|
454 |
|
|
|
455 |
|
#=============================================================================== |
|
456 |
|
echo "generate 35-lang-normalize.conf" |
|
457 |
|
|
|
458 |
|
echo "<fontconfig>" >$build_dir/35-lang-normalize.conf |
|
459 |
|
for i in $(echo $ORTH | sed -e 's/ /\n/g' | grep -v _ | sed -e 's/\.orth$//g' | sort) |
|
460 |
|
do |
|
461 |
|
echo " <!-- $i* -> $i -->" >>$build_dir/35-lang-normalize.conf |
|
462 |
|
echo " <match>" >>$build_dir/35-lang-normalize.conf |
|
463 |
|
echo " <test name=\"lang\" compare=\"contains\"><string>$i</string></test>" >>$build_dir/35-lang-normalize.conf |
|
464 |
|
echo " <edit name=\"lang\" mode=\"assign\" binding=\"same\"><string>$i</string></edit>" >>$build_dir/35-lang-normalize.conf |
|
465 |
|
echo " </match>" >>$build_dir/35-lang-normalize.conf |
|
466 |
|
done |
|
467 |
|
echo "</fontconfig>" >>$build_dir/35-lang-normalize.conf |
|
468 |
|
#=============================================================================== |
|
469 |
|
|
|
470 |
|
|
|
471 |
|
#=============================================================================== |
|
472 |
|
echo "installing xml configuration files in fakeroot" |
|
473 |
|
mkdir -p $build_dir/fakeroot$template_dir |
|
474 |
|
|
|
475 |
|
cp -f \ |
|
476 |
|
$src_dir/conf.d/05-reset-dirs-sample.conf \ |
|
477 |
|
$src_dir/conf.d/09-autohint-if-no-hinting.conf \ |
|
478 |
|
$src_dir/conf.d/10-autohint.conf \ |
|
479 |
|
$src_dir/conf.d/10-hinting-full.conf \ |
|
480 |
|
$src_dir/conf.d/10-hinting-medium.conf \ |
|
481 |
|
$src_dir/conf.d/10-hinting-none.conf \ |
|
482 |
|
$src_dir/conf.d/10-hinting-slight.conf \ |
|
483 |
|
$src_dir/conf.d/10-no-sub-pixel.conf \ |
|
484 |
|
$src_dir/conf.d/10-scale-bitmap-fonts.conf \ |
|
485 |
|
$src_dir/conf.d/10-sub-pixel-bgr.conf \ |
|
486 |
|
$src_dir/conf.d/10-sub-pixel-rgb.conf \ |
|
487 |
|
$src_dir/conf.d/10-sub-pixel-vbgr.conf \ |
|
488 |
|
$src_dir/conf.d/10-sub-pixel-vrgb.conf \ |
|
489 |
|
$src_dir/conf.d/10-unhinted.conf \ |
|
490 |
|
$src_dir/conf.d/11-lcdfilter-default.conf \ |
|
491 |
|
$src_dir/conf.d/11-lcdfilter-legacy.conf \ |
|
492 |
|
$src_dir/conf.d/11-lcdfilter-light.conf \ |
|
493 |
|
$src_dir/conf.d/20-unhint-small-vera.conf \ |
|
494 |
|
$src_dir/conf.d/25-unhint-nonlatin.conf \ |
|
495 |
|
$src_dir/conf.d/30-metric-aliases.conf \ |
|
496 |
|
$build_dir/35-lang-normalize.conf \ |
|
497 |
|
$src_dir/conf.d/40-nonlatin.conf \ |
|
498 |
|
$src_dir/conf.d/45-generic.conf \ |
|
499 |
|
$src_dir/conf.d/45-latin.conf \ |
|
500 |
|
$src_dir/conf.d/49-sansserif.conf \ |
|
501 |
|
$src_dir/conf.d/50-user.conf \ |
|
502 |
|
$src_dir/conf.d/51-local.conf \ |
|
503 |
|
$src_dir/conf.d/60-generic.conf \ |
|
504 |
|
$src_dir/conf.d/60-latin.conf \ |
|
505 |
|
$src_dir/conf.d/65-fonts-persian.conf \ |
|
506 |
|
$src_dir/conf.d/65-khmer.conf \ |
|
507 |
|
$src_dir/conf.d/65-nonlatin.conf \ |
|
508 |
|
$src_dir/conf.d/69-unifont.conf \ |
|
509 |
|
$src_dir/conf.d/70-no-bitmaps.conf \ |
|
510 |
|
$src_dir/conf.d/70-yes-bitmaps.conf \ |
|
511 |
|
$src_dir/conf.d/80-delicious.conf \ |
|
512 |
|
$src_dir/conf.d/90-synthetic.conf \ |
|
513 |
|
$build_dir/fakeroot$template_dir |
|
514 |
|
|
|
515 |
|
default_links="\ |
|
516 |
|
10-hinting-full.conf \ |
|
517 |
|
10-scale-bitmap-fonts.conf \ |
|
518 |
|
20-unhint-small-vera.conf \ |
|
519 |
|
30-metric-aliases.conf \ |
|
520 |
|
40-nonlatin.conf \ |
|
521 |
|
45-generic.conf \ |
|
522 |
|
45-latin.conf \ |
|
523 |
|
49-sansserif.conf \ |
|
524 |
|
50-user.conf \ |
|
525 |
|
51-local.conf \ |
|
526 |
|
60-generic.conf \ |
|
527 |
|
60-latin.conf \ |
|
528 |
|
65-fonts-persian.conf \ |
|
529 |
|
65-nonlatin.conf \ |
|
530 |
|
69-unifont.conf \ |
|
531 |
|
80-delicious.conf \ |
|
532 |
|
90-synthetic.conf" |
|
533 |
|
|
|
534 |
|
mkdir -p $build_dir/fakeroot$base_config_dir/conf.d |
|
535 |
|
for l in $default_links |
|
536 |
|
do |
|
537 |
|
ln -sTf $template_dir/$l $build_dir/fakeroot$base_config_dir/conf.d/$l & |
|
538 |
|
done |
|
539 |
|
#=============================================================================== |
|
540 |
|
|
|
541 |
|
|
|
542 |
|
#=============================================================================== |
|
543 |
|
echo "generate fonts.conf" |
|
544 |
|
mkdir -p $build_dir/fakeroot$base_config_dir |
|
545 |
|
|
|
546 |
|
sed \ |
|
547 |
|
-e "s:@FC_CACHEDIR@:$default_cache_dir:g" \ |
|
548 |
|
-e "s:@FC_DEFAULT_FONTS@:$default_fonts_dir:g" \ |
|
549 |
|
-e "s:@FC_FONTPATH@::g" \ |
|
550 |
|
-e "s:@CONFIGDIR@:conf.d:g" \ |
|
551 |
|
-e "s:@PACKAGE@:fontconfig:g" \ |
|
552 |
|
-e "s:@VERSION@:$version:g" \ |
|
553 |
|
$src_dir/fonts.conf.in >$build_dir/fakeroot$base_config_dir/fonts.conf & |
|
554 |
|
#=============================================================================== |
|
555 |
|
|
|
556 |
|
|
|
557 |
|
#=============================================================================== |
|
558 |
|
echo "include files" |
|
559 |
|
mkdir -p $build_dir/fakeroot$include_dir/fontconfig |
|
560 |
|
|
|
561 |
|
cp -f \ |
|
562 |
|
$src_dir/fontconfig/fcfreetype.h \ |
|
563 |
|
$src_dir/fontconfig/fcprivate.h \ |
|
564 |
|
$src_dir/fontconfig/fontconfig.h \ |
|
565 |
|
$build_dir/fakeroot$include_dir/fontconfig & |
|
566 |
|
#=============================================================================== |
|
567 |
|
|
|
568 |
|
|
|
569 |
|
#=============================================================================== |
|
570 |
|
echo "generate fontconfig.pc (the pkgconfig file)" |
|
571 |
|
mkdir -p $build_dir/fakeroot$lib_dir/pkgconfig |
|
572 |
|
|
|
573 |
|
pc=$build_dir/fakeroot$lib_dir/pkgconfig/fontconfig.pc |
|
574 |
|
cp -f $src_dir/fontconfig.pc.in $pc |
|
575 |
|
# we presume expat and freetype are using pkgconfig |
|
576 |
|
sed \ |
|
577 |
|
-e "s:@prefix@:$prefix:g" \ |
|
578 |
|
-e "s:@exec_prefix@:$exec_prefix:g" \ |
|
579 |
|
-e "s:@libdir@:$lib_dir:g" \ |
|
580 |
|
-e "s:@includedir@:$include_dir:g" \ |
|
581 |
|
-e "s:@sysconfdir@:$sysconf_dir:g" \ |
|
582 |
|
-e "s:@localstatedir@:$localstate_dir:g" \ |
|
583 |
|
-e "s:@PACKAGE@:fontconfig:g" \ |
|
584 |
|
-e "s:@BASECONFIGDIR@:$base_config_dir:g" \ |
|
585 |
|
-e "s:@fc_cachedir@:$default_cache_dir:g" \ |
|
586 |
|
-e "s:@VERSION@:$version:g" \ |
|
587 |
|
-e "s:@PKGCONFIG_REQUIRES@:freetype2:g" \ |
|
588 |
|
-e "s:@PKGCONFIG_REQUIRES_PRIVATELY@:expat:g" \ |
|
589 |
|
-e '/^Libs\.private/ d' \ |
|
590 |
|
-e "s:@ICONV_CFLAGS@::g" \ |
|
591 |
|
-e "s:@PKG_EXPAT_CFLAGS@::g" \ |
|
592 |
|
-i $pc & |
|
593 |
|
#=============================================================================== |
|
594 |
|
wait |