From bd59d70b6a3ef25101096106aa53af94db7ddb6e Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 17 Mar 2019 11:42:34 +0100 Subject: [PATCH] libtalloc: Prevent linking in libbsd needlessly The libtalloc build tries to link in libbsd for strlcpy and strlcat, which is not needed on Android since bionic already has those. See https://github.com/termux/termux-packages/pull/3522. --- packages/libtalloc/build.sh | 1 + packages/libtalloc/lib-replace-wscript.patch | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/libtalloc/build.sh b/packages/libtalloc/build.sh index 0c2f8d2b1..d921c475f 100644 --- a/packages/libtalloc/build.sh +++ b/packages/libtalloc/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://talloc.samba.org/talloc/doc/html/index.html TERMUX_PKG_DESCRIPTION="Hierarchical, reference counted memory pool system with destructors" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_VERSION=2.1.14 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=b185602756a628bac507fa8af8b9df92ace69d27c0add5dab93190ad7c3367ce TERMUX_PKG_SRCURL=https://www.samba.org/ftp/talloc/talloc-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_BUILD_IN_SRC="yes" diff --git a/packages/libtalloc/lib-replace-wscript.patch b/packages/libtalloc/lib-replace-wscript.patch index 910523e8a..a8570d9a8 100644 --- a/packages/libtalloc/lib-replace-wscript.patch +++ b/packages/libtalloc/lib-replace-wscript.patch @@ -1,6 +1,6 @@ -diff -u -r ../talloc-2.1.10/lib/replace/wscript ./lib/replace/wscript ---- ../talloc-2.1.10/lib/replace/wscript 2017-07-02 22:22:14.000000000 +0200 -+++ ./lib/replace/wscript 2017-07-26 15:06:03.665670124 +0200 +diff -u -r ../talloc-2.1.14/lib/replace/wscript ./lib/replace/wscript +--- ../talloc-2.1.14/lib/replace/wscript 2018-07-12 05:51:30.000000000 +0000 ++++ ./lib/replace/wscript 2019-03-17 10:38:26.655881820 +0000 @@ -32,7 +32,7 @@ conf.DEFINE('HAVE_LIBREPLACE', 1) conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) @@ -10,7 +10,7 @@ diff -u -r ../talloc-2.1.10/lib/replace/wscript ./lib/replace/wscript conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h') -@@ -468,9 +468,6 @@ +@@ -551,9 +551,6 @@ conf.CONFIG_SET('HAVE_PTHREAD_MUTEX_CONSISTENT_NP'))): conf.DEFINE('HAVE_ROBUST_MUTEXES', 1) @@ -20,7 +20,15 @@ diff -u -r ../talloc-2.1.10/lib/replace/wscript ./lib/replace/wscript conf.CHECK_VARIABLE('rl_event_hook', define='HAVE_DECL_RL_EVENT_HOOK', always=True, headers='readline.h readline/readline.h readline/history.h') -@@ -685,7 +682,6 @@ +@@ -761,7 +758,6 @@ + break + + extra_libs = '' +- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd' + + bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC', + REPLACE_HOSTCC_SOURCE, +@@ -775,7 +771,6 @@ REPLACE_SOURCE = REPLACE_HOSTCC_SOURCE REPLACE_SOURCE += ' cwrap.c' @@ -28,7 +36,7 @@ diff -u -r ../talloc-2.1.10/lib/replace/wscript ./lib/replace/wscript if not bld.CONFIG_SET('HAVE_DLOPEN'): REPLACE_SOURCE += ' dlfcn.c' if not bld.CONFIG_SET('HAVE_POLL'): REPLACE_SOURCE += ' poll.c' -@@ -712,7 +708,7 @@ +@@ -802,7 +797,7 @@ # at the moment: # hide_symbols=bld.BUILTIN_LIBRARY('replace'), private_library=True,