mc: multple fixes (#2367)
[termux-packages] / packages / ncurses / build.sh
CommitLineData
59f0d218
FF
1TERMUX_PKG_HOMEPAGE=http://invisible-island.net/ncurses/
2TERMUX_PKG_DESCRIPTION="Library for text-based user interfaces in a terminal-independent manner"
78958be8 3TERMUX_PKG_VERSION=6.1.20180331
d02747cf 4TERMUX_PKG_REVISION=1
78958be8 5TERMUX_PKG_SHA256=031337b0f1b7a2b4a0752deb4dde78f5c21a6dd1c3880e2a8da15796767169b7
68e1ebd6 6TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/ncurses-${TERMUX_PKG_VERSION:0:3}-${TERMUX_PKG_VERSION:4}.tgz
59f0d218 7# --without-normal disables static libraries:
707ee7e7 8# --disable-stripping to disable -s argument to install which does not work when cross compiling:
aaff9cad
FF
9TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
10ac_cv_header_locale_h=no
707ee7e7 11--disable-stripping
aaff9cad
FF
12--enable-const
13--enable-ext-colors
14--enable-ext-mouse
15--enable-overwrite
16--enable-pc-files
17--enable-widec
18--mandir=$TERMUX_PREFIX/share/man
19--without-ada
20--without-cxx-binding
21--without-debug
22--without-normal
23--without-static
24--without-tests
25--with-shared
26"
0411bce9 27TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="
1a580cee 28share/man/man1/ncursesw6-config.1*
0411bce9
S
29bin/ncursesw6-config
30"
2e27b20c
FF
31TERMUX_PKG_RM_AFTER_INSTALL="
32bin/captoinfo
33bin/infotocap
1a580cee
FF
34share/man/man1/captoinfo.1*
35share/man/man1/infotocap.1*
36share/man/man5
37share/man/man7
2e27b20c
FF
38"
39
40termux_step_pre_configure() {
41 TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-pkg-config-libdir=$PKG_CONFIG_LIBDIR"
42}
59f0d218 43
59f0d218
FF
44termux_step_post_make_install () {
45 cd $TERMUX_PREFIX/lib
46 for lib in form menu ncurses panel; do
de357946 47 for file in lib${lib}w.so*; do
59f0d218
FF
48 ln -s -f $file `echo $file | sed 's/w//'`
49 done
50 (cd pkgconfig && ln -s -f ${lib}w.pc `echo $lib | sed 's/w//'`.pc)
51 done
d02747cf 52 # some packages want libcurses while building/compiling
53 ln -sf libncurses.so libcurses.so
59f0d218 54
d02747cf 55 # Some packages want these:
aed0f112 56 cd $TERMUX_PREFIX/include/
d02747cf 57 rm -Rf ncurses{,w}
58 mkdir ncurses{,w}
59 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} ncurses
60 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} ncursesw
59f0d218 61}
9ff2bc5d
FF
62
63termux_step_post_massage () {
64 # Strip away 30 years of cruft to decrease size.
86cb8449 65 local TI=$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/terminfo
9ff2bc5d 66 mv $TI $TERMUX_PKG_TMPDIR/full-terminfo
fc19ac86 67 mkdir -p $TI/{a,d,e,n,l,p,r,s,t,v,x}
9ff2bc5d 68 cp $TERMUX_PKG_TMPDIR/full-terminfo/a/ansi $TI/a/
85fba239
FF
69 cp $TERMUX_PKG_TMPDIR/full-terminfo/d/{dtterm,dumb} $TI/d/
70 cp $TERMUX_PKG_TMPDIR/full-terminfo/e/eterm-color $TI/e/
9ff2bc5d
FF
71 cp $TERMUX_PKG_TMPDIR/full-terminfo/n/nsterm $TI/n/
72 cp $TERMUX_PKG_TMPDIR/full-terminfo/l/linux $TI/l/
73 cp $TERMUX_PKG_TMPDIR/full-terminfo/p/putty{,-256color} $TI/p/
74 cp $TERMUX_PKG_TMPDIR/full-terminfo/r/rxvt{,-256color} $TI/r/
75 cp $TERMUX_PKG_TMPDIR/full-terminfo/s/screen{,2,-256color} $TI/s/
fc19ac86 76 cp $TERMUX_PKG_TMPDIR/full-terminfo/t/tmux{,-256color} $TI/t/
9ff2bc5d
FF
77 cp $TERMUX_PKG_TMPDIR/full-terminfo/v/{vt52,vt100,vt102} $TI/v/
78 cp $TERMUX_PKG_TMPDIR/full-terminfo/x/xterm{,-color,-new,-16color,-256color,+256color} $TI/x/
86cb8449
FF
79
80 local RXVT_TAR=$TERMUX_PKG_CACHEDIR/rxvt-unicode-9.22.tar.bz2
9c644283 81 termux_download https://fossies.org/linux/misc/rxvt-unicode-9.22.tar.bz2 \
86cb8449
FF
82 $RXVT_TAR \
83 e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd
84 cd $TERMUX_PKG_TMPDIR
85 local TI_FILE=rxvt-unicode-9.22/doc/etc/rxvt-unicode.terminfo
86 tar xf $RXVT_TAR $TI_FILE
87 tic -x -o $TI $TI_FILE
9ff2bc5d 88}