23dc2572e8d61c1f119a5f64993f030b431cac4f
[termux-packages] / packages / ncurses / build.sh
1 TERMUX_PKG_HOMEPAGE=http://invisible-island.net/ncurses/
2 TERMUX_PKG_DESCRIPTION="Library for text-based user interfaces in a terminal-independent manner"
3 _MAJOR_VERSION=6.0
4 _MINOR_VERSION=20170114
5 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.${_MINOR_VERSION}
6 TERMUX_PKG_SRCURL=ftp://invisible-island.net/ncurses/current/ncurses-${_MAJOR_VERSION}-${_MINOR_VERSION}.tgz
7 # --without-normal disables static libraries:
8 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-overwrite --enable-const --without-cxx-binding --without-normal --without-static --with-shared --without-debug --enable-widec --enable-ext-colors --enable-ext-mouse --enable-pc-files --with-pkg-config-libdir=$PKG_CONFIG_LIBDIR --without-ada --without-tests --mandir=$TERMUX_PREFIX/share/man ac_cv_header_locale_h=no"
9 TERMUX_PKG_RM_AFTER_INSTALL="bin/ncursesw6-config share/man/man1/ncursesw6-config.1 bin/infotocap share/man/man1/infotocap.1m bin/captoinfo share/man/man1/captoinfo.1m"
10
11 termux_step_post_make_install () {
12 cd $TERMUX_PREFIX/lib
13 for lib in form menu ncurses panel; do
14 for file in lib${lib}w.so*; do
15 ln -s -f $file `echo $file | sed 's/w//'`
16 done
17 (cd pkgconfig && ln -s -f ${lib}w.pc `echo $lib | sed 's/w//'`.pc)
18 done
19
20 # Some packages wants this:
21 cd $TERMUX_PREFIX/include/
22 rm -Rf ncursesw
23 mkdir ncursesw
24 cd ncursesw
25 ln -s ../{ncurses.h,termcap.h,panel.h,unctrl.h,menu.h,form.h,tic.h,nc_tparm.h,term.h,eti.h,term_entry.h,ncurses_dll.h,curses.h} .
26
27 if [ `uname` = Darwin ]; then
28 cd $TERMUX_PREFIX/share/terminfo
29 for l in *; do
30 if [ ${#l} -eq 2 ]; then
31 char=`echo 0x$l | /usr/bin/awk '{printf "%c\n", $1}'`
32 rm -Rf $char
33 mv $l $char
34 fi
35 done
36 cd -
37 fi
38 }
39
40 termux_step_post_massage () {
41 cd $TERMUX_PKG_MASSAGEDIR
42 # Strip away 30 years of cruft to decrease size.
43 local TI=./$TERMUX_PREFIX/share/terminfo
44 mv $TI $TERMUX_PKG_TMPDIR/full-terminfo
45 mkdir -p $TI/{a,d,e,n,l,p,r,s,t,v,x}
46 cp $TERMUX_PKG_TMPDIR/full-terminfo/a/ansi $TI/a/
47 cp $TERMUX_PKG_TMPDIR/full-terminfo/d/{dtterm,dumb} $TI/d/
48 cp $TERMUX_PKG_TMPDIR/full-terminfo/e/eterm-color $TI/e/
49 cp $TERMUX_PKG_TMPDIR/full-terminfo/n/nsterm $TI/n/
50 cp $TERMUX_PKG_TMPDIR/full-terminfo/l/linux $TI/l/
51 cp $TERMUX_PKG_TMPDIR/full-terminfo/p/putty{,-256color} $TI/p/
52 cp $TERMUX_PKG_TMPDIR/full-terminfo/r/rxvt{,-256color} $TI/r/
53 cp $TERMUX_PKG_TMPDIR/full-terminfo/s/screen{,2,-256color} $TI/s/
54 cp $TERMUX_PKG_TMPDIR/full-terminfo/t/tmux{,-256color} $TI/t/
55 cp $TERMUX_PKG_TMPDIR/full-terminfo/v/{vt52,vt100,vt102} $TI/v/
56 cp $TERMUX_PKG_TMPDIR/full-terminfo/x/xterm{,-color,-new,-16color,-256color,+256color} $TI/x/
57 }