diff options
author | Scott Garman <sgarman@zenlinux.com> | 2010-08-16 18:55:33 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 13:04:38 +0100 |
commit | 8927e93ccd188b43354132f94ed8cf34bba729c9 (patch) | |
tree | 928668d84b17ea9a2927070e0e2caba0a4bb6c53 /meta/packages/cpio | |
parent | 7c301b9640f46ab0f9b8a723f4b4eba6d630c7a4 (diff) | |
download | poky-8927e93ccd188b43354132f94ed8cf34bba729c9.tar.gz |
cpio: new recipe v2.8
This is the last GPLv2 version of cpio. The recipe was derived from
OE's v2.5 one.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta/packages/cpio')
-rw-r--r-- | meta/packages/cpio/cpio-2.8/m4extensions.patch | 29 | ||||
-rw-r--r-- | meta/packages/cpio/cpio-2.8/statdef.patch | 13 | ||||
-rw-r--r-- | meta/packages/cpio/cpio_2.8.bb | 14 | ||||
-rw-r--r-- | meta/packages/cpio/cpio_v2.inc | 39 |
4 files changed, 95 insertions, 0 deletions
diff --git a/meta/packages/cpio/cpio-2.8/m4extensions.patch b/meta/packages/cpio/cpio-2.8/m4extensions.patch new file mode 100644 index 0000000000..648c725bba --- /dev/null +++ b/meta/packages/cpio/cpio-2.8/m4extensions.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | # Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. | ||
2 | # This is needed to configure correctly with newer versions of autoconf. | ||
3 | |||
4 | diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4 | ||
5 | --- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700 | ||
6 | +++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700 | ||
7 | @@ -1,4 +1,4 @@ | ||
8 | -# serial 4 -*- Autoconf -*- | ||
9 | +# serial 5 -*- Autoconf -*- | ||
10 | # Enable extensions on systems that normally disable them. | ||
11 | |||
12 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
13 | @@ -16,6 +16,7 @@ | ||
14 | # ------------------------ | ||
15 | # Enable extensions on systems that normally disable them, | ||
16 | # typically due to standards-conformance issues. | ||
17 | +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ | ||
18 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
19 | [ | ||
20 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
21 | @@ -48,7 +49,7 @@ | ||
22 | AC_DEFINE([__EXTENSIONS__]) | ||
23 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
24 | AC_DEFINE([_TANDEM_SOURCE]) | ||
25 | -]) | ||
26 | +])]) | ||
27 | |||
28 | # gl_USE_SYSTEM_EXTENSIONS | ||
29 | # ------------------------ | ||
diff --git a/meta/packages/cpio/cpio-2.8/statdef.patch b/meta/packages/cpio/cpio-2.8/statdef.patch new file mode 100644 index 0000000000..dfa0d9150a --- /dev/null +++ b/meta/packages/cpio/cpio-2.8/statdef.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | # Avoid multiple stat definitions | ||
2 | # Patch taken from cpio mailing list posting 2010-03-19 | ||
3 | |||
4 | diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h | ||
5 | --- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 | ||
6 | +++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 | ||
7 | @@ -82,4 +82,6 @@ | ||
8 | #define lstat stat | ||
9 | #endif | ||
10 | int lstat (); | ||
11 | +#ifndef stat | ||
12 | int stat (); | ||
13 | +#endif | ||
diff --git a/meta/packages/cpio/cpio_2.8.bb b/meta/packages/cpio/cpio_2.8.bb new file mode 100644 index 0000000000..be9a64735b --- /dev/null +++ b/meta/packages/cpio/cpio_2.8.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | require cpio_v2.inc | ||
2 | |||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" | ||
5 | |||
6 | PR = "r0" | ||
7 | |||
8 | SRC_URI += "file://m4extensions.patch" | ||
9 | |||
10 | SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" | ||
11 | SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" | ||
12 | |||
13 | # Required to build with gcc 4.3 and later: | ||
14 | CFLAGS += "-fgnu89-inline" | ||
diff --git a/meta/packages/cpio/cpio_v2.inc b/meta/packages/cpio/cpio_v2.inc new file mode 100644 index 0000000000..b571986ef7 --- /dev/null +++ b/meta/packages/cpio/cpio_v2.inc | |||
@@ -0,0 +1,39 @@ | |||
1 | DESCRIPTION = "GNU cpio is a program to manage archives of files" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/cpio/" | ||
3 | SECTION = "base" | ||
4 | |||
5 | DEPENDS = "texinfo-native" | ||
6 | |||
7 | SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ | ||
8 | file://statdef.patch \ | ||
9 | " | ||
10 | |||
11 | inherit autotools gettext | ||
12 | |||
13 | S = "${WORKDIR}/cpio-${PV}" | ||
14 | |||
15 | do_install () { | ||
16 | autotools_do_install | ||
17 | install -d ${D}${base_bindir}/ | ||
18 | mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio.${PN}" | ||
19 | case ${TARGET_OS} in | ||
20 | *-uclibc*) ;; | ||
21 | *) mv "${D}${libexecdir}/rmt" "${D}${libexecdir}/rmt.${PN}" ;; | ||
22 | esac | ||
23 | } | ||
24 | |||
25 | pkg_postinst_${PN} () { | ||
26 | update-alternatives --install ${base_bindir}/cpio cpio cpio.${PN} 100 | ||
27 | if [ -f ${libexecdir}/rmt.${PN} ] | ||
28 | then | ||
29 | update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 50 | ||
30 | fi | ||
31 | } | ||
32 | |||
33 | pkg_prerm_${PN} () { | ||
34 | update-alternatives --remove cpio cpio.${PN} | ||
35 | if [ -f ${libexecdir}/rmt.${PN} ] | ||
36 | then | ||
37 | update-alternatives --remove rmt rmt.${PN} | ||
38 | fi | ||
39 | } | ||