summaryrefslogtreecommitdiff
path: root/data/ncurses/make.sh
blob: 88ca3622f6c25606196410f77ab87bbadc0cb651 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
shopt -s extglob
pkg:setup
cd ..
dir=$(echo *)
mkdir bld-ncurses{,w}
cd bld-ncurses
flags='--with-shared --without-normal --without-debug --enable-sigwinch --disable-mixed-case --enable-termcap'
PKG_CONF=../${dir}/configure pkg:configure ${flags}
make #CFLAGS='-O2 -mthumb'
pkg:install
cd ../bld-ncursesw
PKG_CONF=../${dir}/configure pkg:configure ${flags} --disable-overwrite --enable-widec
make #CFLAGS='-O2 -mthumb'
pkg:install

pkg: mkdir -p @/usr/lib
pkg: cp -aL /usr/lib/libcurses.dylib @/usr/lib/libcurses.dylib
pkg: cp -aL /usr/lib/libncurses.dylib @/usr/lib/libncurses.dylib

pkg: mkdir -p /usr/lib/_ncurses
pkg: mv /usr/lib/lib{,n}curses.dylib /usr/lib/_ncurses/
pkg: rm -f /usr/lib/*.a

for ti in "${PKG_DEST}"/usr/share/terminfo/*/*; do
    if [[ ${ti} == */@(?(pc)ansi|cons25|cygwin|dumb|linux|mach|rxvt|screen|sun|vt@(52|100|102|220)|swvt25?(m)|[Exe]term|putty|konsole|gnome|apple|Apple_Terminal|unknown)?([-+.]*) ]]; then
        echo "keeping terminfo: ${ti}"
    else
        rm -f "${ti}"
    fi
done

rmdir --ignore-fail-on-non-empty "${PKG_DEST}"/usr/share/terminfo/*

for ti in "${PKG_DEST}"/usr/share/terminfo/*; do
    ln -Tsf "${ti##*/}" "${PKG_DEST}"/usr/share/terminfo/"$(printf "%02x" "'${ti##*/}")"
done