diff --git a/patch/PKGBUILD b/patch/PKGBUILD index 7dfba170..ddc4cdc9 100644 --- a/patch/PKGBUILD +++ b/patch/PKGBUILD @@ -2,7 +2,7 @@ pkgname=patch pkgver=2.7.6 -pkgrel=2 +pkgrel=3 pkgdesc="A utility to apply patch files to original sources" arch=('i686' 'x86_64') url="https://www.gnu.org/software/patch/patch.html" @@ -17,7 +17,7 @@ source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig} msys2-patch-manifest.patch) sha256sums=('ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd' 'SKIP' - 'abcb73c2e0941d49335a864e28e59ba1ad6477deef981a2e89374004e658b791' + '676502c3821e67ca493d77f546ee9362663f8d042331e38b9a19dccdb3896d06' '714da1a384d3e0acca5351980b0b3b1b09b66140fabe2e74dfd313652f964de9') validpgpkeys=('259B3792B3D6D319212CC4DCD5BF9FEB0313653A') # Andreas Gruenbacher @@ -41,8 +41,10 @@ prepare() { build() { cd ${srcdir}/${pkgname}-${pkgver} + export MSYSTEM=CYGWIN + local CYGWIN_CHOST="${CHOST/-msys/-cygwin}" ./configure \ - --build=${CHOST} \ + --build=${CYGWIN_CHOST} \ --prefix=/usr \ ac_cv_func_setmode_dos=yes diff --git a/patch/msys2-patch-2.7.1.patch b/patch/msys2-patch-2.7.1.patch index a5f8f5e8..66031024 100644 --- a/patch/msys2-patch-2.7.1.patch +++ b/patch/msys2-patch-2.7.1.patch @@ -1,157 +1,3 @@ -diff -Naur patch-2.7.1/build-aux/ar-lib patch-2.7.1-p/build-aux/ar-lib ---- patch-2.7.1/build-aux/ar-lib 2012-04-06 15:41:12 +0400 -+++ patch-2.7.1-p/build-aux/ar-lib 2013-02-24 13:43:38 +0400 -@@ -53,7 +53,7 @@ - MINGW*) - file_conv=mingw - ;; -- CYGWIN*) -+ CYGWIN* | MSYS*) - file_conv=cygwin - ;; - *) -@@ -65,7 +65,7 @@ - mingw) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; -- cygwin) -+ cygwin | msys) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine) ---- patch-2.7.2/build-aux/compile.orig 2015-01-21 16:10:12.538600000 +0300 -+++ patch-2.7.2/build-aux/compile 2015-01-21 16:10:30.821800000 +0300 -@@ -53,7 +53,7 @@ - MINGW*) - file_conv=mingw - ;; -- CYGWIN*) -+ CYGWIN*|MSYS*) - file_conv=cygwin - ;; - *) -@@ -67,7 +67,7 @@ - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; -- cygwin/*) -+ cygwin/*|msys/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) -diff -Naur patch-2.7.1/build-aux/config.guess patch-2.7.1-p/build-aux/config.guess ---- patch-2.7.1/build-aux/config.guess 2012-09-28 14:47:37 +0400 -+++ patch-2.7.1-p/build-aux/config.guess 2013-02-24 13:43:19 +0400 -@@ -805,6 +805,9 @@ - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ i*:MSYS*:*) -+ echo ${UNAME_MACHINE}-pc-msys -+ exit ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; -@@ -851,6 +854,9 @@ - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; -+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) -+ echo x86_64-unknown-msys -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; -diff -Naur patch-2.7.1/lib/gnulib.mk patch-2.7.1-p/lib/gnulib.mk ---- patch-2.7.1/lib/gnulib.mk 2012-09-28 20:40:58 +0400 -+++ patch-2.7.1-p/lib/gnulib.mk 2013-02-24 13:46:08 +0400 -@@ -572,7 +572,7 @@ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ -diff -Naur patch-2.7.1/m4/double-slash-root.m4 patch-2.7.1-p/m4/double-slash-root.m4 ---- patch-2.7.1/m4/double-slash-root.m4 2012-08-01 06:44:13 +0400 -+++ patch-2.7.1-p/m4/double-slash-root.m4 2013-02-24 13:47:12 +0400 -@@ -16,7 +16,7 @@ - # special semantics and is distinct from /, please report it to - # . - case $host in -- *-cygwin | i370-ibm-openedition) -+ *-cygwin | *-msys | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we -diff -Naur patch-2.7.1/m4/dup2.m4 patch-2.7.1-p/m4/dup2.m4 ---- patch-2.7.1/m4/dup2.m4 2012-08-01 06:44:13 +0400 -+++ patch-2.7.1-p/m4/dup2.m4 2013-02-24 13:47:28 +0400 -@@ -46,7 +46,7 @@ - [case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works="guessing no" ;; -- cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 -+ cygwin* | msys*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works="guessing no" ;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. -diff -Naur patch-2.7.1/m4/malloc.m4 patch-2.7.1-p/m4/malloc.m4 ---- patch-2.7.1/m4/malloc.m4 2012-08-01 06:44:13 +0400 -+++ patch-2.7.1-p/m4/malloc.m4 2013-02-24 13:47:58 +0400 -@@ -30,7 +30,7 @@ - [case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ -- | hpux* | solaris* | cygwin* | mingw*) -+ | hpux* | solaris* | cygwin* | msys* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; -diff -Naur patch-2.7.1/m4/printf.m4 patch-2.7.1-p/m4/printf.m4 ---- patch-2.7.1/m4/printf.m4 2012-08-01 06:44:13 +0400 -+++ patch-2.7.1-p/m4/printf.m4 2013-02-24 13:48:31 +0400 -@@ -735,7 +735,7 @@ - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - irix*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; -- cygwin*) gl_cv_func_printf_directive_ls="guessing no";; -+ cygwin* | msys*) gl_cv_func_printf_directive_ls="guessing no";; - beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; - # Guess yes on native Windows. - mingw*) gl_cv_func_printf_directive_ls="guessing yes";; -@@ -812,7 +812,7 @@ - [ - changequote(,)dnl - case "$host_os" in -- cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; -+ cygwin* | msys*) gl_cv_func_printf_flag_grouping="guessing no";; - netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; - mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; - *) gl_cv_func_printf_flag_grouping="guessing yes";; -@@ -1464,7 +1464,7 @@ - darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Cygwin. -- cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; -+ cygwin* | msys*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; -diff -Naur patch-2.7.1/m4/realloc.m4 patch-2.7.1-p/m4/realloc.m4 ---- patch-2.7.1/m4/realloc.m4 2012-08-01 06:44:13 +0400 -+++ patch-2.7.1-p/m4/realloc.m4 2013-02-24 13:48:54 +0400 -@@ -30,7 +30,7 @@ - [case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ -- | hpux* | solaris* | cygwin* | mingw*) -+ | hpux* | solaris* | cygwin* | msys* | mingw*) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; diff -Naur patch-2.7.1/src/inp.c patch-2.7.1-p/src/inp.c --- patch-2.7.1/src/inp.c 2012-09-19 05:07:31 +0400 +++ patch-2.7.1-p/src/inp.c 2013-02-24 13:50:56 +0400