Upgrade grep to 2.20

grep-2.14 has a bug with Unicode when calling mbrtowc() on a
wide character that won't fit into a single wchar_t.  grep-2.20 has
a fix for this (Cygwin had this problem originally), so we will
bring up to their latest version.

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
Update msys-grep to 2.20-1 in package file

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
Security update for mingw32-gnupg

Also fix the seat test according to http://clbianco.altervista.org/gnupg/eng/gnupg.html.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
Merge pull request #12 from t-b/gnupg-upgrade

Security update for mingw32-gnupg
Merge pull request #11 from t-b/msys-grep

Update Msys grep
msys-lndir: add build recipe for lndir 1.0.3

This version includes a fix for the st_nlink bug [1].

[1] http://cgit.freedesktop.org/xorg/util/lndir/commit/lndir.c?id=23bacbd6c71ec815f394f0a7bbc9e684b3e05438

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-core: Remove the old text files that explain skipped patches

In the same run, rename the patch files in use to be numbered
consecutively.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-core: increment build number to prevent name clash

Using the exact same name as the original MSYS package prevents rebuilding,
because the 'package' step overwrites the downloaded source package.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-core: stat/lstat: drop sub-directory counting for directories

Add a patch that removes extra counting of sub-directories in [l]stat.
This fixes stat.st_nlink for directories (always 1) and improves [l]stat
performance by at least factor 2 (for empty dirs, factor 10 for dirs with
~500 entries).

Note: programs that _rely_ on st_nlink being the number of sub-dirs + 2
need to be fixed.

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: fix parallel make (MinGW bug #1950 [1])

[1] http://sourceforge.net/p/mingw/bugs/1950

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: add basic Unicode support

Use UTF-8 encoding for:
 * file names
 * environment
 * command line arguments
 * console output

In particular, this fixes the "HOME directory doesn't exist" bug if HOME
contains non-ASCII characters (issue 108 in the old Goole issue tracker,
caused by GetEnvironmentStringsA returning OEM-encoded strings which MSYS
reinterpreted as beeing ANSI-encoded).

Patch 0014 fixes a long standing bug in Find*File that affects recursive
directory copying in MSYS' symlink() emulation (and would have affected
sub-directory counting if this hadn't been dropped in patch 0011 :-).

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: Unicode console input

Change console input to UTF-8 encoding and enable ALT+NUMPAD to enter
special characters.

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: backport multibyte support from newlib 1.20

Add multibyte functions (e.g. wctomb, mbtowc) to msys.dll so that other
msys programs (e.g. bash) can be compiled with multibyte support.

Picked from msysgit's msys branch, with these changes to compile on 1.0.18:
 * newlib/libc/include/sys/_types.h: always "typedef long _ssize_t"
 * winsup/cygwin/include/wchar.h: copied from newlib/libc/include/wchar.h

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-bash: add build recipe for bash with Unicode support

Build bash with multibyte support so that we can type non-ASCII characters
in the console (if 8-bit input is enabled in inputrc).

Note: the unicode-enabled msys-core-%-dev package must be installed first,
otherwise 'configure' will silently disable multibyte support due to
missing conversion functions.

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: use canonical posix path for ambiguous mount entries

When looking up a posix path for a windows path, and the windows path is
mounted to multiple posix paths, return the canonical (i.e. shortest)
posix path instead of the longest.

E.g. when starting a shell in the root directory (i.e. the parent dir of
msys.dll), the posix path should be '/', not '/usr' or '/usr/local'.

This broke in 1.0.16 ("Be more robust when dealing with ambiguous paths
and mount points").

Signed-off-by: Karsten Blees <blees@dcon.de>
Add a script to bump the issue date of a software distribution package file

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-lndir: Add remaining upstream patches to add help and hard links

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
mingw32-git: Make post-install paths relative to the installation directory

The installer now properly executes mingw-get with the installation
directory set as the working directory.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
readme: Document that "lzma" should be a "required" filter

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Add a template for the required Git config modifications

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>