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>
This commit is contained in:
Scott Garman 2010-08-16 18:55:33 -07:00 committed by Richard Purdie
parent 7c301b9640
commit 8927e93ccd
4 changed files with 95 additions and 0 deletions

View File

@ -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
# ------------------------

View File

@ -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

View File

@ -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"

View File

@ -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
}