summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/which
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/which')
-rw-r--r--meta/recipes-extended/which/which-2.18/automake-foreign.patch27
-rw-r--r--meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch53
-rw-r--r--meta/recipes-extended/which/which-2.20/automake.patch10
-rw-r--r--meta/recipes-extended/which/which-2.20/remove-declaration.patch18
-rw-r--r--meta/recipes-extended/which/which_2.18.bb34
-rw-r--r--meta/recipes-extended/which/which_2.20.bb32
6 files changed, 174 insertions, 0 deletions
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
new file mode 100644
index 0000000000..8ab1d028eb
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
@@ -0,0 +1,27 @@
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
diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
new file mode 100644
index 0000000000..fb9b1a4083
--- /dev/null
+++ b/meta/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/meta/recipes-extended/which/which-2.20/automake.patch b/meta/recipes-extended/which/which-2.20/automake.patch
new file mode 100644
index 0000000000..92365dd854
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.20/automake.patch
@@ -0,0 +1,10 @@
1diff --git a/configure.ac b/configure.ac
2index d974461..a20dfa8 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script.
6-AC_INIT(which.c)
7-AM_INIT_AUTOMAKE(which, 2.20)
8+AC_INIT([which],[2.20])
9+AC_CONFIG_SRCDIR(which.c)
10+AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-extended/which/which-2.20/remove-declaration.patch b/meta/recipes-extended/which/which-2.20/remove-declaration.patch
new file mode 100644
index 0000000000..d3340a3530
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.20/remove-declaration.patch
@@ -0,0 +1,18 @@
1Remove the declaration of group_member since it has already been
2declared in unistd.h
3
4Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
5
6Upstream-Status: Inappropriate [embedded specific]
7
8diff -ruN which-2.20-orig/bash.c which-2.20/bash.c
9--- which-2.20-orig/bash.c 2010-08-03 12:59:08.897088878 +0800
10+++ which-2.20/bash.c 2010-08-03 13:17:23.406097212 +0800
11@@ -46,7 +46,6 @@
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 static char* extract_colon_unit (char const* string, int* p_index);
17
18 /*===========================================================================
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
new file mode 100644
index 0000000000..eb6cc9967e
--- /dev/null
+++ b/meta/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
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb
new file mode 100644
index 0000000000..74835543de
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.20.bb
@@ -0,0 +1,32 @@
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 = "GPLv3+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
11 file://which.c;beginline=1;endline=17;md5=a9963693af2272e7a8df6f231164e7a2"
12DEPENDS = "cwautomacros-native"
13
14inherit autotools texinfo update-alternatives
15
16PR = "r3"
17
18EXTRA_OECONF = "--disable-iberty"
19
20SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \
21 file://automake.patch \
22 file://remove-declaration.patch"
23
24SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744"
25SRC_URI[sha256sum] = "d417b65c650d88ad26a208293c1c6e3eb60d4b6d847f01ff8f66aca63e2857f8"
26
27do_configure_prepend() {
28 sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am
29}
30
31ALTERNATIVE_${PN} = "which"
32ALTERNATIVE_PRIORITY = "100"