| 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_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 | if [ `uname` = Darwin ]; then |
| 31 | cd $TERMUX_PREFIX/share/terminfo |
| 32 | for l in *; do |
| 33 | if [ ${#l} -eq 2 ]; then |
| 34 | char=`echo 0x$l | awk '{printf "%c\n", $1}'` |
| 35 | rm -Rf $char |
| 36 | mv $l $char |
| 37 | fi |
| 38 | done |
| 39 | cd - |
| 40 | fi |
| 41 | } |