libXshmfence:update and moved to /usr/lib
[nyanlinux.git] / builders / nyanbison-0 / builder-target.sh
blob5d74b9cdd0130595be2672bed3d459b68ddc6583
1 src_name=nyanbison
2 git_commit=1da06aa4eed14fcc1f7dd585a386391600e879da
3 git_url0=git://github.com/sylware/$src_name
5 gnulib_git_commit=f5f067f896b71a96c882b96c35759aeea2fa3072
6 gnulib_git_url0=git://git.savannah.gnu.org/gnulib.git
8 pkg_dir=$pkgs_dir_root/$pkg_name
9 src_dir=$src_dir_root/$src_name
10 rm -Rf $pkg_dir
11 mkdir -p $pkgs_dir_root
12 cp -r $src_dir $pkg_dir
14 #-------------------------------------------------------------------------------
15 cd $pkg_dir
16 # we do trust the version of the gnulib
17 git checkout --force $git_commit
18 git reset --hard
20 # from configmake module, it's specific to m4 binary
21 $src_dir_root/gnulib/gnulib-tool --dir=$pkg_dir --source-base=gnulib --m4-base=m4/gnulib --import \
22 spawn-pipe \
23 xconcat-filename \
24 xstrndup \
25 fopen-safer \
26 stdbool \
27 xmemdup0 \
28 mbswidth \
29 argmatch \
30 hash \
31 closeout \
32 quotearg \
33 progname \
34 configmake \
35 xalloc \
36 verify \
37 unlocked-io
39 touch NEWS
40 touch README
41 touch AUTHORS
42 touch ChangeLog
43 autoreconf -v -f -i
44 #-------------------------------------------------------------------------------
46 build_dir=$builds_dir_root/$pkg_name-$target_gnu_triple
47 rm -Rf $build_dir
48 mkdir -p $build_dir
49 cd $build_dir
51 OLD_PATH=$PATH
52 export PATH=$cross_toolchain_dir_root/bin:$PATH
54 # at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option
55 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"
56 export 'CFLAGS=-O2 -pipe -fPIC'
58 $pkg_dir/configure \
59 --build=$build_gnu_triple \
60 --host=$target_gnu_triple \
61 --prefix=/nyan/nyanbison/0
63 # parallel build breaks code generation
64 make
65 make install DESTDIR=$target_sysroot
67 # cleanup and tidying
68 $target_gnu_triple-strip -s $target_sysroot/nyan/$src_name/0/bin/bison
70 rm -Rf $build_dir $pkg_dir
71 export PATH=$OLD_PATH