]> git.armaanb.net Git - asd-repo.git/blob - core/ncurses/build
ncurses, dvtm: reduce size of terminfo db
[asd-repo.git] / core / ncurses / build
1 #!/bin/sh -e
2
3 ./configure \
4     --prefix=/usr \
5     --mandir=/usr/share/man \
6     --enable-pc-files \
7     --disable-rpath-hack \
8     --with-pkg-config-libdir=/usr/lib/pkgconfig \
9     --with-shared \
10     --enable-widec \
11     --without-ada \
12     --without-tests \
13     --without-debug \
14     --without-cxx-binding \
15     --with-fallbacks=xterm,xterm-256color,dvtm,dvtm-256color,ansi,vt100,vt220
16
17 make
18 make DESTDIR="$1" install
19
20 # Force ncurses to link against wide-character ncurses library.
21 for lib in ncurses form panel menu; do
22     rm -f "$1/usr/lib/lib${lib}.so"
23     printf '%s\n' "INPUT(-l${lib}w)" > "$1/usr/lib/lib${lib}.so"
24     chmod 755 "$1/usr/lib/lib${lib}.so"
25     ln -sf "lib${lib}w.a" "$1/usr/lib/lib${lib}.a"
26 done
27
28 # Some packages look for libcurses instead of libncurses when building.
29 printf '%s\n' "INPUT(-lncursesw)" > "$1/usr/lib/libcursesw.so"
30 ln -s libncurses.so "$1/usr/lib/libcurses.so"
31
32 # Fix pkgconfig file.
33 ln -s ncursesw.pc "$1/usr/lib/pkgconfig/ncurses.pc"
34
35 rm -rf \
36     "$1/usr/share/terminfo" \
37     "$1/usr/bin/clear" \
38     "$1/usr/bin/reset"
39