freetype:update and moved to /usr/lib
[nyanlinux.git] / builders / libxml2-2.9.12 / builder.sh
blob9d0052325507f8c7318fbaad9dfb54da592eda53
1 src_name=libxml2
2 version=${pkg_name##*-}
3 slot=$version
4 archive_name=$src_name-$version.tar.gz
5 url0=
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/$pkg_name
15 rm -Rf $build_dir
16 mkdir -p $build_dir
17 cd $build_dir
19 export PKG_CONFIG_LIBDIR=
21 export "CC=gcc \
22 -isystem /nyan/glibc/current/include \
23 -isystem /nyan/linux-headers/current/include \
24 -I/nyan/zlib/current/include \
25 -L/nyan/zlib/current/lib \
26 -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \
27 -Wl,-rpath-link,/nyan/glibc/current/lib -static-libgcc"
28 export 'CFLAGS=-O2 -pipe -fPIC'
29 $pkg_dir/configure \
30 --prefix=/nyan/$src_name/$slot \
31 --disable-shared \
32 --enable-static
33 unset CFLAGS
34 unset CC
36 make -j $threads_n
37 make install
39 # cleanup and tidying
40 rm -Rf /nyan/$src_name/$slot/share/doc
41 rm -Rf /nyan/$src_name/$slot/share/man
42 rm -f /nyan/$src_name/$slot/lib/*.la
43 find /nyan/$src_name/$slot/lib -type f | while read f; do if file $f | egrep 'ELF.+(shared|executable)' >/dev/null; then strip -s $f; fi; done
45 rm -f $pkgs_dir_root/$archive_name
46 rm -Rf $build_dir $pkg_dir