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