wip update
[nyanlinux.git] / builders / pkg-config-0 / builder-target.sh
blob13e0a6ef748f040048f425a1ac18e086e9d53a69
1 src_name=pkg-config
2 version=0.29.2
3 archive_name=$src_name-$version.tar.gz
4 url0=http://pkgconfig.freedesktop.org/releases/$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=$target_sysroot/nyan/glib/0/lib/pkgconfig"
20 export PKG_CONFIG_SYSROOT_DIR=$target_sysroot
22 # at link time, the only way to tell gnu ld where to look for shared lib dependencies is to pass the -rpath-link option
23 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"
24 export 'CFLAGS=-O2 -pipe -fPIC'
25 $src_dir/configure \
26 --build=$build_gnu_triple \
27 --host=$target_gnu_triple \
28 --prefix=/nyan/pkg-config/0 \
29 --disable-shared
30 unset CFLAGS
31 unset CC
32 unset PKG_CONFIG_SYSROOT_DIR
33 unset PKG_CONFIG_LIBDIR
35 make -j $threads_n
36 make install DESTDIR=$target_sysroot
38 # cleanup and tidying
39 rm -Rf $target_sysroot/nyan/$src_name/0/share/man
40 rm -Rf $target_sysroot/nyan/$src_name/0/share/doc
41 $target_gnu_triple-strip -s $target_sysroot/nyan/$src_name/0/bin/* || true
43 rm -Rf $build_dir $src_dir
44 export PATH=$OLD_PATH