summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cpio
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-extended/cpio
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/cpio')
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch29
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/statdef.patch13
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb14
-rw-r--r--meta/recipes-extended/cpio/cpio_v2.inc39
4 files changed, 95 insertions, 0 deletions
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
new file mode 100644
index 0000000000..648c725bba
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
@@ -0,0 +1,29 @@
+# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
+# This is needed to configure correctly with newer versions of autoconf.
+
+diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
+--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
++++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
+@@ -1,4 +1,4 @@
+-# serial 4 -*- Autoconf -*-
++# serial 5 -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+
+ # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+@@ -16,6 +16,7 @@
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
+ # typically due to standards-conformance issues.
++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+ [
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+@@ -48,7 +49,7 @@
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+-])
++])])
+
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
new file mode 100644
index 0000000000..dfa0d9150a
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
@@ -0,0 +1,13 @@
+# Avoid multiple stat definitions
+# Patch taken from cpio mailing list posting 2010-03-19
+
+diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
+--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
+@@ -82,4 +82,6 @@
+ #define lstat stat
+ #endif
+ int lstat ();
++#ifndef stat
+ int stat ();
++#endif
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
new file mode 100644
index 0000000000..be9a64735b
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -0,0 +1,14 @@
+require cpio_v2.inc
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
+
+PR = "r0"
+
+SRC_URI += "file://m4extensions.patch"
+
+SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
+SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
+
+# Required to build with gcc 4.3 and later:
+CFLAGS += "-fgnu89-inline"
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
new file mode 100644
index 0000000000..b571986ef7
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -0,0 +1,39 @@
+DESCRIPTION = "GNU cpio is a program to manage archives of files"
+HOMEPAGE = "http://www.gnu.org/software/cpio/"
+SECTION = "base"
+
+DEPENDS = "texinfo-native"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+ file://statdef.patch \
+ "
+
+inherit autotools gettext
+
+S = "${WORKDIR}/cpio-${PV}"
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}/
+ mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio.${PN}"
+ case ${TARGET_OS} in
+ *-uclibc*) ;;
+ *) mv "${D}${libexecdir}/rmt" "${D}${libexecdir}/rmt.${PN}" ;;
+ esac
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/cpio cpio cpio.${PN} 100
+ if [ -f ${libexecdir}/rmt.${PN} ]
+ then
+ update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 50
+ fi
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove cpio cpio.${PN}
+ if [ -f ${libexecdir}/rmt.${PN} ]
+ then
+ update-alternatives --remove rmt rmt.${PN}
+ fi
+}