cpio: update 2.5 to 2.11
authorScott Garman <sgarman@zenlinux.com>
Mon, 11 Oct 2010 07:50:10 +0000 (07:50 +0000)
committerKhem Raj <raj.khem@gmail.com>
Thu, 14 Oct 2010 04:30:26 +0000 (21:30 -0700)
Signed-off-by: Scott Garman <sgarman@zenlinux.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/cpio/cpio-2.11/statdef.patch [new file with mode: 0644]
recipes/cpio/cpio_2.11.bb [new file with mode: 0644]
recipes/cpio/cpio_2.5.bb [deleted file]
recipes/cpio/files/install.patch [deleted file]

diff --git a/recipes/cpio/cpio-2.11/statdef.patch b/recipes/cpio/cpio-2.11/statdef.patch
new file mode 100644 (file)
index 0000000..c3117c9
--- /dev/null
@@ -0,0 +1,16 @@
+# Avoid multiple stat definitions
+# Patch written by Naohiro Aota, taken from cpio mailing list:
+# http://lists.gnu.org/archive/html/bug-cpio/2010-03/msg00005.html
+#
+# Signed-off-by: Scott Garman <sgarman@zenlinux.com>
+
+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/recipes/cpio/cpio_2.11.bb b/recipes/cpio/cpio_2.11.bb
new file mode 100644 (file)
index 0000000..42b3676
--- /dev/null
@@ -0,0 +1,42 @@
+DESCRIPTION = "GNU cpio is a program to manage archives of files."
+HOMEPAGE = "http://www.gnu.org/software/cpio/"
+SECTION = "console"
+LICENSE = "GPLv3"
+PR = "r0"
+
+DEPENDS = "texinfo-native"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+           file://statdef.patch \
+          "
+
+SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
+SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
+
+inherit autotools gettext
+
+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
+}
diff --git a/recipes/cpio/cpio_2.5.bb b/recipes/cpio/cpio_2.5.bb
deleted file mode 100644 (file)
index b4504ba..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-DESCRIPTION = "GNU cpio is a program to manage archives of files."
-HOMEPAGE = "http://www.gnu.org/software/cpio/"
-SECTION = "console"
-LICENSE = "GPL"
-PR = "r5"
-
-DEPENDS += " texinfo-native "
-
-SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
-          file://install.patch"
-S = "${WORKDIR}/cpio-${PV}"
-
-inherit autotools
-
-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
-}
-
-SRC_URI[md5sum] = "e02859af1bbbbd73fcbf757acb57e0a4"
-SRC_URI[sha256sum] = "dbf79293d0cafa7d7a3a266c2b0b90c00d556e7b3185d4243c74153291da24c8"
diff --git a/recipes/cpio/files/install.patch b/recipes/cpio/files/install.patch
deleted file mode 100644 (file)
index 3554156..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- cpio-2.5/Makefile.in~install.patch
-+++ cpio-2.5/Makefile.in
-@@ -70,6 +70,7 @@
- # Prefix for each installed man page, normally empty or `g'.
- manprefix = 
-+DESTDIR =
- # Where to install the cpio and mt executables.
- bindir = @bindir@
-@@ -123,19 +124,19 @@
-       $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
- install:: installdirs all $(srcdir)/cpio.1 $(srcdir)/mt.1
--      $(INSTALL_PROGRAM) cpio $(bindir)/$(binprefix)cpio
--      test ! -f mt || $(INSTALL_PROGRAM) mt $(bindir)/$(binprefix)mt
--      -test ! -f rmt || $(INSTALL_PROGRAM) rmt $(libexecdir)/rmt
--      -$(INSTALL_DATA) $(srcdir)/cpio.1 $(mandir)/$(manprefix)cpio.$(manext)
--      -test ! -f mt || $(INSTALL_DATA) $(srcdir)/mt.1 $(mandir)/$(manprefix)mt.$(manext)
-+      $(INSTALL_PROGRAM) -D cpio $(DESTDIR)$(bindir)/$(binprefix)cpio
-+      test ! -f mt || $(INSTALL_PROGRAM) -D mt $(DESTDIR)$(bindir)/$(binprefix)mt
-+      -test ! -f rmt || $(INSTALL_PROGRAM) -D rmt $(DESTDIR)$(libexecdir)/rmt
-+      -$(INSTALL_DATA) -D $(srcdir)/cpio.1 $(DESTDIR)$(mandir)/$(manprefix)cpio.$(manext)
-+      -test ! -f mt || $(INSTALL_DATA) -D $(srcdir)/mt.1 $(DESTDIR)$(mandir)/$(manprefix)mt.$(manext)
- installdirs:
--      $(srcdir)/mkinstalldirs $(bindir) $(libexecdir) $(mandir) $(infodir)
-+      $(srcdir)/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(libexecdir) $(DESTDIR)/$(mandir) $(DESTDIR)/$(infodir)
- uninstall::
--      cd $(bindir); rm -f $(binprefix)cpio $(binprefix)mt
--      -rm -f $(libexecdir)/rmt
--      cd $(mandir); rm -f $(manprefix)cpio.$(manext) $(manprefix)mt.$(manext)
-+      cd $(DESTDIR)$(bindir); rm -f $(binprefix)cpio $(binprefix)mt
-+      -rm -f $(DESTDIR)$(libexecdir)/rmt
-+      cd $(DESTDIR)$(mandir); rm -f $(manprefix)cpio.$(manext) $(manprefix)mt.$(manext)
- check:
-       @echo No tests are supplied.
-@@ -186,14 +187,14 @@
- install-info: $(INFO_DEPS)
-       for file in *.info*; do \
--        $(INSTALL_DATA) $$file $(infodir)/$$file; \
-+        $(INSTALL_DATA) -D $$file $(DESTDIR)$(infodir)/$$file; \
-       done
- uninstall:: uninstall-info
- uninstall-info:
-       for file in *.info*; do \
--        rm -f $(infodir)/$$file; \
-+        rm -f $(DESTDIR)$(infodir)/$$file; \
-       done
- clean: