global: Update from 6.5 to 6.5.2
authorFredrik Fornwall <fredrik@fornwall.net>
Sat, 26 Dec 2015 02:39:56 +0000 (21:39 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Sat, 26 Dec 2015 02:39:56 +0000 (21:39 -0500)
packages/global/build.sh
packages/global/libutil-makepath.c.patch [new file with mode: 0644]

index 0156e70..4719941 100644 (file)
@@ -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 (file)
index 0000000..e911cab
--- /dev/null
@@ -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