diff options
Diffstat (limited to 'abs')
49 files changed, 790 insertions, 5430 deletions
| diff --git a/abs/core-testing/cloog-ppl/PKGBUILD b/abs/core-testing/cloog-ppl/PKGBUILD index 16f0369..56af019 100644 --- a/abs/core-testing/cloog-ppl/PKGBUILD +++ b/abs/core-testing/cloog-ppl/PKGBUILD @@ -1,15 +1,15 @@ -# $Id: PKGBUILD 78357 2010-04-22 02:43:20Z allan $ +# $Id: PKGBUILD 87235 2010-08-11 12:10:19Z allan $  # Maintainer: Allan McRae <allan@archlinux.org>  # Contributor: ezzetabi <ezzetabi at gawab dot com>  pkgname=cloog-ppl  pkgver=0.15.9 -pkgrel=1 +pkgrel=2  pkgdesc="Library that generates loops for scanning polyhedra"  arch=('i686' 'x86_64')  url="http://www.cloog.org/"  license=('GPL') -depends=('ppl') +depends=('ppl>=0.11')  options=('!libtool')  source=(ftp://gcc.gnu.org/pub/gcc/infrastructure/${pkgname}-${pkgver}.tar.gz)  md5sums=('806e001d1b1a6b130069ff6274900af5') @@ -17,6 +17,9 @@ md5sums=('806e001d1b1a6b130069ff6274900af5')  build() {    cd $srcdir/$pkgname-$pkgver +  # "Add" ppl-0.11 compatibility +  sed -i "/ppl_minor_version=/s#10#11#" configure +    ./configure --prefix=/usr --infodir=/usr/share/info \      --with-bits=gmp --with-ppl=/usr     make diff --git a/abs/core-testing/coreutils/PKGBUILD b/abs/core-testing/coreutils/PKGBUILD index b8418e9..2c6fab9 100644 --- a/abs/core-testing/coreutils/PKGBUILD +++ b/abs/core-testing/coreutils/PKGBUILD @@ -1,73 +1,67 @@ -# $Id: PKGBUILD 29340 2009-03-08 00:18:55Z andyrtr $ -# Maintainer: Andreas Radke <andyrtr@archlinux.org> +# $Id: PKGBUILD 82551 2010-06-13 12:07:11Z allan $ +# Maintainer: Allan McRae <allan@archlinux.org>  # Contributor: judd <jvinet@zeroflux.org>  pkgname=coreutils -pkgver=7.1 -pkgrel=5 +pkgver=8.5 +pkgrel=2  pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system" -arch=(i686 x86_64) +arch=('i686' 'x86_64')  license=('GPL3')  url="http://www.gnu.org/software/coreutils"  groups=('base') -depends=('glibc>=2.9-4' 'shadow>=4.1.2.1-2' 'pam>=1.0.3' 'acl>=2.2.47-1' 'gmp>=4.2.4') -provides=('mktemp') -conflicts=('mktemp') -replaces=('sh-utils' 'fileutils' 'textutils' 'mktemp') +depends=('glibc' 'shadow' 'pam' 'acl' 'gmp>=5.0' 'libcap') +replaces=('mktemp')  backup=('etc/pam.d/su')  install=${pkgname}.install -options=('!emptydirs' '!makeflags') -source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz -	coreutils-i18n.patch +options=('!emptydirs') +source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz  	coreutils-uname.patch  	coreutils-pam.patch -	coreutils-6.10-configuration.patch -	coreutils-7.1-sort-endoffields.patch -	coreutils-7.1-cp-recursiveinfloop.patch -	su) +	su.pam) +md5sums=('55170ed640e300f5b81640c6f4641513' +         'c4fcca138b6abf6d443d48a6f0cd8833' +         'aad79a2aa6d566c375d7bdd1b0767278' +         'fa85e5cce5d723275b14365ba71a8aad')  build() {    cd ${srcdir}/${pkgname}-${pkgver} -  # added pam patch and i18n patch from fedora cvs -#  patch -Np1 -i ../coreutils-pam.patch || return 1 -  patch -Np1 -i ../coreutils-i18n.patch || return 1 -  patch -Np1 -i ../coreutils-6.10-configuration.patch || return 1 +  # added su wheel group pam patch (from fedora cvs) +  patch -Np1 -i ${srcdir}/coreutils-pam.patch -  # from gentoo portage -  patch -Np1 -i ../coreutils-uname.patch || return 1 +  # linux specific uname improvement (from gentoo portage) +  patch -Np1 -i ${srcdir}/coreutils-uname.patch -  # bugfix patches from fedora -  patch -Np1 -i ../coreutils-7.1-sort-endoffields.patch || return 1 -  patch -Np1 -i ../coreutils-7.1-cp-recursiveinfloop.patch || return 1 - -  # only needed if new autoconf 2.62 is used -  sed -i 's/1.10a/1.10.2/' configure.ac || return 1 # aclocal fix -  sed -i 's/dist-xz/dist-lzma/' configure.ac || return 1    autoreconf -v -    ./configure --prefix=/usr \ -	--enable-install-program=su \ -	--enable-pam ac_cv_func_openat=no || return 1 -  make || return 1 -  make DESTDIR=${pkgdir} install || return 1 +              --enable-install-program=su \ +              --enable-no-install-program=groups,hostname,kill,uptime \ +              --enable-pam ac_cv_func_openat=no +  make +  make check +} -  rm -f ${pkgdir}/usr/bin/hostname ${pkgdir}/usr/share/man/man1/hostname.1 || return 1 -  rm -f ${pkgdir}/usr/bin/uptime ${pkgdir}/usr/share/man/man1/uptime.1 || return 1 -  rm -f ${pkgdir}/usr/bin/groups ${pkgdir}/usr/share/man/man1/groups.1 || return 1 -  rm -f ${pkgdir}/usr/bin/kill ${pkgdir}/usr/share/man/man1/kill.1|| return 1 +package() { +  cd ${srcdir}/${pkgname}-${pkgver} +  make DESTDIR=${pkgdir} install +      cd ${pkgdir}/usr/bin -  mkdir -p ${pkgdir}/bin ${pkgdir}/sbin ${pkgdir}/usr/sbin -  mv su date echo false pwd stty true uname cat tr cut readlink ../../bin -  mv dd cp df du ln ls mv rm dir sync vdir chgrp chmod chown ../../bin -  mv mkdir mknod rmdir shred touch mkfifo dircolors install sleep ../../bin -  mv chroot ../sbin -  ln -sf test [ -  ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep -  install -D -m644 $startdir/src/su ${pkgdir}/etc/pam.d/su - +  install -dm755 ${pkgdir}/{bin,usr/sbin} +   +  # binaries required by FHS +  _fhs="cat chgrp chmod chown cp date dd df echo false ln ls \ +        mkdir mknod mv pwd rm rmdir stty su sync true uname" +  mv ${_fhs} ${pkgdir}/bin    ls -lha ${pkgdir}/bin/su    chmod -v 4555 ${pkgdir}/bin/su -  rm -f ${pkgdir}/usr/share/info/dir +  # binaries required by various Arch scripts +  _bin="cut dir dircolors du install mkfifo readlink shred \ +        sleep touch tr vdir" +  mv ${_bin} ${pkgdir}/bin +  ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep +     +  mv chroot ${pkgdir}/usr/sbin +  install -Dm644 ${srcdir}/su.pam ${pkgdir}/etc/pam.d/su  } diff --git a/abs/core-testing/coreutils/__changelog b/abs/core-testing/coreutils/__changelog deleted file mode 100644 index f24cf44..0000000 --- a/abs/core-testing/coreutils/__changelog +++ /dev/null @@ -1,2 +0,0 @@ -removed PAM patch, as it causes su  to go bonkers and log you out. - diff --git a/abs/core-testing/coreutils/coreutils-6.10-configuration.patch b/abs/core-testing/coreutils/coreutils-6.10-configuration.patch deleted file mode 100644 index b9bddda..0000000 --- a/abs/core-testing/coreutils/coreutils-6.10-configuration.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -urN coreutils-6.11-orig/tests/mkdir/selinux coreutils-6.11/tests/mkdir/selinux ---- coreutils-6.11-orig/tests/mkdir/selinux	2008-04-19 23:34:23.000000000 +0200 -+++ coreutils-6.11/tests/mkdir/selinux	2008-04-22 13:23:50.000000000 +0200 -@@ -38,6 +28,7 @@ - # successfully, in spite of the invalid context string. -  - . $srcdir/test-lib.sh -+require_selinux_ -  - c=invalid-selinux-context - msg="failed to set default file creation context to \`$c':" -diff -urNp coreutils-6.11-orig/tests/test-lib.sh coreutils-6.11/tests/test-lib.sh ---- coreutils-6.11-orig/tests/test-lib.sh	2008-04-19 23:34:23.000000000 +0200 -+++ coreutils-6.11/tests/test-lib.sh	2008-04-24 14:18:59.000000000 +0200 -@@ -97,8 +97,8 @@ skip_if_() -  - require_selinux_() - { --  case `ls -Zd .` in --    '? .'|'unlabeled .') -+  case `ls --scontext -d . | cut -f1 -d" "` in -+    '?'|'unlabeled') -       skip_test_ "this system (or maybe just" \ -         "the current file system) lacks SELinux support" -     ;; -diff -urNp coreutils-7.1-orig/gnulib-tests/test-getaddrinfo.c coreutils-7.1/gnulib-tests/test-getaddrinfo.c ---- coreutils-7.1-orig/gnulib-tests/test-getaddrinfo.c	2009-01-27 21:33:19.000000000 +0100 -+++ coreutils-7.1/gnulib-tests/test-getaddrinfo.c	2009-02-25 13:52:59.000000000 +0100 -@@ -36,6 +36,8 @@ - # define dbgprintf if (0) printf - #endif -  -+static int skip = 0; -+ - /* BeOS does not have AF_UNSPEC.  */ - #ifndef AF_UNSPEC - # define AF_UNSPEC 0 -@@ -52,6 +54,9 @@ int simple (char *host, char *service) -   struct addrinfo *ai0, *ai; -   int res; -  -+  if (skip) -+    return 0; -+ -   dbgprintf ("Finding %s service %s...\n", host, service); -  -   /* This initializes "hints" but does not use it.  Is there a reason -@@ -72,8 +77,12 @@ int simple (char *host, char *service) - 	 in-law's farm. */ -       if (res == EAI_AGAIN) - 	{ --	  fprintf (stderr, "skipping getaddrinfo test: no network?\n"); --	  return 77; -+	if (!skip) -+	  { -+	    skip++; -+	    fprintf (stderr, "skipping getaddrinfo test: no network?\n"); -+	    return 77; -+	  } - 	} -       /* IRIX reports EAI_NONAME for "https".  Don't fail the test - 	 merely because of this.  */ -diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c ---- coreutils-7.1-orig/src/ls.c	2009-02-25 13:23:59.000000000 +0100 -+++ coreutils-7.1/src/ls.c	2009-02-25 13:25:20.000000000 +0100 -@@ -38,10 +38,6 @@ - #include <config.h> - #include <sys/types.h> -  --#ifdef HAVE_CAP --# include <sys/capability.h> --#endif -- - #if HAVE_TERMIOS_H - # include <termios.h> - #endif -@@ -84,6 +80,10 @@ - #include "system.h" - #include <fnmatch.h> -  -+#ifdef HAVE_CAP -+# include <sys/capability.h> -+#endif -+ - #include "acl.h" - #include "argmatch.h" - #include "dev-ino.h" - diff --git a/abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch b/abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch deleted file mode 100644 index 963af0b..0000000 --- a/abs/core-testing/coreutils/coreutils-7.1-cp-recursiveinfloop.patch +++ /dev/null @@ -1,154 +0,0 @@ -diff -urNp coreutils-7.1-orig/src/copy.c coreutils-7.1/src/copy.c ---- coreutils-7.1-orig/src/copy.c	2009-02-27 12:07:29.000000000 +0100 -+++ coreutils-7.1/src/copy.c	2009-02-27 12:14:29.000000000 +0100 -@@ -104,6 +104,7 @@ static bool copy_internal (char const *s - 			   struct dir_list *ancestors, - 			   const struct cp_options *x, - 			   bool command_line_arg, -+			   bool *first_dir_created_per_command_line_arg, - 			   bool *copy_into_self, - 			   bool *rename_succeeded); - static bool owner_failure_ok (struct cp_options const *x); -@@ -201,13 +202,16 @@ copy_attr_by_name (char const *src_path, -    DST_NAME_IN is a directory that was created previously in the -    recursion.   SRC_SB and ANCESTORS describe SRC_NAME_IN. -    Set *COPY_INTO_SELF if SRC_NAME_IN is a parent of -+   FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG  FIXME -    (or the same as) DST_NAME_IN; otherwise, clear it. -    Return true if successful.  */ -  - static bool - copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst, - 	  const struct stat *src_sb, struct dir_list *ancestors, --	  const struct cp_options *x, bool *copy_into_self) -+	  const struct cp_options *x, -+	  bool *first_dir_created_per_command_line_arg, -+	  bool *copy_into_self) - { -   char *name_space; -   char *namep; -@@ -237,12 +241,20 @@ copy_dir (char const *src_name_in, char  -  -       ok &= copy_internal (src_name, dst_name, new_dst, src_sb->st_dev, - 			   ancestors, &non_command_line_options, false, -+			   first_dir_created_per_command_line_arg, - 			   &local_copy_into_self, NULL); -       *copy_into_self |= local_copy_into_self; -  -       free (dst_name); -       free (src_name); -  -+      /* If we're copying into self, there's no point in continuing, -+        and in fact, that would even infloop, now that we record only -+        the first created directory per command line argument.  */ -+      if (local_copy_into_self) -+       break; -+ -+ -       namep += strlen (namep) + 1; -     } -   free (name_space); -@@ -1125,6 +1137,7 @@ restore_default_fscreatecon_or_die (void -    not known.  ANCESTORS points to a linked, null terminated list of -    devices and inodes of parent directories of SRC_NAME.  COMMAND_LINE_ARG -    is true iff SRC_NAME was specified on the command line. -+   FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG is both input and output. -    Set *COPY_INTO_SELF if SRC_NAME is a parent of (or the -    same as) DST_NAME; otherwise, clear it. -    Return true if successful.  */ -@@ -1135,6 +1148,7 @@ copy_internal (char const *src_name, cha - 	       struct dir_list *ancestors, - 	       const struct cp_options *x, - 	       bool command_line_arg, -+	       bool *first_dir_created_per_command_line_arg, - 	       bool *copy_into_self, - 	       bool *rename_succeeded) - { -@@ -1815,11 +1829,15 @@ copy_internal (char const *src_name, cha - 		} - 	    } -  --	  /* Insert the created directory's inode and device --             numbers into the search structure, so that we can --             avoid copying it again.  */ --	  if (!x->hard_link) --	    remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev); -+         /* Record the created directory's inode and device numbers into -+            the search structure, so that we can avoid copying it again. -+            Do this only for the first directory that is created for each -+            source command line argument.  */ -+         if (!*first_dir_created_per_command_line_arg) -+           { -+             remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev); -+             *first_dir_created_per_command_line_arg = true; -+           } -  - 	  if (x->verbose) - 	    emit_verbose (src_name, dst_name, NULL); -@@ -1840,6 +1858,7 @@ copy_internal (char const *src_name, cha - 	     in a source directory would cause the containing destination - 	     directory not to have owner/perms set properly.  */ - 	  delayed_ok = copy_dir (src_name, dst_name, new_dst, &src_sb, dir, x, -+				 first_dir_created_per_command_line_arg, - 				 copy_into_self); - 	} -     } -@@ -2187,8 +2206,11 @@ copy (char const *src_name, char const * -   top_level_src_name = src_name; -   top_level_dst_name = dst_name; -  -+  bool first_dir_created_per_command_line_arg = false; -   return copy_internal (src_name, dst_name, nonexistent_dst, 0, NULL, --			options, true, copy_into_self, rename_succeeded); -+			options, true, -+			&first_dir_created_per_command_line_arg, -+			copy_into_self, rename_succeeded); - } -  - /* Set *X to the default options for a value of type struct cp_options.  */ -diff -urNp coreutils-7.1-orig/tests/cp/into-self coreutils-7.1/tests/cp/into-self ---- coreutils-7.1-orig/tests/cp/into-self	2008-09-18 09:06:57.000000000 +0200 -+++ coreutils-7.1/tests/cp/into-self	2009-02-27 12:16:21.000000000 +0100 -@@ -1,7 +1,7 @@ - #!/bin/sh - # Confirm that copying a directory into itself gets a proper diagnostic. -  --# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2002, 2004, 2006-2009 Free Software Foundation, Inc. -  - # This program is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -28,15 +28,32 @@ fi -  - . $srcdir/test-lib.sh -  --mkdir dir || framework_failure -+mkdir a dir || framework_failure -  - fail=0 -  - # This command should exit nonzero. - cp -R dir dir 2> out && fail=1 -+echo 1 >> out -+ -+# This should, too.  However, with coreutils-7.1 it would infloop. -+cp -rl dir dir 2>> out && fail=1 -+echo 2 >> out -+ -+cp -rl a dir dir 2>> out && fail=1 -+echo 3 >> out -+cp -rl a dir dir 2>> out && fail=1 -+echo 4 >> out -  - cat > exp <<\EOF - cp: cannot copy a directory, `dir', into itself, `dir/dir' -+1 -+cp: cannot copy a directory, `dir', into itself, `dir/dir' -+2 -+cp: cannot copy a directory, `dir', into itself, `dir/dir' -+3 -+cp: cannot copy a directory, `dir', into itself, `dir/dir' -+4 - EOF - #' -  diff --git a/abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch b/abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch deleted file mode 100644 index 45d1e28..0000000 --- a/abs/core-testing/coreutils/coreutils-7.1-sort-endoffields.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -urNp coreutils-7.1-orig/src/sort.c coreutils-7.1/src/sort.c ---- coreutils-7.1-orig/src/sort.c	2009-02-25 16:15:52.000000000 +0100 -+++ coreutils-7.1/src/sort.c	2009-02-25 16:20:35.000000000 +0100 -@@ -1598,6 +1598,9 @@ limfield_uni (const struct line *line, c -   size_t eword = key->eword, echar = key->echar; -   size_t remaining_bytes; -  -+  if (echar == 0) -+    eword++; /* skip all of end field. */ -+ -   /* Move PTR past EWORD fields or to one past the last byte on LINE, -      whichever comes first.  If there are more than EWORD fields, leave -      PTR pointing at the beginning of the field having zero-based index, -@@ -1673,19 +1676,22 @@ limfield_uni (const struct line *line, c -     } - #endif -  --  /* If we're ignoring leading blanks when computing the End --     of the field, don't start counting bytes until after skipping --     past any leading blanks. */ --  if (key->skipeblanks) --    while (ptr < lim && blanks[to_uchar (*ptr)]) --      ++ptr; -  --  /* Advance PTR by ECHAR (if possible), but no further than LIM.  */ --  remaining_bytes = lim - ptr; --  if (echar < remaining_bytes) --    ptr += echar; --  else --    ptr = lim; -+  if (echar != 0) /* We need to skip over a portion of the end field.  */ -+    { -+      if (key->skipeblanks) /* blanks not counted in echar.  */ -+        { -+          while (ptr < lim && blanks[to_uchar (*ptr)]) -+            ++ptr; -+        } -+ -+      /* Advance PTR by ECHAR (if possible), but no further than LIM.  */ -+      remaining_bytes = lim - ptr; -+      if (echar < remaining_bytes) -+        ptr += echar; -+      else -+        ptr = lim; -+    } -  -   return ptr; - } -@@ -3736,12 +3742,9 @@ main (int argc, char **argv) - 		  badfieldspec (optarg, N_("field number is zero")); - 		} - 	      if (*s == '.') --		s = parse_field_count (s + 1, &key->echar, --				       N_("invalid number after `.'")); --	      else - 		{ --		  /* `-k 2,3' is equivalent to `+1 -3'.  */ --		  key->eword++; -+                 s = parse_field_count (s + 1, &key->echar, -+                                        N_("invalid number after `.'")); - 		} - 	      s = set_ordering (s, key, bl_end); - 	    } -diff -urNp coreutils-7.1-orig/tests/misc/sort coreutils-7.1/tests/misc/sort ---- coreutils-7.1-orig/tests/misc/sort	2009-01-27 22:11:25.000000000 +0100 -+++ coreutils-7.1/tests/misc/sort	2009-02-25 16:21:48.000000000 +0100 -@@ -24,6 +24,10 @@ my $prog = 'sort'; - # Turn off localization of executable's output. - @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; -  -+my $mb_locale = $ENV{LOCALE_FR_UTF8}; -+! defined $mb_locale || $mb_locale eq 'none' -+ and $mb_locale = 'C'; -+ - # Since each test is run with a file name and with redirected stdin, - # the name in the diagnostic is either the file name or "-". - # Normalize each diagnostic to use '-'. -@@ -110,6 +114,8 @@ my @Tests = - ["07b", '-k 2,3', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}], - ["07c", '-k 2,3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}], - ["07d", '+1 -3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}], -+["07e", '-k 2,3.0', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}], -+ - # - # report an error for `.' without following char spec - ["08a", '-k 2.,3', {EXIT=>2}, -@@ -210,6 +216,15 @@ my @Tests = - # key start and key end. - ["18e", '-nb -k1.1,1.2', {IN=>" 901\n100\n"}, {OUT=>"100\n 901\n"}], -  -+# When ignoring leading blanks for end position, ensure blanks from -+# next field are not included in the sort. I.E. order should not change here. -+["18f", '-k1,1b', {IN=>"a  y\na z\n"}, {OUT=>"a  y\na z\n"}], -+ -+# When ignoring leading blanks for start position, ensure blanks from -+# next field are not included in the sort. I.E. order should not change here. -+# This was noticed as an issue on fedora 8 (only in multibyte locales). -+["18g", '-k1b,1', {IN=>"a y\na z\n"}, {OUT=>"a y\na z\n"}, -+ {ENV => "LC_ALL=$mb_locale"}], - # This looks odd, but works properly -- 2nd keyspec is never - # used because all lines are different. - ["19a", '+0 +1nr', {IN=>"b 2\nb 1\nb 3\n"}, {OUT=>"b 1\nb 2\nb 3\n"}], diff --git a/abs/core-testing/coreutils/coreutils-8.5-2-i686.pkg.tar.gz b/abs/core-testing/coreutils/coreutils-8.5-2-i686.pkg.tar.gz new file mode 120000 index 0000000..3eef1a4 --- /dev/null +++ b/abs/core-testing/coreutils/coreutils-8.5-2-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/coreutils-8.5-2-i686.pkg.tar.gz
\ No newline at end of file diff --git a/abs/core-testing/coreutils/coreutils-i18n.patch b/abs/core-testing/coreutils/coreutils-i18n.patch deleted file mode 100644 index 626bac0..0000000 --- a/abs/core-testing/coreutils/coreutils-i18n.patch +++ /dev/null @@ -1,4065 +0,0 @@ -diff -urN coreutils-6.12-orig/tests/misc/cut coreutils-6.12/tests/misc/cut ---- coreutils-6.12-orig/tests/misc/cut	2008-05-17 08:41:11.000000000 +0200 -+++ coreutils-6.12/tests/misc/cut	2008-06-02 11:13:08.000000000 +0200 -@@ -26,7 +26,7 @@ - my $prog = 'cut'; - my $try = "Try \`$prog --help' for more information.\n"; - my $from_1 = "$prog: fields and positions are numbered from 1\n$try"; --my $inval = "$prog: invalid byte or field list\n$try"; -+my $inval = "$prog: invalid byte, character or field list\n$try"; - my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try"; -  - my @Tests = -@@ -140,8 +140,8 @@ -   ['od-overlap5', '-b1-3,1-4', '--output-d=:', {IN=>"abcde\n"}, {OUT=>"abcd\n"}], -  -   # None of the following invalid ranges provoked an error up to coreutils-6.9. --  ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1}, --   {ERR=>"$prog: invalid decreasing range\n$try"}], -+  ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1}, -+   {ERR=>"$prog: invalid byte, character or field list\n$try"}], -   ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}], -   ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}], -   ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}], ---- /dev/null	2007-03-01 09:16:39.219409909 +0000 -+++ coreutils-6.8+/tests/misc/sort-mb-tests	2007-03-01 15:08:24.000000000 +0000 -@@ -0,0 +1,58 @@ -+#! /bin/sh -+case $# in -+  0) xx='../src/sort';; -+  *) xx="$1";; -+esac -+test "$VERBOSE" && echo=echo || echo=: -+$echo testing program: $xx -+errors=0 -+test "$srcdir" || srcdir=. -+test "$VERBOSE" && $xx --version 2> /dev/null -+ -+export LC_ALL=en_US.UTF-8 -+locale -k LC_CTYPE 2>&1 | grep -q charmap.*UTF-8 || exit 77 -+errors=0 -+ -+$xx -t @ -k2 -n misc/mb1.I > misc/mb1.O -+code=$? -+if test $code != 0; then -+  $echo "Test mb1 failed: $xx return code $code differs from expected value 0" 1>&2 -+  errors=`expr $errors + 1` -+else -+  cmp misc/mb1.O $srcdir/misc/mb1.X > /dev/null 2>&1 -+  case $? in -+    0) if test "$VERBOSE"; then $echo "passed mb1"; fi;; -+    1) $echo "Test mb1 failed: files misc/mb1.O and $srcdir/misc/mb1.X differ" 1>&2 -+       (diff -c misc/mb1.O $srcdir/misc/mb1.X) 2> /dev/null -+       errors=`expr $errors + 1`;; -+    2) $echo "Test mb1 may have failed." 1>&2 -+       $echo The command "cmp misc/mb1.O $srcdir/misc/mb1.X" failed. 1>&2 -+       errors=`expr $errors + 1`;; -+  esac -+fi -+ -+$xx -t @ -k4 -n misc/mb2.I > misc/mb2.O -+code=$? -+if test $code != 0; then -+  $echo "Test mb2 failed: $xx return code $code differs from expected value 0" 1>&2 -+  errors=`expr $errors + 1` -+else -+  cmp misc/mb2.O $srcdir/misc/mb2.X > /dev/null 2>&1 -+  case $? in -+    0) if test "$VERBOSE"; then $echo "passed mb2"; fi;; -+    1) $echo "Test mb2 failed: files misc/mb2.O and $srcdir/misc/mb2.X differ" 1>&2 -+       (diff -c misc/mb2.O $srcdir/misc/mb2.X) 2> /dev/null -+       errors=`expr $errors + 1`;; -+    2) $echo "Test mb2 may have failed." 1>&2 -+       $echo The command "cmp misc/mb2.O $srcdir/misc/mb2.X" failed. 1>&2 -+       errors=`expr $errors + 1`;; -+  esac -+fi -+ -+if test $errors = 0; then -+  $echo Passed all 113 tests. 1>&2 -+else -+  $echo Failed $errors tests. 1>&2 -+fi -+test $errors = 0 || errors=1 -+exit $errors ---- /dev/null	2007-03-01 09:16:39.219409909 +0000 -+++ coreutils-6.8+/tests/misc/mb2.I	2007-03-01 15:08:24.000000000 +0000 -@@ -0,0 +1,4 @@ -+Apple@AA10@@20 -+Banana@AA5@@30 -+Citrus@AA20@@5 -+Cherry@AA30@@10 ---- /dev/null	2007-03-01 09:16:39.219409909 +0000 -+++ coreutils-6.8+/tests/misc/mb2.X	2007-03-01 15:08:24.000000000 +0000 -@@ -0,0 +1,4 @@ -+Citrus@AA20@@5 -+Cherry@AA30@@10 -+Apple@AA10@@20 -+Banana@AA5@@30 ---- /dev/null	2007-03-01 09:16:39.219409909 +0000 -+++ coreutils-6.8+/tests/misc/mb1.I	2007-03-01 15:08:24.000000000 +0000 -@@ -0,0 +1,4 @@ -+Apple@10 -+Banana@5 -+Citrus@20 -+Cherry@30 ---- /dev/null	2007-03-01 09:16:39.219409909 +0000 -+++ coreutils-6.8+/tests/misc/mb1.X	2007-03-01 15:08:24.000000000 +0000 -@@ -0,0 +1,4 @@ -+Banana@5 -+Apple@10 -+Citrus@20 -+Cherry@30 -diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am ---- coreutils-6.12-orig/tests/Makefile.am	2008-05-27 13:47:53.000000000 +0200 -+++ coreutils-6.12/tests/Makefile.am	2008-06-02 10:06:03.000000000 +0200 -@@ -192,6 +192,7 @@ -   misc/sort					\ -   misc/sort-compress				\ -   misc/sort-files0-from				\ -+  misc/sort-mb-tests				\ -   misc/sort-merge				\ -   misc/sort-rand				\ -   misc/sort-version				\ -@@ -391,6 +392,10 @@ -   $(root_tests) -  - pr_data =					\ -+  misc/mb1.X			\ -+  misc/mb1.I			\ -+  misc/mb2.X			\ -+  misc/mb2.I			\ -   pr/0F						\ -   pr/0FF					\ -   pr/0FFnt					\ ---- coreutils-6.8+/lib/linebuffer.h.i18n	2005-05-14 07:44:24.000000000 +0100 -+++ coreutils-6.8+/lib/linebuffer.h	2007-03-01 15:08:24.000000000 +0000 -@@ -22,6 +22,11 @@ -  - # include <stdio.h> -  -+/* Get mbstate_t.  */ -+# if HAVE_WCHAR_H -+#  include <wchar.h> -+# endif -+ - /* A `struct linebuffer' holds a line of text. */ -  - struct linebuffer -@@ -29,6 +34,9 @@ -   size_t size;			/* Allocated. */ -   size_t length;		/* Used. */ -   char *buffer; -+# if HAVE_WCHAR_H -+  mbstate_t state; -+# endif - }; -  - /* Initialize linebuffer LINEBUFFER for use. */ ---- coreutils-6.8+/src/expand.c.i18n	2007-01-14 15:41:28.000000000 +0000 -+++ coreutils-6.8+/src/expand.c	2007-03-01 15:08:24.000000000 +0000 -@@ -38,11 +38,28 @@ - #include <stdio.h> - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" - #include "xstrndup.h" -  -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+   installation; work around this configuration error.  */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix).  */ - #define PROGRAM_NAME "expand" -  -@@ -183,6 +200,7 @@ - 	      stops = num_start + len - 1; - 	    } - 	} -+ -       else - 	{ - 	  error (0, 0, _("tab size contains invalid character(s): %s"), -@@ -365,6 +383,142 @@ -     } - } -  -+#if HAVE_MBRTOWC -+static void -+expand_multibyte (void) -+{ -+  FILE *fp;			/* Input strem. */ -+  mbstate_t i_state;		/* Current shift state of the input stream. */ -+  mbstate_t i_state_bak;	/* Back up the I_STATE. */ -+  mbstate_t o_state;		/* Current shift state of the output stream. */ -+  char buf[MB_LEN_MAX + BUFSIZ];  /* For spooling a read byte sequence. */ -+  char *bufpos;			/* Next read position of BUF. */ -+  size_t buflen = 0;		/* The length of the byte sequence in buf. */ -+  wchar_t wc;			/* A gotten wide character. */ -+  size_t mblength;		/* The byte size of a multibyte character -+				   which shows as same character as WC. */ -+  int tab_index = 0;		/* Index in `tab_list' of next tabstop. */ -+  int column = 0;		/* Column on screen of the next char. */ -+  int next_tab_column;		/* Column the next tab stop is on. */ -+  int convert = 1;		/* If nonzero, perform translations. */ -+ -+  fp = next_file ((FILE *) NULL); -+  if (fp == NULL) -+    return; -+ -+  memset (&o_state, '\0', sizeof(mbstate_t)); -+  memset (&i_state, '\0', sizeof(mbstate_t)); -+ -+  for (;;) -+    { -+      /* Refill the buffer BUF. */ -+      if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp)) -+	{ -+	  memmove (buf, bufpos, buflen); -+	  buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp); -+	  bufpos = buf; -+	} -+ -+      /* No character is left in BUF. */ -+      if (buflen < 1) -+	{ -+	  fp = next_file (fp); -+ -+	  if (fp == NULL) -+	    break;		/* No more files. */ -+	  else -+	    { -+	      memset (&i_state, '\0', sizeof(mbstate_t)); -+	      continue; -+	    } -+	} -+ -+      /* Get a wide character. */ -+      i_state_bak = i_state; -+      mblength = mbrtowc (&wc, bufpos, buflen, &i_state); -+ -+      switch (mblength) -+	{ -+	case (size_t)-1:	/* illegal byte sequence. */ -+	case (size_t)-2: -+	  mblength = 1; -+	  i_state = i_state_bak; -+	  if (convert) -+	    { -+	      ++column; -+	      if (convert_entire_line == 0) -+		convert = 0; -+	    } -+	  putchar (*bufpos); -+	  break; -+ -+	case 0:		/* null. */ -+	  mblength = 1; -+	  if (convert && convert_entire_line == 0) -+	    convert = 0; -+	  putchar ('\0'); -+	  break; -+ -+	default: -+	  if (wc == L'\n')   /* LF. */ -+	    { -+	      tab_index = 0; -+	      column = 0; -+	      convert = 1; -+	      putchar ('\n'); -+	    } -+	  else if (wc == L'\t' && convert)	/* Tab. */ -+	    { -+	      if (tab_size == 0) -+		{ -+		  /* Do not let tab_index == first_free_tab; -+		     stop when it is 1 less. */ -+		  while (tab_index < first_free_tab - 1 -+		      && column >= tab_list[tab_index]) -+		    tab_index++; -+		  next_tab_column = tab_list[tab_index]; -+		  if (tab_index < first_free_tab - 1) -+		    tab_index++; -+		  if (column >= next_tab_column) -+		    next_tab_column = column + 1; -+		} -+	      else -+		next_tab_column = column + tab_size - column % tab_size; -+ -+	      while (column < next_tab_column) -+		{ -+		  putchar (' '); -+		  ++column; -+		} -+	    } -+	  else  /* Others. */ -+	    { -+	      if (convert) -+		{ -+		  if (wc == L'\b') -+		    { -+		      if (column > 0) -+			--column; -+		    } -+		  else -+		    { -+		      int width;		/* The width of WC. */ -+ -+		      width = wcwidth (wc); -+		      column += (width > 0) ? width : 0; -+		      if (convert_entire_line == 0) -+			convert = 0; -+		    } -+		} -+	      fwrite (bufpos, sizeof(char), mblength, stdout); -+	    } -+	} -+      buflen -= mblength; -+      bufpos += mblength; -+    } -+} -+#endif -+ - int - main (int argc, char **argv) - { -@@ -429,7 +583,12 @@ -  -   file_list = (optind < argc ? &argv[optind] : stdin_argv); -  --  expand (); -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    expand_multibyte (); -+  else -+#endif -+    expand (); -  -   if (have_read_stdin && fclose (stdin) != 0) -     error (EXIT_FAILURE, errno, "-"); ---- coreutils-6.8+/src/join.c.i18n	2007-01-14 15:41:28.000000000 +0000 -+++ coreutils-6.8+/src/join.c	2007-03-01 15:08:24.000000000 +0000 -@@ -23,16 +23,30 @@ - #include <sys/types.h> - #include <getopt.h> -  -+/* Get mbstate_t, mbrtowc(), mbrtowc(), wcwidth().  */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get iswblank(), towupper.  */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "linebuffer.h" --#include "memcasecmp.h" - #include "quote.h" - #include "stdio--.h" - #include "xmemcoll.h" - #include "xstrtol.h" - #include "argmatch.h" -  -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix).  */ - #define PROGRAM_NAME "join" -  -@@ -104,10 +118,12 @@ - /* Last element in `outlist', where a new element can be added.  */ - static struct outlist *outlist_end = &outlist_head; -  --/* Tab character separating fields.  If negative, fields are separated --   by any nonempty string of blanks, otherwise by exactly one --   tab character whose value (when cast to unsigned char) equals TAB.  */ --static int tab = -1; -+/* Tab character separating fields.  If NULL, fields are separated -+   by any nonempty string of blanks.  */ -+static char *tab = NULL; -+ -+/* The number of bytes used for tab. */ -+static size_t tablen = 0; -  - /* If nonzero, check that the input is correctly ordered. */ - static enum -@@ -199,10 +217,11 @@ -   if (ptr == lim) -     return; -  --  if (0 <= tab) -+  if (tab != NULL) -     { -+      unsigned char t = tab[0]; -       char *sep; --      for (; (sep = memchr (ptr, tab, lim - ptr)) != NULL; ptr = sep + 1) -+      for (; (sep = memchr (ptr, t, lim - ptr)) != NULL; ptr = sep + 1) - 	extract_field (line, ptr, sep - ptr); -     } -   else -@@ -229,6 +248,148 @@ -   extract_field (line, ptr, lim - ptr); - } -  -+#if HAVE_MBRTOWC -+static void -+xfields_multibyte (struct line *line) -+{ -+  char *ptr = line->buf.buffer; -+  char const *lim = ptr + line->buf.length - 1; -+  wchar_t wc = 0; -+  size_t mblength = 1; -+  mbstate_t state, state_bak; -+ -+  memset (&state, 0, sizeof (mbstate_t)); -+ -+  if (ptr == lim) -+    return; -+ -+  if (tab != NULL) -+    { -+      unsigned char t = tab[0]; -+      char *sep = ptr; -+      for (; ptr < lim; ptr = sep + mblength) -+	{ -+	  sep = ptr; -+	  while (sep < lim) -+	    { -+	      state_bak = state; -+	      mblength = mbrtowc (&wc, sep, lim - sep + 1, &state); -+ -+	      if (mblength == (size_t)-1 || mblength == (size_t)-2) -+		{ -+		  mblength = 1; -+		  state = state_bak; -+		} -+	      mblength = (mblength < 1) ? 1 : mblength; -+ -+	      if (mblength == tablen && !memcmp (sep, tab, mblength)) -+		break; -+	      else -+		{ -+		  sep += mblength; -+		  continue; -+		} -+	    } -+ -+	  if (sep == lim) -+	    break; -+ -+	  extract_field (line, ptr, sep - ptr); -+	} -+    } -+  else -+    { -+      /* Skip leading blanks before the first field.  */ -+      while(ptr < lim) -+      { -+        state_bak = state; -+        mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state); -+ -+        if (mblength == (size_t)-1 || mblength == (size_t)-2) -+          { -+            mblength = 1; -+            state = state_bak; -+            break; -+          } -+        mblength = (mblength < 1) ? 1 : mblength; -+ -+        if (!iswblank(wc)) -+          break; -+        ptr += mblength; -+      } -+ -+      do -+	{ -+	  char *sep; -+	  state_bak = state; -+	  mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state); -+	  if (mblength == (size_t)-1 || mblength == (size_t)-2) -+	    { -+	      mblength = 1; -+	      state = state_bak; -+	      break; -+	    } -+	  mblength = (mblength < 1) ? 1 : mblength; -+ -+	  sep = ptr + mblength; -+	  while (sep != lim) -+	    { -+	      state_bak = state; -+	      mblength = mbrtowc (&wc, sep, lim - sep + 1, &state); -+	      if (mblength == (size_t)-1 || mblength == (size_t)-2) -+		{ -+		  mblength = 1; -+		  state = state_bak; -+		  break; -+		} -+	      mblength = (mblength < 1) ? 1 : mblength; -+ -+	      if (iswblank (wc)) -+		break; -+ -+	      sep += mblength; -+	    } -+ -+	  extract_field (line, ptr, sep - ptr); -+	  if (sep == lim) -+	    return; -+ -+	  state_bak = state; -+	  mblength = mbrtowc (&wc, sep, lim - sep + 1, &state); -+	  if (mblength == (size_t)-1 || mblength == (size_t)-2) -+	    { -+	      mblength = 1; -+	      state = state_bak; -+	      break; -+	    } -+	  mblength = (mblength < 1) ? 1 : mblength; -+ -+	  ptr = sep + mblength; -+	  while (ptr != lim) -+	    { -+	      state_bak = state; -+	      mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state); -+	      if (mblength == (size_t)-1 || mblength == (size_t)-2) -+		{ -+		  mblength = 1; -+		  state = state_bak; -+		  break; -+		} -+	      mblength = (mblength < 1) ? 1 : mblength; -+ -+	      if (!iswblank (wc)) -+		break; -+ -+	      ptr += mblength; -+	    } -+	} -+      while (ptr != lim); -+    } -+ -+  extract_field (line, ptr, lim - ptr); -+} -+#endif -+  - static void - freeline (struct line *line) - { -@@ -377,11 +601,18 @@ -  - /* Print the join of LINE1 and LINE2.  */ -  -+#define PUT_TAB_CHAR							\ -+  do									\ -+    {									\ -+      (tab != NULL) ?							\ -+	fwrite(tab, sizeof(char), tablen, stdout) : putchar (' ');	\ -+    }									\ -+  while (0)								 -+ - static void - prjoin (struct line const *line1, struct line const *line2) - { -   const struct outlist *outlist; --  char output_separator = tab < 0 ? ' ' : tab; -  -   outlist = outlist_head.next; -   if (outlist) -@@ -397,12 +628,12 @@ - 	  if (o->file == 0) - 	    { - 	      if (line1 == &uni_blank) --	        { -+		{ - 		  line = line2; - 		  field = join_field_2; - 		} - 	      else --	        { -+		{ - 		  line = line1; - 		  field = join_field_1; - 		} -@@ -416,7 +647,7 @@ - 	  o = o->next; - 	  if (o == NULL) - 	    break; --	  putchar (output_separator); -+	  PUT_TAB_CHAR; - 	} -       putchar ('\n'); -     } -@@ -434,23 +665,23 @@ -       prfield (join_field_1, line1); -       for (i = 0; i < join_field_1 && i < line1->nfields; ++i) - 	{ --	  putchar (output_separator); -+	  PUT_TAB_CHAR; - 	  prfield (i, line1); - 	} -       for (i = join_field_1 + 1; i < line1->nfields; ++i) - 	{ --	  putchar (output_separator); -+	  PUT_TAB_CHAR; - 	  prfield (i, line1); - 	} -  -       for (i = 0; i < join_field_2 && i < line2->nfields; ++i) - 	{ --	  putchar (output_separator); -+	  PUT_TAB_CHAR; - 	  prfield (i, line2); - 	} -       for (i = join_field_2 + 1; i < line2->nfields; ++i) - 	{ --	  putchar (output_separator); -+	  PUT_TAB_CHAR; - 	  prfield (i, line2); - 	} -       putchar ('\n'); -@@ -859,20 +1090,41 @@ -  - 	case 't': - 	  { --	    unsigned char newtab = optarg[0]; --	    if (! newtab) -+	    char *newtab; -+	    size_t newtablen; -+	    if (! optarg[0]) - 	      error (EXIT_FAILURE, 0, _("empty tab")); --	    if (optarg[1]) -+	    newtab = xstrdup (optarg); -+#if HAVE_MBRTOWC -+	    if (MB_CUR_MAX > 1) -+	      { -+		mbstate_t state; -+ -+		memset (&state, 0, sizeof (mbstate_t)); -+		newtablen = mbrtowc (NULL, newtab, -+				     strnlen (newtab, MB_LEN_MAX), -+				     &state); -+		if (newtablen == (size_t) 0 -+		    || newtablen == (size_t) -1 -+		    || newtablen == (size_t) -2) -+		  newtablen = 1; -+	      } -+	    else -+#endif -+	      newtablen = 1; -+		 -+	    if (newtablen == 1 && newtab[1]) -+	      { -+		if (STREQ (newtab, "\\0")) -+		  newtab[0] = '\0'; -+	      } -+	    if (tab != NULL && strcmp (tab, newtab)) - 	      { --		if (STREQ (optarg, "\\0")) --		  newtab = '\0'; --		else --		  error (EXIT_FAILURE, 0, _("multi-character tab %s"), --			 quote (optarg)); -+		free (newtab); -+		error (EXIT_FAILURE, 0, _("incompatible tabs")); - 	      } --	    if (0 <= tab && tab != newtab) --	      error (EXIT_FAILURE, 0, _("incompatible tabs")); - 	    tab = newtab; -+	    tablen = newtablen; - 	  } - 	  break; - -diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c ---- coreutils-6.11-orig/src/join.c	2008-04-21 13:44:32.000000000 +0200 -+++ coreutils-6.11/src/join.c	2008-04-21 14:03:22.000000000 +0200 -@@ -324,56 +324,115 @@ keycmp (struct line const *line1, struct - 	size_t jf_1, size_t jf_2) - { -   /* Start of field to compare in each file.  */ --  char *beg1; --  char *beg2; -- --  size_t len1; --  size_t len2;		/* Length of fields to compare.  */ -+  char *beg[2]; -+  char *copy[2]; -+  size_t len[2]; 	/* Length of fields to compare.  */ -   int diff; -+  int i, j; -  -   if (jf_1 < line1->nfields) -     { --      beg1 = line1->fields[jf_1].beg; --      len1 = line1->fields[jf_1].len; -+      beg[0] = line1->fields[jf_1].beg; -+      len[0] = line1->fields[jf_1].len; -     } -   else -     { --      beg1 = NULL; --      len1 = 0; -+      beg[0] = NULL; -+      len[0] = 0; -     } -  -   if (jf_2 < line2->nfields) -     { --      beg2 = line2->fields[jf_2].beg; --      len2 = line2->fields[jf_2].len; -+      beg[1] = line2->fields[jf_2].beg; -+      len[1] = line2->fields[jf_2].len; -     } -   else -     { --      beg2 = NULL; --      len2 = 0; -+      beg[1] = NULL; -+      len[1] = 0; -     } -  --  if (len1 == 0) --    return len2 == 0 ? 0 : -1; --  if (len2 == 0) -+  if (len[0] == 0) -+    return len[1] == 0 ? 0 : -1; -+  if (len[1] == 0) -     return 1; -  -   if (ignore_case) -     { --      /* FIXME: ignore_case does not work with NLS (in particular, --         with multibyte chars).  */ --      diff = memcasecmp (beg1, beg2, MIN (len1, len2)); -+#ifdef HAVE_MBRTOWC -+      if (MB_CUR_MAX > 1) -+      { -+        size_t mblength; -+        wchar_t wc, uwc; -+        mbstate_t state, state_bak; -+ -+        memset (&state, '\0', sizeof (mbstate_t)); -+ -+        for (i = 0; i < 2; i++) -+          { -+            copy[i] = alloca (len[i] + 1); -+ -+            for (j = 0; j < MIN (len[0], len[1]);) -+              { -+                state_bak = state; -+                mblength = mbrtowc (&wc, beg[i] + j, len[i] - j, &state); -+ -+                switch (mblength) -+                  { -+                  case (size_t) -1: -+                  case (size_t) -2: -+                    state = state_bak; -+                    /* Fall through */ -+                  case 0: -+                    mblength = 1; -+                    break; -+ -+                  default: -+                    uwc = towupper (wc); -+ -+                    if (uwc != wc) -+                      { -+                        mbstate_t state_wc; -+ -+                        memset (&state_wc, '\0', sizeof (mbstate_t)); -+                        wcrtomb (copy[i] + j, uwc, &state_wc); -+                      } -+                    else -+                      memcpy (copy[i] + j, beg[i] + j, mblength); -+                  } -+                j += mblength; -+              } -+            copy[i][j] = '\0'; -+          } -+      } -+      else -+#endif -+      { -+        for (i = 0; i < 2; i++) -+          { -+            copy[i] = alloca (len[i] + 1); -+ -+            for (j = 0; j < MIN (len[0], len[1]); j++) -+              copy[i][j] = toupper (beg[i][j]); -+ -+            copy[i][j] = '\0'; -+          } -+      } -     } -   else -     { --      if (hard_LC_COLLATE) --	return xmemcoll (beg1, len1, beg2, len2); --      diff = memcmp (beg1, beg2, MIN (len1, len2)); -+      copy[0] = (unsigned char *) beg[0]; -+      copy[1] = (unsigned char *) beg[1];   -     } -  -+  if (hard_LC_COLLATE) -+    return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]); -+  diff = memcmp (copy[0], copy[1], MIN (len[0], len[1])); -+ -+ -   if (diff) -     return diff; --  return len1 < len2 ? -1 : len1 != len2; -+  return len[0] - len[1]; - } -  - /* Check that successive input lines PREV and CURRENT from input file ---- coreutils-6.8+/src/uniq.c.i18n	2007-01-14 15:41:28.000000000 +0000 -+++ coreutils-6.8+/src/uniq.c	2007-03-01 15:08:24.000000000 +0000 -@@ -23,6 +23,16 @@ - #include <getopt.h> - #include <sys/types.h> -  -+/* Get mbstate_t, mbrtowc(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get isw* functions. */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "argmatch.h" - #include "linebuffer.h" -@@ -32,7 +42,19 @@ - #include "quote.h" - #include "xmemcoll.h" - #include "xstrtol.h" --#include "memcasecmp.h" -+#include "xmemcoll.h" -+ -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+   installation; work around this configuration error.  */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ -  - /* The official name of this program (e.g., no `g' prefix).  */ - #define PROGRAM_NAME "uniq" -@@ -109,6 +131,10 @@ - /* Select whether/how to delimit groups of duplicate lines.  */ - static enum delimit_method delimit_groups; -  -+/* Function pointers. */ -+static char * -+(*find_field) (struct linebuffer *line); -+ - static struct option const longopts[] = - { -   {"count", no_argument, NULL, 'c'}, -@@ -198,7 +224,7 @@ -    return a pointer to the beginning of the line's field to be compared. */ -  - static char * --find_field (struct linebuffer const *line) -+find_field_uni (struct linebuffer *line) - { -   size_t count; -   char const *lp = line->buffer; -@@ -219,6 +245,83 @@ -   return line->buffer + i; - } -  -+#if HAVE_MBRTOWC -+ -+# define MBCHAR_TO_WCHAR(WC, MBLENGTH, LP, POS, SIZE, STATEP, CONVFAIL)  \ -+  do									\ -+    {									\ -+      mbstate_t state_bak;						\ -+									\ -+      CONVFAIL = 0;							\ -+      state_bak = *STATEP;						\ -+									\ -+      MBLENGTH = mbrtowc (&WC, LP + POS, SIZE - POS, STATEP);		\ -+									\ -+      switch (MBLENGTH)							\ -+	{								\ -+	case (size_t)-2:						\ -+	case (size_t)-1:						\ -+	  *STATEP = state_bak;						\ -+	  CONVFAIL++;							\ -+	  /* Fall through */						\ -+	case 0:								\ -+	  MBLENGTH = 1;							\ -+	}								\ -+    }									\ -+  while (0) -+ -+static char * -+find_field_multi (struct linebuffer *line) -+{ -+  size_t count; -+  char *lp = line->buffer; -+  size_t size = line->length - 1; -+  size_t pos; -+  size_t mblength; -+  wchar_t wc; -+  mbstate_t *statep; -+  int convfail; -+ -+  pos = 0; -+  statep = &(line->state); -+ -+  /* skip fields. */ -+  for (count = 0; count < skip_fields && pos < size; count++) -+    { -+      while (pos < size) -+	{ -+	  MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+  -+	  if (convfail || !iswblank (wc)) -+	    { -+	      pos += mblength; -+	      break; -+	    } -+	  pos += mblength; -+	} -+ -+      while (pos < size) -+	{ -+	  MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+ -+	  if (!convfail && iswblank (wc)) -+	    break; -+ -+	  pos += mblength; -+	} -+    } -+ -+  /* skip fields. */ -+  for (count = 0; count < skip_chars && pos < size; count++) -+    { -+      MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+      pos += mblength; -+    } -+ -+  return lp + pos; -+} -+#endif -+ - /* Return false if two strings OLD and NEW match, true if not. -    OLD and NEW point not to the beginnings of the lines -    but rather to the beginnings of the fields to compare. -@@ -227,6 +330,8 @@ - static bool - different (char *old, char *new, size_t oldlen, size_t newlen) - { -+  char *copy_old, *copy_new; -+ -   if (check_chars < oldlen) -     oldlen = check_chars; -   if (check_chars < newlen) -@@ -234,14 +339,92 @@ -  -   if (ignore_case) -     { --      /* FIXME: This should invoke strcoll somehow.  */ --      return oldlen != newlen || memcasecmp (old, new, oldlen); -+      size_t i; -+ -+      copy_old = alloca (oldlen + 1); -+      copy_new = alloca (oldlen + 1); -+ -+      for (i = 0; i < oldlen; i++) -+	{ -+	  copy_old[i] = toupper (old[i]); -+	  copy_new[i] = toupper (new[i]); -+	} -     } --  else if (hard_LC_COLLATE) --    return xmemcoll (old, oldlen, new, newlen) != 0; -   else --    return oldlen != newlen || memcmp (old, new, oldlen); -+    { -+      copy_old = (char *)old; -+      copy_new = (char *)new; -+    } -+ -+  return xmemcoll (copy_old, oldlen, copy_new, newlen); -+} -+ -+#if HAVE_MBRTOWC -+static int -+different_multi (const char *old, const char *new, size_t oldlen, size_t newlen, mbstate_t oldstate, mbstate_t newstate) -+{ -+  size_t i, j, chars; -+  const char *str[2]; -+  char *copy[2]; -+  size_t len[2]; -+  mbstate_t state[2]; -+  size_t mblength; -+  wchar_t wc, uwc; -+  mbstate_t state_bak; -+ -+  str[0] = old; -+  str[1] = new; -+  len[0] = oldlen; -+  len[1] = newlen; -+  state[0] = oldstate; -+  state[1] = newstate; -+ -+  for (i = 0; i < 2; i++) -+    { -+      copy[i] = alloca (len[i] + 1); -+ -+      for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++) -+	{ -+	  state_bak = state[i]; -+	  mblength = mbrtowc (&wc, str[i] + j, len[i] - j, &(state[i])); -+ -+	  switch (mblength) -+	    { -+	    case (size_t)-1: -+	    case (size_t)-2: -+	      state[i] = state_bak; -+	      /* Fall through */ -+	    case 0: -+	      mblength = 1; -+	      break; -+ -+	    default: -+	      if (ignore_case) -+		{ -+		  uwc = towupper (wc); -+ -+		  if (uwc != wc) -+		    { -+		      mbstate_t state_wc; -+ -+		      memset (&state_wc, '\0', sizeof(mbstate_t)); -+		      wcrtomb (copy[i] + j, uwc, &state_wc); -+		    } -+		  else -+		    memcpy (copy[i] + j, str[i] + j, mblength); -+		} -+	      else -+		memcpy (copy[i] + j, str[i] + j, mblength); -+	    } -+	  j += mblength; -+	} -+      copy[i][j] = '\0'; -+      len[i] = j; -+    } -+ -+  return xmemcoll (copy[0], len[0], copy[1], len[1]); - } -+#endif -  - /* Output the line in linebuffer LINE to standard output -    provided that the switches say it should be output. -@@ -295,15 +478,43 @@ -     { -       char *prevfield IF_LINT (= NULL); -       size_t prevlen IF_LINT (= 0); -+#if HAVE_MBRTOWC -+      mbstate_t prevstate; -+ -+      memset (&prevstate, '\0', sizeof (mbstate_t)); -+#endif -  -       while (!feof (stdin)) - 	{ - 	  char *thisfield; - 	  size_t thislen; -+#if HAVE_MBRTOWC -+	  mbstate_t thisstate; -+#endif -+ - 	  if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) - 	    break; - 	  thisfield = find_field (thisline); - 	  thislen = thisline->length - 1 - (thisfield - thisline->buffer); -+#if HAVE_MBRTOWC -+	  if (MB_CUR_MAX > 1) -+            { -+            thisstate = thisline->state; -+ -+            if (prevline->length == 0 || different_multi -+              (thisfield, prevfield, thislen, prevlen, thisstate, prevstate)) -+              { -+                fwrite (thisline->buffer, sizeof (char), -+                        thisline->length, stdout); -+ -+                SWAP_LINES (prevline, thisline); -+                prevfield = thisfield; -+                prevlen = thislen; -+                prevstate = thisstate; -+              } -+          } -+	else -+#endif - 	  if (prevline->length == 0 - 	      || different (thisfield, prevfield, thislen, prevlen)) - 	    { -@@ -322,17 +533,26 @@ -       size_t prevlen; -       uintmax_t match_count = 0; -       bool first_delimiter = true; -+#if HAVE_MBRTOWC -+      mbstate_t prevstate; -+#endif -  -       if (readlinebuffer_delim (prevline, stdin, delimiter) == 0) - 	goto closefiles; -       prevfield = find_field (prevline); -       prevlen = prevline->length - 1 - (prevfield - prevline->buffer); -+#if HAVE_MBRTOWC -+      prevstate = prevline->state; -+#endif -  -       while (!feof (stdin)) - 	{ - 	  bool match; - 	  char *thisfield; - 	  size_t thislen; -+#if HAVE_MBRTOWC -+	  mbstate_t thisstate; -+#endif - 	  if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) - 	    { - 	      if (ferror (stdin)) -@@ -341,6 +561,15 @@ - 	    } - 	  thisfield = find_field (thisline); - 	  thislen = thisline->length - 1 - (thisfield - thisline->buffer); -+#if HAVE_MBRTOWC -+	  if (MB_CUR_MAX > 1) -+	    { -+              thisstate = thisline->state; -+              match = !different_multi (thisfield, prevfield, -+                                thislen, prevlen, thisstate, prevstate); -+            } -+	  else -+#endif - 	  match = !different (thisfield, prevfield, thislen, prevlen); - 	  match_count += match; -  -@@ -373,6 +602,9 @@ - 	      SWAP_LINES (prevline, thisline); - 	      prevfield = thisfield; - 	      prevlen = thislen; -+#if HAVE_MBRTOWC -+	      prevstate = thisstate; -+#endif - 	      if (!match) - 		match_count = 0; - 	    } -@@ -417,6 +649,19 @@ -  -   atexit (close_stdout); -  -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    { -+      find_field = find_field_multi; -+    } -+  else -+#endif -+    { -+      find_field = find_field_uni; -+    } -+ -+ -+ -   skip_chars = 0; -   skip_fields = 0; -   check_chars = SIZE_MAX; ---- coreutils-6.8+/src/fold.c.i18n	2007-02-23 12:01:47.000000000 +0000 -+++ coreutils-6.8+/src/fold.c	2007-03-01 15:08:24.000000000 +0000 -@@ -23,11 +23,33 @@ - #include <getopt.h> - #include <sys/types.h> -  -+/* Get mbstate_t, mbrtowc(), wcwidth().  */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get iswprint(), iswblank(), wcwidth().  */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" - #include "xstrtol.h" -  -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+      installation; work around this configuration error.  */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# undef MB_LEN_MAX -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - #define TAB_WIDTH 8 -  - /* The official name of this program (e.g., no `g' prefix).  */ -@@ -35,20 +57,41 @@ -  - #define AUTHORS proper_name ("David MacKenzie") -  -+#define FATAL_ERROR(Message)                                            \ -+  do                                                                    \ -+    {                                                                   \ -+      error (0, 0, (Message));                                          \ -+      usage (2);                                                        \ -+    }                                                                   \ -+  while (0) -+ -+enum operating_mode -+{ -+  /* Fold texts by columns that are at the given positions. */ -+  column_mode, -+ -+  /* Fold texts by bytes that are at the given positions. */ -+  byte_mode, -+ -+  /* Fold texts by characters that are at the given positions. */ -+  character_mode, -+}; -+ -+/* The argument shows current mode. (Default: column_mode) */ -+static enum operating_mode operating_mode; -+ - /* If nonzero, try to break on whitespace. */ - static bool break_spaces; -  --/* If nonzero, count bytes, not column positions. */ --static bool count_bytes; -- - /* If nonzero, at least one of the files we read was standard input. */ - static bool have_read_stdin; -  --static char const shortopts[] = "bsw:0::1::2::3::4::5::6::7::8::9::"; -+static char const shortopts[] = "bcsw:0::1::2::3::4::5::6::7::8::9::"; -  - static struct option const longopts[] = - { -   {"bytes", no_argument, NULL, 'b'}, -+  {"characters", no_argument, NULL, 'c'}, -   {"spaces", no_argument, NULL, 's'}, -   {"width", required_argument, NULL, 'w'}, -   {GETOPT_HELP_OPTION_DECL}, -@@ -81,6 +124,7 @@ - "), stdout); -       fputs (_("\ -   -b, --bytes         count bytes rather than columns\n\ -+  -c, --characters    count characters rather than columns\n\ -   -s, --spaces        break at spaces\n\ -   -w, --width=WIDTH   use WIDTH columns instead of 80\n\ - "), stdout); -@@ -98,7 +142,7 @@ - static size_t - adjust_column (size_t column, char c) - { --  if (!count_bytes) -+  if (operating_mode != byte_mode) -     { -       if (c == '\b') - 	{ -@@ -121,30 +165,14 @@ -    to stdout, with maximum line length WIDTH. -    Return true if successful.  */ -  --static bool --fold_file (char const *filename, size_t width) -+static void -+fold_text (FILE *istream, size_t width, int *saved_errno) - { --  FILE *istream; -   int c; -   size_t column = 0;		/* Screen column where next char will go. */ -   size_t offset_out = 0;	/* Index in `line_out' for next char. */ -   static char *line_out = NULL; -   static size_t allocated_out = 0; --  int saved_errno; -- --  if (STREQ (filename, "-")) --    { --      istream = stdin; --      have_read_stdin = true; --    } --  else --    istream = fopen (filename, "r"); -- --  if (istream == NULL) --    { --      error (0, errno, "%s", filename); --      return false; --    } -  -   while ((c = getc (istream)) != EOF) -     { -@@ -172,6 +200,15 @@ - 	      bool found_blank = false; - 	      size_t logical_end = offset_out; -  -+	      /* If LINE_OUT has no wide character, -+		 put a new wide character in LINE_OUT -+		 if column is bigger than width. */ -+	      if (offset_out == 0) -+		{ -+		  line_out[offset_out++] = c; -+		  continue; -+		} -+ - 	      /* Look for the last blank. */ - 	      while (logical_end) - 		{ -@@ -218,11 +255,225 @@ -       line_out[offset_out++] = c; -     } -  --  saved_errno = errno; -+  *saved_errno = errno; -+ -+  if (offset_out) -+    fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); -+ -+  free(line_out); -+} -+ -+#if HAVE_MBRTOWC -+static void -+fold_multibyte_text (FILE *istream, size_t width, int *saved_errno) -+{ -+  char buf[MB_LEN_MAX + BUFSIZ];  /* For spooling a read byte sequence. */ -+  size_t buflen = 0;	/* The length of the byte sequence in buf. */ -+  char *bufpos;         /* Next read position of BUF. */ -+  wint_t wc;		/* A gotten wide character. */ -+  size_t mblength;	/* The byte size of a multibyte character which shows -+			   as same character as WC. */ -+  mbstate_t state, state_bak;	/* State of the stream. */ -+  int convfail;		/* 1, when conversion is failed. Otherwise 0. */ -+ -+  char *line_out = NULL; -+  size_t offset_out = 0;	/* Index in `line_out' for next char. */ -+  size_t allocated_out = 0; -+ -+  int increment; -+  size_t column = 0; -+ -+  size_t last_blank_pos; -+  size_t last_blank_column; -+  int is_blank_seen; -+  int last_blank_increment; -+  int is_bs_following_last_blank; -+  size_t bs_following_last_blank_num; -+  int is_cr_after_last_blank; -+ -+#define CLEAR_FLAGS				\ -+   do						\ -+     {						\ -+	last_blank_pos = 0;			\ -+	last_blank_column = 0;			\ -+	is_blank_seen = 0;			\ -+	is_bs_following_last_blank = 0;		\ -+	bs_following_last_blank_num = 0;	\ -+	is_cr_after_last_blank = 0;		\ -+     }						\ -+   while (0) -+ -+#define START_NEW_LINE			\ -+   do					\ -+     {					\ -+      putchar ('\n');			\ -+      column = 0;			\ -+      offset_out = 0;			\ -+      CLEAR_FLAGS;			\ -+    }					\ -+   while (0) -+ -+  CLEAR_FLAGS; -+  memset (&state, '\0', sizeof(mbstate_t)); -+ -+  for (;; bufpos += mblength, buflen -= mblength) -+    { -+      if (buflen < MB_LEN_MAX && !feof (istream) && !ferror (istream)) -+	{ -+	  memmove (buf, bufpos, buflen); -+	  buflen += fread (buf + buflen, sizeof(char), BUFSIZ, istream); -+	  bufpos = buf; -+	} -+ -+      if (buflen < 1) -+	break; -+ -+      /* Get a wide character. */ -+      convfail = 0; -+      state_bak = state; -+      mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &state); -+ -+      switch (mblength) -+	{ -+	case (size_t)-1: -+	case (size_t)-2: -+	  convfail++; -+	  state = state_bak; -+	  /* Fall through. */ -+ -+	case 0: -+	  mblength = 1; -+	  break; -+	} -+ -+rescan: -+      if (operating_mode == byte_mode)			/* byte mode */ -+	increment = mblength; -+      else if (operating_mode == character_mode)	/* character mode */ -+	increment = 1; -+      else						/* column mode */ -+	{ -+	  if (convfail) -+	    increment = 1; -+	  else -+	    { -+	      switch (wc) -+		{ -+		case L'\n': -+		  fwrite (line_out, sizeof(char), offset_out, stdout); -+		  START_NEW_LINE; -+		  continue; -+		   -+		case L'\b': -+		  increment = (column > 0) ? -1 : 0; -+		  break; -+ -+		case L'\r': -+		  increment = -1 * column; -+		  break; -+ -+		case L'\t': -+		  increment = 8 - column % 8; -+		  break; -+ -+		default: -+		  increment = wcwidth (wc); -+		  increment = (increment < 0) ? 0 : increment; -+		} -+	    } -+	} -+ -+      if (column + increment > width && break_spaces && last_blank_pos) -+	{ -+	  fwrite (line_out, sizeof(char), last_blank_pos, stdout); -+	  putchar ('\n'); -+ -+	  offset_out = offset_out - last_blank_pos; -+	  column = column - last_blank_column + ((is_cr_after_last_blank) -+	      ? last_blank_increment : bs_following_last_blank_num); -+	  memmove (line_out, line_out + last_blank_pos, offset_out); -+	  CLEAR_FLAGS; -+	  goto rescan; -+	} -+ -+      if (column + increment > width && column != 0) -+	{ -+	  fwrite (line_out, sizeof(char), offset_out, stdout); -+	  START_NEW_LINE; -+	  goto rescan; -+	} -+ -+      if (allocated_out < offset_out + mblength) -+	{ -+	  allocated_out += 1024; -+	  line_out = xrealloc (line_out, allocated_out); -+	} -+ -+      memcpy (line_out + offset_out, bufpos, mblength); -+      offset_out += mblength; -+      column += increment; -+ -+      if (is_blank_seen && !convfail && wc == L'\r') -+	is_cr_after_last_blank = 1; -+ -+      if (is_bs_following_last_blank && !convfail && wc == L'\b') -+	++bs_following_last_blank_num; -+      else -+	is_bs_following_last_blank = 0; -+ -+      if (break_spaces && !convfail && iswblank (wc)) -+	{ -+	  last_blank_pos = offset_out; -+	  last_blank_column = column; -+	  is_blank_seen = 1; -+	  last_blank_increment = increment; -+	  is_bs_following_last_blank = 1; -+	  bs_following_last_blank_num = 0; -+	  is_cr_after_last_blank = 0; -+	} -+    } -+ -+  *saved_errno = errno; -  -   if (offset_out) -     fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); -  -+  free(line_out); -+} -+#endif -+ -+/* Fold file FILENAME, or standard input if FILENAME is "-", -+   to stdout, with maximum line length WIDTH. -+   Return 0 if successful, 1 if an error occurs. */ -+ -+static bool -+fold_file (char *filename, size_t width) -+{ -+  FILE *istream; -+  int saved_errno; -+ -+  if (STREQ (filename, "-")) -+    { -+      istream = stdin; -+      have_read_stdin = 1; -+    } -+  else -+    istream = fopen (filename, "r"); -+ -+  if (istream == NULL) -+    { -+      error (0, errno, "%s", filename); -+      return 1; -+    } -+ -+  /* Define how ISTREAM is being folded. */ -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    fold_multibyte_text (istream, width, &saved_errno); -+  else -+#endif -+    fold_text (istream, width, &saved_errno); -+ -   if (ferror (istream)) -     { -       error (0, saved_errno, "%s", filename); -@@ -255,7 +506,8 @@ -  -   atexit (close_stdout); -  --  break_spaces = count_bytes = have_read_stdin = false; -+  operating_mode = column_mode; -+  break_spaces = have_read_stdin = false; -  -   while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) -     { -@@ -264,7 +516,15 @@ -       switch (optc) - 	{ - 	case 'b':		/* Count bytes rather than columns. */ --	  count_bytes = true; -+	  if (operating_mode != column_mode) -+	    FATAL_ERROR (_("only one way of folding may be specified")); -+	  operating_mode = byte_mode; -+	  break; -+ -+	case 'c': -+	  if (operating_mode != column_mode) -+	    FATAL_ERROR (_("only one way of folding may be specified")); -+	  operating_mode = character_mode; - 	  break; -  - 	case 's':		/* Break at word boundaries. */ ---- coreutils-6.8+/src/sort.c.i18n	2007-02-24 11:23:23.000000000 +0000 -+++ coreutils-6.8+/src/sort.c	2007-03-01 15:10:57.000000000 +0000 -@@ -23,10 +23,19 @@ -  - #include <config.h> -  -+#include <assert.h> - #include <getopt.h> - #include <sys/types.h> - #include <sys/wait.h> - #include <signal.h> -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+/* Get isw* functions. */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+ - #include "system.h" - #include "argmatch.h" - #include "error.h" -@@ -116,14 +125,38 @@ - /* Thousands separator; if -1, then there isn't one.  */ - static int thousands_sep; -  -+static int force_general_numcompare = 0; -+ - /* Nonzero if the corresponding locales are hard.  */ - static bool hard_LC_COLLATE; --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET - static bool hard_LC_TIME; - #endif -  - #define NONZERO(x) ((x) != 0) -  -+/* get a multibyte character's byte length. */ -+#define GET_BYTELEN_OF_CHAR(LIM, PTR, MBLENGTH, STATE)			\ -+  do									\ -+    {									\ -+      wchar_t wc;							\ -+      mbstate_t state_bak;						\ -+									\ -+      state_bak = STATE;						\ -+      mblength = mbrtowc (&wc, PTR, LIM - PTR, &STATE);			\ -+									\ -+      switch (MBLENGTH)							\ -+	{								\ -+	case (size_t)-1:						\ -+	case (size_t)-2:						\ -+	  STATE = state_bak;						\ -+		/* Fall through. */					\ -+	case 0:								\ -+	  MBLENGTH = 1;							\ -+      }									\ -+    }									\ -+  while (0) -+ - /* The kind of blanks for '-b' to skip in various options. */ - enum blanktype { bl_start, bl_end, bl_both }; -  -@@ -261,13 +294,11 @@ -    they were read if all keys compare equal.  */ - static bool stable; -  --/* If TAB has this value, blanks separate fields.  */ --enum { TAB_DEFAULT = CHAR_MAX + 1 }; -- --/* Tab character separating fields.  If TAB_DEFAULT, then fields are -+/* Tab character separating fields.  If tab_length is 0, then fields are -    separated by the empty string between a non-blank character and a blank -    character. */ --static int tab = TAB_DEFAULT; -+static char tab[MB_LEN_MAX + 1]; -+static size_t tab_length = 0; -  - /* Flag to remove consecutive duplicate lines from the output. -    Only the last of a sequence of equal lines will be output. */ -@@ -639,6 +670,44 @@ -     update_proc (pid); - } -  -+/* Function pointers. */ -+static void -+(*inittables) (void); -+static char * -+(*begfield) (const struct line*, const struct keyfield *); -+static char * -+(*limfield) (const struct line*, const struct keyfield *); -+static int -+(*getmonth) (char const *, size_t); -+static int -+(*keycompare) (const struct line *, const struct line *); -+static int -+(*numcompare) (const char *, const char *); -+ -+/* Test for white space multibyte character. -+   Set LENGTH the byte length of investigated multibyte character. */ -+#if HAVE_MBRTOWC -+static int -+ismbblank (const char *str, size_t len, size_t *length) -+{ -+  size_t mblength; -+  wchar_t wc; -+  mbstate_t state; -+ -+  memset (&state, '\0', sizeof(mbstate_t)); -+  mblength = mbrtowc (&wc, str, len, &state); -+ -+  if (mblength == (size_t)-1 || mblength == (size_t)-2) -+    { -+      *length = 1; -+      return 0; -+    } -+ -+  *length = (mblength < 1) ? 1 : mblength; -+  return iswblank (wc); -+} -+#endif -+ - /* Clean up any remaining temporary files.  */ -  - static void -@@ -978,7 +1047,7 @@ -   free (node); - } -  --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET -  - static int - struct_month_cmp (const void *m1, const void *m2) -@@ -993,7 +1062,7 @@ - /* Initialize the character class tables. */ -  - static void --inittables (void) -+inittables_uni (void) - { -   size_t i; -  -@@ -1005,7 +1074,7 @@ -       fold_toupper[i] = toupper (i); -     } -  --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET -   /* If we're not in the "C" locale, read different names for months.  */ -   if (hard_LC_TIME) -     { -@@ -1031,6 +1100,64 @@ -     xstrtol_fatal (e, oi, c, long_options, s); - } -  -+#if HAVE_MBRTOWC -+static void -+inittables_mb (void) -+{ -+  int i, j, k, l; -+  char *name, *s; -+  size_t s_len, mblength; -+  char mbc[MB_LEN_MAX]; -+  wchar_t wc, pwc; -+  mbstate_t state_mb, state_wc; -+ -+  for (i = 0; i < MONTHS_PER_YEAR; i++) -+    { -+      s = (char *) nl_langinfo (ABMON_1 + i); -+      s_len = strlen (s); -+      monthtab[i].name = name = (char *) xmalloc (s_len + 1); -+      monthtab[i].val = i + 1; -+ -+      memset (&state_mb, '\0', sizeof (mbstate_t)); -+      memset (&state_wc, '\0', sizeof (mbstate_t)); -+ -+      for (j = 0; j < s_len;) -+	{ -+	  if (!ismbblank (s + j, s_len - j, &mblength)) -+	    break; -+	  j += mblength; -+	} -+ -+      for (k = 0; j < s_len;) -+	{ -+	  mblength = mbrtowc (&wc, (s + j), (s_len - j), &state_mb); -+	  assert (mblength != (size_t)-1 && mblength != (size_t)-2); -+	  if (mblength == 0) -+	    break; -+ -+	  pwc = towupper (wc); -+	  if (pwc == wc) -+	    { -+	      memcpy (mbc, s + j, mblength); -+	      j += mblength; -+	    } -+	  else -+	    { -+	      j += mblength; -+	      mblength = wcrtomb (mbc, pwc, &state_wc); -+	      assert (mblength != (size_t)0 && mblength != (size_t)-1); -+	    } -+ -+	  for (l = 0; l < mblength; l++) -+	    name[k++] = mbc[l]; -+	} -+      name[k] = '\0'; -+    } -+  qsort ((void *) monthtab, MONTHS_PER_YEAR, -+      sizeof (struct month), struct_month_cmp); -+} -+#endif -+ - /* Specify the amount of main memory to use when sorting.  */ - static void - specify_sort_size (int oi, char c, char const *s) -@@ -1241,7 +1368,7 @@ -    by KEY in LINE. */ -  - static char * --begfield (const struct line *line, const struct keyfield *key) -+begfield_uni (const struct line *line, const struct keyfield *key) - { -   char *ptr = line->text, *lim = ptr + line->length - 1; -   size_t sword = key->sword; -@@ -1251,10 +1378,10 @@ -   /* The leading field separator itself is included in a field when -t -      is absent.  */ -  --  if (tab != TAB_DEFAULT) -+  if (tab_length) -     while (ptr < lim && sword--) -       { --	while (ptr < lim && *ptr != tab) -+	while (ptr < lim && *ptr != tab[0]) - 	  ++ptr; - 	if (ptr < lim) - 	  ++ptr; -@@ -1282,11 +1409,70 @@ -   return ptr; - } -  -+#if HAVE_MBRTOWC -+static char * -+begfield_mb (const struct line *line, const struct keyfield *key) -+{ -+  int i; -+  char *ptr = line->text, *lim = ptr + line->length - 1; -+  size_t sword = key->sword; -+  size_t schar = key->schar; -+  size_t mblength; -+  mbstate_t state; -+ -+  memset (&state, '\0', sizeof(mbstate_t)); -+ -+  if (tab_length) -+    while (ptr < lim && sword--) -+      { -+	while (ptr < lim && memcmp (ptr, tab, tab_length) != 0) -+	  { -+	    GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	    ptr += mblength; -+	  } -+	if (ptr < lim) -+	  { -+	    GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	    ptr += mblength; -+	  } -+      } -+  else -+    while (ptr < lim && sword--) -+      { -+	while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+	  ptr += mblength; -+	if (ptr < lim) -+	  { -+	    GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	    ptr += mblength; -+	  } -+	while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength)) -+	  ptr += mblength; -+      } -+ -+  if (key->skipsblanks) -+    while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+      ptr += mblength; -+ -+  for (i = 0; i < schar; i++) -+    { -+      GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ -+      if (ptr + mblength > lim) -+	break; -+      else -+	ptr += mblength; -+    } -+ -+  return ptr; -+} -+#endif -+ - /* Return the limit of (a pointer to the first character after) the field -    in LINE specified by KEY. */ -  - static char * --limfield (const struct line *line, const struct keyfield *key) -+limfield_uni (const struct line *line, const struct keyfield *key) - { -   char *ptr = line->text, *lim = ptr + line->length - 1; -   size_t eword = key->eword, echar = key->echar; -@@ -1299,10 +1485,10 @@ -      `beginning' is the first character following the delimiting TAB. -      Otherwise, leave PTR pointing at the first `blank' character after -      the preceding field.  */ --  if (tab != TAB_DEFAULT) -+  if (tab_length) -     while (ptr < lim && eword--) -       { --	while (ptr < lim && *ptr != tab) -+	while (ptr < lim && *ptr != tab[0]) - 	  ++ptr; - 	if (ptr < lim && (eword | echar)) - 	  ++ptr; -@@ -1348,10 +1534,10 @@ -      */ -  -   /* Make LIM point to the end of (one byte past) the current field.  */ --  if (tab != TAB_DEFAULT) -+  if (tab_length) -     { -       char *newlim; --      newlim = memchr (ptr, tab, lim - ptr); -+      newlim = memchr (ptr, tab[0], lim - ptr); -       if (newlim) - 	lim = newlim; -     } -@@ -1384,6 +1570,113 @@ -   return ptr; - } -  -+#if HAVE_MBRTOWC -+static char * -+limfield_mb (const struct line *line, const struct keyfield *key) -+{ -+  char *ptr = line->text, *lim = ptr + line->length - 1; -+  size_t eword = key->eword, echar = key->echar; -+  int i; -+  size_t mblength; -+  mbstate_t state; -+ -+  if (echar == 0) -+    eword++; /* skip all of end field. */ -+ -+  memset (&state, '\0', sizeof(mbstate_t)); -+ -+  if (tab_length) -+    while (ptr < lim && eword--) -+      { -+	while (ptr < lim && memcmp (ptr, tab, tab_length) != 0) -+	  { -+	    GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	    ptr += mblength; -+	  } -+	if (ptr < lim && (eword | echar)) -+	  { -+	    GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	    ptr += mblength; -+	  } -+      } -+  else -+    while (ptr < lim && eword--) -+      { -+	while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+	  ptr += mblength; -+	if (ptr < lim) -+	  { -+	    GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	    ptr += mblength; -+	  } -+	while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength)) -+	  ptr += mblength; -+      } -+ -+ -+# ifdef POSIX_UNSPECIFIED -+  /* Make LIM point to the end of (one byte past) the current field.  */ -+  if (tab_length) -+    { -+      char *newlim, *p; -+ -+      newlim = NULL; -+      for (p = ptr; p < lim;) -+ 	{ -+	  if (memcmp (p, tab, tab_length) == 0) -+	    { -+	      newlim = p; -+	      break; -+	    } -+ -+	  GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	  p += mblength; -+	} -+    } -+  else -+    { -+      char *newlim; -+      newlim = ptr; -+ -+      while (newlim < lim && ismbblank (newlim, lim - newlim, &mblength)) -+	newlim += mblength; -+      if (ptr < lim) -+	{ -+	  GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+	  ptr += mblength; -+	} -+      while (newlim < lim && !ismbblank (newlim, lim - newlim, &mblength)) -+	newlim += mblength; -+      lim = newlim; -+    } -+# endif -+ -+  if (echar != 0) -+  { -+    /* If we're skipping leading blanks, don't start counting characters -+     *      until after skipping past any leading blanks.  */ -+    if (key->skipsblanks) -+      while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+        ptr += mblength; -+ -+    memset (&state, '\0', sizeof(mbstate_t)); -+ -+    /* Advance PTR by ECHAR (if possible), but no further than LIM.  */ -+    for (i = 0; i < echar; i++) -+     { -+        GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); -+ -+        if (ptr + mblength > lim) -+  	break; -+        else -+	  ptr += mblength; -+      } -+  } -+ -+  return ptr; -+} -+#endif -+ - /* Fill BUF reading from FP, moving buf->left bytes from the end -    of buf->buf to the beginning first.  If EOF is reached and the -    file wasn't terminated by a newline, supply one.  Set up BUF's line -@@ -1466,8 +1753,24 @@ - 		  else - 		    { - 		      if (key->skipsblanks) --			while (blanks[to_uchar (*line_start)]) --			  line_start++; -+			{ -+#if HAVE_MBRTOWC -+			  if (MB_CUR_MAX > 1) -+			    { -+			      size_t mblength; -+			      mbstate_t state; -+			      memset (&state, '\0', sizeof(mbstate_t)); -+			      while (line_start < line->keylim && -+				     ismbblank (line_start, -+						line->keylim - line_start, -+						&mblength)) -+				line_start += mblength; -+			    } -+			  else -+#endif -+			  while (blanks[to_uchar (*line_start)]) -+			    line_start++; -+			} - 		      line->keybeg = line_start; - 		    } - 		} -@@ -1500,7 +1803,7 @@ -    hideously fast. */ -  - static int --numcompare (const char *a, const char *b) -+numcompare_uni (const char *a, const char *b) - { -   while (blanks[to_uchar (*a)]) -     a++; -@@ -1510,6 +1813,25 @@ -   return strnumcmp (a, b, decimal_point, thousands_sep); - } -  -+#if HAVE_MBRTOWC -+static int -+numcompare_mb (const char *a, const char *b) -+{ -+  size_t mblength, len; -+  len = strlen (a); /* okay for UTF-8 */ -+  while (*a && ismbblank (a, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength)) -+    { -+      a += mblength; -+      len -= mblength; -+    } -+  len = strlen (b); /* okay for UTF-8 */ -+  while (*b && ismbblank (b, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength)) -+    b += mblength; -+ -+  return strnumcmp (a, b, decimal_point, thousands_sep); -+} -+#endif /* HAV_EMBRTOWC */ -+ - static int - general_numcompare (const char *sa, const char *sb) - { -@@ -1543,7 +1865,7 @@ -    Return 0 if the name in S is not recognized.  */ -  - static int --getmonth (char const *month, size_t len) -+getmonth_uni (char const *month, size_t len) - { -   size_t lo = 0; -   size_t hi = MONTHS_PER_YEAR; -@@ -1698,11 +2020,79 @@ -   return diff; - } -  -+#if HAVE_MBRTOWC -+static int -+getmonth_mb (const char *s, size_t len) -+{ -+  char *month; -+  register size_t i; -+  register int lo = 0, hi = MONTHS_PER_YEAR, result; -+  char *tmp; -+  size_t wclength, mblength; -+  const char **pp; -+  const wchar_t **wpp; -+  wchar_t *month_wcs; -+  mbstate_t state; -+ -+  while (len > 0 && ismbblank (s, len, &mblength)) -+    { -+      s += mblength; -+      len -= mblength; -+    } -+ -+  if (len == 0) -+    return 0; -+ -+  month = (char *) alloca (len + 1); -+ -+  tmp = (char *) alloca (len + 1); -+  memcpy (tmp, s, len); -+  tmp[len] = '\0'; -+  pp = (const char **)&tmp; -+  month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t)); -+  memset (&state, '\0', sizeof(mbstate_t)); -+ -+  wclength = mbsrtowcs (month_wcs, pp, len + 1, &state); -+  assert (wclength != (size_t)-1 && *pp == NULL); -+ -+  for (i = 0; i < wclength; i++) -+    { -+      month_wcs[i] = towupper(month_wcs[i]); -+      if (iswblank (month_wcs[i])) -+	{ -+	  month_wcs[i] = L'\0'; -+	  break; -+	} -+    } -+ -+  wpp = (const wchar_t **)&month_wcs; -+ -+  mblength = wcsrtombs (month, wpp, len + 1, &state); -+  assert (mblength != (-1) && *wpp == NULL); -+ -+  do -+    { -+      int ix = (lo + hi) / 2; -+ -+      if (strncmp (month, monthtab[ix].name, strlen (monthtab[ix].name)) < 0) -+	hi = ix; -+      else -+	lo = ix; -+    } -+  while (hi - lo > 1); -+ -+  result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name)) -+      ? monthtab[lo].val : 0); -+ -+  return result; -+} -+#endif -+ - /* Compare two lines A and B trying every key in sequence until there -    are no more keys or a difference is found. */ -  - static int --keycompare (const struct line *a, const struct line *b) -+keycompare_uni (const struct line *a, const struct line *b) - { -   struct keyfield const *key = keylist; -  -@@ -1875,6 +2265,179 @@ -   return key->reverse ? -diff : diff; - } -  -+#if HAVE_MBRTOWC -+static int -+keycompare_mb (const struct line *a, const struct line *b) -+{ -+  struct keyfield *key = keylist; -+ -+  /* For the first iteration only, the key positions have been -+     precomputed for us. */ -+  char *texta = a->keybeg; -+  char *textb = b->keybeg; -+  char *lima = a->keylim; -+  char *limb = b->keylim; -+ -+  size_t mblength_a, mblength_b; -+  wchar_t wc_a, wc_b; -+  mbstate_t state_a, state_b; -+ -+  int diff; -+ -+  memset (&state_a, '\0', sizeof(mbstate_t)); -+  memset (&state_b, '\0', sizeof(mbstate_t)); -+ -+  for (;;) -+    { -+      unsigned char *translate = (unsigned char *) key->translate; -+      bool const *ignore = key->ignore; -+ -+      /* Find the lengths. */ -+      size_t lena = lima <= texta ? 0 : lima - texta; -+      size_t lenb = limb <= textb ? 0 : limb - textb; -+ -+      /* Actually compare the fields. */ -+      if (key->random) -+        diff = compare_random (texta, lena, textb, lenb); -+      else if (key->numeric | key->general_numeric) -+	{ -+	  char savea = *lima, saveb = *limb; -+ -+	  *lima = *limb = '\0'; -+	  if (force_general_numcompare) -+	    diff = general_numcompare (texta, textb); -+	  else -+	    diff = ((key->numeric ? numcompare : general_numcompare) -+		(texta, textb)); -+	  *lima = savea, *limb = saveb; -+	} -+      else if (key->month) -+	diff = getmonth (texta, lena) - getmonth (textb, lenb); -+      else -+	{ -+	  if (ignore || translate) -+	    { -+	      char *copy_a = (char *) alloca (lena + 1 + lenb + 1); -+	      char *copy_b = copy_a + lena + 1; -+	      size_t new_len_a, new_len_b; -+	      size_t i, j; -+ -+	      /* Ignore and/or translate chars before comparing.  */ -+# define IGNORE_CHARS(NEW_LEN, LEN, TEXT, COPY, WC, MBLENGTH, STATE)	\ -+  do									\ -+    {									\ -+      wchar_t uwc;							\ -+      char mbc[MB_LEN_MAX];						\ -+      mbstate_t state_wc;						\ -+									\ -+      for (NEW_LEN = i = 0; i < LEN;)					\ -+	{								\ -+	  mbstate_t state_bak;						\ -+									\ -+	  state_bak = STATE;						\ -+	  MBLENGTH = mbrtowc (&WC, TEXT + i, LEN - i, &STATE);		\ -+									\ -+	  if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1		\ -+	      || MBLENGTH == 0)						\ -+	    {								\ -+	      if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1)	\ -+		STATE = state_bak;					\ -+	      if (!ignore)						\ -+		COPY[NEW_LEN++] = TEXT[i++];				\ -+	      continue;							\ -+	    }								\ -+									\ -+	  if (ignore)							\ -+	    {								\ -+	      if ((ignore == nonprinting && !iswprint (WC))		\ -+		   || (ignore == nondictionary				\ -+		       && !iswalnum (WC) && !iswblank (WC)))		\ -+		{							\ -+		  i += MBLENGTH;					\ -+		  continue;						\ -+		}							\ -+	    }								\ -+									\ -+	  if (translate)						\ -+	    {								\ -+									\ -+	      uwc = towupper(WC);					\ -+	      if (WC == uwc)						\ -+		{							\ -+		  memcpy (mbc, TEXT + i, MBLENGTH);			\ -+		  i += MBLENGTH;					\ -+		}							\ -+	      else							\ -+		{							\ -+		  i += MBLENGTH;					\ -+		  WC = uwc;						\ -+		  memset (&state_wc, '\0', sizeof (mbstate_t));		\ -+									\ -+		  MBLENGTH = wcrtomb (mbc, WC, &state_wc);		\ -+		  assert (MBLENGTH != (size_t)-1 && MBLENGTH != 0);	\ -+		}							\ -+									\ -+	      for (j = 0; j < MBLENGTH; j++)				\ -+		COPY[NEW_LEN++] = mbc[j];				\ -+	    }								\ -+	  else								\ -+	    for (j = 0; j < MBLENGTH; j++)				\ -+	      COPY[NEW_LEN++] = TEXT[i++];				\ -+	}								\ -+      COPY[NEW_LEN] = '\0';						\ -+    }									\ -+  while (0) -+	      IGNORE_CHARS (new_len_a, lena, texta, copy_a, -+			    wc_a, mblength_a, state_a); -+	      IGNORE_CHARS (new_len_b, lenb, textb, copy_b, -+			    wc_b, mblength_b, state_b); -+	      diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b); -+	    } -+	  else if (lena == 0) -+	    diff = - NONZERO (lenb); -+	  else if (lenb == 0) -+	    goto greater; -+	  else -+	    diff = xmemcoll (texta, lena, textb, lenb); -+	} -+ -+      if (diff) -+	goto not_equal; -+ -+      key = key->next; -+      if (! key) -+	break; -+ -+      /* Find the beginning and limit of the next field.  */ -+      if (key->eword != -1) -+	lima = limfield (a, key), limb = limfield (b, key); -+      else -+	lima = a->text + a->length - 1, limb = b->text + b->length - 1; -+ -+      if (key->sword != -1) -+	texta = begfield (a, key), textb = begfield (b, key); -+      else -+	{ -+	  texta = a->text, textb = b->text; -+	  if (key->skipsblanks) -+	    { -+	      while (texta < lima && ismbblank (texta, lima - texta, &mblength_a)) -+		texta += mblength_a; -+	      while (textb < limb && ismbblank (textb, limb - textb, &mblength_b)) -+		textb += mblength_b; -+	    } -+	} -+    } -+ -+  return 0; -+ -+greater: -+  diff = 1; -+not_equal: -+  return key->reverse ? -diff : diff; -+} -+#endif -+ - /* Compare two lines A and B, returning negative, zero, or positive -    depending on whether A compares less than, equal to, or greater than B. */ - -@@ -2744,7 +3305,7 @@ -   initialize_exit_failure (SORT_FAILURE); -  -   hard_LC_COLLATE = hard_locale (LC_COLLATE); --#if HAVE_NL_LANGINFO -+#if HAVE_LANGINFO_CODESET -   hard_LC_TIME = hard_locale (LC_TIME); - #endif -  -@@ -2765,6 +3326,27 @@ -       thousands_sep = -1; -   } -  -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    { -+      inittables = inittables_mb; -+      begfield = begfield_mb; -+      limfield = limfield_mb; -+      getmonth = getmonth_mb; -+      keycompare = keycompare_mb; -+      numcompare = numcompare_mb; -+    } -+  else -+#endif -+    { -+      inittables = inittables_uni; -+      begfield = begfield_uni; -+      limfield = limfield_uni; -+      getmonth = getmonth_uni; -+      keycompare = keycompare_uni; -+      numcompare = numcompare_uni; -+    } -+ -   have_read_stdin = false; -   inittables (); -  -@@ -3015,13 +3597,35 @@ -  - 	case 't': - 	  { --	    char newtab = optarg[0]; --	    if (! newtab) -+	    char newtab[MB_LEN_MAX + 1]; -+	    size_t newtab_length = 1; -+	    strncpy (newtab, optarg, MB_LEN_MAX); -+	    if (! newtab[0]) - 	      error (SORT_FAILURE, 0, _("empty tab")); --	    if (optarg[1]) -+#if HAVE_MBRTOWC -+	    if (MB_CUR_MAX > 1) -+	      { -+		wchar_t wc; -+		mbstate_t state; -+		size_t i; -+ -+		memset (&state, '\0', sizeof (mbstate_t)); -+		newtab_length = mbrtowc (&wc, newtab, strnlen (newtab, -+							       MB_LEN_MAX), -+					 &state); -+		switch (newtab_length) -+		  { -+		  case (size_t) -1: -+		  case (size_t) -2: -+		  case 0: -+		    newtab_length = 1; -+		  } -+	      } -+#endif -+	    if (newtab_length == 1 && optarg[1]) - 	      { - 		if (STREQ (optarg, "\\0")) --		  newtab = '\0'; -+		  newtab[0] = '\0'; - 		else - 		  { - 		    /* Provoke with `sort -txx'.  Complain about -@@ -3032,9 +3636,12 @@ - 			   quote (optarg)); - 		  } - 	      } --	    if (tab != TAB_DEFAULT && tab != newtab) -+	    if (tab_length -+		&& (tab_length != newtab_length -+		    || memcmp (tab, newtab, tab_length) != 0)) - 	      error (SORT_FAILURE, 0, _("incompatible tabs")); --	    tab = newtab; -+	    memcpy (tab, newtab, newtab_length); -+	    tab_length = newtab_length; - 	  } - 	  break; -  ---- coreutils-6.8+/src/unexpand.c.i18n	2007-01-14 15:41:28.000000000 +0000 -+++ coreutils-6.8+/src/unexpand.c	2007-03-01 15:08:24.000000000 +0000 -@@ -39,11 +39,28 @@ - #include <stdio.h> - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" - #include "xstrndup.h" -  -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+      installation; work around this configuration error.  */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix).  */ - #define PROGRAM_NAME "unexpand" -  -@@ -110,6 +127,208 @@ -   {NULL, 0, NULL, 0} - }; -  -+static FILE *next_file (FILE *fp); -+ -+#if HAVE_MBRTOWC -+static void -+unexpand_multibyte (void) -+{ -+  FILE *fp;			/* Input stream. */ -+  mbstate_t i_state;		/* Current shift state of the input stream. */ -+  mbstate_t i_state_bak;	/* Back up the I_STATE. */ -+  mbstate_t o_state;		/* Current shift state of the output stream. */ -+  char buf[MB_LEN_MAX + BUFSIZ];  /* For spooling a read byte sequence. */ -+  char *bufpos;			/* Next read position of BUF. */ -+  size_t buflen = 0;		/* The length of the byte sequence in buf. */ -+  wint_t wc;			/* A gotten wide character. */ -+  size_t mblength;		/* The byte size of a multibyte character -+				   which shows as same character as WC. */ -+ -+  /* Index in `tab_list' of next tabstop: */ -+  int tab_index = 0;		/* For calculating width of pending tabs. */ -+  int print_tab_index = 0;	/* For printing as many tabs as possible. */ -+  unsigned int column = 0;	/* Column on screen of next char. */ -+  int next_tab_column;		/* Column the next tab stop is on. */ -+  int convert = 1;		/* If nonzero, perform translations. */ -+  unsigned int pending = 0;	/* Pending columns of blanks. */ -+ -+  fp = next_file ((FILE *) NULL); -+  if (fp == NULL) -+    return; -+ -+  memset (&o_state, '\0', sizeof(mbstate_t)); -+  memset (&i_state, '\0', sizeof(mbstate_t)); -+ -+  for (;;) -+    { -+      if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp)) -+	{ -+	  memmove (buf, bufpos, buflen); -+	  buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp); -+	  bufpos = buf; -+	} -+ -+      /* Get a wide character. */ -+      if (buflen < 1) -+	{ -+	  mblength = 1; -+	  wc = WEOF; -+	} -+      else -+	{ -+	  i_state_bak = i_state; -+	  mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &i_state); -+	} -+ -+      if (mblength == (size_t)-1 || mblength == (size_t)-2) -+	{ -+	  i_state = i_state_bak; -+	  wc = L'\0'; -+	} -+ -+      if (wc == L' ' && convert && column < INT_MAX) -+	{ -+	  ++pending; -+	  ++column; -+	} -+      else if (wc == L'\t' && convert) -+	{ -+	  if (tab_size == 0) -+	    { -+	      /* Do not let tab_index == first_free_tab; -+		 stop when it is 1 less. */ -+	      while (tab_index < first_free_tab - 1 -+		  && column >= tab_list[tab_index]) -+		tab_index++; -+	      next_tab_column = tab_list[tab_index]; -+	      if (tab_index < first_free_tab - 1) -+		tab_index++; -+	      if (column >= next_tab_column) -+		{ -+		  convert = 0;	/* Ran out of tab stops. */ -+		  goto flush_pend_mb; -+		} -+	    } -+	  else -+	    { -+	      next_tab_column = column + tab_size - column % tab_size; -+	    } -+	  pending += next_tab_column - column; -+	  column = next_tab_column; -+	} -+      else -+	{ -+flush_pend_mb: -+	  /* Flush pending spaces.  Print as many tabs as possible, -+	     then print the rest as spaces. */ -+	  if (pending == 1) -+	    { -+	      putchar (' '); -+	      pending = 0; -+	    } -+	  column -= pending; -+	  while (pending > 0) -+	    { -+	      if (tab_size == 0) -+		{ -+		  /* Do not let print_tab_index == first_free_tab; -+		     stop when it is 1 less. */ -+		  while (print_tab_index < first_free_tab - 1 -+		      && column >= tab_list[print_tab_index]) -+		    print_tab_index++; -+		  next_tab_column = tab_list[print_tab_index]; -+		  if (print_tab_index < first_free_tab - 1) -+		    print_tab_index++; -+		} -+	      else -+		{ -+		  next_tab_column = -+		    column + tab_size - column % tab_size; -+		} -+	      if (next_tab_column - column <= pending) -+		{ -+		  putchar ('\t'); -+		  pending -= next_tab_column - column; -+		  column = next_tab_column; -+		} -+	      else -+		{ -+		  --print_tab_index; -+		  column += pending; -+		  while (pending != 0) -+		    { -+		      putchar (' '); -+		      pending--; -+		    } -+		} -+	    } -+ -+	  if (wc == WEOF) -+	    { -+	      fp = next_file (fp); -+	      if (fp == NULL) -+		break;          /* No more files. */ -+	      else -+		{ -+		  memset (&i_state, '\0', sizeof(mbstate_t)); -+		  continue; -+		} -+	    } -+ -+	  if (mblength == (size_t)-1 || mblength == (size_t)-2) -+	    { -+	      if (convert) -+		{ -+		  ++column; -+		  if (convert_entire_line == 0) -+		    convert = 0; -+		} -+	      mblength = 1; -+	      putchar (buf[0]); -+	    } -+	  else if (mblength == 0) -+	    { -+	      if (convert && convert_entire_line == 0) -+		convert = 0; -+	      mblength = 1; -+	      putchar ('\0'); -+	    } -+	  else -+	    { -+	      if (convert) -+		{ -+		  if (wc == L'\b') -+		    { -+		      if (column > 0) -+			--column; -+		    } -+		  else -+		    { -+		      int width;            /* The width of WC. */ -+ -+		      width = wcwidth (wc); -+		      column += (width > 0) ? width : 0; -+		      if (convert_entire_line == 0) -+			convert = 0; -+		    } -+		} -+ -+	      if (wc == L'\n') -+		{ -+		  tab_index = print_tab_index = 0; -+		  column = pending = 0; -+		  convert = 1; -+		} -+	      fwrite (bufpos, sizeof(char), mblength, stdout); -+	    } -+	} -+      buflen -= mblength; -+      bufpos += mblength; -+    } -+} -+#endif -+ -+ - void - usage (int status) - { -@@ -531,7 +750,12 @@ -  -   file_list = (optind < argc ? &argv[optind] : stdin_argv); -  --  unexpand (); -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    unexpand_multibyte (); -+  else -+#endif -+    unexpand (); -  -   if (have_read_stdin && fclose (stdin) != 0) -     error (EXIT_FAILURE, errno, "-"); ---- coreutils-6.8+/src/pr.c.i18n	2007-01-14 15:41:28.000000000 +0000 -+++ coreutils-6.8+/src/pr.c	2007-03-01 15:08:24.000000000 +0000 -@@ -313,6 +313,32 @@ -  - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get MB_LEN_MAX.  */ -+#include <limits.h> -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+   installation; work around this configuration error.  */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX == 1 -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Get MB_CUR_MAX.  */ -+#include <stdlib.h> -+ -+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */ -+/* Get mbstate_t, mbrtowc(), wcwidth().  */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif -+ -+/* Get iswprint(). -- for wcwidth().  */ -+#if HAVE_WCTYPE_H -+# include <wctype.h> -+#endif -+#if !defined iswprint && !HAVE_ISWPRINT -+# define iswprint(wc) 1 -+#endif -+ - #include "system.h" - #include "error.h" - #include "mbswidth.h" -@@ -324,6 +350,18 @@ - #include "strftime.h" - #include "xstrtol.h" -  -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ -+#ifndef HAVE_DECL_WCWIDTH -+"this configure-time declaration test was not run" -+#endif -+#if !HAVE_DECL_WCWIDTH -+extern int wcwidth (); -+#endif -+ - /* The official name of this program (e.g., no `g' prefix).  */ - #define PROGRAM_NAME "pr" -  -@@ -416,7 +454,20 @@ -  - #define NULLCOL (COLUMN *)0 -  --static int char_to_clump (char c); -+/* Funtion pointers to switch functions for single byte locale or for -+   multibyte locale. If multibyte functions do not exist in your sysytem, -+   these pointers always point the function for single byte locale. */ -+static void (*print_char) (char c); -+static int (*char_to_clump) (char c); -+ -+/* Functions for single byte locale. */ -+static void print_char_single (char c); -+static int char_to_clump_single (char c); -+ -+/* Functions for multibyte locale. */ -+static void print_char_multi (char c); -+static int char_to_clump_multi (char c); -+ - static bool read_line (COLUMN *p); - static bool print_page (void); - static bool print_stored (COLUMN *p); -@@ -426,6 +477,7 @@ - static void pad_across_to (int position); - static void add_line_number (COLUMN *p); - static void getoptarg (char *arg, char switch_char, char *character, -+		       int *character_length, int *character_width, - 		       int *number); - void usage (int status); - static void print_files (int number_of_files, char **av); -@@ -440,7 +492,6 @@ - static void pad_down (int lines); - static void read_rest_of_line (COLUMN *p); - static void skip_read (COLUMN *p, int column_number); --static void print_char (char c); - static void cleanup (void); - static void print_sep_string (void); - static void separator_string (const char *optarg_S); -@@ -455,7 +506,7 @@ -    we store the leftmost columns contiguously in buff. -    To print a line from buff, get the index of the first character -    from line_vector[i], and print up to line_vector[i + 1]. */ --static char *buff; -+static unsigned char *buff; -  - /* Index of the position in buff where the next character -    will be stored. */ -@@ -559,7 +610,7 @@ - static bool untabify_input = false; -  - /* (-e) The input tab character. */ --static char input_tab_char = '\t'; -+static char input_tab_char[MB_LEN_MAX] = "\t"; -  - /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... -    where the leftmost column is 1. */ -@@ -569,7 +620,10 @@ - static bool tabify_output = false; -  - /* (-i) The output tab character. */ --static char output_tab_char = '\t'; -+static char output_tab_char[MB_LEN_MAX] = "\t"; -+ -+/* (-i) The byte length of output tab character. */ -+static int output_tab_char_length = 1; -  - /* (-i) The width of the output tab. */ - static int chars_per_output_tab = 8; -@@ -643,7 +697,13 @@ - static bool numbered_lines = false; -  - /* (-n) Character which follows each line number. */ --static char number_separator = '\t'; -+static char number_separator[MB_LEN_MAX] = "\t"; -+ -+/* (-n) The byte length of the character which follows each line number. */ -+static int number_separator_length = 1; -+ -+/* (-n) The character width of the character which follows each line number. */ -+static int number_separator_width = 0; -  - /* (-n) line counting starts with 1st line of input file (not with 1st -    line of 1st page printed). */ -@@ -696,6 +756,7 @@ -    -a|COLUMN|-m is a `space' and with the -J option a `tab'. */ - static char *col_sep_string = (char *) ""; - static int col_sep_length = 0; -+static int col_sep_width = 0; - static char *column_separator = (char *) " "; - static char *line_separator = (char *) "\t"; -  -@@ -852,6 +913,13 @@ -   col_sep_length = (int) strlen (optarg_S); -   col_sep_string = xmalloc (col_sep_length + 1); -   strcpy (col_sep_string, optarg_S); -+ -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    col_sep_width = mbswidth (col_sep_string, 0); -+  else -+#endif -+    col_sep_width = col_sep_length; - } -  - int -@@ -877,6 +945,21 @@ -  -   atexit (close_stdout); -  -+/* Define which functions are used, the ones for single byte locale or the ones -+   for multibyte locale. */ -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    { -+      print_char = print_char_multi; -+      char_to_clump = char_to_clump_multi; -+    } -+  else -+#endif -+    { -+      print_char = print_char_single; -+      char_to_clump = char_to_clump_single; -+    } -+ -   n_files = 0; -   file_names = (argc > 1 - 		? xmalloc ((argc - 1) * sizeof (char *)) -@@ -949,8 +1032,12 @@ - 	  break; - 	case 'e': - 	  if (optarg) --	    getoptarg (optarg, 'e', &input_tab_char, --		       &chars_per_input_tab); -+	    { -+	      int dummy_length, dummy_width; -+ -+	      getoptarg (optarg, 'e', input_tab_char, &dummy_length, -+			 &dummy_width, &chars_per_input_tab); -+	    } - 	  /* Could check tab width > 0. */ - 	  untabify_input = true; - 	  break; -@@ -963,8 +1050,12 @@ - 	  break; - 	case 'i': - 	  if (optarg) --	    getoptarg (optarg, 'i', &output_tab_char, --		       &chars_per_output_tab); -+	    { -+	      int dummy_width; -+ -+	      getoptarg (optarg, 'i', output_tab_char, &output_tab_char_length, -+			 &dummy_width, &chars_per_output_tab); -+	    } - 	  /* Could check tab width > 0. */ - 	  tabify_output = true; - 	  break; -@@ -991,8 +1082,8 @@ - 	case 'n': - 	  numbered_lines = true; - 	  if (optarg) --	    getoptarg (optarg, 'n', &number_separator, --		       &chars_per_number); -+	    getoptarg (optarg, 'n', number_separator, &number_separator_length, -+		       &number_separator_width, &chars_per_number); - 	  break; - 	case 'N': - 	  skip_count = false; -@@ -1031,7 +1122,7 @@ - 	  old_s = false; - 	  /* Reset an additional input of -s, -S dominates -s */ - 	  col_sep_string = bad_cast (""); --	  col_sep_length = 0; -+	  col_sep_length = col_sep_width = 0; - 	  use_col_separator = true; - 	  if (optarg) - 	    separator_string (optarg); -@@ -1188,10 +1279,45 @@ -    a number. */ -  - static void --getoptarg (char *arg, char switch_char, char *character, int *number) -+getoptarg (char *arg, char switch_char, char *character, int *character_length, -+	   int *character_width, int *number) - { -   if (!ISDIGIT (*arg)) --    *character = *arg++; -+    { -+#ifdef HAVE_MBRTOWC -+      if (MB_CUR_MAX > 1)	/* for multibyte locale. */ -+	{ -+	  wchar_t wc; -+	  size_t mblength; -+	  int width; -+	  mbstate_t state = {'\0'}; -+ -+	  mblength = mbrtowc (&wc, arg, strnlen(arg, MB_LEN_MAX), &state); -+ -+	  if (mblength == (size_t)-1 || mblength == (size_t)-2) -+	    { -+	      *character_length = 1; -+	      *character_width = 1; -+	    } -+	  else -+	    { -+	      *character_length = (mblength < 1) ? 1 : mblength; -+	      width = wcwidth (wc); -+	      *character_width = (width < 0) ? 0 : width; -+	    } -+ -+	  strncpy (character, arg, *character_length); -+	  arg += *character_length; -+	} -+      else			/* for single byte locale. */ -+#endif -+	{ -+	  *character = *arg++; -+	  *character_length = 1; -+	  *character_width = 1; -+	} -+    } -+ -   if (*arg) -     { -       long int tmp_long; -@@ -1256,7 +1382,7 @@ - 	  else - 	    col_sep_string = column_separator; -  --	  col_sep_length = 1; -+	  col_sep_length = col_sep_width = 1; - 	  use_col_separator = true; - 	} -       /* It's rather pointless to define a TAB separator with column -@@ -1288,11 +1414,11 @@ - 	     TAB_WIDTH (chars_per_input_tab, chars_per_number);   */ -  -       /* Estimate chars_per_text without any margin and keep it constant. */ --      if (number_separator == '\t') -+      if (number_separator[0] == '\t') - 	number_width = chars_per_number + - 	  TAB_WIDTH (chars_per_default_tab, chars_per_number); -       else --	number_width = chars_per_number + 1; -+	number_width = chars_per_number + number_separator_width; -  -       /* The number is part of the column width unless we are - 	 printing files in parallel. */ -@@ -1307,7 +1433,7 @@ -     } -  -   chars_per_column = (chars_per_line - chars_used_by_number - --		     (columns - 1) * col_sep_length) / columns; -+		     (columns - 1) * col_sep_width) / columns; -  -   if (chars_per_column < 1) -     error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1432,7 +1558,7 @@ -  -   /* Enlarge p->start_position of first column to use the same form of -      padding_not_printed with all columns. */ --  h = h + col_sep_length; -+  h = h + col_sep_width; -  -   /* This loop takes care of all but the rightmost column. */ -  -@@ -1466,7 +1592,7 @@ - 	} -       else - 	{ --	  h = h_next + col_sep_length; -+	  h = h_next + col_sep_width; - 	  h_next = h + chars_per_column; - 	} -     } -@@ -1756,9 +1882,9 @@ - align_column (COLUMN *p) - { -   padding_not_printed = p->start_position; --  if (padding_not_printed - col_sep_length > 0) -+  if (padding_not_printed - col_sep_width > 0) -     { --      pad_across_to (padding_not_printed - col_sep_length); -+      pad_across_to (padding_not_printed - col_sep_width); -       padding_not_printed = ANYWHERE; -     } -  -@@ -2029,13 +2155,13 @@ -       /* May be too generous. */ -       buff = X2REALLOC (buff, &buff_allocated); -     } --  buff[buff_current++] = c; -+  buff[buff_current++] = (unsigned char) c; - } -  - static void - add_line_number (COLUMN *p) - { --  int i; -+  int i, j; -   char *s; -   int left_cut; -  -@@ -2058,22 +2184,24 @@ -       /* Tabification is assumed for multiple columns, also for n-separators, - 	 but `default n-separator = TAB' hasn't been given priority over - 	 equal column_width also specified by POSIX. */ --      if (number_separator == '\t') -+      if (number_separator[0] == '\t') -         { -           i = number_width - chars_per_number; -           while (i-- > 0) - 	    (p->char_func) (' '); -         } -       else --        (p->char_func) (number_separator); -+	for (j = 0; j < number_separator_length; j++) -+	  (p->char_func) (number_separator[j]); -     } -   else -     /* To comply with POSIX, we avoid any expansion of default TAB -        separator with a single column output. No column_width requirement -        has to be considered. */ -     { --      (p->char_func) (number_separator); --      if (number_separator == '\t') -+      for (j = 0; j < number_separator_length; j++) -+	(p->char_func) (number_separator[j]); -+      if (number_separator[0] == '\t') -         output_position = POS_AFTER_TAB (chars_per_output_tab, - 			  output_position); -     } -@@ -2234,7 +2362,7 @@ -   while (goal - h_old > 1 - 	 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) -     { --      putchar (output_tab_char); -+      fwrite (output_tab_char, sizeof(char), output_tab_char_length, stdout); -       h_old = h_new; -     } -   while (++h_old <= goal) -@@ -2254,6 +2382,7 @@ - { -   char *s; -   int l = col_sep_length; -+  int not_space_flag; -  -   s = col_sep_string; -  -@@ -2267,6 +2396,7 @@ -     { -       for (; separators_not_printed > 0; --separators_not_printed) - 	{ -+	  not_space_flag = 0; - 	  while (l-- > 0) - 	    { - 	      /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2280,12 +2410,15 @@ - 		} - 	      else - 		{ -+		  not_space_flag = 1; - 		  if (spaces_not_printed > 0) - 		    print_white_space (); - 		  putchar (*s++); --		  ++output_position; - 		} - 	    } -+	  if (not_space_flag) -+	    output_position += col_sep_width; -+ -           /* sep_string ends with some spaces */ - 	  if (spaces_not_printed > 0) - 	    print_white_space (); -@@ -2313,7 +2446,7 @@ -    required number of tabs and spaces. */ -  - static void --print_char (char c) -+print_char_single (char c) - { -   if (tabify_output) -     { -@@ -2337,6 +2470,74 @@ -   putchar (c); - } -  -+#ifdef HAVE_MBRTOWC -+static void -+print_char_multi (char c) -+{ -+  static size_t mbc_pos = 0; -+  static char mbc[MB_LEN_MAX] = {'\0'}; -+  static mbstate_t state = {'\0'}; -+  mbstate_t state_bak; -+  wchar_t wc; -+  size_t mblength; -+  int width; -+ -+  if (tabify_output) -+    { -+      state_bak = state; -+      mbc[mbc_pos++] = c; -+      mblength = mbrtowc (&wc, mbc, mbc_pos, &state); -+ -+      while (mbc_pos > 0) -+	{ -+	  switch (mblength) -+	    { -+	    case (size_t)-2: -+	      state = state_bak; -+	      return; -+ -+	    case (size_t)-1: -+	      state = state_bak; -+	      ++output_position; -+	      putchar (mbc[0]); -+	      memmove (mbc, mbc + 1, MB_CUR_MAX - 1); -+	      --mbc_pos; -+	      break; -+ -+	    case 0: -+	      mblength = 1; -+ -+	    default: -+	      if (wc == L' ') -+		{ -+		  memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); -+		  --mbc_pos; -+		  ++spaces_not_printed; -+		  return; -+		} -+	      else if (spaces_not_printed > 0) -+		print_white_space (); -+ -+	      /* Nonprintables are assumed to have width 0, except L'\b'. */ -+	      if ((width = wcwidth (wc)) < 1) -+		{ -+		  if (wc == L'\b') -+		    --output_position; -+		} -+	      else -+		output_position += width; -+ -+	      fwrite (mbc, sizeof(char), mblength, stdout); -+	      memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); -+	      mbc_pos -= mblength; -+	    } -+	} -+      return; -+    } -+  putchar (c); -+} -+#endif -+ - /* Skip to page PAGE before printing. -    PAGE may be larger than total number of pages. */ -  -@@ -2517,9 +2718,9 @@ - 	  align_empty_cols = false; - 	} -  --      if (padding_not_printed - col_sep_length > 0) -+      if (padding_not_printed - col_sep_width > 0) - 	{ --	  pad_across_to (padding_not_printed - col_sep_length); -+	  pad_across_to (padding_not_printed - col_sep_width); - 	  padding_not_printed = ANYWHERE; - 	} -  -@@ -2620,9 +2821,9 @@ - 	} -     } -  --  if (padding_not_printed - col_sep_length > 0) -+  if (padding_not_printed - col_sep_width > 0) -     { --      pad_across_to (padding_not_printed - col_sep_length); -+      pad_across_to (padding_not_printed - col_sep_width); -       padding_not_printed = ANYWHERE; -     } -  -@@ -2635,8 +2836,8 @@ -   if (spaces_not_printed == 0) -     { -       output_position = p->start_position + end_vector[line]; --      if (p->start_position - col_sep_length == chars_per_margin) --	output_position -= col_sep_length; -+      if (p->start_position - col_sep_width == chars_per_margin) -+	output_position -= col_sep_width; -     } -  -   return true; -@@ -2655,7 +2856,7 @@ -    number of characters is 1.) */ -  - static int --char_to_clump (char c) -+char_to_clump_single (char c) - { -   unsigned char uc = c; -   char *s = clump_buff; -@@ -2665,10 +2866,10 @@ -   int chars; -   int chars_per_c = 8; -  --  if (c == input_tab_char) -+  if (c == input_tab_char[0]) -     chars_per_c = chars_per_input_tab; -  --  if (c == input_tab_char || c == '\t') -+  if (c == input_tab_char[0] || c == '\t') -     { -       width = TAB_WIDTH (chars_per_c, input_position); -  -@@ -2739,6 +2940,154 @@ -   return chars; - } -  -+#ifdef HAVE_MBRTOWC -+static int -+char_to_clump_multi (char c) -+{ -+  static size_t mbc_pos = 0; -+  static char mbc[MB_LEN_MAX] = {'\0'}; -+  static mbstate_t state = {'\0'}; -+  mbstate_t state_bak; -+  wchar_t wc; -+  size_t mblength; -+  int wc_width; -+  register char *s = clump_buff; -+  register int i, j; -+  char esc_buff[4]; -+  int width; -+  int chars; -+  int chars_per_c = 8; -+ -+  state_bak = state; -+  mbc[mbc_pos++] = c; -+  mblength = mbrtowc (&wc, mbc, mbc_pos, &state); -+ -+  width = 0; -+  chars = 0; -+  while (mbc_pos > 0) -+    { -+      switch (mblength) -+	{ -+	case (size_t)-2: -+	  state = state_bak; -+	  return 0; -+ -+	case (size_t)-1: -+	  state = state_bak; -+	  mblength = 1; -+ -+	  if (use_esc_sequence || use_cntrl_prefix) -+	    { -+	      width = +4; -+	      chars = +4; -+	      *s++ = '\\'; -+	      sprintf (esc_buff, "%03o", mbc[0]); -+	      for (i = 0; i <= 2; ++i) -+		*s++ = (int) esc_buff[i]; -+	    } -+	  else -+	    { -+	      width += 1; -+	      chars += 1; -+	      *s++ = mbc[0]; -+	    } -+	  break; -+ -+	case 0: -+	  mblength = 1; -+		/* Fall through */ -+ -+	default: -+	  if (memcmp (mbc, input_tab_char, mblength) == 0) -+	    chars_per_c = chars_per_input_tab; -+ -+	  if (memcmp (mbc, input_tab_char, mblength) == 0 || c == '\t') -+	    { -+	      int  width_inc; -+ -+	      width_inc = TAB_WIDTH (chars_per_c, input_position); -+	      width += width_inc; -+ -+	      if (untabify_input) -+		{ -+		  for (i = width_inc; i; --i) -+		    *s++ = ' '; -+		  chars += width_inc; -+		} -+	      else -+		{ -+		  for (i = 0; i <  mblength; i++) -+		    *s++ = mbc[i]; -+		  chars += mblength; -+		} -+	    } -+	  else if ((wc_width = wcwidth (wc)) < 1) -+	    { -+	      if (use_esc_sequence) -+		{ -+		  for (i = 0; i < mblength; i++) -+		    { -+		      width += 4; -+		      chars += 4; -+		      *s++ = '\\'; -+		      sprintf (esc_buff, "%03o", c); -+		      for (j = 0; j <= 2; ++j) -+			*s++ = (int) esc_buff[j]; -+		    } -+		} -+	      else if (use_cntrl_prefix) -+		{ -+		  if (wc < 0200) -+		    { -+		      width += 2; -+		      chars += 2; -+		      *s++ = '^'; -+		      *s++ = wc ^ 0100; -+		    } -+		  else -+		    { -+		      for (i = 0; i < mblength; i++) -+			{ -+			  width += 4; -+			  chars += 4; -+			  *s++ = '\\'; -+			  sprintf (esc_buff, "%03o", c); -+			  for (j = 0; j <= 2; ++j) -+			    *s++ = (int) esc_buff[j]; -+			} -+		    } -+		} -+	      else if (wc == L'\b') -+		{ -+		  width += -1; -+		  chars += 1; -+		  *s++ = c; -+		} -+	      else -+		{ -+		  width += 0; -+		  chars += mblength; -+		  for (i = 0; i < mblength; i++) -+		    *s++ = mbc[i]; -+		} -+	    } -+	  else -+	    { -+	      width += wc_width; -+	      chars += mblength; -+	      for (i = 0; i < mblength; i++) -+		*s++ = mbc[i]; -+	    } -+	} -+      memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); -+      mbc_pos -= mblength; -+    } -+ -+  input_position += width; -+  return chars; -+} -+#endif -+ - /* We've just printed some files and need to clean up things before -    looking for more options and printing the next batch of files. -  ---- coreutils-6.8+/src/cut.c.i18n	2007-01-14 15:41:28.000000000 +0000 -+++ coreutils-6.8+/src/cut.c	2007-03-01 15:08:24.000000000 +0000 -@@ -29,6 +29,11 @@ - #include <assert.h> - #include <getopt.h> - #include <sys/types.h> -+ -+/* Get mbstate_t, mbrtowc().  */ -+#if HAVE_WCHAR_H -+# include <wchar.h> -+#endif - #include "system.h" -  - #include "error.h" -@@ -37,6 +42,18 @@ - #include "quote.h" - #include "xstrndup.h" -  -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+   installation; work around this configuration error.	*/ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# undef MB_LEN_MAX -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - /* The official name of this program (e.g., no `g' prefix).  */ - #define PROGRAM_NAME "cut" -  -@@ -67,6 +84,52 @@ -     }							\ -   while (0) -  -+/* Refill the buffer BUF to get a multibyte character. */ -+#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM)			\ -+  do									\ -+    {									\ -+      if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM))	\ -+	{								\ -+	  memmove (BUF, BUFPOS, BUFLEN);				\ -+	  BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \ -+	  BUFPOS = BUF;							\ -+	}								\ -+    }									\ -+  while (0) -+ -+/* Get wide character on BUFPOS. BUFPOS is not included after that. -+   If byte sequence is not valid as a character, CONVFAIL is 1. Otherwise 0. */  -+#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \ -+  do									\ -+    {									\ -+      mbstate_t state_bak;						\ -+									\ -+      if (BUFLEN < 1)							\ -+	{								\ -+	  WC = WEOF;							\ -+	  break;							\ -+	}								\ -+									\ -+      /* Get a wide character. */					\ -+      CONVFAIL = 0;							\ -+      state_bak = STATE;						\ -+      MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE);	\ -+									\ -+      switch (MBLENGTH)							\ -+	{								\ -+	case (size_t)-1:						\ -+	case (size_t)-2:						\ -+	  CONVFAIL++;							\ -+	  STATE = state_bak;						\ -+	  /* Fall througn. */						\ -+									\ -+	case 0:								\ -+	  MBLENGTH = 1;							\ -+	  break;							\ -+	}								\ -+    }									\ -+  while (0) -+ - struct range_pair -   { -     size_t lo; -@@ -85,7 +148,7 @@ - /* The number of bytes allocated for FIELD_1_BUFFER.  */ - static size_t field_1_bufsize; -  --/* The largest field or byte index used as an endpoint of a closed -+/* The largest byte, character or field index used as an endpoint of a closed -    or degenerate range specification;  this doesn't include the starting -    index of right-open-ended ranges.  For example, with either range spec -    `2-5,9-', `2-3,5,9-' this variable would be set to 5.  */ -@@ -97,10 +160,11 @@ -  - /* This is a bit vector. -    In byte mode, which bytes to output. -+   In character mode, which characters to output. -    In field mode, which DELIM-separated fields to output. --   Both bytes and fields are numbered starting with 1, -+   Bytes, characters and fields are numbered starting with 1, -    so the zeroth bit of this array is unused. --   A field or byte K has been selected if -+   A byte, character or field K has been selected if -    (K <= MAX_RANGE_ENDPOINT and is_printable_field(K)) -     || (EOL_RANGE_START > 0 && K >= EOL_RANGE_START).  */ - static unsigned char *printable_field; -@@ -109,9 +173,12 @@ -   { -     undefined_mode, -  --    /* Output characters that are in the given bytes. */ -+    /* Output bytes that are at the given positions. */ -     byte_mode, -  -+    /* Output characters that are at the given positions. */ -+    character_mode, -+ -     /* Output the given delimeter-separated fields. */ -     field_mode -   }; -@@ -121,6 +188,13 @@ -  - static enum operating_mode operating_mode; -  -+/* If nonzero, when in byte mode, don't split multibyte characters.  */ -+static int byte_mode_character_aware; -+ -+/* If nonzero, the function for single byte locale is work -+   if this program runs on multibyte locale. */ -+static int force_singlebyte_mode; -+ - /* If true do not output lines containing no delimeter characters. -    Otherwise, all such lines are printed.  This option is valid only -    with field mode.  */ -@@ -132,6 +206,9 @@ -  - /* The delimeter character for field mode. */ - static unsigned char delim; -+#if HAVE_WCHAR_H -+static wchar_t wcdelim; -+#endif -  - /* True if the --output-delimiter=STRING option was specified.  */ - static bool output_delimiter_specified; -@@ -205,7 +282,7 @@ -   -f, --fields=LIST       select only these fields;  also print any line\n\ -                             that contains no delimiter character, unless\n\ -                             the -s option is specified\n\ --  -n                      (ignored)\n\ -+  -n                      with -b: don't split multibyte characters\n\ - "), stdout); -       fputs (_("\ -       --complement        complement the set of selected bytes, characters\n\ -@@ -362,7 +439,7 @@ - 	  in_digits = false; - 	  /* Starting a range. */ - 	  if (dash_found) --	    FATAL_ERROR (_("invalid byte or field list")); -+	    FATAL_ERROR (_("invalid byte, character or field list")); - 	  dash_found = true; - 	  fieldstr++; -  -@@ -387,14 +464,16 @@ - 	      if (!rhs_specified) - 		{ - 		  /* `n-'.  From `initial' to end of line. */ --		  eol_range_start = initial; -+		  if (eol_range_start == 0 || -+		      (eol_range_start != 0 && eol_range_start > initial)) -+		    eol_range_start = initial; - 		  field_found = true; - 		} - 	      else - 		{ - 		  /* `m-n' or `-n' (1-n). */ - 		  if (value < initial) --		    FATAL_ERROR (_("invalid decreasing range")); -+		    FATAL_ERROR (_("invalid byte, character or field list")); -  - 		  /* Is there already a range going to end of line? */ - 		  if (eol_range_start != 0) -@@ -467,6 +546,9 @@ - 	      if (operating_mode == byte_mode) - 		error (0, 0, - 		       _("byte offset %s is too large"), quote (bad_num)); -+	      else if (operating_mode == character_mode) -+		error (0, 0, -+		       _("character offset %s is too large"), quote (bad_num)); - 	      else - 		error (0, 0, - 		       _("field number %s is too large"), quote (bad_num)); -@@ -477,7 +559,7 @@ - 	  fieldstr++; - 	} -       else --	FATAL_ERROR (_("invalid byte or field list")); -+	FATAL_ERROR (_("invalid byte, character or field list")); -     } -  -   max_range_endpoint = 0; -@@ -570,6 +652,63 @@ -     } - } -  -+#if HAVE_MBRTOWC -+/* This function is in use for the following case. -+ -+   1. Read from the stream STREAM, printing to standard output any selected -+   characters.  -+ -+   2. Read from stream STREAM, printing to standard output any selected bytes, -+   without splitting multibyte characters.  */ -+  -+static void -+cut_characters_or_cut_bytes_no_split (FILE *stream) -+{ -+  int idx;		/* number of bytes or characters in the line so far. */ -+  char buf[MB_LEN_MAX + BUFSIZ];  /* For spooling a read byte sequence. */ -+  char *bufpos;		/* Next read position of BUF. */ -+  size_t buflen;	/* The length of the byte sequence in buf. */ -+  wint_t wc;		/* A gotten wide character. */ -+  size_t mblength;	/* The byte size of a multibyte character which shows -+			   as same character as WC. */ -+  mbstate_t state;	/* State of the stream. */ -+  int convfail;		/* 1, when conversion is failed. Otherwise 0. */ -+ -+  idx = 0; -+  buflen = 0; -+  bufpos = buf; -+  memset (&state, '\0', sizeof(mbstate_t)); -+ -+  while (1) -+    { -+      REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+      GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail); -+ -+      if (wc == WEOF) -+	{ -+	  if (idx > 0) -+	    putchar ('\n'); -+	  break; -+	} -+      else if (wc == L'\n') -+	{ -+	  putchar ('\n'); -+	  idx = 0; -+	} -+      else -+	{ -+	  idx += (operating_mode == byte_mode) ? mblength : 1; -+	  if (print_kth (idx, NULL)) -+	    fwrite (bufpos, mblength, sizeof(char), stdout); -+	} -+ -+      buflen -= mblength; -+      bufpos += mblength; -+    } -+} -+#endif -+		    - /* Read from stream STREAM, printing to standard output any selected fields.  */ -  - static void -@@ -692,13 +831,192 @@ -     } - } -  -+#if HAVE_MBRTOWC -+static void -+cut_fields_mb (FILE *stream) -+{ -+  int c; -+  unsigned int field_idx; -+  int found_any_selected_field; -+  int buffer_first_field; -+  int empty_input; -+  char buf[MB_LEN_MAX + BUFSIZ];  /* For spooling a read byte sequence. */ -+  char *bufpos;		/* Next read position of BUF. */ -+  size_t buflen;	/* The length of the byte sequence in buf. */ -+  wint_t wc = 0;	/* A gotten wide character. */ -+  size_t mblength;	/* The byte size of a multibyte character which shows -+			   as same character as WC. */ -+  mbstate_t state;	/* State of the stream. */ -+  int convfail;		/* 1, when conversion is failed. Otherwise 0. */ -+ -+  found_any_selected_field = 0; -+  field_idx = 1; -+  bufpos = buf; -+  buflen = 0; -+  memset (&state, '\0', sizeof(mbstate_t)); -+ -+  c = getc (stream); -+  empty_input = (c == EOF); -+  if (c != EOF) -+    ungetc (c, stream); -+  else -+    wc = WEOF; -+ -+  /* To support the semantics of the -s flag, we may have to buffer -+     all of the first field to determine whether it is `delimited.' -+     But that is unnecessary if all non-delimited lines must be printed -+     and the first field has been selected, or if non-delimited lines -+     must be suppressed and the first field has *not* been selected. -+     That is because a non-delimited line has exactly one field.  */ -+  buffer_first_field = (suppress_non_delimited ^ !print_kth (1, NULL)); -+ -+  while (1) -+    { -+      if (field_idx == 1 && buffer_first_field) -+	{ -+	  int len = 0; -+ -+	  while (1) -+	    { -+	      REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+	      GET_NEXT_WC_FROM_BUFFER -+		(wc, bufpos, buflen, mblength, state, convfail); -+ -+	      if (wc == WEOF) -+		break; -+ -+	      field_1_buffer = xrealloc (field_1_buffer, len + mblength); -+	      memcpy (field_1_buffer + len, bufpos, mblength); -+	      len += mblength; -+	      buflen -= mblength; -+	      bufpos += mblength; -+ -+	      if (!convfail && (wc == L'\n' || wc == wcdelim)) -+		break; -+	    } -+ -+	  if (wc == WEOF) -+	    break; -+ -+	  /* If the first field extends to the end of line (it is not -+	     delimited) and we are printing all non-delimited lines, -+	     print this one.  */ -+	  if (convfail || (!convfail && wc != wcdelim)) -+	    { -+	      if (suppress_non_delimited) -+		{ -+		  /* Empty.	*/ -+		} -+	      else -+		{ -+		  fwrite (field_1_buffer, sizeof (char), len, stdout); -+		  /* Make sure the output line is newline terminated.  */ -+		  if (convfail || (!convfail && wc != L'\n')) -+		    putchar ('\n'); -+		} -+	      continue; -+	    } -+ -+	  if (print_kth (1, NULL)) -+	    { -+	      /* Print the field, but not the trailing delimiter.  */ -+	      fwrite (field_1_buffer, sizeof (char), len - 1, stdout); -+	      found_any_selected_field = 1; -+	    } -+	  ++field_idx; -+	} -+ -+      if (wc != WEOF) -+	{ -+	  if (print_kth (field_idx, NULL)) -+	    { -+	      if (found_any_selected_field) -+		{ -+		  fwrite (output_delimiter_string, sizeof (char), -+			  output_delimiter_length, stdout); -+		} -+	      found_any_selected_field = 1; -+	    } -+ -+	  while (1) -+	    { -+	      REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+	      GET_NEXT_WC_FROM_BUFFER -+		(wc, bufpos, buflen, mblength, state, convfail); -+ -+	      if (wc == WEOF) -+		break; -+	      else if (!convfail && (wc == wcdelim || wc == L'\n')) -+		{ -+		  buflen -= mblength; -+		  bufpos += mblength; -+		  break; -+		} -+ -+	      if (print_kth (field_idx, NULL)) -+		fwrite (bufpos, mblength, sizeof(char), stdout); -+ -+	      buflen -= mblength; -+	      bufpos += mblength; -+	    } -+	} -+ -+      if ((!convfail || wc == L'\n') && buflen < 1) -+	wc = WEOF; -+ -+      if (!convfail && wc == wcdelim) -+	++field_idx; -+      else if (wc == WEOF || (!convfail && wc == L'\n')) -+	{ -+	  if (found_any_selected_field -+	      || (!empty_input && !(suppress_non_delimited && field_idx == 1))) -+	    putchar ('\n'); -+	  if (wc == WEOF) -+	    break; -+	  field_idx = 1; -+	  found_any_selected_field = 0; -+	} -+    } -+} -+#endif -+ - static void - cut_stream (FILE *stream) - { --  if (operating_mode == byte_mode) --    cut_bytes (stream); -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1 && !force_singlebyte_mode) -+    { -+      switch (operating_mode) -+	{ -+	case byte_mode: -+	  if (byte_mode_character_aware) -+	    cut_characters_or_cut_bytes_no_split (stream); -+	  else -+	    cut_bytes (stream); -+	  break; -+ -+	case character_mode: -+	  cut_characters_or_cut_bytes_no_split (stream); -+	  break; -+ -+	case field_mode: -+	  cut_fields_mb (stream); -+	  break; -+ -+	default: -+	  abort (); -+	} -+    } -   else --    cut_fields (stream); -+#endif -+    { -+      if (operating_mode == field_mode) -+	cut_fields (stream); -+      else -+	cut_bytes (stream); -+    } - } -  - /* Process file FILE to standard output. -@@ -748,6 +1066,8 @@ -   bool ok; -   bool delim_specified = false; -   char *spec_list_string IF_LINT(= NULL); -+  char mbdelim[MB_LEN_MAX + 1]; -+  size_t delimlen = 0; -  -   initialize_main (&argc, &argv); -   set_program_name (argv[0]); -@@ -770,7 +1090,6 @@ -       switch (optc) - 	{ - 	case 'b': --	case 'c': - 	  /* Build the byte list. */ - 	  if (operating_mode != undefined_mode) - 	    FATAL_ERROR (_("only one type of list may be specified")); -@@ -778,6 +1097,14 @@ - 	  spec_list_string = optarg; - 	  break; -  -+	case 'c': -+	  /* Build the character list. */ -+	  if (operating_mode != undefined_mode) -+	    FATAL_ERROR (_("only one type of list may be specified")); -+	  operating_mode = character_mode; -+	  spec_list_string = optarg; -+	  break; -+ - 	case 'f': - 	  /* Build the field list. */ - 	  if (operating_mode != undefined_mode) -@@ -789,10 +1116,35 @@ - 	case 'd': - 	  /* New delimiter. */ - 	  /* Interpret -d '' to mean `use the NUL byte as the delimiter.'  */ --	  if (optarg[0] != '\0' && optarg[1] != '\0') --	    FATAL_ERROR (_("the delimiter must be a single character")); --	  delim = optarg[0]; --	  delim_specified = true; -+	    { -+#if HAVE_MBRTOWC -+	      if(MB_CUR_MAX > 1) -+		{ -+		  mbstate_t state; -+ -+		  memset (&state, '\0', sizeof(mbstate_t)); -+		  delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state); -+ -+		  if (delimlen == (size_t)-1 || delimlen == (size_t)-2) -+		    ++force_singlebyte_mode; -+		  else -+		    { -+		      delimlen = (delimlen < 1) ? 1 : delimlen; -+		      if (wcdelim != L'\0' && *(optarg + delimlen) != '\0') -+			FATAL_ERROR (_("the delimiter must be a single character")); -+		      memcpy (mbdelim, optarg, delimlen); -+		    } -+		} -+ -+	      if (MB_CUR_MAX <= 1 || force_singlebyte_mode) -+#endif -+		{ -+		  if (optarg[0] != '\0' && optarg[1] != '\0') -+		    FATAL_ERROR (_("the delimiter must be a single character")); -+		  delim = (unsigned char) optarg[0]; -+		} -+	    delim_specified = true; -+	  } - 	  break; -  - 	case OUTPUT_DELIMITER_OPTION: -@@ -805,6 +1157,7 @@ - 	  break; -  - 	case 'n': -+	  byte_mode_character_aware = 1; - 	  break; -  - 	case 's': -@@ -827,7 +1180,7 @@ -   if (operating_mode == undefined_mode) -     FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); -  --  if (delim != '\0' && operating_mode != field_mode) -+  if (delim_specified && operating_mode != field_mode) -     FATAL_ERROR (_("an input delimiter may be specified only\ -  when operating on fields")); -  -@@ -854,15 +1207,34 @@ -     } -  -   if (!delim_specified) --    delim = '\t'; -+    { -+      delim = '\t'; -+#ifdef HAVE_MBRTOWC -+      wcdelim = L'\t'; -+      mbdelim[0] = '\t'; -+      mbdelim[1] = '\0'; -+      delimlen = 1; -+#endif -+    } -  -   if (output_delimiter_string == NULL) -     { --      static char dummy[2]; --      dummy[0] = delim; --      dummy[1] = '\0'; --      output_delimiter_string = dummy; --      output_delimiter_length = 1; -+#ifdef HAVE_MBRTOWC -+      if (MB_CUR_MAX > 1 && !force_singlebyte_mode) -+	{ -+	  output_delimiter_string = xstrdup(mbdelim); -+	  output_delimiter_length = delimlen; -+	} -+ -+      if (MB_CUR_MAX <= 1 || force_singlebyte_mode) -+#endif -+	{ -+	  static char dummy[2];  -+	  dummy[0] = delim; -+	  dummy[1] = '\0'; -+	  output_delimiter_string = dummy; -+	  output_delimiter_length = 1; -+	} -     } -  -   if (optind == argc) -diff -urNp coreutils-6.12/src/join.c coreutils-6.12-orig/src/join.c ---- coreutils-6.12/src/join.c	2008-07-16 14:08:01.000000000 +0200 -+++ coreutils-6.12-orig/src/join.c	2008-07-16 14:07:02.000000000 +0200 -@@ -634,6 +634,11 @@ get_line (FILE *fp, struct line *line, i -       return false; -     } -  -+#if HAVE_MBRTOWC -+  if (MB_CUR_MAX > 1) -+    xfields_multibyte (line); -+  else -+#endif -   xfields (line); -  -   if (prevline[which - 1]) - diff --git a/abs/core-testing/coreutils/coreutils-pam.patch b/abs/core-testing/coreutils/coreutils-pam.patch index 7171522..e61908f 100644 --- a/abs/core-testing/coreutils/coreutils-pam.patch +++ b/abs/core-testing/coreutils/coreutils-pam.patch @@ -1,17 +1,96 @@ ---- coreutils-6.7/src/Makefile.am.pam	2006-11-24 21:28:10.000000000 +0000 -+++ coreutils-6.7/src/Makefile.am	2007-01-09 17:00:01.000000000 +0000 -@@ -103,7 +103,7 @@ - # If necessary, add -lm to resolve use of pow in lib/strtod.c. - uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) +diff -urNp coreutils-8.4-orig/configure.ac coreutils-8.4/configure.ac +--- coreutils-8.4-orig/configure.ac	2010-01-11 18:20:42.000000000 +0100 ++++ coreutils-8.4/configure.ac	2010-02-12 10:17:46.000000000 +0100 +@@ -126,6 +126,13 @@ if test "$gl_gcc_warnings" = yes; then +   AC_SUBST([GNULIB_WARN_CFLAGS]) + fi --su_LDADD = $(LDADD) $(LIB_CRYPT) -+su_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@ ++dnl Give the chance to enable PAM ++AC_ARG_ENABLE(pam, dnl ++[  --enable-pam              Enable use of the PAM libraries], ++[AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM]) ++LIB_PAM="-ldl -lpam -lpam_misc" ++AC_SUBST(LIB_PAM)]) ++ + AC_FUNC_FORK +  + optional_bin_progs= +diff -urNp coreutils-8.4-orig/doc/coreutils.texi coreutils-8.4/doc/coreutils.texi +--- coreutils-8.4-orig/doc/coreutils.texi	2010-01-03 18:06:20.000000000 +0100 ++++ coreutils-8.4/doc/coreutils.texi	2010-02-12 10:17:46.000000000 +0100 +@@ -15081,8 +15081,11 @@ to certain shells, etc.). + @findex syslog + @command{su} can optionally be compiled to use @code{syslog} to report + failed, and optionally successful, @command{su} attempts.  (If the system +-supports @code{syslog}.)  However, GNU @command{su} does not check if the +-user is a member of the @code{wheel} group; see below. ++supports @code{syslog}.) ++ ++This version of @command{su} has support for using PAM for ++authentication.  You can edit @file{/etc/pam.d/su} to customize its ++behaviour. +  + The program accepts the following options.  Also see @ref{Common options}. +  +@@ -15124,6 +15127,8 @@ environment variables except @env{TERM}, + @env{PATH} to a compiled-in default value.  Change to @var{user}'s home + directory.  Prepend @samp{-} to the shell's name, intended to make it + read its login startup file(s). ++Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables  ++are preserved as well for PAM functionality. +  + @item -m + @itemx -p +@@ -15163,33 +15168,6 @@ Exit status: + the exit status of the subshell otherwise + @end display +  +-@cindex wheel group, not supported +-@cindex group wheel, not supported +-@cindex fascism +-@subsection Why GNU @command{su} does not support the @samp{wheel} group +- +-(This section is by Richard Stallman.) +- +-@cindex Twenex +-@cindex MIT AI lab +-Sometimes a few of the users try to hold total power over all the +-rest.  For example, in 1984, a few users at the MIT AI lab decided to +-seize power by changing the operator password on the Twenex system and +-keeping it secret from everyone else.  (I was able to thwart this coup +-and give power back to the users by patching the kernel, but I +-wouldn't know how to do that in Unix.) +- +-However, occasionally the rulers do tell someone.  Under the usual +-@command{su} mechanism, once someone learns the root password who +-sympathizes with the ordinary users, he or she can tell the rest.  The +-``wheel group'' feature would make this impossible, and thus cement the +-power of the rulers. +- +-I'm on the side of the masses, not that of the rulers.  If you are +-used to supporting the bosses and sysadmins in whatever they do, you +-might find this idea strange at first. +- +- + @node timeout invocation + @section @command{timeout}: Run a command with a time limit +  +diff -urNp coreutils-8.4-orig/src/Makefile.am coreutils-8.4/src/Makefile.am +--- coreutils-8.4-orig/src/Makefile.am	2010-01-03 18:06:20.000000000 +0100 ++++ coreutils-8.4/src/Makefile.am	2010-02-12 10:17:46.000000000 +0100 +@@ -361,7 +361,7 @@ factor_LDADD += $(LIB_GMP) + uptime_LDADD += $(GETLOADAVG_LIBS) +  + # for crypt +-su_LDADD += $(LIB_CRYPT) ++su_LDADD += $(LIB_CRYPT) @LIB_PAM@ - dir_LDADD += $(LIB_ACL) - ls_LDADD += $(LIB_ACL) ---- coreutils-6.7/src/su.c.pam	2007-01-09 17:00:01.000000000 +0000 -+++ coreutils-6.7/src/su.c	2007-01-09 17:16:43.000000000 +0000 -@@ -38,6 +38,16 @@ + # for various ACL functions + copy_LDADD += $(LIB_ACL) +diff -urNp coreutils-8.4-orig/src/su.c coreutils-8.4/src/su.c +--- coreutils-8.4-orig/src/su.c	2010-02-12 10:15:15.000000000 +0100 ++++ coreutils-8.4/src/su.c	2010-02-12 10:24:29.000000000 +0100 +@@ -37,6 +37,16 @@      restricts who can su to UID 0 accounts.  RMS considers that to      be fascist. @@ -28,9 +107,9 @@      Compile-time options:      -DSYSLOG_SUCCESS	Log successful su's (by default, to root) with syslog.      -DSYSLOG_FAILURE	Log failed su's (by default, to root) with syslog. -@@ -59,6 +69,15 @@ -    prototype (returning `int') in <unistd.h>.  */ - #define getusershell _getusershell_sys_proto_ +@@ -53,6 +63,15 @@ + #include <pwd.h> + #include <grp.h>  +#ifdef USE_PAM  +# include <signal.h> @@ -44,18 +123,13 @@   #include "system.h"   #include "getpass.h" -@@ -128,15 +147,22 @@ +@@ -120,10 +139,17 @@   /* The user to become if none is specified.  */   #define DEFAULT_USER "root"  +#ifndef USE_PAM   char *crypt (char const *key, char const *salt);  +#endif - char *getusershell (void); - void endusershell (void); - void setusershell (void); -  - extern char **environ;  -static void run_shell (char const *, char const *, char **, size_t)  +static void run_shell (char const *, char const *, char **, size_t, @@ -68,7 +142,7 @@   /* If true, pass the `-f' option to the subshell.  */   static bool fast_startup; -@@ -225,7 +251,26 @@ +@@ -209,7 +235,26 @@ log_su (struct passwd const *pw, bool su   }   #endif @@ -95,7 +169,7 @@      Return true if the user gives the correct password for entry PW,      false if not.  Return true without asking for a password if run by UID 0      or if PW has an empty password.  */ -@@ -233,6 +278,44 @@ +@@ -217,6 +262,44 @@ log_su (struct passwd const *pw, bool su   static bool   correct_password (const struct passwd *pw)   { @@ -140,7 +214,7 @@     char *unencrypted, *encrypted, *correct;   #if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP     /* Shadow passwd stuff for SVR3 and maybe other systems.  */ -@@ -257,6 +340,7 @@ +@@ -241,6 +324,7 @@ correct_password (const struct passwd *p     encrypted = crypt (unencrypted, correct);     memset (unencrypted, 0, strlen (unencrypted));     return STREQ (encrypted, correct); @@ -148,26 +222,26 @@   }   /* Update `environ' for the new shell based on PW, with SHELL being -@@ -270,12 +354,18 @@ +@@ -254,12 +338,18 @@ modify_environment (const struct passwd          /* Leave TERM unchanged.  Set HOME, SHELL, USER, LOGNAME, PATH.            Unset all other environment variables.  */         char const *term = getenv ("TERM");  +      char const *display = getenv ("DISPLAY");  +      char const *xauthority = getenv ("XAUTHORITY");         if (term) - 	term = xstrdup (term); +         term = xstrdup (term);         environ = xmalloc ((6 + !!term) * sizeof (char *));         environ[0] = NULL;         if (term) - 	xsetenv ("TERM", term); +         xsetenv ("TERM", term);  +      if (display) -+	xsetenv ("DISPLAY", display); ++        xsetenv ("DISPLAY", display);  +      if (xauthority) -+	xsetenv ("XAUTHORITY", xauthority); ++        xsetenv ("XAUTHORITY", xauthority);         xsetenv ("HOME", pw->pw_dir);         xsetenv ("SHELL", shell);         xsetenv ("USER", pw->pw_name); -@@ -308,8 +398,13 @@ +@@ -292,8 +382,13 @@ change_identity (const struct passwd *pw   {   #ifdef HAVE_INITGROUPS     errno = 0; @@ -177,13 +251,13 @@  +    pam_close_session(pamh, 0);  +    pam_end(pamh, PAM_ABORT);  +#endif -     error (EXIT_FAILURE, errno, _("cannot set groups")); +     error (EXIT_CANCELED, errno, _("cannot set groups"));  +  }     endgrent ();   #endif     if (setgid (pw->pw_gid)) -@@ -318,6 +413,31 @@ -     error (EXIT_FAILURE, errno, _("cannot set user id")); +@@ -302,6 +397,31 @@ change_identity (const struct passwd *pw +     error (EXIT_CANCELED, errno, _("cannot set user id"));   }  +#ifdef USE_PAM @@ -214,12 +288,12 @@   /* Run SHELL, or DEFAULT_SHELL if SHELL is empty.      If COMMAND is nonzero, pass it to the shell with the -c option.      Pass ADDITIONAL_ARGS to the shell as more arguments; there -@@ -325,17 +445,49 @@ +@@ -309,17 +429,49 @@ change_identity (const struct passwd *pw   static void   run_shell (char const *shell, char const *command, char **additional_args, --	   size_t n_additional_args) -+	   size_t n_additional_args, const struct passwd *pw) +-           size_t n_additional_args) ++           size_t n_additional_args, const struct passwd *pw)   {     size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;     char const **args = xnmalloc (n_args, sizeof *args); @@ -265,7 +339,7 @@         shell_basename = last_component (shell);         arg0 = xmalloc (strlen (shell_basename) + 2);         arg0[0] = '-'; -@@ -360,6 +512,66 @@ +@@ -344,6 +496,67 @@ run_shell (char const *shell, char const       error (0, errno, "%s", shell);       exit (exit_status);     } @@ -303,12 +377,12 @@  +  +      pid = waitpid(-1, &status, WUNTRACED);  + -+      if (WIFSTOPPED(status)) { -+          kill(getpid(), SIGSTOP); ++      if (((pid_t)-1 != pid) && (0 != WIFSTOPPED (status))) { ++          kill(getpid(), WSTOPSIG(status));  +          /* once we get here, we must have resumed */  +          kill(pid, SIGCONT);  +      } -+    } while (WIFSTOPPED(status)); ++    } while (0 != WIFSTOPPED(status));  +  }  +  +  if (caught) { @@ -327,12 +401,13 @@  +    fprintf(stderr, " ...killed.\n");  +    exit(-1);  +  } -+  exit (WEXITSTATUS(status)); ++  exit ((0 != WIFEXITED (status)) ? WEXITSTATUS (status) ++                                  : WTERMSIG (status) + 128);  +#endif /* USE_PAM */   }   /* Return true if SHELL is a restricted shell (one not returned by -@@ -527,9 +739,9 @@ +@@ -511,9 +724,9 @@ main (int argc, char **argv)     shell = xstrdup (shell ? shell : pw->pw_shell);     modify_environment (pw, shell); @@ -342,82 +417,12 @@  -    error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);  +#endif +   /* error() flushes stderr, but does not check for write failure. +      Normally, we would catch this via our atexit() hook of +@@ -523,5 +736,5 @@ main (int argc, char **argv) +   if (ferror (stderr)) +     exit (EXIT_CANCELED); +   -  run_shell (shell, command, argv + optind, MAX (0, argc - optind));  +  run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw);   } ---- coreutils-6.7/doc/coreutils.texi.pam	2006-10-27 15:30:48.000000000 +0100 -+++ coreutils-6.7/doc/coreutils.texi	2007-01-09 17:00:01.000000000 +0000 -@@ -13395,8 +13395,11 @@ - @findex syslog - @command{su} can optionally be compiled to use @code{syslog} to report - failed, and optionally successful, @command{su} attempts.  (If the system --supports @code{syslog}.)  However, GNU @command{su} does not check if the --user is a member of the @code{wheel} group; see below. -+supports @code{syslog}.) -+ -+This version of @command{su} has support for using PAM for -+authentication.  You can edit @file{/etc/pam.d/su} to customize its -+behaviour. -  - The program accepts the following options.  Also see @ref{Common options}. -  -@@ -12815,6 +12815,8 @@ - @env{PATH} to a compiled-in default value.  Change to @var{user}'s home - directory.  Prepend @samp{-} to the shell's name, intended to make it - read its login startup file(s). -+Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables  -+are preserved as well for PAM functionality. - - @item -m - @itemx -p -@@ -13477,33 +13480,6 @@ - the exit status of the subshell otherwise - @end display -  --@cindex wheel group, not supported --@cindex group wheel, not supported --@cindex fascism --@subsection Why GNU @command{su} does not support the @samp{wheel} group -- --(This section is by Richard Stallman.) -- --@cindex Twenex --@cindex MIT AI lab --Sometimes a few of the users try to hold total power over all the --rest.  For example, in 1984, a few users at the MIT AI lab decided to --seize power by changing the operator password on the Twenex system and --keeping it secret from everyone else.  (I was able to thwart this coup --and give power back to the users by patching the kernel, but I --wouldn't know how to do that in Unix.) -- --However, occasionally the rulers do tell someone.  Under the usual --@command{su} mechanism, once someone learns the root password who --sympathizes with the ordinary users, he or she can tell the rest.  The --``wheel group'' feature would make this impossible, and thus cement the --power of the rulers. -- --I'm on the side of the masses, not that of the rulers.  If you are --used to supporting the bosses and sysadmins in whatever they do, you --might find this idea strange at first. -- -- - @node timeout invocation - @section @command{timeout}: Run a command with a time limit -  ---- coreutils-6.7/configure.ac.pam	2006-12-07 21:30:24.000000000 +0000 -+++ coreutils-6.7/configure.ac	2007-01-09 17:18:04.000000000 +0000 -@@ -44,6 +44,13 @@ - gl_INIT - coreutils_MACROS -  -+dnl Give the chance to enable PAM -+AC_ARG_ENABLE(pam, dnl -+[  --enable-pam              Enable use of the PAM libraries], -+[AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM]) -+LIB_PAM="-ldl -lpam -lpam_misc" -+AC_SUBST(LIB_PAM)]) -+ - AC_FUNC_FORK - - optional_bin_progs= - diff --git a/abs/core-testing/coreutils/coreutils-uname.patch b/abs/core-testing/coreutils/coreutils-uname.patch index 93cb134..b458abe 100644 --- a/abs/core-testing/coreutils/coreutils-uname.patch +++ b/abs/core-testing/coreutils/coreutils-uname.patch @@ -11,11 +11,11 @@ func in the linux/arch/<ARCH>/ source tree of the kernel.  --- coreutils/src/uname.c  +++ coreutils/src/uname.c -@@ -51,6 +51,11 @@ +@@ -50,6 +50,11 @@   # include <mach-o/arch.h>   #endif -+#if defined (__linux__) ++#if defined(__linux__)  +# define USE_PROCINFO  +# define UNAME_HARDWARE_PLATFORM  +#endif @@ -63,7 +63,7 @@ func in the linux/arch/<ARCH>/ source tree of the kernel.  +	}  +}  + -+static int __linux_procinfo (int x, char *fstr, size_t s) ++static int __linux_procinfo(int x, char *fstr, size_t s)  +{  +	FILE *fp;  + @@ -148,26 +148,26 @@ func in the linux/arch/<ARCH>/ source tree of the kernel.  -#if HAVE_SYSINFO && defined SI_ARCHITECTURE  +#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)         { - 	static char processor[257]; +         static char processor[257];  +#if defined(USE_PROCINFO) -+	if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor)) ++        if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))  +#else - 	if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) +         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))  +#endif - 	  element = processor; +           element = processor;         }   #endif  @@ -306,9 +404,13 @@ main (int argc, char **argv)         if (element == unknown) - 	{ - 	  static char hardware_platform[257]; +         { +           static char hardware_platform[257];  +#if defined(USE_PROCINFO) -+	  if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform)) ++          if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))  +#else - 	  size_t s = sizeof hardware_platform; - 	  static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; - 	  if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) +           size_t s = sizeof hardware_platform; +           static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; +           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)  +#endif - 	    element = hardware_platform; - 	} +             element = hardware_platform; +         }   #endif diff --git a/abs/core-testing/coreutils/coreutils.install b/abs/core-testing/coreutils/coreutils.install index 37ebe29..dff2dc5 100644 --- a/abs/core-testing/coreutils/coreutils.install +++ b/abs/core-testing/coreutils/coreutils.install @@ -4,7 +4,7 @@ filelist=(coreutils.info)  post_install() {   [ -x usr/bin/install-info ] || return 0   for file in ${filelist[@]}; do -    usr/bin/install-info $infodir/$file $infodir/dir 2> /dev/null +    usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null   done  } @@ -15,7 +15,7 @@ post_upgrade() {  pre_remove() {   [ -x usr/bin/install-info ] || return 0    for file in ${filelist[@]}; do -    usr/bin/install-info --delete $infodir/$file $infodir/dir 2> /dev/null +    usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null    done  } diff --git a/abs/core-testing/coreutils/futimes.patch b/abs/core-testing/coreutils/futimes.patch deleted file mode 100644 index bb08384..0000000 --- a/abs/core-testing/coreutils/futimes.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- coreutils-6.9/lib/utimens.h.futimens	2007-02-23 18:25:21.000000000 +0000 -+++ coreutils-6.9/lib/utimens.h	2007-06-13 11:40:37.000000000 +0100 -@@ -1,3 +1,3 @@ - #include <time.h> --int futimens (int, char const *, struct timespec const [2]); -+int gl_futimens (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); ---- coreutils-6.9/lib/utimens.c.futimens	2007-01-18 08:33:34.000000000 +0000 -+++ coreutils-6.9/lib/utimens.c	2007-06-13 11:40:37.000000000 +0100 -@@ -75,7 +75,7 @@ struct utimbuf -    Return 0 on success, -1 (setting errno) on failure.  */ -  - int --futimens (int fd ATTRIBUTE_UNUSED, -+gl_futimens (int fd ATTRIBUTE_UNUSED, - 	  char const *file, struct timespec const timespec[2]) - { -   /* Some Linux-based NFS clients are buggy, and mishandle time stamps -@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED, - int - utimens (char const *file, struct timespec const timespec[2]) - { --  return futimens (-1, file, timespec); -+  return gl_futimens (-1, file, timespec); - } ---- coreutils-6.9/src/copy.c.futimens	2007-06-13 11:56:44.000000000 +0100 -+++ coreutils-6.9/src/copy.c	2007-06-13 11:57:00.000000000 +0100 -@@ -547,7 +547,7 @@ copy_reg (char const *src_name, char con -       timespec[0] = get_stat_atime (src_sb); -       timespec[1] = get_stat_mtime (src_sb); -  --      if (futimens (dest_desc, dst_name, timespec) != 0) -+      if (gl_futimens (dest_desc, dst_name, timespec) != 0) - 	{ - 	  error (0, errno, _("preserving times for %s"), quote (dst_name)); - 	  if (x->require_preserve) ---- coreutils-6.9/src/touch.c.futimens	2007-06-13 11:58:00.000000000 +0100 -+++ coreutils-6.9/src/touch.c	2007-06-13 11:58:06.000000000 +0100 -@@ -182,7 +182,7 @@ touch (const char *file) -       t = timespec; -     } -  --  ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); -+  ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); -  -   if (fd == STDIN_FILENO) -     { diff --git a/abs/core-testing/coreutils/su b/abs/core-testing/coreutils/su.pam index cf15f40..cf15f40 100644 --- a/abs/core-testing/coreutils/su +++ b/abs/core-testing/coreutils/su.pam diff --git a/abs/core-testing/elfutils/PKGBUILD b/abs/core-testing/elfutils/PKGBUILD new file mode 100644 index 0000000..5ecdcde --- /dev/null +++ b/abs/core-testing/elfutils/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 87360 2010-08-13 03:21:31Z allan $ +# Maintainer: Allan McRae <allan@archlinux.org> +# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu> + +pkgname=elfutils +pkgver=0.148 +pkgrel=1 +pkgdesc="Collection of libraries and utilities for working with ELF object files and DWARF debugging information" +arch=('i686' 'x86_64') +url="https://fedorahosted.org/elfutils/" +license=('GPL2') +depends=('glibc') +#optdepends=('zlib' 'xz' 'bzip2') +provides=('libelf') +replaces=('libelf') +conflicts=('libelf') +source=(https://fedorahosted.org/releases/e/l/elfutils/${pkgver}/elfutils-${pkgver}.tar.bz2) +md5sums=('a0bed1130135f17ad27533b0034dba8d') + +build() +{ +  cd ${srcdir}/${pkgname}-${pkgver} +  ./configure --prefix=/usr --program-prefix="eu-" +  make +  make check +} + +package() +{ +  cd ${srcdir}/${pkgname}-${pkgver} +  make DESTDIR=${pkgdir} install +} diff --git a/abs/core-testing/gcc/PKGBUILD b/abs/core-testing/gcc/PKGBUILD index 40fd4b6..1cec41a 100644 --- a/abs/core-testing/gcc/PKGBUILD +++ b/abs/core-testing/gcc/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 82472 2010-06-11 13:12:15Z allan $ +# $Id: PKGBUILD 87242 2010-08-11 12:46:24Z allan $  # Maintainer: Jan de Groot <jgc@archlinux.org>  # Maintainer: Allan McRae <allan@archlinux.org> @@ -6,31 +6,30 @@  # NOTE: libtool requires rebuilt with each new gcc version  pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada') -pkgver=4.5.0 -pkgrel=6 -_snapshot=4.5-20100610 -_libstdcppmanver=20100312	# Note: check source directory name when updating this +pkgver=4.5.1 +pkgrel=2 +#_snapshot=4.5-20100610 +_libstdcppmanver=20100719	# Note: check source directory name when updating this  pkgdesc="The GNU Compiler Collection"  arch=('i686' 'x86_64')  license=('GPL' 'LGPL' 'custom')  url="http://gcc.gnu.org" -makedepends=('binutils>=2.20.1' 'libmpc>=0.8.2-2' 'cloog-ppl>=0.15.8' 'libelf' 'gcc-ada') +makedepends=('binutils>=2.20.1' 'libmpc>=0.8.2-2' 'cloog-ppl>=0.15.9-2' 'elfutils' 'gcc-ada')  options=('!libtool' '!emptydirs') -source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,ada}-${pkgver}.tar.bz2 -	ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc,ada}-${_snapshot}.tar.bz2 -	ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.${_libstdcppmanver}.tar.bz2 +source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,ada}-${pkgver}.tar.bz2 +	#ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc,ada}-${_snapshot}.tar.bz2 +	ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2  	gcc_pure64.patch -	gcc-hash-style-both.patch -	r160561.patch) -md5sums=('d0c6573f18e61d0a6c6fe742066346cd' -         '4c5369d27b8cb4c4e447553f064d0f16' -         '2c191ab600e600c774a65674c542e210' -         'a569128d6daf741b242e39f5c24debe4' -         'a7527896c33759ccc40bb82173f8f27f' -         'f9a21b9dfc174f49a09ddaacfd3ac78f' +	gcc-hash-style-both.patch) +md5sums=('dc8959e31b01a65ce10d269614815054' +         'b294953ff0bb2f20c7acb2bf005d832a' +         '7567c2f8df8a8bf61b48fe414b88de65' +         '3c11b7037896e967eddf8178af2ddd98' +         'c92111e2e22fc60d1e0adb1b5c7fa4f9' +         '226ae0c6364cfe2c1f7ac88d06088d5a'           '4030ee1c08dd1e843c0225b772360e76' -         '6fd395bacbd7b6e47c7b74854b478363' -         '79cb26e66eb2502171ef69438fa8666d') +         '6fd395bacbd7b6e47c7b74854b478363') +  if [ -n "${_snapshot}" ]; then    _basedir="${srcdir}/gcc-${_snapshot}" @@ -46,6 +45,9 @@ build() {    cd ${_basedir} +  # "Add" ppl-0.11 compatibility +  sed -i "/ppl_minor_version=/s#10#11#" configure +    # Do not install libiberty    sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in @@ -53,12 +55,9 @@ build() {    sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in    if [ "${CARCH}" = "x86_64" ]; then -    patch -Np1 -i ../gcc_pure64.patch || return 1 +    patch -Np1 -i ../gcc_pure64.patch    fi -  patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch || return 1 - -  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44258 -  patch -Np1 -i ${srcdir}/r160561.patch || return 1 +  patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch    echo ${pkgver} > gcc/BASE-VER @@ -71,14 +70,14 @@ build() {        --with-system-zlib --with-ppl --with-cloog \        --libdir=/usr/lib --libexecdir=/usr/lib \        --mandir=/usr/share/man --infodir=/usr/share/info -  make || return 1 +  make  }  package_gcc-libs()  {    pkgdesc="Runtime libraries shipped by GCC for C and C++ languages"    groups=('base') -  depends=('glibc>=2.12-4') +  depends=('glibc>=2.11.1-2')    install=gcc-libs.install    cd ${_basedir}/build @@ -105,14 +104,14 @@ package_gcc-libs()  package_gcc()  { -  depends=('binutils>=2.20.1' 'libmpc>=0.8.1-2' 'cloog-ppl>=0.15.8' 'libelf') +  depends=('binutils>=2.20.1' 'libmpc>=0.8.1-2' 'cloog-ppl>=0.15.9-2' 'elfutils')    groups=('base-devel')    install=gcc.install    cd ${_basedir}/build    # much, much easier to install the lot and clean-up the mess -  make -j1 DESTDIR=${pkgdir} install || return 1 +  make -j1 DESTDIR=${pkgdir} install    rm $pkgdir/usr/bin/{*gfortran,gnat*}    rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}/*    rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,libgfortranbegin.a} @@ -158,7 +157,7 @@ EOF    # install the libstdc++ man pages    install -dm755 ${pkgdir}/usr/share/man/man3 -  install -m644 ${srcdir}/libstdc++-man.${_libstdcppmanver}/man3/* \ +  install -m644 ${srcdir}/libstdc++-api-${_libstdcppmanver}.man/man3/* \      ${pkgdir}/usr/share/man/man3/    # deal with conflicts...    rm -f ${pkgdir}/usr/share/man/man3/{ctime,queue,random,regex,string}.3 diff --git a/abs/core-testing/gcc/buildfix_new_bison.patch b/abs/core-testing/gcc/buildfix_new_bison.patch deleted file mode 100644 index 01b8880..0000000 --- a/abs/core-testing/gcc/buildfix_new_bison.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gcc/treelang/parse.y	2007-07-18 08:19:29.000000000 +0000 -+++ gcc/treelang/parse.y.new	2008-11-20 06:40:00.013275486 +0000 -@@ -369,7 +369,6 @@ -   current_function = NULL; - } - ; -- - variable_defs_opt: - /* Nil.  */ { -   $$ = 0; -@@ -685,9 +684,9 @@ -  - expressions_with_commas_opt: - /* Nil.  */ { --$$ = 0 -+$$ = 0; - } --|expressions_with_commas { $$ = $1 } -+|expressions_with_commas { $$ = $1; } - ; -  - expressions_with_commas: diff --git a/abs/core-testing/gcc/gcc-java-driver.patch b/abs/core-testing/gcc/gcc-java-driver.patch deleted file mode 100644 index 528b528..0000000 --- a/abs/core-testing/gcc/gcc-java-driver.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc/Makefile.in.orig	2008-03-08 09:52:09.000000000 +0000 -+++ gcc/Makefile.in	2008-03-08 09:54:09.000000000 +0000 -@@ -421,8 +421,8 @@ - xm_defines=@xm_defines@ - lang_checks=check-gcc - lang_opt_files=@lang_opt_files@ $(srcdir)/c.opt $(srcdir)/common.opt --lang_specs_files=@lang_specs_files@ -+lang_specs_files=@lang_specs_files@ $(srcdir)/java/lang-specs.h - lang_tree_files=@lang_tree_files@ - target_cpu_default=@target_cpu_default@ - GCC_THREAD_FILE=@thread_file@ diff --git a/abs/core-testing/gcc/r160561.patch b/abs/core-testing/gcc/r160561.patch deleted file mode 100644 index f3c386b..0000000 --- a/abs/core-testing/gcc/r160561.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- trunk/gcc/tree-sra.c	2010/06/10 16:44:04	160560 -+++ trunk/gcc/tree-sra.c	2010/06/10 16:49:09	160561 -@@ -1689,9 +1689,10 @@ -  - /* Build a subtree of accesses rooted in *ACCESS, and move the pointer in the -    linked list along the way.  Stop when *ACCESS is NULL or the access pointed --   to it is not "within" the root.  */ -+   to it is not "within" the root.  Return false iff some accesses partially -+   overlap.  */ -  --static void -+static bool - build_access_subtree (struct access **access) - { -   struct access *root = *access, *last_child = NULL; -@@ -1706,24 +1707,32 @@ - 	last_child->next_sibling = *access; -       last_child = *access; -  --      build_access_subtree (access); -+      if (!build_access_subtree (access)) -+	return false; -     } -+ -+  if (*access && (*access)->offset < limit) -+    return false; -+ -+  return true; - } -  - /* Build a tree of access representatives, ACCESS is the pointer to the first --   one, others are linked in a list by the next_grp field.  Decide about scalar --   replacements on the way, return true iff any are to be created.  */ -+   one, others are linked in a list by the next_grp field.  Return false iff -+   some accesses partially overlap.  */ -  --static void -+static bool - build_access_trees (struct access *access) - { -   while (access) -     { -       struct access *root = access; -  --      build_access_subtree (&access); -+      if (!build_access_subtree (&access)) -+	return false; -       root->next_grp = access; -     } -+  return true; - } -  - /* Return true if expr contains some ARRAY_REFs into a variable bounded -@@ -2062,9 +2071,7 @@ -       struct access *access; -  -       access = sort_and_splice_var_accesses (var); --      if (access) --	build_access_trees (access); --      else -+      if (!access || !build_access_trees (access)) - 	disqualify_candidate (var, - 			      "No or inhibitingly overlapping accesses."); -     } diff --git a/abs/core-testing/glibc/ChangeLog b/abs/core-testing/glibc/ChangeLog deleted file mode 100644 index 631f360..0000000 --- a/abs/core-testing/glibc/ChangeLog +++ /dev/null @@ -1,39 +0,0 @@ -glibc 2.9-3 -- remove texinfo dep -- only call install-info when needed - -glibc 2.9-2 -- apply Fedora10 changes to fix -  name resolving issues - -glibc 2.9-1 -- bump to new 2.9 branch - -glibc 2.8-2 -- fix an old memory issue again - -glibc 2.8-1 -- no more tarballs -- we checkout the current release branch incl. libidn -- cleanup the patches - -glibc 2.7-6 -- fix broken locales with upstream changes -- disable the whole weekday patch, fixes #8530 - -glibc 2.7-5 -- fix a regression: http://sourceware.org/bugzilla/show_bug.cgi?id=4781 -  mainly for x86_64 where using gcc-gcj eats all memory - -glibc 2.7-4 -- extract /etc/locale.gen from sources to have all new locales supported -- mask other broken locales / added a comment to post.install message -- apply changes from Debian 2.7-exp7 pkg -  to fix some broken locales - -glibc 2.7-3 -- removed locale/check-unknown-symbols.diff -          localedata/tailor-iso14651_t1.diff partly -  to fix broken et_EE locale -- switch to compressed patches -- added ChangeLog diff --git a/abs/core-testing/glibc/PKGBUILD b/abs/core-testing/glibc/PKGBUILD index e31d7b6..673951b 100644 --- a/abs/core-testing/glibc/PKGBUILD +++ b/abs/core-testing/glibc/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 83855 2010-06-23 10:51:26Z allan $ +# $Id: PKGBUILD 87193 2010-08-11 00:55:29Z allan $  # Maintainer: Jan de Groot <jgc@archlinux.org>  # Maintainer: Allan McRae <allan@archlinux.org> @@ -6,9 +6,9 @@  # NOTE: valgrind requires rebuilt with each new glibc version  pkgname=glibc -pkgver=2.12 -pkgrel=4 -_glibcdate=20100620 +pkgver=2.12.1 +pkgrel=1 +_glibcdate=20100811  pkgdesc="GNU C Library"  arch=('i686' 'x86_64')  url="http://www.gnu.org/software/libc" @@ -21,14 +21,14 @@ backup=(etc/locale.gen          etc/nscd.conf)  options=('!strip')  install=glibc.install -source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.bz2 +source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz          glibc-2.10-dont-build-timezone.patch          glibc-2.10-bz4781.patch          glibc-__i686.patch          nscd          locale.gen.txt          locale-gen)     -md5sums=('8857bfae3e0a659452ddd8f9d2606490' +md5sums=('3f0d64de5a9fc5614d8acc0f1d5846ed'           '4dadb9203b69a3210d53514bb46f41c3'           '0c5540efc51c0b93996c51b57a8540ae'           '40cd342e21f71f5e49e32622b25acc52' @@ -41,7 +41,7 @@ mksource() {    pushd glibc    git checkout -b glibc-2.12-arch origin/release/2.12/master    popd -  tar -cvjf glibc-${pkgver}_${_glibcdate}.tar.bz2 glibc/* +  tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*  }  build() { @@ -128,11 +128,11 @@ package() {    [[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4    strip $STRIP_STATIC usr/lib/*.a \ -                      lib/{{ld,libpthread}-2.12,libthread_db-1.0}.so +                      lib/{{ld,libpthread}-${pkgver},libthread_db-1.0}.so -  strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libc,libcidn,libcrypt}-2.12.so \ -                      lib/libnss_{compat,dns,files,hesiod,nis,nisplus}-2.12.so \ -                      lib/{libdl,libm,libnsl,libresolv,librt,libutil}-2.12.so \ +  strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libc,libcidn,libcrypt}-${pkgver}.so \ +                      lib/libnss_{compat,dns,files,hesiod,nis,nisplus}-${pkgver}.so \ +                      lib/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \                        lib/{libmemusage,libpcprofile,libSegFault}.so \                        usr/lib/{pt_chown,gconv/*.so}  } diff --git a/abs/core-testing/glibc/fix-makecontext.patch b/abs/core-testing/glibc/fix-makecontext.patch deleted file mode 100644 index f507b7a..0000000 --- a/abs/core-testing/glibc/fix-makecontext.patch +++ /dev/null @@ -1,33 +0,0 @@ -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/makecontext.S,v -retrieving revision 1.8 -retrieving revision 1.9 -diff -u -r1.8 -r1.9 ---- libc/sysdeps/unix/sysv/linux/i386/makecontext.S	2007/12/03 04:56:56	1.8 -+++ libc/sysdeps/unix/sysv/linux/i386/makecontext.S	2008/01/09 19:35:15	1.9 -@@ -1,5 +1,5 @@ - /* Create new context. --   Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. -+   Copyright (C) 2001, 2002, 2005, 2007, 2008 Free Software Foundation, Inc. -    This file is part of the GNU C Library. -    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. -  -@@ -41,13 +41,15 @@ - 	movl	12(%esp), %ecx - 	movl	%ecx, oEBX(%eax) -  --	/* Make room on the new stack for the parameters.  */ -+	/* Make room on the new stack for the parameters. -+	   Room for the arguments, return address (== L(exitcode)) and -+	   oLINK pointer is needed.  One of the pointer sizes is subtracted -+	   after aligning the stack.  */ - 	negl	%ecx --	leal	-8(%edx,%ecx,4), %edx -+	leal	-4(%edx,%ecx,4), %edx - 	negl	%ecx -  - 	/* Align the stack.  */ --	addl	$16, %edx - 	andl	$0xfffffff0, %edx - 	subl	$4, %edx -  diff --git a/abs/core-testing/glibc/glibc.install b/abs/core-testing/glibc/glibc.install index 0b250b4..5e15c81 100644 --- a/abs/core-testing/glibc/glibc.install +++ b/abs/core-testing/glibc/glibc.install @@ -3,8 +3,8 @@ filelist=(libc.info libc.info-1 libc.info-2 libc.info-3 libc.info-4 libc.info-5            libc.info-8 libc.info-9 libc.info-10 libc.info-11)  post_upgrade() { -  ldconfig -r . -  [ -x /sbin/init ] && init u +  sbin/ldconfig -r . +  [ -x sbin/init ] && sbin/init u    usr/sbin/locale-gen    [ -x usr/bin/install-info ] || return 0 diff --git a/abs/core-testing/glibc/locale.gen b/abs/core-testing/glibc/locale.gen deleted file mode 100644 index c739380..0000000 --- a/abs/core-testing/glibc/locale.gen +++ /dev/null @@ -1,438 +0,0 @@ -# Configuration file for locale-gen -# -# lists of locales that are to be generated by the locale-gen command. -# -# Each line is of the form: -# -#     <locale> <charset> -# -#  where <locale> is one of the locales given in /usr/share/i18n/locales -#  and <charset> is one of the character sets listed in /usr/share/i18n/charmaps -# -#  Examples: -#  en_US ISO-8859-1 -#  en_US.UTF-8 UTF-8 -#  de_DE ISO-8859-1 -#  de_DE@euro ISO-8859-15 -# -#  The locale-gen command will generate all the locales, -#  placing them in /usr/lib/locale. -# -#  A list of supported locales is included in this file. -#  Uncomment the ones you need. -# -#aa_DJ.UTF-8 UTF-8   -#aa_DJ ISO-8859-1   -#aa_ER UTF-8   -#aa_ER@saaho UTF-8   -#aa_ET UTF-8   -#af_ZA.UTF-8 UTF-8   -#af_ZA ISO-8859-1   -#am_ET UTF-8   -#an_ES.UTF-8 UTF-8   -#an_ES ISO-8859-15   -#ar_AE.UTF-8 UTF-8   -#ar_AE ISO-8859-6   -#ar_BH.UTF-8 UTF-8   -#ar_BH ISO-8859-6   -#ar_DZ.UTF-8 UTF-8   -#ar_DZ ISO-8859-6   -#ar_EG.UTF-8 UTF-8   -#ar_EG ISO-8859-6   -#ar_IN UTF-8   -#ar_IQ.UTF-8 UTF-8   -#ar_IQ ISO-8859-6   -#ar_JO.UTF-8 UTF-8   -#ar_JO ISO-8859-6   -#ar_KW.UTF-8 UTF-8   -#ar_KW ISO-8859-6   -#ar_LB.UTF-8 UTF-8   -#ar_LB ISO-8859-6   -#ar_LY.UTF-8 UTF-8   -#ar_LY ISO-8859-6   -#ar_MA.UTF-8 UTF-8   -#ar_MA ISO-8859-6   -#ar_OM.UTF-8 UTF-8   -#ar_OM ISO-8859-6   -#ar_QA.UTF-8 UTF-8   -#ar_QA ISO-8859-6   -#ar_SA.UTF-8 UTF-8   -#ar_SA ISO-8859-6   -#ar_SD.UTF-8 UTF-8   -#ar_SD ISO-8859-6   -#ar_SY.UTF-8 UTF-8   -#ar_SY ISO-8859-6   -#ar_TN.UTF-8 UTF-8   -#ar_TN ISO-8859-6   -#ar_YE.UTF-8 UTF-8   -#ar_YE ISO-8859-6   -#az_AZ.UTF-8 UTF-8   -#as_IN.UTF-8 UTF-8   -#ast_ES.UTF-8 UTF-8   -#ast_ES ISO-8859-15   -#be_BY.UTF-8 UTF-8   -#be_BY CP1251   -#be_BY@latin UTF-8   -#ber_DZ UTF-8   -#ber_MA UTF-8   -#bg_BG.UTF-8 UTF-8   -#bg_BG CP1251   -#bn_BD UTF-8   -#bn_IN UTF-8   -#br_FR.UTF-8 UTF-8   -#br_FR ISO-8859-1   -#br_FR@euro ISO-8859-15   -#bs_BA.UTF-8 UTF-8   -#bs_BA ISO-8859-2   -#byn_ER UTF-8   -#ca_AD.UTF-8 UTF-8   -#ca_AD ISO-8859-15   -#ca_ES.UTF-8 UTF-8   -#ca_ES ISO-8859-1   -#ca_ES@euro ISO-8859-15   -#ca_ES.UTF-8@valencia UTF-8   -#ca_ES@valencia ISO-8859-15   -#ca_FR.UTF-8 UTF-8   -#ca_FR ISO-8859-15   -#ca_IT.UTF-8 UTF-8   -#ca_IT ISO-8859-15   -#crh_UA UTF-8   -#cs_CZ.UTF-8 UTF-8   -#cs_CZ ISO-8859-2   -#csb_PL UTF-8   -#cy_GB.UTF-8 UTF-8   -#cy_GB ISO-8859-14   -#da_DK.UTF-8 UTF-8   -#da_DK ISO-8859-1   -#da_DK.ISO-8859-15 ISO-8859-15   -#de_AT.UTF-8 UTF-8   -#de_AT ISO-8859-1   -#de_AT@euro ISO-8859-15   -#de_BE.UTF-8 UTF-8   -#de_BE ISO-8859-1   -#de_BE@euro ISO-8859-15   -#de_CH.UTF-8 UTF-8   -#de_CH ISO-8859-1   -#de_DE.UTF-8 UTF-8   -#de_DE ISO-8859-1   -#de_DE@euro ISO-8859-15   -#de_LU.UTF-8 UTF-8   -#de_LU ISO-8859-1   -#de_LU@euro ISO-8859-15   -#dz_BT UTF-8   -#el_GR.UTF-8 UTF-8   -#el_GR ISO-8859-7   -#el_CY.UTF-8 UTF-8   -#el_CY ISO-8859-7   -#en_AU.UTF-8 UTF-8   -#en_AU ISO-8859-1   -#en_BW.UTF-8 UTF-8   -#en_BW ISO-8859-1   -#en_CA.UTF-8 UTF-8   -#en_CA ISO-8859-1   -#en_DK.UTF-8 UTF-8   -#en_DK.ISO-8859-15 ISO-8859-15   -#en_DK ISO-8859-1   -#en_GB.UTF-8 UTF-8   -#en_GB ISO-8859-1   -#en_GB.ISO-8859-15 ISO-8859-15   -#en_HK.UTF-8 UTF-8   -#en_HK ISO-8859-1   -#en_IE.UTF-8 UTF-8   -#en_IE ISO-8859-1   -#en_IE@euro ISO-8859-15   -#en_IN UTF-8   -#en_NG UTF-8   -#en_NZ.UTF-8 UTF-8   -#en_NZ ISO-8859-1   -#en_PH.UTF-8 UTF-8   -#en_PH ISO-8859-1   -#en_SG.UTF-8 UTF-8   -#en_SG ISO-8859-1   -#en_US.UTF-8 UTF-8   -#en_US ISO-8859-1   -#en_US.ISO-8859-15 ISO-8859-15   -#en_ZA.UTF-8 UTF-8   -#en_ZA ISO-8859-1   -#en_ZW.UTF-8 UTF-8   -#en_ZW ISO-8859-1   -#eo.UTF-8 UTF-8   -#eo ISO-8859-3   -#es_AR.UTF-8 UTF-8   -#es_AR ISO-8859-1   -#es_BO.UTF-8 UTF-8   -#es_BO ISO-8859-1   -#es_CL.UTF-8 UTF-8   -#es_CL ISO-8859-1   -#es_CO.UTF-8 UTF-8   -#es_CO ISO-8859-1   -#es_CR.UTF-8 UTF-8   -#es_CR ISO-8859-1   -#es_DO.UTF-8 UTF-8   -#es_DO ISO-8859-1   -#es_EC.UTF-8 UTF-8   -#es_EC ISO-8859-1   -#es_ES.UTF-8 UTF-8   -#es_ES ISO-8859-1   -#es_ES@euro ISO-8859-15   -#es_GT.UTF-8 UTF-8   -#es_GT ISO-8859-1   -#es_HN.UTF-8 UTF-8   -#es_HN ISO-8859-1   -#es_MX.UTF-8 UTF-8   -#es_MX ISO-8859-1   -#es_NI.UTF-8 UTF-8   -#es_NI ISO-8859-1   -#es_PA.UTF-8 UTF-8   -#es_PA ISO-8859-1   -#es_PE.UTF-8 UTF-8   -#es_PE ISO-8859-1   -#es_PR.UTF-8 UTF-8   -#es_PR ISO-8859-1   -#es_PY.UTF-8 UTF-8   -#es_PY ISO-8859-1   -#es_SV.UTF-8 UTF-8   -#es_SV ISO-8859-1   -#es_US.UTF-8 UTF-8   -#es_US ISO-8859-1   -#es_UY.UTF-8 UTF-8   -#es_UY ISO-8859-1   -#es_VE.UTF-8 UTF-8   -#es_VE ISO-8859-1   -#et_EE.UTF-8 UTF-8   -#et_EE ISO-8859-1   -#et_EE.ISO-8859-15 ISO-8859-15   -#eu_ES.UTF-8 UTF-8   -#eu_ES ISO-8859-1   -#eu_ES@euro ISO-8859-15   -#eu_FR.UTF-8 UTF-8   -#eu_FR ISO-8859-1   -#eu_FR@euro ISO-8859-15   -#fa_IR UTF-8   -#fi_FI.UTF-8 UTF-8   -#fi_FI ISO-8859-1   -#fi_FI@euro ISO-8859-15   -#fil_PH UTF-8   -#fo_FO.UTF-8 UTF-8   -#fo_FO ISO-8859-1   -#fr_BE.UTF-8 UTF-8   -#fr_BE ISO-8859-1   -#fr_BE@euro ISO-8859-15   -#fr_CA.UTF-8 UTF-8   -#fr_CA ISO-8859-1   -#fr_CH.UTF-8 UTF-8   -#fr_CH ISO-8859-1   -#fr_FR.UTF-8 UTF-8   -#fr_FR ISO-8859-1   -#fr_FR@euro ISO-8859-15   -#fr_LU.UTF-8 UTF-8   -#fr_LU ISO-8859-1   -#fr_LU@euro ISO-8859-15   -#fur_IT UTF-8   -#fy_NL UTF-8   -#fy_DE UTF-8   -#ga_IE.UTF-8 UTF-8   -#ga_IE ISO-8859-1   -#ga_IE@euro ISO-8859-15   -#gd_GB.UTF-8 UTF-8   -#gd_GB ISO-8859-15   -#gez_ER UTF-8   -#gez_ER@abegede UTF-8   -#gez_ET UTF-8   -#gez_ET@abegede UTF-8   -#gl_ES.UTF-8 UTF-8   -#gl_ES ISO-8859-1   -#gl_ES@euro ISO-8859-15   -#gu_IN UTF-8   -#gv_GB.UTF-8 UTF-8   -#gv_GB ISO-8859-1   -#ha_NG UTF-8   -#he_IL.UTF-8 UTF-8   -#he_IL ISO-8859-8   -#hi_IN UTF-8   -#hr_HR.UTF-8 UTF-8   -#hr_HR ISO-8859-2   -#hsb_DE.UTF-8 UTF-8   -#hsb_DE ISO-8859-2   -#hu_HU.UTF-8 UTF-8   -#hu_HU ISO-8859-2   -#hy_AM UTF-8   -#hy_AM.ARMSCII-8 ARMSCII-8   -#ia UTF-8   -#id_ID.UTF-8 UTF-8   -#id_ID ISO-8859-1   -#ig_NG UTF-8   -#ik_CA UTF-8   -#is_IS.UTF-8 UTF-8   -#is_IS ISO-8859-1   -#it_CH.UTF-8 UTF-8   -#it_CH ISO-8859-1   -#it_IT.UTF-8 UTF-8   -#it_IT ISO-8859-1   -#it_IT@euro ISO-8859-15   -#iu_CA UTF-8   -#iw_IL.UTF-8 UTF-8   -#iw_IL ISO-8859-8   -#ja_JP.UTF-8 UTF-8   -#ja_JP.EUC-JP EUC-JP   -#ka_GE.UTF-8 UTF-8   -#ka_GE GEORGIAN-PS   -#kk_KZ.UTF-8 UTF-8   -#kk_KZ PT154   -#kl_GL.UTF-8 UTF-8   -#kl_GL ISO-8859-1   -#km_KH UTF-8   -#kn_IN UTF-8   -#ko_KR.UTF-8 UTF-8   -#ko_KR.EUC-KR EUC-KR   -#ku_TR.UTF-8 UTF-8   -#ku_TR ISO-8859-9   -#kw_GB.UTF-8 UTF-8   -#kw_GB ISO-8859-1   -#ky_KG UTF-8   -#lg_UG.UTF-8 UTF-8   -#lg_UG ISO-8859-10   -#li_BE UTF-8   -#li_NL UTF-8   -#lo_LA UTF-8   -#lt_LT.UTF-8 UTF-8   -#lt_LT ISO-8859-13   -#lv_LV.UTF-8 UTF-8   -#lv_LV ISO-8859-13   -#mai_IN UTF-8   -#mg_MG.UTF-8 UTF-8   -#mg_MG ISO-8859-15   -#mi_NZ.UTF-8 UTF-8   -#mi_NZ ISO-8859-13   -#mk_MK.UTF-8 UTF-8   -#mk_MK ISO-8859-5   -#ml_IN UTF-8   -#mn_MN UTF-8   -#mr_IN UTF-8   -#ms_MY.UTF-8 UTF-8   -#ms_MY ISO-8859-1   -#mt_MT.UTF-8 UTF-8   -#mt_MT ISO-8859-3   -#nb_NO.UTF-8 UTF-8   -#nb_NO ISO-8859-1   -#nds_DE UTF-8   -#nds_NL UTF-8   -#ne_NP UTF-8   -#nl_BE.UTF-8 UTF-8   -#nl_BE ISO-8859-1   -#nl_BE@euro ISO-8859-15   -#nl_NL.UTF-8 UTF-8   -#nl_NL ISO-8859-1   -#nl_NL@euro ISO-8859-15   -#nn_NO.UTF-8 UTF-8   -#nn_NO ISO-8859-1   -#nr_ZA UTF-8   -#nso_ZA UTF-8   -#oc_FR.UTF-8 UTF-8   -#oc_FR ISO-8859-1   -#om_ET UTF-8   -#om_KE.UTF-8 UTF-8   -#om_KE ISO-8859-1   -#or_IN UTF-8   -#pa_IN UTF-8   -#pa_PK UTF-8   -#pap_AN UTF-8   -#pl_PL.UTF-8 UTF-8   -#pl_PL ISO-8859-2   -#pt_BR.UTF-8 UTF-8   -#pt_BR ISO-8859-1   -#pt_PT.UTF-8 UTF-8   -#pt_PT ISO-8859-1   -#pt_PT@euro ISO-8859-15   -#ro_RO.UTF-8 UTF-8   -#ro_RO ISO-8859-2   -#ru_RU.UTF-8 UTF-8   -#ru_RU.KOI8-R KOI8-R   -#ru_RU ISO-8859-5   -#ru_RU.CP1251 CP1251   -#ru_UA.UTF-8 UTF-8   -#ru_UA KOI8-U   -#rw_RW UTF-8   -#sa_IN UTF-8   -#sc_IT UTF-8   -#se_NO UTF-8   -#si_LK UTF-8   -#sid_ET UTF-8   -#sk_SK.UTF-8 UTF-8   -#sk_SK ISO-8859-2   -#sl_SI.UTF-8 UTF-8   -#sl_SI ISO-8859-2   -#so_DJ.UTF-8 UTF-8   -#so_DJ ISO-8859-1   -#so_ET UTF-8   -#so_KE.UTF-8 UTF-8   -#so_KE ISO-8859-1   -#so_SO.UTF-8 UTF-8   -#so_SO ISO-8859-1   -#sq_AL.UTF-8 UTF-8   -#sq_AL ISO-8859-1   -#sr_ME UTF-8   -#sr_RS UTF-8   -#sr_RS@latin UTF-8   -#ss_ZA UTF-8   -#st_ZA.UTF-8 UTF-8   -#st_ZA ISO-8859-1   -#sv_FI.UTF-8 UTF-8   -#sv_FI ISO-8859-1   -#sv_FI@euro ISO-8859-15   -#sv_SE.UTF-8 UTF-8   -#sv_SE ISO-8859-1   -#sv_SE.ISO-8859-15 ISO-8859-15   -#ta_IN UTF-8   -#te_IN UTF-8   -#tg_TJ.UTF-8 UTF-8   -#tg_TJ KOI8-T   -#th_TH.UTF-8 UTF-8   -#th_TH TIS-620   -#ti_ER UTF-8   -#ti_ET UTF-8   -#tig_ER UTF-8   -#tk_TM UTF-8   -#tl_PH.UTF-8 UTF-8   -#tl_PH ISO-8859-1   -#tn_ZA UTF-8   -#tr_CY.UTF-8 UTF-8   -#tr_CY ISO-8859-9   -#tr_TR.UTF-8 UTF-8   -#tr_TR ISO-8859-9   -#ts_ZA UTF-8   -#tt_RU.UTF-8 UTF-8   -#tt_RU@iqtelif.UTF-8 UTF-8   -#ug_CN UTF-8   -#uk_UA.UTF-8 UTF-8   -#uk_UA KOI8-U   -#ur_PK UTF-8   -#uz_UZ.UTF-8 UTF-8   -#uz_UZ ISO-8859-1   -#uz_UZ@cyrillic UTF-8   -#ve_ZA UTF-8   -#vi_VN UTF-8   -#vi_VN.TCVN TCVN5712-1   -#wa_BE.UTF-8 UTF-8   -#wa_BE ISO-8859-1   -#wa_BE@euro ISO-8859-15   -#wo_SN UTF-8   -#xh_ZA.UTF-8 UTF-8   -#xh_ZA ISO-8859-1   -#yi_US.UTF-8 UTF-8   -#yi_US CP1255   -#yo_NG UTF-8   -#zh_CN.UTF-8 UTF-8   -#zh_CN.GB18030 GB18030   -#zh_CN.GBK GBK   -#zh_CN GB2312   -#zh_HK.UTF-8 UTF-8   -#zh_HK BIG5-HKSCS   -#zh_SG.UTF-8 UTF-8   -#zh_SG.GBK GBK   -#zh_SG GB2312   -#zh_TW.UTF-8 UTF-8   -#zh_TW BIG5   -#zh_TW.EUC-TW EUC-TW   -#zu_ZA.UTF-8 UTF-8   -#zu_ZA ISO-8859-1   diff --git a/abs/core-testing/libarchive/PKGBUILD b/abs/core-testing/libarchive/PKGBUILD index 1c29cd2..ad44d8f 100644 --- a/abs/core-testing/libarchive/PKGBUILD +++ b/abs/core-testing/libarchive/PKGBUILD @@ -1,30 +1,35 @@ -# $Id: PKGBUILD 50484 2009-08-27 22:33:42Z thomas $ +# $Id: PKGBUILD 85003 2010-07-06 13:24:34Z dan $  # Maintainer: Dan McGee <dan@archlinux.org>  # Maintainer: Aaron Griffin <aaron@archlinux.org>  pkgname=libarchive -pkgver=2.7.1 +pkgver=2.8.4  pkgrel=1  pkgdesc="library that can create and read several streaming archive formats" -arch=(i686 x86_64) +arch=('i686' 'x86_64')  url="http://libarchive.googlecode.com/"  license=('BSD') -groups=('base') -depends=('zlib' 'bzip2' 'xz-utils' 'acl' 'openssl') -source=(http://libarchive.googlecode.com/files/libarchive-$pkgver.tar.gz) -sha256sums=('a7e066ef857d3db0211e2d916ca14aafc48a4776c4fa108fd67092ce862a7ba8') +depends=('zlib' 'bzip2' 'xz' 'acl' 'openssl>=1.0.0' 'expat') +source=("http://libarchive.googlecode.com/files/libarchive-${pkgver}.tar.gz") +md5sums=('83b237a542f27969a8d68ac217dc3796') +sha256sums=('86cffa3eaa28d3116f5d0b20284026c3762cf4a2b52b9844df2b494d4a89f688')  # pacman.static build fails unless we keep the libtool files (or unless we link  # the missing symbols inside the libarchive .a static lib, but that is dirty) -options=(libtool) +options=('libtool') + +# keep an upgrade path for older installations +PKGEXT='.pkg.tar.gz'  build() { -  cd $startdir/src/$pkgname-$pkgver -  ./configure --prefix=/usr +  cd $srcdir/$pkgname-$pkgver +  ./configure --prefix=/usr --without-xml2    make || return 1 -  make DESTDIR=$startdir/pkg install +} + +package() { +  cd $srcdir/$pkgname-$pkgver +  make DESTDIR=$pkgdir install -  # install license -  mkdir -p $startdir/pkg/usr/share/licenses/libarchive -  install -m644 COPYING $startdir/pkg/usr/share/licenses/libarchive/ +  install -D -m644 COPYING $pkgdir/usr/share/licenses/libarchive/COPYING  } diff --git a/abs/core-testing/libelf/PKGBUILD b/abs/core-testing/libelf/PKGBUILD deleted file mode 100644 index 17f4877..0000000 --- a/abs/core-testing/libelf/PKGBUILD +++ /dev/null @@ -1,23 +0,0 @@ -# $Id: PKGBUILD 66485 2010-01-31 10:45:08Z allan $ -# Maintainer: Allan McRae <allan@archlinux.org> -# Maintainer: Jan de Groot <jgc@archlinux.org> -# Contributor: Tom Newsom <Jeepster@gmx.co.uk> - -pkgname=libelf -pkgver=0.8.13 -pkgrel=1 -pkgdesc="libelf is a free ELF object file access library" -arch=('i686' 'x86_64') -url="http://www.mr511.de/software/" -license=('GPL') -depends=('glibc') -source=(http://www.mr511.de/software/${pkgname}-${pkgver}.tar.gz) -md5sums=('4136d7b4c04df68b686570afa26988ac') - -build() { -    cd "${srcdir}/${pkgname}-${pkgver}" -    ./configure --prefix=/usr --enable-shared \ -      --enable-gnu-names --enable-compat || return 1 -    make || return 1 -    make prefix="${pkgdir}/usr" install || return 1 -} diff --git a/abs/core-testing/libfetch/Makefile b/abs/core-testing/libfetch/Makefile index 15df96e..53bcee9 100644 --- a/abs/core-testing/libfetch/Makefile +++ b/abs/core-testing/libfetch/Makefile @@ -5,7 +5,7 @@ FETCH_WITH_INET6 = true  FETCH_WITH_OPENSSL = true  WARNINGS = -Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts \ -	   -Wpointer-arith -Wcast-align -Wsign-compare +	   -Wpointer-arith -Wcast-align  CFLAGS   = -O2 -pipe -I. -fPIC $(WARNINGS) \  	   -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES @@ -42,18 +42,17 @@ E = @/bin/echo  Q = @  all: libfetch.so libfetch.a -	$(E) "  built with:  " $(CFLAGS)  .PHONY: all  %.o: %.c $(INCS) $(GEN)  	$(E) "  compile   " $@  	$(Q) $(CC) $(CFLAGS) -c $< -ftperr.h: ftp.errors +ftperr.h: ftp.errors Makefile errlist.sh  	$(E) "  generate  " $@  	$(Q) ./errlist.sh ftp_errlist FTP ftp.errors > $@ -httperr.h: http.errors +httperr.h: http.errors Makefile errlist.sh  	$(E) "  generate  " $@  	$(Q) ./errlist.sh http_errlist HTTP http.errors > $@ @@ -61,12 +60,14 @@ libfetch.so: $(GEN) $(INCS) $(OBJS)  	$(E) "  build     " $@  	$(Q) rm -f $@  	$(Q) $(LD) $(LDFLAGS) *.o -shared -o $@ +	$(E) "  built with:  " $(CFLAGS)  libfetch.a: $(GEN) $(INCS) $(OBJS)  	$(E) "  build     " $@  	$(Q) rm -f $@  	$(Q) $(AR) rcs $@ *.o  	$(Q) $(RANLIB) $@ +	$(E) "  built with:  " $(CFLAGS)  clean:  	$(E) "  clean     " diff --git a/abs/core-testing/libfetch/PKGBUILD b/abs/core-testing/libfetch/PKGBUILD index 8cdbd2c..641e7d4 100644 --- a/abs/core-testing/libfetch/PKGBUILD +++ b/abs/core-testing/libfetch/PKGBUILD @@ -3,16 +3,20 @@  # Contributor: Xavier Chantry <shiningxc@gmail.com>  pkgname=libfetch -pkgver=2.26 +pkgver=2.33  pkgrel=1  pkgdesc="URL based download library"  arch=('i686' 'x86_64')  license=('BSD') -groups=('base') -depends=('openssl') +depends=('openssl>=1.0.0')  url="http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/libfetch/"  source=(Makefile          ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz) +md5sums=('5167d18db7660228e75290fc7d25fe56' +         'a176b94f7f30344ef8a71c047ca2136b') + +# keep an upgrade path for older installations +PKGEXT='.pkg.tar.gz'  # source PKGBUILD && mksource  mksource() { @@ -28,11 +32,15 @@ mksource() {  }  build() { -  cd $srcdir/${pkgname}-${pkgver} -  cp ../Makefile . +  cd $srcdir/$pkgname-$pkgver +  cp $srcdir/Makefile .    make || return 1 -  make DESTDIR=$pkgdir install  } -md5sums=('cea609a8d6fd97761e364f7203e6d609' -         '2dc53c0b5480d3dd5157482379820806') +package() { +  cd $srcdir/$pkgname-$pkgver +  make DESTDIR=$pkgdir install +  licdir=$pkgdir/usr/share/licenses/libfetch/ +  mkdir -p $licdir +  sed -n -e '/Copyright (c)/,/SUCH DAMAGE\./p' common.c | cut -c '4-' > $licdir/LICENSE +} diff --git a/abs/core-testing/libfetch/libfetch-2.33-1-i686.pkg.tar.gz b/abs/core-testing/libfetch/libfetch-2.33-1-i686.pkg.tar.gz new file mode 120000 index 0000000..2c8ffbe --- /dev/null +++ b/abs/core-testing/libfetch/libfetch-2.33-1-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/libfetch-2.33-1-i686.pkg.tar.gz
\ No newline at end of file diff --git a/abs/core-testing/libtool/PKGBUILD b/abs/core-testing/libtool/PKGBUILD index c6f5f7a..eab01ea 100644 --- a/abs/core-testing/libtool/PKGBUILD +++ b/abs/core-testing/libtool/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 82294 2010-06-10 03:52:16Z allan $ +# $Id: PKGBUILD 87248 2010-08-11 14:10:45Z allan $  # Maintainer: Allan McRae <allan@archlinux.org>  # Contributor: judd <jvinet@zeroflux.org> @@ -6,7 +6,7 @@  pkgname=libtool  pkgver=2.2.10 -pkgrel=1 +pkgrel=3  pkgdesc="A generic library support script"  arch=('i686' 'x86_64')  url="http://www.gnu.org/software/libtool" @@ -21,7 +21,8 @@ md5sums=('b745d220e88163fcd9eea0a90ccf21b0')  build() {    cd ${srcdir}/${pkgname}-${pkgver}    ./configure --prefix=/usr -  make || return 1 +  make +  make check  }  package() { diff --git a/abs/core-testing/libtool/libtool-2.2.10-3-i686.pkg.tar.gz b/abs/core-testing/libtool/libtool-2.2.10-3-i686.pkg.tar.gz new file mode 120000 index 0000000..76cb8a4 --- /dev/null +++ b/abs/core-testing/libtool/libtool-2.2.10-3-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/libtool-2.2.10-3-i686.pkg.tar.gz
\ No newline at end of file diff --git a/abs/core-testing/linux-api-headers/linux-api-headers-2.6.34-1-i686.pkg.tar.gz b/abs/core-testing/linux-api-headers/linux-api-headers-2.6.34-1-i686.pkg.tar.gz new file mode 120000 index 0000000..2e2ed4c --- /dev/null +++ b/abs/core-testing/linux-api-headers/linux-api-headers-2.6.34-1-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/linux-api-headers-2.6.34-1-i686.pkg.tar.gz
\ No newline at end of file diff --git a/abs/core-testing/openssh/PKGBUILD b/abs/core-testing/openssh/PKGBUILD index 504ed4a..36a82bd 100644 --- a/abs/core-testing/openssh/PKGBUILD +++ b/abs/core-testing/openssh/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 80964 2010-05-24 06:39:23Z allan $ +# $Id: PKGBUILD 89278 2010-08-30 21:38:00Z thomas $  # Maintainer: Aaron Griffin <aaron@archlinux.org>  # Contributor: judd <jvinet@zeroflux.org>  pkgname=openssh -pkgver=5.5p1 +pkgver=5.6p1  pkgrel=1  pkgdesc='A Secure SHell server/client'  arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd')  depends=('openssl' 'zlib' 'pam' 'tcp_wrappers' 'heimdal')  source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"          'sshd' 'sshd.confd' 'sshd.pam') -md5sums=('88633408f4cb1eb11ec7e2ec58b519eb' +md5sums=('e6ee52e47c768bf0ec42a232b5d18fb0'           '17b1b1bf0f578a55945ee204bd4462af'           'e2cea70ac13af7e63d40eb04415eacd5'           '1c7c2ea8734ec7e3ca58d820634dc73a') diff --git a/abs/core-testing/openssh/sshd.patch b/abs/core-testing/openssh/sshd.patch deleted file mode 100644 index f3ba392..0000000 --- a/abs/core-testing/openssh/sshd.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- openssh-5.1p1/sshd_config.org	2010-03-08 23:43:07.000000000 +0000 -+++ openssh-5.1p1/sshd_config	2010-03-08 23:45:37.000000000 +0000 -@@ -38,14 +38,14 @@ - # Authentication: -  - #LoginGraceTime 2m --#PermitRootLogin yes -+PermitRootLogin no - #StrictModes yes - #MaxAuthTries 6 - #MaxSessions 10 -  - #RSAAuthentication yes --#PubkeyAuthentication yes --#AuthorizedKeysFile	.ssh/authorized_keys -+PubkeyAuthentication yes -+AuthorizedKeysFile	.ssh/authorized_keys -  - # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts - #RhostsRSAAuthentication no -@@ -88,7 +88,7 @@ - #AllowAgentForwarding yes - #AllowTcpForwarding yes - #GatewayPorts no --#X11Forwarding no -+X11Forwarding yes - #X11DisplayOffset 10 - #X11UseLocalhost yes - #PrintMotd yes -@@ -110,10 +110,11 @@ - #Banner none -  - # override default of no subsystems --Subsystem	sftp	/usr/libexec/sftp-server -+Subsystem	sftp	/usr/lib/ssh/sftp-server -  - # Example of overriding settings on a per-user basis - #Match User anoncvs - #	X11Forwarding no - #	AllowTcpForwarding no - #	ForceCommand cvs server -+DenyUsers mythtv diff --git a/abs/core-testing/openssh/sshd_config.diff b/abs/core-testing/openssh/sshd_config.diff deleted file mode 100644 index e69de29..0000000 --- a/abs/core-testing/openssh/sshd_config.diff +++ /dev/null diff --git a/abs/core-testing/pacman/PKGBUILD b/abs/core-testing/pacman/PKGBUILD index b18009b..27dd4ca 100644 --- a/abs/core-testing/pacman/PKGBUILD +++ b/abs/core-testing/pacman/PKGBUILD @@ -1,39 +1,34 @@ -# $Id: PKGBUILD 83376 2010-06-21 12:52:09Z dan $ -# Maintainer: Aaron Griffin <aaron@archlinux.org> +# $Id: PKGBUILD 89780 2010-09-04 01:05:26Z dan $  # Maintainer: Dan McGee <dan@archlinux.org>  pkgname=pacman -pkgver=3.4.0 -pkgrel=2 +pkgver=3.4.1 +pkgrel=1  pkgdesc="A library-based package manager with dependency support"  arch=('i686' 'x86_64')  url="http://www.archlinux.org/pacman/"  license=('GPL')  groups=('base')  depends=('bash' 'libarchive>=2.7.1' 'libfetch>=2.25' 'pacman-mirrorlist') -optdepends=('fakeroot: for makepkg usage as normal user') +optdepends=('fakeroot: for makepkg usage as normal user' +            'curl: for rankmirrors usage')  backup=(etc/pacman.conf etc/makepkg.conf)  install=pacman.install  options=(!libtool)  source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz          pacman.conf -        makepkg.conf -        0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch) -md5sums=('50ad71be1faaad84842c576e239d1bb5' -         '80f5bb2a606553512d0db857f78d9ac2' -         'aef317285c7d16ac495b0e53deeb948d' -         'f8c4a3cc7702a7a70d177659441495c5') -sha256sums=('cd80e206ee653ce337555c73b7064088e672e9341245317fe09dc52d06bff3c3' -            '97fb68536c1179a7de52dfb8a107c6e9bf3a71eaa6a98d6ae74dc224d4ca5838' -            '3a60e1f895c90c8e74f5ca389fa05fb3328745e9873c5452b8cd1b2e68bee418' -            '99f1d108f930b134cfb4c1ca8c86cd282fe9efb69de39cd747218f3d448dda44') +        pacman.conf.x86_64 +        makepkg.conf) +md5sums=('4e4e8e4f636d9878fbed9cf840f162cf' +         'eda9cbdb47f85fabda2e7e63801e3e16' +         '9ba146b4fa7bcb3cc18204b06d1f6157' +         'aef317285c7d16ac495b0e53deeb948d')  # keep an upgrade path for older installations  PKGEXT='.pkg.tar.gz'  build() {    cd $srcdir/$pkgname-$pkgver -  patch -Np1 < $srcdir/0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc    make || return 1  } @@ -44,7 +39,14 @@ package() {    # install Arch specific stuff    mkdir -p $pkgdir/etc -  install -m644 $srcdir/pacman.conf $pkgdir/etc/ +  case "$CARCH" in +    i686) +      install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf +      ;; +    x86_64) +      install -m644 $srcdir/pacman.conf.x86_64 $pkgdir/etc/pacman.conf +      ;; +  esac    install -m644 $srcdir/makepkg.conf $pkgdir/etc/    # set things correctly in the default conf file    case "$CARCH" in diff --git a/abs/core-testing/pacman/0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch b/abs/core-testing/pacman/old/0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch index 8baa35e..8baa35e 100644 --- a/abs/core-testing/pacman/0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch +++ b/abs/core-testing/pacman/old/0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch diff --git a/abs/core-testing/pacman/old/PKGBUILD b/abs/core-testing/pacman/old/PKGBUILD new file mode 100644 index 0000000..a138950 --- /dev/null +++ b/abs/core-testing/pacman/old/PKGBUILD @@ -0,0 +1,74 @@ +# $Id: PKGBUILD 83376 2010-06-21 12:52:09Z dan $ +# Maintainer: Aaron Griffin <aaron@archlinux.org> +# Maintainer: Dan McGee <dan@archlinux.org> + +pkgname=pacman +pkgver=3.4.0 +pkgrel=3 +pkgdesc="A library-based package manager with dependency support" +arch=('i686' 'x86_64') +url="http://www.archlinux.org/pacman/" +license=('GPL') +groups=('base') +depends=('bash' 'libarchive>=2.7.1' 'libfetch>=2.25' 'pacman-mirrorlist') +optdepends=('fakeroot: for makepkg usage as normal user') +backup=(etc/pacman.conf etc/makepkg.conf) +install=pacman.install +options=(!libtool) +source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz +        pacman.conf +        makepkg.conf +        0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch) +md5sums=('50ad71be1faaad84842c576e239d1bb5' +         '80f5bb2a606553512d0db857f78d9ac2' +         'aef317285c7d16ac495b0e53deeb948d' +         'f8c4a3cc7702a7a70d177659441495c5') +sha256sums=('cd80e206ee653ce337555c73b7064088e672e9341245317fe09dc52d06bff3c3' +            '97fb68536c1179a7de52dfb8a107c6e9bf3a71eaa6a98d6ae74dc224d4ca5838' +            '3a60e1f895c90c8e74f5ca389fa05fb3328745e9873c5452b8cd1b2e68bee418' +            '99f1d108f930b134cfb4c1ca8c86cd282fe9efb69de39cd747218f3d448dda44') + +# keep an upgrade path for older installations +PKGEXT='.pkg.tar.gz' + +build() { +  cd $srcdir/$pkgname-$pkgver +  patch -Np1 < $srcdir/0001-makepkg-fallback-to-sane-defaults-for-library-stripp.patch +  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-doc +  make || return 1 +} + +package() { +  cd $srcdir/$pkgname-$pkgver +  make DESTDIR=$pkgdir install || return 1 + +  # install Arch specific stuff +  mkdir -p $pkgdir/etc +  install -m644 $srcdir/pacman.conf $pkgdir/etc/ +  install -m644 $srcdir/makepkg.conf $pkgdir/etc/ +  # set things correctly in the default conf file +  case "$CARCH" in +    i686) +      mycarch="i686" +      mychost="i686-pc-linux-gnu" +      myflags="-march=i686 " +      ;; +    x86_64) +      mycarch="x86_64" +      mychost="x86_64-unknown-linux-gnu" +      myflags="-march=x86-64 " +      ;; +  esac +  sed -i $pkgdir/etc/makepkg.conf \ +    -e "s|@CARCH[@]|$mycarch|g" \ +    -e "s|@CHOST[@]|$mychost|g" \ +    -e "s|@CARCHFLAGS[@]|$myflags|g" + +  # install completion files +  mkdir -p $pkgdir/etc/bash_completion.d/ +  install -m644 contrib/bash_completion $pkgdir/etc/bash_completion.d/pacman +  mkdir -p $pkgdir/usr/share/zsh/site-functions/ +  install -m644 contrib/zsh_completion $pkgdir/usr/share/zsh/site-functions/_pacman +} + +# vim: set ts=2 sw=2 et: diff --git a/abs/core-testing/pacman/old/makepkg.conf b/abs/core-testing/pacman/old/makepkg.conf new file mode 100644 index 0000000..ff08a0f --- /dev/null +++ b/abs/core-testing/pacman/old/makepkg.conf @@ -0,0 +1,115 @@ +# +# /etc/makepkg.conf +# + +######################################################################### +# SOURCE ACQUISITION +######################################################################### +# +#-- The download utilities that makepkg should use to acquire sources +#  Format: 'protocol::agent' +DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u' +          'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u' +          'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u' +          'rsync::/usr/bin/rsync -z %u %o' +          'scp::/usr/bin/scp -C %u %o') + +# Other common tools: +# /usr/bin/snarf +# /usr/bin/lftpget -c +# /usr/bin/curl + +######################################################################### +# ARCHITECTURE, COMPILE FLAGS +######################################################################### +# +CARCH="@CARCH@" +CHOST="@CHOST@" + +#-- Exclusive: will only run on @CARCH@ +# -march (or -mcpu) builds exclusively for an architecture +# -mtune optimizes for an architecture, but builds for whole processor family +CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" +CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" +LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed" +#-- Make Flags: change this for DistCC/SMP systems +#MAKEFLAGS="-j2" + +######################################################################### +# BUILD ENVIRONMENT +######################################################################### +# +# Defaults: BUILDENV=(fakeroot !distcc color !ccache) +#  A negated environment option will do the opposite of the comments below. +# +#-- fakeroot: Allow building packages as a non-root user +#-- distcc:   Use the Distributed C/C++/ObjC compiler +#-- color:    Colorize output messages +#-- ccache:   Use ccache to cache compilation +# +BUILDENV=(fakeroot !distcc color !ccache) +# +#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, +#-- specify a space-delimited list of hosts running in the DistCC cluster. +#DISTCC_HOSTS="" + +######################################################################### +# GLOBAL PACKAGE OPTIONS +#   These are default values for the options=() settings +######################################################################### +# +# Default: OPTIONS=(strip docs libtool emptydirs zipman purge) +#  A negated option will do the opposite of the comments below. +# +#-- strip:     Strip symbols from binaries/libraries in STRIP_DIRS +#-- docs:      Save doc directories specified by DOC_DIRS +#-- libtool:   Leave libtool (.la) files in packages +#-- emptydirs: Leave empty directories in packages +#-- zipman:    Compress manual (man and info) pages in MAN_DIRS with gzip +#-- purge:     Remove files specified by PURGE_TARGETS +# +OPTIONS=(strip docs libtool emptydirs zipman purge) + +#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 +INTEGRITY_CHECK=(md5) +#-- Options to be used when stripping binaries. See `man strip' for details. +STRIP_BINARIES="--strip-all" +#-- Options to be used when stripping shared libraries. See `man strip' for details. +STRIP_SHARED="--strip-unneeded" +#-- Options to be used when stripping static libraries. See `man strip' for details. +STRIP_STATIC="--strip-debug" +#-- Manual (man and info) directories to compress (if zipman is specified) +MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) +#-- Doc directories to remove (if !docs is specified) +DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) +#-- Directories to be searched for the strip option (if strip is specified) +STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin}) +#-- Files to be removed from all packages (if purge is specified) +PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) + +######################################################################### +# PACKAGE OUTPUT +######################################################################### +# +# Default: put built package and cached source in build directory +# +#-- Destination: specify a fixed directory where all packages will be placed +#PKGDEST=/home/packages +#-- Source cache: specify a fixed directory where source files will be cached +#SRCDEST=/home/sources +#-- Source packages: specify a fixed directory where all src packages will be placed +#SRCPKGDEST=/home/srcpackages +#-- Packager: name/email of the person or organization building packages +#PACKAGER="John Doe <john@doe.com>" + +######################################################################### +# EXTENSION DEFAULTS +######################################################################### +# +# WARNING: Do NOT modify these variables unless you know what you are +#          doing. +# +PKGEXT='.pkg.tar.xz' +SRCEXT='.src.tar.gz' + +# vim: set ft=sh ts=2 sw=2 et: diff --git a/abs/core-testing/pacman/mirrorlist b/abs/core-testing/pacman/old/mirrorlist index 83e75ae..83e75ae 100644 --- a/abs/core-testing/pacman/mirrorlist +++ b/abs/core-testing/pacman/old/mirrorlist diff --git a/abs/core-testing/pacman/old/pacman.conf b/abs/core-testing/pacman/old/pacman.conf new file mode 100644 index 0000000..911c23d --- /dev/null +++ b/abs/core-testing/pacman/old/pacman.conf @@ -0,0 +1,84 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir     = / +#DBPath      = /var/lib/pacman/ +#CacheDir    = /var/cache/pacman/pkg/ +#LogFile     = /var/log/pacman.log +HoldPkg     = pacman glibc +# If upgrades are available for these packages they will be asked for first +SyncFirst   = pacman +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#XferCommand = /usr/bin/curl -C - %u > %o +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg   = +#IgnoreGroup = + +#NoUpgrade   = +#NoExtract   = + +# Misc options (all disabled by default) +#UseSyslog +#ShowSize +#UseDelta +#TotalDownload + +# +# REPOSITORIES +#   - can be defined here or included from another file +#   - pacman will search repositories in the order defined here +#   - local/custom mirrors can be added here or in separate files +#   - repositories listed first will take precedence when packages +#     have identical names, regardless of version number +#   - URLs will have $repo replaced by the name of the current repo +#   - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +#       [repo-name] +#       Server = ServerName +#       Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +## Add your preferred servers here, they will be used first +#Include = /etc/pacman.d/mirrorlist + +[core] +# Add your preferred servers here, they will be used first +Include = /etc/pacman.d/mirrorlist + +[extra] +# Add your preferred servers here, they will be used first +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +## Add your preferred servers here, they will be used first +#Include = /etc/pacman.d/mirrorlist + +[community] +# Add your preferred servers here, they will be used first +Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository.  See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#Server = file:///home/custompkgs + diff --git a/abs/core-testing/pacman/old/pacman.install b/abs/core-testing/pacman/old/pacman.install new file mode 100644 index 0000000..294222e --- /dev/null +++ b/abs/core-testing/pacman/old/pacman.install @@ -0,0 +1,53 @@ +#!/bin/sh +# arg 1:  the new package version +# arg 2:  the old package version +post_upgrade() { +	# one time stuff for md5sum issue with older pacman versions +	if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then +		_resetbackups +	fi +} + +_resetbackups() { +	echo ">>> Performing one-time reset of NoUpgrade md5sums. After this reset" +	echo ">>> you are able to remove all NoUpgrade lines of already protected" +	echo ">>> files from pacman.conf." +	echo ">>>" + +	# path variables +    pacconf="/etc/pacman.conf" +    dbpath="/var/lib/pacman/local" + +    # get a list of NoUpgrade files from the user's pacman.conf +    echo ">>> Retrieving pacman.conf NoUpgrade list..." +    config=$(grep "^NoUpgrade" $pacconf | cut -d'=' -f2) +    # add the standard list of files, even if they are already above +    config="$config \ +    etc/passwd etc/group etc/shadow etc/sudoers \ +    etc/fstab etc/raidtab etc/ld.so.conf \ +    etc/rc.conf etc/rc.local \ +    etc/modprobe.conf etc/modules.conf \ +    etc/lilo.conf boot/grub/menu.lst" + +    # blank md5sum for use in sed expression +    zeroes='00000000000000000000000000000000' + +    for file in $config; do +        echo ">>> -> finding owner of /$file..." +        line=$(LC_ALL=C LANG=C pacman -Qo /$file 2>/dev/null) +        # if file is owned by a package, go find its incorrectly stored sum +        if [ ! -z "$line" ]; then +            # get the name and version of the package owning file +            name=$(echo $line | awk '{print $5}') +            version=$(echo $line | awk '{print $6}') +            # set the path to the backup array holding the md5sum +            path="$dbpath/$name-$version/files" +            # run a sed on the path to reset the line containing $file +            # NOTE: literal tab characters in sed expression after $file +            echo ">>> -> resetting sum of /$file..." +            sed -i "s#$file [0-9a-fA-F]*#$file  $zeroes#" $path +        else +            echo ">>> -> $file is unowned." +        fi +    done +} diff --git a/abs/core-testing/pacman/pacman-3.4.1-1-i686.pkg.tar.gz b/abs/core-testing/pacman/pacman-3.4.1-1-i686.pkg.tar.gz new file mode 120000 index 0000000..5d96387 --- /dev/null +++ b/abs/core-testing/pacman/pacman-3.4.1-1-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/pacman-3.4.1-1-i686.pkg.tar.gz
\ No newline at end of file diff --git a/abs/core-testing/pacman/pacman.conf b/abs/core-testing/pacman/pacman.conf index 911c23d..3a5d875 100644 --- a/abs/core-testing/pacman/pacman.conf +++ b/abs/core-testing/pacman/pacman.conf @@ -58,23 +58,18 @@ Architecture = auto  # after the header, and they will be used before the default mirrors.  #[testing] -## Add your preferred servers here, they will be used first  #Include = /etc/pacman.d/mirrorlist  [core] -# Add your preferred servers here, they will be used first  Include = /etc/pacman.d/mirrorlist  [extra] -# Add your preferred servers here, they will be used first  Include = /etc/pacman.d/mirrorlist  #[community-testing] -## Add your preferred servers here, they will be used first  #Include = /etc/pacman.d/mirrorlist  [community] -# Add your preferred servers here, they will be used first  Include = /etc/pacman.d/mirrorlist  # An example of a custom package repository.  See the pacman manpage for diff --git a/abs/core-testing/pacman/pacman.conf.x86_64 b/abs/core-testing/pacman/pacman.conf.x86_64 new file mode 100644 index 0000000..e825b4b --- /dev/null +++ b/abs/core-testing/pacman/pacman.conf.x86_64 @@ -0,0 +1,84 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir     = / +#DBPath      = /var/lib/pacman/ +#CacheDir    = /var/cache/pacman/pkg/ +#LogFile     = /var/log/pacman.log +HoldPkg     = pacman glibc +# If upgrades are available for these packages they will be asked for first +SyncFirst   = pacman +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#XferCommand = /usr/bin/curl -C - %u > %o +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg   = +#IgnoreGroup = + +#NoUpgrade   = +#NoExtract   = + +# Misc options (all disabled by default) +#UseSyslog +#ShowSize +#UseDelta +#TotalDownload + +# +# REPOSITORIES +#   - can be defined here or included from another file +#   - pacman will search repositories in the order defined here +#   - local/custom mirrors can be added here or in separate files +#   - repositories listed first will take precedence when packages +#     have identical names, regardless of version number +#   - URLs will have $repo replaced by the name of the current repo +#   - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +#       [repo-name] +#       Server = ServerName +#       Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist + +[community] +Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repository here. +#[multilib] +#Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository.  See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#Server = file:///home/custompkgs + diff --git a/abs/core-testing/ppl/PKGBUILD b/abs/core-testing/ppl/PKGBUILD index e432e18..ee5979a 100644 --- a/abs/core-testing/ppl/PKGBUILD +++ b/abs/core-testing/ppl/PKGBUILD @@ -1,27 +1,27 @@ -# $Id: PKGBUILD 72640 2010-03-19 03:03:03Z allan $ +# $Id: PKGBUILD 87232 2010-08-11 12:07:18Z allan $  # Maintainer: Allan McRae <allan@archlinux.org>  # Contributor: ezzetabi <ezzetabi at gawab dot com>  pkgname=ppl -pkgver=0.10.2 -pkgrel=3 +pkgver=0.11 +pkgrel=1  pkgdesc="A modern library for convex polyhedra and other numerical abstractions."  arch=('i686' 'x86_64')  url="http://www.cs.unipr.it/ppl"  license=('GPL3')  depends=('gmp>=5.0')  options=('!docs' '!libtool') -source=(http://www.cs.unipr.it/ppl/Download/ftp/releases/$pkgver/ppl-$pkgver.tar.gz -        ppl-0.10.2-gmp-5.0.patch) -md5sums=('e7dd265afdeaea81f7e87a72b182d875' -         '4da347693c76ccccba4fb5b60ca0f321') +source=(http://www.cs.unipr.it/ppl/Download/ftp/releases/$pkgver/ppl-$pkgver.tar.gz) +md5sums=('ba527ec0ffc830ce16fad8a4195a337e')  build() {    cd $srcdir/ppl-$pkgver -  patch -Np1 -i $srcdir/ppl-0.10.2-gmp-5.0.patch -  autoreconf -vf +  ./configure --prefix=/usr --enable-interfaces="c,cxx" +  make +  make check +} -  ./configure --prefix=/usr --enable-interfaces="c,cxx" || return 1 -  make || return 1 -  make DESTDIR=$pkgdir install || return 1 +package() { +  cd $srcdir/ppl-$pkgver +  make DESTDIR=$pkgdir install  } diff --git a/abs/core-testing/wget/PKGBUILD b/abs/core-testing/wget/PKGBUILD index 5a9e0cb..1ef6911 100644 --- a/abs/core-testing/wget/PKGBUILD +++ b/abs/core-testing/wget/PKGBUILD @@ -1,21 +1,29 @@ -# $Id: PKGBUILD 4756 2008-07-09 20:00:54Z andyrtr $ -# Maintainer: Judd Vinet <jvinet@zeroflux.org> +# $Id: PKGBUILD 75183 2010-04-01 01:40:17Z pierre $ +# Maintainer: Allan McRae <allan@archlinux.org> +# Contributor: Judd Vinet <jvinet@zeroflux.org> +  pkgname=wget -pkgver=1.11.4 -pkgrel=10 +pkgver=1.12 +pkgrel=2  pkgdesc="A network utility to retrieve files from the Web" -arch=(i686 x86_64) +arch=('i686' 'x86_64')  url="http://www.gnu.org/software/wget/wget.html"  license=('GPL3')  groups=('base')  depends=('glibc' 'openssl') +optdepends=('ca-certificates: HTTPS downloads')  backup=('etc/wgetrc') +install=wget.install  source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz) -md5sums=('69e8a7296c0e12c53bd9ffd786462e87') +md5sums=('141461b9c04e454dc8933c9d1f2abf83')  build() {    cd ${srcdir}/$pkgname-$pkgver    ./configure --prefix=/usr --sysconfdir=/etc    make || return 1 +} + +package() { +  cd ${srcdir}/$pkgname-$pkgver    make DESTDIR=${pkgdir} install  } diff --git a/abs/core-testing/wget/wget-1.12-2-i686.pkg.tar.gz b/abs/core-testing/wget/wget-1.12-2-i686.pkg.tar.gz new file mode 120000 index 0000000..6fc2266 --- /dev/null +++ b/abs/core-testing/wget/wget-1.12-2-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/wget-1.12-2-i686.pkg.tar.gz
\ No newline at end of file diff --git a/abs/core-testing/wget/wget.install b/abs/core-testing/wget/wget.install new file mode 100644 index 0000000..1715333 --- /dev/null +++ b/abs/core-testing/wget/wget.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(wget.info) + +post_install() { +  [ -x usr/bin/install-info ] || return 0 +  for file in ${filelist[@]}; do +    install-info $infodir/$file $infodir/dir 2> /dev/null +  done +} + +post_upgrade() { +  post_install $1 +} + +pre_remove() { +  [ -x usr/bin/install-info ] || return 0 +  for file in ${filelist[@]}; do +    install-info --delete $infodir/$file $infodir/dir 2> /dev/null +  done +} diff --git a/abs/core-testing/xz/xz-4.999.9beta-5-i686.pkg.tar.gz b/abs/core-testing/xz/xz-4.999.9beta-5-i686.pkg.tar.gz new file mode 120000 index 0000000..0423fa8 --- /dev/null +++ b/abs/core-testing/xz/xz-4.999.9beta-5-i686.pkg.tar.gz @@ -0,0 +1 @@ +/data/pkg_repo/packages/xz-4.999.9beta-5-i686.pkg.tar.gz
\ No newline at end of file | 
