summaryrefslogtreecommitdiffstats
path: root/recipes-extended/which
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-02 12:24:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-02 12:30:01 +0000
commit8ba70a1c28a4e0ee73db5308b38abc923b0be44d (patch)
tree0ed9bff8e4bd70766c81dbb559d32781bdd93ce8 /recipes-extended/which
downloadmeta-gplv2-8ba70a1c28a4e0ee73db5308b38abc923b0be44d.tar.gz
Create meta-gplv2 from files from OE-Core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'recipes-extended/which')
-rw-r--r--recipes-extended/which/which-2.18/automake-foreign.patch28
-rw-r--r--recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch53
-rw-r--r--recipes-extended/which/which_2.18.bb34
3 files changed, 115 insertions, 0 deletions
diff --git a/recipes-extended/which/which-2.18/automake-foreign.patch b/recipes-extended/which/which-2.18/automake-foreign.patch
new file mode 100644
index 0000000..495cdc6
--- /dev/null
+++ b/recipes-extended/which/which-2.18/automake-foreign.patch
@@ -0,0 +1,28 @@
1Subject: [PATCH] automake foreign strictness
2
3Use foreign strictness to avoid automake errors.
4
5Upstream-Status: Inappropriate [upstream no longer active]
6
7Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
8---
9 configure.ac | 5 +++--
10 1 files changed, 3 insertions(+), 2 deletions(-)
11
12diff --git a/configure.ac b/configure.ac
13index b30b6f5..bd3222c 100644
14--- a/configure.ac
15+++ b/configure.ac
16@@ -1,6 +1,7 @@
17 dnl Process this file with autoconf to produce a configure script.
18-AC_INIT(which.c)
19-AM_INIT_AUTOMAKE(which, 2.18)
20+AC_INIT([which],[2.18])
21+AC_CONFIG_SRCDIR(which.c)
22+AM_INIT_AUTOMAKE([foreign])
23 AM_CONFIG_HEADER(config.h)
24 AM_MAINTAINER_MODE
25
26--
271.7.1
28
diff --git a/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
new file mode 100644
index 0000000..0e0988b
--- /dev/null
+++ b/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
@@ -0,0 +1,53 @@
1Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific]
2
3# glibc also implements the function group_member. To avoid name conflict,
4# here let us append a "_" to which's version.
5#
6# Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
7# (this patch is licensed under GPLv2)
8
9--- which-2.18/bash.c
10+++ which-2.18/bash.c
11@@ -45,7 +45,12 @@
12 * - changed all occurences of 'gid_t' into 'GID_T'.
13 * - exported functions needed in which.c
14 */
15-static int group_member (GID_T gid);
16+
17+/*
18+ * glibc also implements the function group_member. To avoid name conflict,
19+ * here let us append a "_" to which's version.
20+ */
21+static int _group_member (GID_T gid);
22 static char* extract_colon_unit (char const* string, int *p_index);
23
24 /*===========================================================================
25@@ -200,8 +205,8 @@
26
27 /* From bash-2.05b / general.c / line 805 */
28 /* Return non-zero if GID is one that we have in our groups list. */
29-int
30-group_member (GID_T gid)
31+static int
32+_group_member (GID_T gid)
33 {
34 #if defined (HAVE_GETGROUPS)
35 register int i;
36@@ -290,7 +295,7 @@
37 return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
38
39 /* Otherwise, if we are in the owning group, the group permissions apply. */
40- if (group_member (finfo.st_gid))
41+ if (_group_member (finfo.st_gid))
42 return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
43
44 /* Otherwise, if we are in the other group, the other permissions apply. */
45@@ -331,7 +336,7 @@
46 /* Given a string containing units of information separated by colons,
47 return the next one pointed to by (P_INDEX), or NULL if there are no more.
48 Advance (P_INDEX) to the character after the colon. */
49-char*
50+static char*
51 extract_colon_unit (char const* string, int* p_index)
52 {
53 int i, start, len;
diff --git a/recipes-extended/which/which_2.18.bb b/recipes-extended/which/which_2.18.bb
new file mode 100644
index 0000000..eb6cc99
--- /dev/null
+++ b/recipes-extended/which/which_2.18.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Displays the full path of shell commands"
2DESCRIPTION = "Which is a utility that prints out the full path of the \
3executables that bash(1) would execute when the passed \
4program names would have been entered on the shell prompt. \
5It does this by using the exact same algorithm as bash."
6SECTION = "libs"
7HOMEPAGE = "http://carlo17.home.xs4all.nl/which/"
8
9LICENSE = "GPLv2+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
11
12PR = "r2"
13
14SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \
15 file://fix_name_conflict_group_member.patch \
16 file://automake-foreign.patch \
17"
18
19SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
20SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
21
22DEPENDS = "cwautomacros-native"
23
24inherit autotools texinfo update-alternatives
25
26do_configure_prepend() {
27 OLD="@ACLOCAL_CWFLAGS@"
28 NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4"
29 sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}`
30}
31
32ALTERNATIVE_${PN} = "which"
33ALTERNATIVE_PRIORITY = "100"
34