ncurses: Update patch version
[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 # This is the patch number used for fetching a patch from ftp://invisible-island.net/ncurses/6.0/
5 # in termux_step_post_extract_package below:
6 _MINOR_VERSION=20160910
7 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.${_MINOR_VERSION}
8 TERMUX_PKG_SRCURL=http://ftp.gnu.org/pub/gnu/ncurses/ncurses-${_MAJOR_VERSION}.tar.gz
9 # --without-normal disables static libraries:
10 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"
11 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"
12
13 termux_step_post_extract_package () {
14 cd $TERMUX_PKG_SRCDIR
15 _PATCH_FILENAME=ncurses-${_MAJOR_VERSION}-${_MINOR_VERSION}-patch.sh
16 _PATCHFILE=$TERMUX_PKG_CACHEDIR/$_PATCH_FILENAME
17 test ! -f $_PATCHFILE && curl "ftp://invisible-island.net/ncurses/${_MAJOR_VERSION}/${_PATCH_FILENAME}.bz2" | bunzip2 - > $_PATCHFILE
18 sh $_PATCHFILE
19 }
20
21 termux_step_post_make_install () {
22 cd $TERMUX_PREFIX/lib
23 for lib in form menu ncurses panel; do
24 for file in lib${lib}w.so*; do
25 ln -s -f $file `echo $file | sed 's/w//'`
26 done
27 (cd pkgconfig && ln -s -f ${lib}w.pc `echo $lib | sed 's/w//'`.pc)
28 done
29
30 # Some packages wants this:
31 cd $TERMUX_PREFIX/include/
32 rm -Rf ncursesw
33 mkdir ncursesw
34 cd ncursesw
35 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} .
36
37 if [ `uname` = Darwin ]; then
38 cd $TERMUX_PREFIX/share/terminfo
39 for l in *; do
40 if [ ${#l} -eq 2 ]; then
41 char=`echo 0x$l | /usr/bin/awk '{printf "%c\n", $1}'`
42 rm -Rf $char
43 mv $l $char
44 fi
45 done
46 cd -
47 fi
48 }
49
50 termux_step_post_massage () {
51 cd $TERMUX_PKG_MASSAGEDIR
52 # Strip away 30 years of cruft to decrease size.
53 local TI=./$TERMUX_PREFIX/share/terminfo
54 mv $TI $TERMUX_PKG_TMPDIR/full-terminfo
55 mkdir -p $TI/{a,d,e,n,l,p,r,s,t,v,x}
56 cp $TERMUX_PKG_TMPDIR/full-terminfo/a/ansi $TI/a/
57 cp $TERMUX_PKG_TMPDIR/full-terminfo/d/{dtterm,dumb} $TI/d/
58 cp $TERMUX_PKG_TMPDIR/full-terminfo/e/eterm-color $TI/e/
59 cp $TERMUX_PKG_TMPDIR/full-terminfo/n/nsterm $TI/n/
60 cp $TERMUX_PKG_TMPDIR/full-terminfo/l/linux $TI/l/
61 cp $TERMUX_PKG_TMPDIR/full-terminfo/p/putty{,-256color} $TI/p/
62 cp $TERMUX_PKG_TMPDIR/full-terminfo/r/rxvt{,-256color} $TI/r/
63 cp $TERMUX_PKG_TMPDIR/full-terminfo/s/screen{,2,-256color} $TI/s/
64 cp $TERMUX_PKG_TMPDIR/full-terminfo/t/tmux{,-256color} $TI/t/
65 cp $TERMUX_PKG_TMPDIR/full-terminfo/v/{vt52,vt100,vt102} $TI/v/
66 cp $TERMUX_PKG_TMPDIR/full-terminfo/x/xterm{,-color,-new,-16color,-256color,+256color} $TI/x/
67 }