libXfixes:moved to "simplified /usr"
[nyanlinux.git] / builders / bootstrap / cross-gmp / builder.sh
blob90bb464262fba4c9d53f30e3e3c14a777ddd1520
1 . $nyan_root/conf.bootstrap.sh
3 version=6.2.0
4 archive_name=gmp-$version.tar.xz
5 url0=https://gmplib.org/download/gmp/$archive_name
7 src_dir=$pkgs_dir_root/gmp-$version
8 cp -f $src_dir_root/$archive_name $pkgs_dir_root
9 rm -Rf $src_dir
10 cd $pkgs_dir_root
11 tar xf $archive_name
13 build_dir=$builds_dir_root/$pkg_name-$version
14 rm -Rf $build_dir
15 mkdir -p $build_dir
16 cd $build_dir
18 # work out the right composition of flags to please the disgusting brain diareha
19 # which are meson/autotools/cmake/etc.
20 export "CPP=$bootstrap_build_cpp"
21 export "CPPFLAGS=$bootstrap_build_cppflags"
22 export "CFLAGS=$bootstrap_build_cflags $bootstrap_build_cppflags $bootstrap_build_ccld_flags"
23 export "CC=$bootstrap_build_cc"
24 $src_dir/configure \
25 --prefix=$bootstrap_target_cross_toolchain \
26 --build=$bootstrap_build_gnu_triple \
27 --host=$bootstrap_build_gnu_triple \
28 --disable-alloca \
29 --disable-cxx \
30 --disable-shared
31 unset CPP
32 unset CPPFLAGS
33 unset CFLAGS
34 unset CC
36 make -j $threads_n
37 make install
39 #cleanup
40 rm -f $bootstrap_target_cross_toolchain/lib/libgmp.la
41 rm -Rf $bootstrap_target_cross_toolchain/lib/pkgconfig
42 rm -Rf $bootstrap_target_cross_toolchain/share
44 rm -f $pkgs_dir_root/$archive_name
45 rm -Rf $src_dir $build_dir