libXshmfence:update and moved to /usr/lib
[nyanlinux.git] / builders / libXi-0 / builder-target.sh
blobaf3c97571048ae8a8c9ec6fa05fee8a83e13e3b0
1 src_name=libXi
2 version=1.7.9
3 archive_name=$src_name-$version.tar.bz2
4 url0=http://xorg.freedesktop.org/releases/individual/lib/$archive_name
6 src_dir=$src_dir_root/$src_name-$version
7 cd $src_dir_root
8 rm -Rf $src_name-$version
9 tar xf $archive_name
11 build_dir=$builds_dir_root/$pkg_name-$version-$target_gnu_triple
12 rm -Rf $build_dir
13 mkdir -p $build_dir
14 cd $build_dir
16 OLD_PATH=$PATH
17 export PATH=$cross_toolchain_dir_root/bin:$PATH
19 export "PKG_CONFIG_LIBDIR=\
20 $target_sysroot/nyan/libXau/0/lib/pkgconfig:\
21 $target_sysroot/nyan/libpthread-stubs/0/lib/pkgconfig:\
22 $target_sysroot/nyan/libxcb/0/lib/pkgconfig:\
23 $target_sysroot/nyan/libX11/0/lib/pkgconfig:\
24 $target_sysroot/nyan/libXext/0/lib/pkgconfig:\
25 $target_sysroot/nyan/libXfixes/0/lib/pkgconfig:\
26 $target_sysroot/nyan/xorgproto/0/share/pkgconfig:\
27 $target_sysroot/nyan/util-macro/0/share/pkgconfig"
28 export PKG_CONFIG_SYSROOT_DIR=$target_sysroot
30 # at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option
31 export "CC=$target_gnu_triple-gcc -B$target_sysroot/nyan/glibc/current/lib -L$target_sysroot/nyan/glibc/current/lib -Wl,-rpath-link,$target_sysroot/nyan/glibc/current/lib -static-libgcc"
32 export 'CFLAGS=-O2 -pipe -fPIC'
33 $src_dir/configure \
34 --build=$build_gnu_triple \
35 --host=$target_gnu_triple \
36 --prefix=/nyan/libXi/0 \
37 --enable-shared \
38 --disable-static \
39 --disable-docs \
40 --disable-specs \
41 xorg_cv_malloc0_returns_null=no
42 unset CFLAGS
43 unset CC
45 make -j $threads_n
46 make install DESTDIR=$target_sysroot
48 # cleanup and tidying
49 rm -Rf $target_sysroot/nyan/$src_name/0/share
50 rm -f $target_sysroot/nyan/$src_name/0/lib/*.la
51 find $target_sysroot/nyan/$src_name/0/lib -type f | while read f; do if file $f | egrep 'ELF.+(shared|executable)' >/dev/null; then $target_gnu_triple-strip -s $f; fi; done
53 rm -Rf $build_dir $src_dir
54 OLD_PATH=$PATH