termux-packages/packages/mc/build.sh

30 lines
1.1 KiB
Bash
Raw Normal View History

2015-06-13 01:03:31 +02:00
TERMUX_PKG_HOMEPAGE=https://www.midnight-commander.org/
2015-07-04 14:56:17 +02:00
TERMUX_PKG_DESCRIPTION="Midnight Commander - a powerful file manager"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="GPL-2.0"
2019-01-03 02:32:24 +01:00
TERMUX_PKG_VERSION=4.8.22
2019-01-27 17:06:55 +01:00
TERMUX_PKG_REVISION=1
2019-01-03 02:32:24 +01:00
TERMUX_PKG_SHA256=ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318
2017-11-26 23:15:39 +01:00
TERMUX_PKG_SRCURL=http://ftp.midnight-commander.org/mc-${TERMUX_PKG_VERSION}.tar.xz
2019-01-03 03:50:25 +01:00
TERMUX_PKG_DEPENDS="libandroid-support, ncurses, glib, openssl, libssh2"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
2019-01-03 03:50:25 +01:00
ac_cv_lib_util_openpty=no
ac_cv_path_PERL=$TERMUX_PREFIX/bin/perl
ac_cv_path_PYTHON=$TERMUX_PREFIX/bin/python
ac_cv_path_RUBY=$TERMUX_PREFIX/bin/ruby
2019-01-03 03:50:25 +01:00
ac_cv_path_UNZIP=$TERMUX_PREFIX/bin/unzip
ac_cv_path_ZIP=$TERMUX_PREFIX/bin/zip
--with-ncurses-includes=$TERMUX_PREFIX/include
--with-ncurses-libs=$TERMUX_PREFIX/lib
--with-screen=ncurses
"
Add fixes for debug builds (#2296) * build-package.sh: add possibility for debug patches and TERMUX_PKG_HAS_DEBUG Setting TERMUX_PKG_HAS_DEBUG=no disables attempt to build debug build of package. Useful for example if a debug build doesn't make sense, as for python-packages and texlive. * aapt: skip D_FORTIFY_SOURCE=2 for libandroid-cutils when doing debug build * lftp: skip D_FORTIFY_SOURCE=2 for debug build * libflac: don't use -g3 for debug build Configure script removes it otherwise. * nano: skip -D_FORTIFY_SOURCE=2 for debug build * vifm: skip -D_FORTIFY_SOURCE=2 for debug build * mc: skip -D_FORTIFY_SOURCE=2 for debug build * dropbear: add __attribute__((overloadable)) to XMEMSET and XMEMCPY if debug * gdb: add __attribute__((overloadable)) to strchr if debug * gnuit: add __attribute__((overloadable)) to strchr and strcpy if debug * gperf: add __attribute__((overloadable)) to strlen if debug * inetutils: add __attribute__((overloadable)) to strrchr and strchr if debug * readline: add __attribute__((overloadable)) to strchr if debug * tsocks: add __attribute__((overloadable)) to poll if debug * units: add __attribute__((overloadable)) to strchr if debug * liblua: fix bug in loslib.c that emerged in debug build Use strncpy instead of strcpy. Original error message: loslib.c:169:3: error: 'strcpy' called with string bigger than buffer lua_tmpnam(buff, err); ^ loslib.c:122:37: note: expanded from macro 'lua_tmpnam' strcpy(b, LUA_TMPNAMTEMPLATE); \ ^ * alpine: include our getpass.h in imap's mtest.c to declare getpass Debug build complained about the previous implicit declaration. * nginx: use --with-debug instead of --debug * cboard: skip -D_FORTIFY_SOURCE=2 for debug build * gettext: add __attribute__((overloadable)) to getcwd if debug * oathtool: skip -D_FORTIFY_SOURCE=2 for debug build * php: add __attribute__((overloadable)) to strlcpy and strlcat if debug * expect: add __attribute__((overloadable)) to strchr if debug * texlive: set TERMUX_PKG_HAS_DEBUG=no * asciinema: set TERMUX_PKG_HAS_DEBUG=no * libllvm: set TERMUX_PKG_HAS_DEBUG=no Debug build fails with: home/builder/.termux-build/libllvm/src/lib/Support/Unix/Path.inc:740:19: error: no matching function for call to 'RetryAfterSignal' if ((ResultFD = sys::RetryAfterSignal(-1, open, P.begin(), OpenFlags)) < 0) * build-package.sh: set TERMUX_PKG_REPLACES=package if debug build Hopefully allows us to install debug packages without breaking dependecies. Should be looked over and be made more similar to how debian does this in any case * Update build.sh
2018-06-13 02:12:36 +02:00
termux_step_pre_configure() {
if [ "$TERMUX_DEBUG" == "true" ]; then
# Debug build fails with:
# /home/builder/.termux-build/mc/src/src/filemanager/file.c:2019:37: error: 'umask' called with invalid mode
# src_mode = umask (-1);
2019-02-09 12:16:54 +01:00
# ^
Add fixes for debug builds (#2296) * build-package.sh: add possibility for debug patches and TERMUX_PKG_HAS_DEBUG Setting TERMUX_PKG_HAS_DEBUG=no disables attempt to build debug build of package. Useful for example if a debug build doesn't make sense, as for python-packages and texlive. * aapt: skip D_FORTIFY_SOURCE=2 for libandroid-cutils when doing debug build * lftp: skip D_FORTIFY_SOURCE=2 for debug build * libflac: don't use -g3 for debug build Configure script removes it otherwise. * nano: skip -D_FORTIFY_SOURCE=2 for debug build * vifm: skip -D_FORTIFY_SOURCE=2 for debug build * mc: skip -D_FORTIFY_SOURCE=2 for debug build * dropbear: add __attribute__((overloadable)) to XMEMSET and XMEMCPY if debug * gdb: add __attribute__((overloadable)) to strchr if debug * gnuit: add __attribute__((overloadable)) to strchr and strcpy if debug * gperf: add __attribute__((overloadable)) to strlen if debug * inetutils: add __attribute__((overloadable)) to strrchr and strchr if debug * readline: add __attribute__((overloadable)) to strchr if debug * tsocks: add __attribute__((overloadable)) to poll if debug * units: add __attribute__((overloadable)) to strchr if debug * liblua: fix bug in loslib.c that emerged in debug build Use strncpy instead of strcpy. Original error message: loslib.c:169:3: error: 'strcpy' called with string bigger than buffer lua_tmpnam(buff, err); ^ loslib.c:122:37: note: expanded from macro 'lua_tmpnam' strcpy(b, LUA_TMPNAMTEMPLATE); \ ^ * alpine: include our getpass.h in imap's mtest.c to declare getpass Debug build complained about the previous implicit declaration. * nginx: use --with-debug instead of --debug * cboard: skip -D_FORTIFY_SOURCE=2 for debug build * gettext: add __attribute__((overloadable)) to getcwd if debug * oathtool: skip -D_FORTIFY_SOURCE=2 for debug build * php: add __attribute__((overloadable)) to strlcpy and strlcat if debug * expect: add __attribute__((overloadable)) to strchr if debug * texlive: set TERMUX_PKG_HAS_DEBUG=no * asciinema: set TERMUX_PKG_HAS_DEBUG=no * libllvm: set TERMUX_PKG_HAS_DEBUG=no Debug build fails with: home/builder/.termux-build/libllvm/src/lib/Support/Unix/Path.inc:740:19: error: no matching function for call to 'RetryAfterSignal' if ((ResultFD = sys::RetryAfterSignal(-1, open, P.begin(), OpenFlags)) < 0) * build-package.sh: set TERMUX_PKG_REPLACES=package if debug build Hopefully allows us to install debug packages without breaking dependecies. Should be looked over and be made more similar to how debian does this in any case * Update build.sh
2018-06-13 02:12:36 +02:00
export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
fi
}