TERMUX_PKG_HOMEPAGE=https://nmap.org/
TERMUX_PKG_DESCRIPTION="Utility for network discovery and security auditing"
TERMUX_PKG_VERSION=7.40
+TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://nmap.org/dist/nmap-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=9e14665fffd054554d129d62c13ad95a7b5c7a046daa2290501909e65f4d3188
# Depend on netcat so that it gets installed automatically when installing
--- /dev/null
+diff -u -r ../nmap-7.40/ncat/ncat_main.c ./ncat/ncat_main.c
+--- ../nmap-7.40/ncat/ncat_main.c 2016-12-14 01:12:23.000000000 +0100
++++ ./ncat/ncat_main.c 2017-02-17 11:46:27.468844181 +0100
+@@ -965,8 +965,8 @@
+
+ #ifndef WIN32
+ /* See if the shell is executable before we get deep into this */
+- if (o.execmode == EXEC_SHELL && access("/bin/sh", X_OK) == -1)
+- bye("/bin/sh is not executable, so `-c' won't work.");
++ if (o.execmode == EXEC_SHELL && access("@TERMUX_PREFIX@/bin/sh", X_OK) == -1)
++ bye("@TERMUX_PREFIX@/bin/sh is not executable, so `-c' won't work.");
+ #endif
+
+ if (targetss.storage.ss_family != AF_UNSPEC) {
+diff -u -r ../nmap-7.40/ncat/ncat_posix.c ./ncat/ncat_posix.c
+--- ../nmap-7.40/ncat/ncat_posix.c 2016-12-14 01:12:23.000000000 +0100
++++ ./ncat/ncat_posix.c 2017-02-17 11:47:09.716313620 +0100
+@@ -239,7 +239,7 @@
+ char **cmdargs;
+
+ case EXEC_SHELL:
+- execl("/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
++ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
+ break;
+ #ifdef HAVE_LUA
+ case EXEC_LUA: