3 archive_name
=$src_name-$version.
tar.gz
4 url0
=http
://ftpmirror.gnu.org
/$src_name/$archive_name
6 src_dir
=$src_dir_root/$src_name-$version
8 rm -Rf $src_name-$version
12 ### we use wide version of ncurses, be brutal telling bash configure
13 ##sed -i 's/tinfo/tinfow/' ./configure
15 build_dir
=$builds_dir_root/$pkg_name-$version-$target_gnu_triple
21 export PATH
=$cross_toolchain_dir_root/bin
:$PATH
23 # help bash configuration find the right tinfo
24 ln -fs libtinfow.a
$target_sysroot/nyan
/ncurses
/0/lib
/libtinfo.a
26 # at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option
27 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"
28 export 'CFLAGS=-O2 -pipe -fPIC'
29 export "LDFLAGS=-L$target_sysroot/nyan/readline/0/lib -L$target_sysroot/nyan/ncurses/0/lib"
31 --build=$build_gnu_triple \
32 --host=$target_gnu_triple \
33 --prefix=/nyan
/bash
/0 \
35 --enable-net-redirections \
37 --with-installed-readline \
44 make install DESTDIR
=$target_sysroot
47 rm -Rf $target_sysroot/nyan
/$src_name/0/share
48 find $target_sysroot/nyan
/$src_name/0 -type f |
while read f
; do if file $f |
egrep 'ELF.+(shared|executable)' >/dev
/null
; then $target_gnu_triple-strip -s $f; fi; done
50 rm -f $target_sysroot/nyan
/ncurses
/0/lib
/libtinfo.a
52 rm -Rf $build_dir $src_dir