[oe-commits] org.oe.oz354x coreutils: added 5.3.0 from .dev, dropped older

hrw commit openembedded-commits at lists.openembedded.org
Sun Jan 7 16:21:31 UTC 2007


coreutils: added 5.3.0 from .dev, dropped older

Author: hrw at openembedded.org
Branch: org.openembedded.oz354x
Revision: 2b607ac40e25eb2db7aaad2d5d268590884ba693
ViewMTN: http://monotone.openembedded.org/revision.psp?id=2b607ac40e25eb2db7aaad2d5d268590884ba693
Files:
1
packages/coreutils/coreutils-5.0
packages/coreutils/coreutils-5.0/configure.patch
packages/coreutils/coreutils-5.0/malloc.patch
packages/coreutils/coreutils-5.1.3
packages/coreutils/coreutils-5.1.3/install-cross.patch
packages/coreutils/coreutils-5.1.3/man.patch
packages/coreutils/coreutils-native_5.1.3.bb
packages/coreutils/coreutils_5.0.bb
packages/coreutils/coreutils_5.1.1.bb
packages/coreutils/coreutils_5.1.3.bb
packages/coreutils/coreutils-5.3.0
packages/coreutils/coreutils-5.3.0/install-cross.patch
packages/coreutils/coreutils-5.3.0/man.patch
packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch
packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch
packages/coreutils/coreutils-native_5.3.0.bb
packages/coreutils/coreutils.inc
packages/coreutils/coreutils_5.3.0.bb
Diffs:

