From 03658e133fe92e9de42702ba3f230df5c85428a2 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 25 Dec 2015 21:39:56 -0500 Subject: [PATCH] global: Update from 6.5 to 6.5.2 --- packages/global/build.sh | 2 +- packages/global/libutil-makepath.c.patch | 45 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 packages/global/libutil-makepath.c.patch diff --git a/packages/global/build.sh b/packages/global/build.sh index 0156e70d..47199414 100644 --- a/packages/global/build.sh +++ b/packages/global/build.sh @@ -1,6 +1,6 @@ TERMUX_PKG_HOMEPAGE="http://www.gnu.org/software/global/global.html" TERMUX_PKG_DESCRIPTION="GNU global source code tag system that works the same way across diverse environments" -TERMUX_PKG_VERSION=6.5 +TERMUX_PKG_VERSION=6.5.2 TERMUX_PKG_SRCURL=http://tamacom.com/global/global-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-posix-sort=$TERMUX_PREFIX/bin/sort" # coreutils provides the posix sort executable: diff --git a/packages/global/libutil-makepath.c.patch b/packages/global/libutil-makepath.c.patch new file mode 100644 index 00000000..e911caba --- /dev/null +++ b/packages/global/libutil-makepath.c.patch @@ -0,0 +1,45 @@ +diff -u -r ../global-6.5.2/libutil/makepath.c ./libutil/makepath.c +--- ../global-6.5.2/libutil/makepath.c 2015-12-16 00:02:48.000000000 -0500 ++++ ./libutil/makepath.c 2015-12-25 21:36:31.333892462 -0500 +@@ -122,6 +122,9 @@ + * ~/dir/... + */ + if (*++file == '/') { ++#ifdef __ANDROID__ ++ return makepath("@TERMUX_HOME@", file, NULL); ++#else + uid_t uid; + file++; + uid = getuid(); +@@ -129,11 +132,15 @@ + if (pw->pw_uid == uid) + break; + } ++#endif + } + /* + * ~user/dir/... + */ + else { ++#ifdef __ANDROID__ ++ pw = NULL; ++#else + const char *name = strmake(file, "/"); + file = locatestring(file, "/", MATCH_FIRST); + if (file != NULL) +@@ -144,12 +151,15 @@ + if (!strcmp(pw->pw_name, name)) + break; + } ++#endif + } + if (errno) + die("cannot open passwd file. (errno = %d)", errno); + if (pw == NULL) + die("home directory not found."); ++#ifndef __ANDROID__ + endpwent(); ++#endif + return makepath(pw->pw_dir, file, NULL); + /* + * absolute path -- 2.11.0