chiark / gitweb /
mutt: Remove etc/mime.support
[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 _MINOR_VERSION=20170729
5 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.${_MINOR_VERSION}
6 TERMUX_PKG_REVISION=1
7 TERMUX_PKG_SRCURL=http://invisible-mirror.net/archives/ncurses/current/ncurses-${_MAJOR_VERSION}-${_MINOR_VERSION}.tgz
8 TERMUX_PKG_SHA256=eaf15a7bc7aaca35fef7dc0ff04cb0d803b50fe1f9578904ff1a49fb04bdcdb1
9 # --without-normal disables static libraries:
10 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
11 ac_cv_header_locale_h=no
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 "
27 TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="
28 share/man/man1/ncursesw6-config.1*
29 bin/ncursesw6-config
30 "
31 TERMUX_PKG_RM_AFTER_INSTALL="
32 bin/captoinfo
33 bin/infotocap
34 share/man/man1/captoinfo.1*
35 share/man/man1/infotocap.1*
36 share/man/man5
37 share/man/man7
38 "
39
40 termux_step_pre_configure() {
41         TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-pkg-config-libdir=$PKG_CONFIG_LIBDIR"
42 }
43
44 termux_step_post_make_install () {
45         cd $TERMUX_PREFIX/lib
46         for lib in form menu ncurses panel; do
47                 for file in lib${lib}w.so*; do 
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
52
53         # Some packages wants this:
54         cd $TERMUX_PREFIX/include/
55         rm -Rf ncursesw
56         mkdir ncursesw
57         cd ncursesw
58         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} .
59 }
60
61 termux_step_post_massage () {
62         # Strip away 30 years of cruft to decrease size.
63         local TI=$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/share/terminfo
64         mv $TI $TERMUX_PKG_TMPDIR/full-terminfo
65         mkdir -p $TI/{a,d,e,n,l,p,r,s,t,v,x}
66         cp $TERMUX_PKG_TMPDIR/full-terminfo/a/ansi $TI/a/
67         cp $TERMUX_PKG_TMPDIR/full-terminfo/d/{dtterm,dumb} $TI/d/
68         cp $TERMUX_PKG_TMPDIR/full-terminfo/e/eterm-color $TI/e/
69         cp $TERMUX_PKG_TMPDIR/full-terminfo/n/nsterm $TI/n/
70         cp $TERMUX_PKG_TMPDIR/full-terminfo/l/linux $TI/l/
71         cp $TERMUX_PKG_TMPDIR/full-terminfo/p/putty{,-256color} $TI/p/
72         cp $TERMUX_PKG_TMPDIR/full-terminfo/r/rxvt{,-256color} $TI/r/
73         cp $TERMUX_PKG_TMPDIR/full-terminfo/s/screen{,2,-256color} $TI/s/
74         cp $TERMUX_PKG_TMPDIR/full-terminfo/t/tmux{,-256color} $TI/t/
75         cp $TERMUX_PKG_TMPDIR/full-terminfo/v/{vt52,vt100,vt102} $TI/v/
76         cp $TERMUX_PKG_TMPDIR/full-terminfo/x/xterm{,-color,-new,-16color,-256color,+256color} $TI/x/
77
78         local RXVT_TAR=$TERMUX_PKG_CACHEDIR/rxvt-unicode-9.22.tar.bz2
79         termux_download http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.22.tar.bz2 \
80                 $RXVT_TAR \
81                 e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd
82         cd $TERMUX_PKG_TMPDIR
83         local TI_FILE=rxvt-unicode-9.22/doc/etc/rxvt-unicode.terminfo
84         tar xf $RXVT_TAR $TI_FILE
85         tic -x -o $TI $TI_FILE
86 }