From 8927e93ccd188b43354132f94ed8cf34bba729c9 Mon Sep 17 00:00:00 2001 From: Scott Garman Date: Mon, 16 Aug 2010 18:55:33 -0700 Subject: 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 --- meta/packages/cpio/cpio-2.8/m4extensions.patch | 29 +++++++++++++++++++ meta/packages/cpio/cpio-2.8/statdef.patch | 13 +++++++++ meta/packages/cpio/cpio_2.8.bb | 14 +++++++++ meta/packages/cpio/cpio_v2.inc | 39 ++++++++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 meta/packages/cpio/cpio-2.8/m4extensions.patch create mode 100644 meta/packages/cpio/cpio-2.8/statdef.patch create mode 100644 meta/packages/cpio/cpio_2.8.bb create mode 100644 meta/packages/cpio/cpio_v2.inc 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 @@ +# 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/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 @@ +# 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/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 @@ +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/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 @@ +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 +} -- cgit v1.2.3