libXshmfence:update and moved to /usr/lib
[nyanlinux.git] / builders / font-util-1.3.3 / builder.sh
blob6b919de4647a4ed566074ddefa950e778972a851
1 src_name=font-util
2 version=${pkg_name##*-}
3 slot=$version
4 archive_name=$src_name-$version.tar.xz
5 url0=http://xorg.freedesktop.org/releases/individual/font/$archive_name
7 pkg_dir=$pkgs_dir_root/$src_name-$version
8 rm -Rf $pkg_dir
9 mkdir -p $pkgs_dir_root
10 cp -f $src_dir_root/$archive_name $pkgs_dir_root
11 cd $pkgs_dir_root
12 tar xf $archive_name
14 build_dir=$builds_dir_root/$src_name-$version
15 rm -Rf $build_dir
16 mkdir -p $build_dir
17 cd $build_dir
19 PATH_SAVED=$PATH
20 export PATH="\
21 /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin:\
22 /nyan/make/current/bin:\
23 $PATH\
25 target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)")
26 target_gnu_triple=${target_gnu_triple%-gcc}
28 export 'CFLAGS=-O2 -pipe -fPIC'
29 export "CC=$target_gnu_triple-gcc \
30 -isystem /nyan/glibc/current/include \
31 -isystem /nyan/linux-headers/current/include \
32 -B/nyan/glibc/current/lib \
33 -L/nyan/glibc/current/lib \
34 -Wl,-rpath-link,/nyan/glibc/current/lib \
35 -Wl,-s \
36 -static-libgcc"
37 $pkg_dir/configure \
38 --prefix=/nyan/$src_name/$slot \
39 --with-fontrootdir=/share/fonts/X11
40 unset CFLAGS
41 unset CC
43 make
45 # The pkg-config file is configured for /share/font/X11/util and this is where the installation of
46 # the database is done. We must use DESTDIR to install properly this database.
47 install_dir=$builds_dir_root/install-$src_name-$slot
48 make install DESTDIR=$install_dir
50 rm -Rf $install_dir/nyan/$src_name/$slot/share/man
52 # again, manual installation is required due to the database
53 rm -Rf /nyan/$src_name/$slot
54 cp -rf $install_dir/nyan/$src_name /nyan
56 # we will use a symbol link to point the database to the current one, see below
57 mkdir -p /nyan/$src_name/$slot/share/fonts/X11
58 cp -rf $install_dir/share/fonts/X11/util /nyan/$src_name/$slot/share/fonts/X11
60 # be sure the link to the database exists and is correct
61 mkdir -p /share/fonts
62 ln -sTf /nyan/font-util/current/share/fonts/X11 /share/fonts/X11
64 export PATH=$PATH_SAVED
65 unset PATH_SAVED
66 unset target_gnu_triple
67 rm -f $pkgs_dir_root/$archive_name
68 rm -Rf $build_dir $pkg_dir $install_dir