Gfx Stack Update
[nyanlinux.git] / builders / libXrandr-1.5.4 / builder.sh
blob52fc67578a5cd265ade711cf1c64ad0af7e95e62
1 src_name=libXrandr
2 version=${pkg_name##*-}
3 slot=$version
4 archive_name=$src_name-$version.tar.xz
5 url0=http://xorg.freedesktop.org/releases/individual/lib/$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 /nyan/pkgconf/current/bin:\
24 $PATH\
26 target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)")
27 target_gnu_triple=${target_gnu_triple%-gcc}
29 export "PKG_CONFIG_LIBDIR=\
30 /nyan/libXau/current/lib/pkgconfig:\
31 /nyan/libpthread-stubs/current/lib/pkgconfig:\
32 /nyan/libxcb/current/lib/pkgconfig:\
33 /nyan/libX11/current/lib/pkgconfig:\
34 /nyan/libXrender/current/lib/pkgconfig:\
35 /nyan/libXext/current/lib/pkgconfig:\
36 /nyan/xorgproto/current/share/pkgconfig:\
37 /nyan/util-macro/current/share/pkgconfig"
38 export PKG_CONFIG=pkgconf
40 export 'CFLAGS=-O2 -pipe -fPIC'
41 export "CC=$target_gnu_triple-gcc \
42 -isystem /nyan/glibc/current/include \
43 -isystem /nyan/linux-headers/current/include \
44 -B/nyan/glibc/current/lib \
45 -L/nyan/glibc/current/lib \
46 -Wl,-rpath-link,/nyan/glibc/current/lib \
47 -Wl,-s \
48 -static-libgcc"
49 $pkg_dir/configure \
50 --prefix=/nyan/$src_name/$slot \
51 --enable-shared \
52 --disable-static
53 unset CFLAGS
54 unset CC
56 make -j $threads_n
57 make install
59 rm -Rf /nyan/$src_name/$slot/share
60 rm -f /nyan/$src_name/$slot/lib/*.la
62 export PATH=$PATH_SAVED
63 unset PATH_SAVED
64 unset target_gnu_triple
65 rm -f $pkgs_dir_root/$archive_name
66 rm -Rf $build_dir $pkg_dir