first stage of new bootstrap
[nyanlinux.git] / builders / popt-0 / builder-target.sh
blob7a30510641ba868a713c090cb029a48817c84fad
1 src_name=popt
2 version=1.16
3 network_archive_name=$src_name-$version.tar.gz
4 archive_name=$src_name-$version.tar
5 # WARNING, it's a bare tar archive, not a gzipped tar archive
6 url0=http://rpm5.org/files/popt/$network_archive_name
9 src_dir=$src_dir_root/$src_name-$version
10 rm -Rf $src_dir
11 cd $src_dir_root
13 cp -f $network_archive_name $archive_name
14 tar xf $archive_name
15 rm -f $archive_name
17 build_dir=$builds_dir_root/$pkg_name-$version-$target_gnu_triple
18 rm -Rf $build_dir
19 mkdir -p $build_dir
20 cd $build_dir
22 OLD_PATH=$PATH
23 export PATH=$cross_toolchain_dir_root/bin:$PATH
25 # at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option
26 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"
27 export 'CFLAGS=-O2 -pipe -fPIC'
28 $src_dir/configure \
29 --build=$build_gnu_triple \
30 --host=$target_gnu_triple \
31 --prefix=/nyan/popt/0 \
32 --disable-nls \
33 --disable-shared
34 unset CFLAGS
35 unset CC
37 make -j $threads_n
38 make install DESTDIR=$target_sysroot
40 # cleanup and tidying
41 rm -Rf $target_sysroot/nyan/$src_name/0/share
42 rm -Rf $target_sysroot/nyan/$src_name/0/lib/*.la || true
44 rm -Rf $build_dir $src_dir
45 export PATH=$OLD_PATH