#
# mt diff -rece43327650e145c561e353cf8c167b3fe56b710 -r2b607ac40e25eb2db7aaad2d5d268590884ba693
#
# 
# 
# delete "packages/coreutils/coreutils-5.0"
# 
# delete "packages/coreutils/coreutils-5.0/configure.patch"
# 
# delete "packages/coreutils/coreutils-5.0/malloc.patch"
# 
# delete "packages/coreutils/coreutils-5.1.3"
# 
# delete "packages/coreutils/coreutils-5.1.3/install-cross.patch"
# 
# delete "packages/coreutils/coreutils-5.1.3/man.patch"
# 
# delete "packages/coreutils/coreutils-native_5.1.3.bb"
# 
# delete "packages/coreutils/coreutils_5.0.bb"
# 
# delete "packages/coreutils/coreutils_5.1.1.bb"
# 
# delete "packages/coreutils/coreutils_5.1.3.bb"
# 
# add_dir "packages/coreutils/coreutils-5.3.0"
# 
# add_file "packages/coreutils/coreutils-5.3.0/install-cross.patch"
#  content [8a754932418be3c0acbd71b819d2423e84288aef]
# 
# add_file "packages/coreutils/coreutils-5.3.0/man.patch"
#  content [ff9a0d70eeec7f93c6cb9393b93f49dbe419d614]
# 
# add_file "packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch"
#  content [295474bdf81629c67d4bfe9f144ffd637c886e56]
# 
# add_file "packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch"
#  content [0a6a6c59fa7945fdb5223281929cbdcc499df660]
# 
# add_file "packages/coreutils/coreutils-native_5.3.0.bb"
#  content [6404ab2a1ae4487b3b190cd9efa252a23403c068]
# 
# add_file "packages/coreutils/coreutils.inc"
#  content [59ffecbe1e3e7c1ae9e2a110bb0cf6489f035a18]
# 
# add_file "packages/coreutils/coreutils_5.3.0.bb"
#  content [e3c222c8a27658bb6f3092680fe67a444fd60c47]
# 
============================================================
--- packages/coreutils/coreutils-5.3.0/install-cross.patch	8a754932418be3c0acbd71b819d2423e84288aef
+++ packages/coreutils/coreutils-5.3.0/install-cross.patch	8a754932418be3c0acbd71b819d2423e84288aef
@@ -0,0 +1,27 @@
+--- src/install.c~	2003-08-09 18:46:45.000000000 +0100
++++ src/install.c	2004-03-27 18:38:45.000000000 +0000
+@@ -516,7 +516,14 @@
+ strip (const char *path)
+ {
+   int status;
+-  pid_t pid = fork ();
++  pid_t pid;
++  char *strip_name;
++
++  strip_name = getenv ("STRIP");
++  if (strip_name == NULL)
++    strip_name = "strip";
++
++  pid = fork ();
+ 
+   switch (pid)
+     {
+@@ -524,7 +531,7 @@
+       error (EXIT_FAILURE, errno, _("fork system call failed"));
+       break;
+     case 0:			/* Child. */
+-      execlp ("strip", "strip", path, NULL);
++      execlp (strip_name, "strip", path, NULL);
+       error (EXIT_FAILURE, errno, _("cannot run strip"));
+       break;
+     default:			/* Parent. */
============================================================
--- packages/coreutils/coreutils-5.3.0/man.patch	ff9a0d70eeec7f93c6cb9393b93f49dbe419d614
+++ packages/coreutils/coreutils-5.3.0/man.patch	ff9a0d70eeec7f93c6cb9393b93f49dbe419d614
@@ -0,0 +1,42 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- coreutils-5.3.0/configure.ac~man
++++ coreutils-5.3.0/configure.ac
+@@ -237,6 +237,20 @@
+ AM_GNU_GETTEXT([external], [need-ngettext])
+ AM_GNU_GETTEXT_VERSION(0.13.1)
+ 
++AC_MSG_CHECKING([whether to build man pages])
++AC_ARG_WITH(manpages, 
++	AS_HELP_STRING([--with-manpages],
++		[Enable building of manpages (default=yes)]),
++	[cu_cv_build_manpages=$enableval],
++	[cu_cv_build_manpages=yes])
++# help2man doesn't work when crosscompiling, as it needs to run the
++# binary that was built.
++if test x"$cross_compiling" = x"yes"; then
++  cu_cv_build_manpages=no
++fi
++AC_MSG_RESULT($cu_cv_build_manpages)
++AM_CONDITIONAL(ENABLE_MANPAGES, test x"$cu_cv_build_manpages" = x"yes")
++
+ AC_CONFIG_FILES(
+   Makefile
+   doc/Makefile
+--- coreutils-5.3.0/Makefile.am~man
++++ coreutils-5.3.0/Makefile.am
+@@ -1,6 +1,11 @@
+ ## Process this file with automake to produce Makefile.in -*-Makefile-*-
+ 
++if ENABLE_MANPAGES
+ SUBDIRS = lib src doc man po tests
++else
++SUBDIRS = lib src doc po tests
++endif
++
+ EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
+   .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
+   .x-sc_space_tab .x-sc_sun_os_names \
============================================================
--- packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch	295474bdf81629c67d4bfe9f144ffd637c886e56
+++ packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch	295474bdf81629c67d4bfe9f144ffd637c886e56
@@ -0,0 +1,33 @@
+Glibc 2.5 has a function called tee which conflicts with the same function
+in coreutils. This patch renames the function to tee_files (as is done in
+the newer coreutils versions.)
+
+--- coreutils-5.3.0/src/tee.c	2006/10/23 07:35:00	1.1
++++ coreutils-5.3.0/src/tee.c	2006/10/23 07:35:16
+@@ -31,7 +31,7 @@
+ 
+ #define AUTHORS "Mike Parker", "Richard M. Stallman", "David MacKenzie"
+ 
+-static bool tee (int nfiles, const char **files);
++static bool tee_files (int nfiles, const char **files);
+ 
+ /* If true, append to output files rather than truncating them. */
+ static bool append;
+@@ -121,7 +121,7 @@
+   /* Do *not* warn if tee is given no file arguments.
+      POSIX requires that it work when given no arguments.  */
+ 
+-  ok = tee (argc - optind, (const char **) &argv[optind]);
++  ok = tee_files (argc - optind, (const char **) &argv[optind]);
+   if (close (STDIN_FILENO) != 0)
+     error (EXIT_FAILURE, errno, _("standard input"));
+ 
+@@ -133,7 +133,7 @@
+    Return true if successful.  */
+ 
+ static bool
+-tee (int nfiles, const char **files)
++tee_files (int nfiles, const char **files)
+ {
+   FILE **descriptors;
+   char buffer[BUFSIZ];
============================================================
--- packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch	0a6a6c59fa7945fdb5223281929cbdcc499df660
+++ packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch	0a6a6c59fa7945fdb5223281929cbdcc499df660
@@ -0,0 +1,11 @@
+--- coreutils-5.3.0/src/Makefile.am.orig	2005-09-27 22:34:35.659272058 -0700
++++ coreutils-5.3.0/src/Makefile.am	2005-09-27 22:34:39.403507668 -0700
+@@ -74,7 +74,7 @@
+ sleep_LDADD = $(nanosec_libs)
+ tail_LDADD = $(nanosec_libs)
+ 
+-uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
++uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS)
+ 
+ su_LDADD = $(LDADD) $(LIB_CRYPT)
+ 
============================================================
--- packages/coreutils/coreutils-native_5.3.0.bb	6404ab2a1ae4487b3b190cd9efa252a23403c068
+++ packages/coreutils/coreutils-native_5.3.0.bb	6404ab2a1ae4487b3b190cd9efa252a23403c068
@@ -0,0 +1,7 @@
+SECTION = "base"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/coreutils-${PV}"
+S = "${WORKDIR}/coreutils-${PV}"
+
+require coreutils_${PV}.bb
+inherit native
============================================================
--- packages/coreutils/coreutils.inc	59ffecbe1e3e7c1ae9e2a110bb0cf6489f035a18
+++ packages/coreutils/coreutils.inc	59ffecbe1e3e7c1ae9e2a110bb0cf6489f035a18
@@ -0,0 +1,7 @@
+DESCRIPTION = "A collection of core GNU utilities."
+LICENSE = "GPL"
+SECTION = "base"
+RREPLACES = "textutils shellutils fileutils"
+RPROVIDES = "textutils shellutils fileutils"
+
+inherit autotools
============================================================
--- packages/coreutils/coreutils_5.3.0.bb	e3c222c8a27658bb6f3092680fe67a444fd60c47
+++ packages/coreutils/coreutils_5.3.0.bb	e3c222c8a27658bb6f3092680fe67a444fd60c47
@@ -0,0 +1,82 @@
+require coreutils.inc
+
+PR = "r1"
+
+SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \
+           file://install-cross.patch;patch=1;pnum=0 \
+           file://man.patch;patch=1 \
+           file://rename-tee-for-glibc2.5.patch;patch=1 \
+           file://uptime-pow-lib.patch;patch=1"
+
+# [ gets a special treatment and is not included in this
+bindir_progs = "basename cksum comm csplit cut dir dircolors dirname du \
+		env expand expr factor fmt fold groups head hostid id install \
+		join link logname md5sum mkfifo nice nl nohup od paste pathchk \
+		pinky pr printenv printf ptx readlink seq sha1sum shred sort \
+		split stat sum tac tail tee test tr tsort tty unexpand uniq \
+		unlink users vdir wc who whoami yes \
+		"
+
+# hostname gets a special treatment and is not included in this
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \
+		     ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \
+		     true uname \
+		     "
+
+sbindir_progs= "chroot"
+
+do_install () {
+	autotools_do_install
+
+	# Renaming the utilities that should go in /usr/bin
+	for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
+
+	# Renaming and moving the utilities that should go in /bin (FHS)
+	install -d ${D}${base_bindir}
+	for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
+
+	# Renaming and moving the utilities that should go in /usr/sbin (FHS)
+	install -d ${D}${sbindir}
+	for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
+
+	# [ requires special handling because [.coreutils will cause the sed stuff
+	# in update-alternatives to fail, therefore use lbracket - the name used
+	# for the actual source file.
+	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
+	# hostname and uptime separated. busybox's versions are preferred
+	mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
+	mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
+
+}
+
+pkg_postinst_${PN} () {
+	# The utilities in /usr/bin
+	for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
+
+	# The utilities in /bin
+	for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
+
+	# The utilities in /usr/sbin
+	for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
+
+	# Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
+	update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
+	update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
+	update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
+}
+
+pkg_prerm_${PN} () {
+	# The utilities in /usr/bin
+	for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
+
+	# The utilities in /bin
+	for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
+
+	# The utilities in /usr/sbin
+	for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
+
+	# The special cases
+	update-alternatives --remove hostname hostname.${PN}
+	update-alternatives --remove uptime uptime.${PN}
+	update-alternatives --remove '[' 'lbracket.${PN}'
+}






More information about the Openembedded-commits mailing list