gfx stack update (still holding the breaking llvm)
[nyanlinux.git] / builders / ncurses-6.2-20210619 / builder.sh
blobc6f8f6a4d7293d5c885c58717b897b251bb9ef21
1 src_name=ncurses
2 version_all=${pkg_name#*-}
3 slot=$version_all
4 version_base=${version_all%-*}
5 version_patch=${version_all##*-}
6 archive_name=$src_name-$version_base.tar.gz
7 patch_name=patch-$version_all.sh.gz
8 url0=http://ftpmirror.gnu.org/$src_name/$archive_name
9 url1=ftp://ftp.invisible-island.net/$src_name/$version_base/patch_name
11 pkg_dir=$pkgs_dir_root/$src_name-$version_base
12 rm -Rf $pkg_dir
13 mkdir -p $pkgs_dir_root
14 cp -f $src_dir_root/$archive_name $pkgs_dir_root
15 cd $pkgs_dir_root
16 tar xf $archive_name
18 cd $pkg_dir
19 cp -f $src_dir_root/$patch_name ./
20 gunzip ./$patch_name
21 chmod +x ./$(basename $patch_name .gz)
22 ./$(basename $patch_name .gz)
24 build_dir=$builds_dir_root/$pkg_name-$version_all
25 rm -Rf $build_dir
26 mkdir -p $build_dir
27 cd $build_dir
29 PATH_SAVED=$PATH
30 export PATH="\
31 /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin:\
32 /nyan/make/current/bin:\
33 $PATH\
35 target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)")
36 target_gnu_triple=${target_gnu_triple%-gcc}
38 export PKG_CONFIG=/nyan/pkgconf/current/bin/pkgconf
39 export "CPPFLAGS=\
40 -isystem /nyan/glibc/current/include \
41 -isystem /nyan/linux-headers/current/include"
42 export "CPP=$target_gnu_triple-gcc -E"
43 export 'CFLAGS=-O2 -pipe -fPIC -static-libgcc'
44 export LDFLAGS="\
45 -B/nyan/glibc/current/lib \
46 -L/nyan/glibc/current/lib \
47 -Wl,-rpath-link,/nyan/glibc/current/lib \
48 -Wl,-s \
49 -static-libgcc"
50 export CC=$target_gnu_triple-gcc
51 export AR=$target_gnu_triple-ar
52 export "BUILD_CPPFLAGS=$CPPFLAGS"
53 export "BUILD_CPP=$CPP"
54 export "BUILD_CFLAGS=$CFLAGS"
55 export "BUILD_LDFLAGS=$LDFLAGS"
56 export "BUILD_CC=$CC"
57 export "BUILD_AR=$AR"
58 $pkg_dir/configure \
59 --prefix=/nyan/ncurses/$slot \
60 --without-ada \
61 --without-cxx \
62 --without-cxx-binding \
63 --enable-db-install \
64 --without-manpages \
65 --with-progs \
66 --without-tests \
67 --with-pkg-config-libdir=/nyan/ncurses/$slot/lib/pkgconfig \
68 --enable-pc-files \
69 --disable-mixed-case \
70 --without-libtool \
71 --without-shared \
72 --with-normal \
73 --without-debug \
74 --without-profile \
75 --with-termlib \
76 --with-ticlib \
77 --without-gpm \
78 --disable-lib-suffixes \
79 --enable-database \
80 --disable-termcap \
81 --disable-root-environ \
82 --enable-symlinks \
83 --enable-widec \
84 --enable-ext-funcs \
85 --enable-sp-funcs \
86 --enable-ext-colors \
87 --disable-ext-mouse \
88 --enable-sigwinch \
89 --with-pthread \
90 --enable-opaque-curses \
91 --enable-opaque-form \
92 --enable-opaque-menu \
93 --enable-opaque-panel \
94 --without-develop \
95 --enable-fvisibility \
96 --disable-stripping
97 unset PKG_CONFIG
98 unset CPPFLAGS
99 unset CPP
100 unset CFLAGS
101 unset LDFLAGS
102 unset CC
103 unset AR
104 unset BUILD_CPPFLAGS
105 unset BUILD_CPP
106 unset BUILD_CFLAGS
107 unset BUILD_LDFLAGS
108 unset BUILD_CC
109 unset BUILD_AR
111 make -j $threads_n
112 make install
114 export PATH=$PATH_SAVED
115 unset PATH_SAVED
116 unset target_gnu_triple
117 rm -f $pkgs_dir_root/$archive_name
118 rm -Rf $build_dir $pkg_dir