lynx:use untrusted gcc machine code generator (moved to opt)
[nyanlinux.git] / builders / lynx-2.9.0 / builder.sh
blob324896bef3dc2144c76afafdfc8c655cd916037b
1 src_name=lynx
2 version=${pkg_name##*-}
3 slot=$version
4 # meh
5 archive_name=$src_name-cur.tar.bz2
6 url0=http://invisible-island.net/datafiles/release/$archive_name
8 slot=$version
10 pkg_dir=$pkgs_dir_root/$src_name$version
11 mkdir -p $pkgs_dir_root
12 rm -Rf $pkg_dir
13 cp $src_dir_root/$archive_name $pkgs_dir_root
14 cd $pkgs_dir_root
15 tar xf $archive_name
16 cd $pkg_dir
18 build_dir=$builds_dir_root/$src_name-$version
19 rm -Rf $build_dir
20 mkdir -p $build_dir
21 cd $build_dir
23 PATH_SAVED=$PATH
24 export "PATH=\
25 /opt/toolchains/x64/elf/binutils-gcc/current/bin:\
26 /nyan/make/current/bin:\
27 /nyan/ncurses/current/bin:\
28 $PATH\
30 export CPPFLAGS="\
31 -isystem /nyan/glibc/current/include \
32 -isystem /nyan/linux-headers/current/include \
33 -I/nyan/libressl/current/include \
34 -I/nyan/zlib/current/include \
35 -I/nyan/bzip2/current/include"
36 export CFLAGS='-O2 -pipe -fPIC -static-libgcc'
37 export LDFLAGS="\
38 -B/nyan/glibc/current/lib \
39 -L/nyan/glibc/current/lib \
40 -Wl,-rpath-link,/nyan/glibc/current/lib \
41 -L/nyan/libressl/current/lib \
42 -L/nyan/zlib/current/lib \
43 -L/nyan/bzip2/current/lib \
44 -Wl,-s \
45 -static-libgcc"
46 export CC=gcc
47 export AR=ar
48 export LIBS=-lpthread
49 # --disable-trace is broken
50 $pkg_dir/configure \
51 --prefix=/nyan/$src_name/$slot \
52 --disable-debug \
53 --enable-trace \
54 --disable-nls \
55 --disable-full-paths \
56 --with-ssl \
57 --without-pkg-config \
58 --enable-ipv6 \
59 --with-screen=ncurses \
60 --enable-widec \
61 --enable-htmlized-cfg \
62 --disable-local-docs \
63 --disable-bibp-urls \
64 --disable-menu-options \
65 --disable-sessions \
66 --disable-session-cache \
67 --enable-japanese-utf8 \
68 --enable-wcwidth-support \
69 --enable-default-colors \
70 --enable-nested-tables \
71 --disable-idna \
72 --disable-partial \
73 --disable-scrollbar \
74 --enable-charset-choice \
75 --enable-externs \
76 --disable-nsl-fork \
77 --with-bzlib \
78 --with-zlib \
79 --disable-finger \
80 --disable-gopher \
81 --disable-news \
82 --disable-dired \
83 --without-x \
84 --disable-rpath-hack
85 unset CPPFLAGS
86 unset CFLAGS
87 unset LDFLAGS
88 unset CC
89 unset AR
90 unset LIBS
92 make -j $threads_n
93 make install
95 rm -Rf /nyan/$src_name/$slot/share
97 export PATH=$PATH_SAVED
98 unset PATH_SAVED
99 rm -f $pkgs_dir_root/$archive_name
100 rm -Rf $build_dir $pkg_dir