| 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} |
| 8 | TERMUX_PKG_BUILD_REVISION=1 |
| 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 | |
| 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 | |
| 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 | } |