Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions autoconf/0001-autoconf-2.70-MSYS2-specifics-AC_CYGWIN.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 81a57fbd4c10db5f35a1ad233abd27a71f4009cf Mon Sep 17 00:00:00 2001
From: Jannick <thirdedition@gmx.net>
Date: Wed, 9 Dec 2020 00:36:38 +0100
Subject: [PATCH 1/3] autoconf-2.70-msys-specifics-AC_CYGWIN

---
lib/autoconf/specific.m4 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 275938c..3ffb417 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -493,11 +493,11 @@ AU_DEFUN([AC_GNU_SOURCE], [AC_USE_SYSTEM_EXTENSIONS])
AU_DEFUN([AC_CYGWIN],
[AC_CANONICAL_HOST
case $host_os in
- *cygwin* ) CYGWIN=yes;;
+ *cygwin* | *msys* ) CYGWIN=yes;;
* ) CYGWIN=no;;
esac
], [$0 is obsolete: use AC_CANONICAL_HOST and check if $host_os
-matches *cygwin*])# AC_CYGWIN
+matches *cygwin* or *msys*])# AC_CYGWIN


# AC_EMXOS2
--
2.29.2.windows.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
From f4c17d4c349fab3a74c261c342494af7f077bf1b Mon Sep 17 00:00:00 2001
From: Jannick <thirdedition@gmx.net>
Date: Wed, 9 Dec 2020 00:43:24 +0100
Subject: [PATCH 2/3] autoconf-2.70-MSYS2-Autotest-Unify-EOLs-By-Default

This commit tackles the end-of-line (EOL) issue on Windows when running
an AUTOTEST testsuite which might compare files and/or program outputs.

This commit sets the default behaviour of any AUTOTEST testsuite generated
with AUTOCONF 2.70: When running an AUTOTEST test suite and comparing files
or program outputs, EOL differences (like LF vs CRLF) are ignored **BY
DEFAULT**, iff the program DIFF allows the flag '--strip-trailing-cr'.

In order to switch off this feature and run the testsuite mocking
differences between different EOL patterns, run the testsuite with the
environment variable 'MSYS2_AUTOTEST_NO_UNIFY_EOL' set to '1', e.g.:

tests/testsuite -C tests MSYS2_AUTOTEST_NO_UNIFY_EOL=1

* lib/autotest/general.m4:
- add the diff flag '--strip-trailing-cr' when possible and not
prohibited every time the testsuite is run.
* tests/autotest.at:
- add a test checking the interplay of 'MSYS2_AUTOTEST_NO_UNIFY_EOL'
and the difference between files with CRLF and LF.
---
lib/autotest/general.m4 | 23 +++++++++++++++++++++++
tests/autotest.at | 14 ++++++++++++++
2 files changed, 37 insertions(+)

diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 0c0e3c5..12fb14a 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -1031,6 +1031,29 @@ else
at_diff=diff
fi

+### ------------------------------------------------- ###
+### MSYS2 patch for Windows specificity (EOL issue) ###
+### ------------------------------------------------- ###
+# By default try to treat any end of line identfier 'LF' and 'CRLF' the same
+# in testsuites when comparing files or output of programs.
+# This feature can be switched off if the testsuite script is run with the
+# environment variable 'MSYS2_AUTOTEST_NO_UNIFY_EOL' set to a non-empty string
+# other than '0', e.g. simply by setting 'MSYS2_AUTOTEST_NO_UNIFY_EOL=1'.
+# Sample calls:
+# - tests/testsuite -C tests ... Differences in EOLs are ignored
+# for file comparisons.
+# - tests/testsuite -C tests MSYS2_AUTOTEST_NO_UNIFY_EOL=1 ... EOLs do matter for file comparisons.
+case "x$MSYS2_AUTOTEST_NO_UNIFY_EOL" in
+ x|x0)
+ # Use the diff flag '--strip-trailing-cr' when possible.
+ if at_ret=`$at_diff --strip-trailing-cr "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_ret"
+ then
+ at_diff="$at_diff --strip-trailing-cr"
+ fi
+ at_ret='';;
+esac
+
+
# Get the last needed group.
for at_group in : $at_groups; do :; done

diff --git a/tests/autotest.at b/tests/autotest.at
index b5a9c40..3637fc5 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -2150,3 +2150,17 @@ else
fi

AT_CLEANUP
+
+## -------------------------------------------- ##
+## MSYS patched feature: unify EOLs on Windows ##
+## -------------------------------------------- ##
+
+AT_SETUP([MSYS2: Unfiy EOLs])
+AT_KEYWORDS([msys2 windows unify.eol])
+printf "a\n" > a.LF
+printf "a\r\n" > a.CRLF
+AS_ECHO(["MSYS2_AUTOTEST_NO_UNIFY_EOL='$MSYS2_AUTOTEST_NO_UNIFY_EOL'"])
+AS_CASE(["x$MSYS2_AUTOTEST_NO_UNIFY_EOL"],
+ [x|x0],[at_ret_diff=0],[at_ret_diff=1])
+AT_CHECK([$at_diff a.LF a.CRLF],[$at_ret_diff],[stdout],[stderr])
+AT_CLEANUP
--
2.29.2.windows.2

12 changes: 12 additions & 0 deletions autoconf/0003-autoconf-2.70-MSYS2-specifics-config.guess.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- autoconf-2.72/build-aux/config.guess.orig 2023-12-23 09:15:46.672145000 +0100
+++ autoconf-2.72/build-aux/config.guess 2023-12-23 09:16:58.657560200 +0100
@@ -958,6 +958,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
GUESS=x86_64-pc-cygwin
;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ GUESS=x86_64-unknown-msys
+ ;;
prep*:SunOS:5.*:*)
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
GUESS=powerpcle-unknown-solaris2$SUN_REL
60 changes: 60 additions & 0 deletions autoconf/0004-LLVM-Flang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Treat LLVM Flang as GNU-compatible compiler for GNU targets.

--- autoconf-2.71/lib/autoconf/fortran.m4.orig 2021-01-28 21:46:48.000000000 +0100
+++ autoconf-2.71/lib/autoconf/fortran.m4 2024-10-30 13:24:17.360461800 +0100
@@ -287,6 +287,46 @@
[m4_fatal([unknown Fortran dialect])])])


+# _AC_FC_COMPILER_GNU
+# ---------------------
+# Check whether the compiler for the current language is GNU.
+#
+# This is similar to _AC_LANG_COMPILER_GNU. But also considers LLVM Flang
+# a GNU-compatible compiler. Pay attention to the fact that the position
+# of 'choke me' on the seventh column is intentional: otherwise
+# some Fortran compilers (e.g., SGI) might consider it's a
+# continuation line, and warn instead of reporting an error.
+m4_define([_AC_FC_COMPILER_GNU],
+[AC_CACHE_CHECK([whether the compiler supports GNU _AC_LANG],
+ [ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __GNUC__
+ choke me
+#endif
+]])],
+ [ac_compiler_gnu=yes],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __flang__
+ choke me
+#endif
+]])],
+ [case `$[]_AC_FC[] $[]_AC_LANG_PREFIX[]FLAGS --print-target-triple < /dev/null 2>&1` in
+ *mingw*|*-gnu)
+ ac_compiler_gnu=yes
+ ;;
+ *-msvc)
+ ac_compiler_gnu=no
+ ;;
+ *)
+ ## assume Flang is GNU-compatible by default
+ ac_compiler_gnu=yes
+ ;;
+ esac],
+ [ac_compiler_gnu=no])])
+ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu
+])
+ac_compiler_gnu=$ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu
+])# _AC_FC_COMPILER_GNU
+
+
# _AC_PROG_FC([DIALECT], [COMPILERS...])
# --------------------------------------
# DIALECT is a Fortran dialect, given by Fortran [YY]YY or simply [YY]YY,
@@ -347,7 +387,7 @@
# input file. (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
-_AC_LANG_COMPILER_GNU
+_AC_FC_COMPILER_GNU
ac_ext=$ac_save_ext
_AC_PROG_FC_G
])# _AC_PROG_FC
67 changes: 67 additions & 0 deletions autoconf/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

_realname=autoconf
pkgname=${_realname}
pkgver=2.73
pkgrel=1
pkgdesc="A GNU tool for automatically configuring source code"
arch=('any')
url="https://www.gnu.org/software/autoconf"
msys2_references=(
'archlinux: autoconf'
)
license=('spdx:GPL-2.0-or-later AND GPL-3.0-or-later WITH Autoconf-exception-3.0')
depends=('awk' 'm4' 'diffutils' 'bash' 'perl' 'sed')
makedepends=('make')
source=(https://ftp.gnu.org/pub/gnu/${_realname}/${_realname}-${pkgver}.tar.xz
0001-autoconf-2.70-MSYS2-specifics-AC_CYGWIN.patch
0002-autoconf-2.70-MSYS2-Autotest-Unify-EOLs-By-Default.patch
0003-autoconf-2.70-MSYS2-specifics-config.guess.patch
0004-LLVM-Flang.patch)
sha256sums=('9fd672b1c8425fac2fa67fa0477b990987268b90ff36d5f016dae57be0d6b52e'
'01edbaa771818518dc64fe54740d60909feb581428eb3751e0c2b6851e104038'
'3d37cb317d88843b07cadaf2981e1f6293bce2245fa0f0265fdaf08c18ffac61'
'82cb932ea114ad79d63072350457cde64bd60ece835a605e8aea0e4b7806b03c'
'd43d4bd0ca33820305d8eefb1940f23c8e474b94429281796c5fd55e0cd0d09d')
conflicts=("autoconf2.73<2.73-2") # /usr/share/info conflicts

apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Np1 -i "${srcdir}"/$_patch
done
}

prepare() {
cd "${srcdir}"/${_realname}-${pkgver}

# MSYS2
apply_patch_with_msg \
0001-autoconf-2.70-MSYS2-specifics-AC_CYGWIN.patch \
0002-autoconf-2.70-MSYS2-Autotest-Unify-EOLs-By-Default.patch \
0003-autoconf-2.70-MSYS2-specifics-config.guess.patch \
0004-LLVM-Flang.patch
}

build() {
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}

../${_realname}-${pkgver}/configure --prefix=/usr

make
}

check() {
cd build-${MSYSTEM}
# CAUTION: The tests run very very long, even on a server.
make check TESTSUITEFLAGS='-j16'
}

package() {
make -C build-${MSYSTEM} DESTDIR="${pkgdir}" install

# license exception
install -Dm644 ${_realname}-${pkgver}/COPYING.EXCEPTION \
"${pkgdir}"/usr/share/licenses/${_realname}/COPYING.EXCEPTION
}
4 changes: 2 additions & 2 deletions autoconf2.73/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_realname=autoconf
pkgname=${_realname}2.73
pkgver=2.73
pkgrel=1
pkgrel=2
pkgdesc="A GNU tool for automatically configuring source code"
arch=('any')
url="https://www.gnu.org/software/autoconf"
Expand Down Expand Up @@ -72,5 +72,5 @@ package() {
# Note: Remove these files once a newer autoconf is added, and add
# a versioned conflict to the old version of this package to make
# upgrades work.
# rm -rf "${pkgdir}"/usr/share/info
rm -rf "${pkgdir}"/usr/share/info
}
2 changes: 1 addition & 1 deletion autogen/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arch=('i686' 'x86_64')
url="https://autogen.sourceforge.io/"
msys2_repository_url='https://cgit.git.savannah.gnu.org/cgit/autogen.git'
license=('spdx:GPL-3.0-or-later')
makedepends=('gcc' 'gmp-devel' 'libxcrypt-devel' 'libffi-devel' 'libgc-devel' 'libguile-devel' 'libxml2-devel' 'make' 'autoconf' 'automake-wrapper' 'libtool' 'gperf')
makedepends=('gcc' 'gmp-devel' 'libxcrypt-devel' 'libffi-devel' 'libgc-devel' 'libguile-devel' 'libxml2-devel' 'make' 'autoconf' 'automake' 'libtool' 'gperf')
depends=('gcc-libs' 'gmp' 'libxcrypt' 'libffi' 'libgc' 'libguile' 'libxml2')
source=("https://ftp.gnu.org/gnu/${pkgname}/rel${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.sig}
autogen-guile-3.0.patch
Expand Down
59 changes: 59 additions & 0 deletions automake/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Maintainer: Yang Kun <ikspress@outlook.com>

_basever=1.18
pkgname=automake
pkgver=${_basever}.1
pkgrel=1
pkgdesc="A GNU tool for automatically creating Makefiles"
arch=('any')
license=('spdx:GPL-2.0-or-later')
url="https://www.gnu.org/software/automake"
msys2_repository_url="https://cgit.git.savannah.gnu.org/cgit/automake.git"
msys2_references=(
"cpe: cpe:/a:gnu:automake"
)
depends=('bash' 'perl')
makedepends=('autoconf' 'make' 'texinfo')
checkdepends=('bison' 'cscope' 'dejagnu' 'emacs' 'expect' 'flex' 'gcc' 'gettext'
'help2man' 'libtool' 'lzip' 'sharutils' 'texinfo-tex' 'zip')
source=(https://ftp.gnu.org/gnu/automake/automake-${pkgver}.tar.xz{,.sig}
automake-1.17-msys2.patch)
sha256sums=('168aa363278351b89af56684448f525a5bce5079d0b6842bd910fdd3f1646887'
'SKIP'
'a6b3a7099fb23ddc3d1402b16df32cf8f21bb63ca6b9314ff7caff5869b6ed50')
validpgpkeys=('17D3311B14BC0F248267BF020716748A30D155AD') # Karl Berry
provides=('automake1.18')
conflicts=('automake1.18')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _fname in "$@"; do
msg2 "Applying ${_fname}"
patch -Nbp1 -i "${srcdir}/${_fname}"
done
}
# =========================================== #

prepare() {
cd "${srcdir}/automake-${pkgver}"

apply_patch_with_msg \
automake-1.17-msys2.patch
}

build() {
cd "${srcdir}/automake-${pkgver}"
./configure --prefix=/usr
make
}

check() {
cd "${srcdir}/automake-${pkgver}"

make -k check || warning "Tests failed"
}

package() {
cd ${srcdir}/automake-${pkgver}
make DESTDIR=${pkgdir} install
}
18 changes: 18 additions & 0 deletions automake/automake-1.17-msys2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git automake-1.17-orig/t/compile5.sh automake-1.17/t/compile5.sh
index 67c46cc..ddf9683 100644
--- automake-1.17-orig/t/compile5.sh
+++ automake-1.17/t/compile5.sh
@@ -47,11 +47,11 @@ case '@host_os@' in
;;
esac
case @build_os@ in
- mingw* | cygwin*)
+ mingw* | cygwin* | msys*)
;;
*)
winepath -w / \
- || skip_ "not on MinGW or Cygwin, and winepath not available"
+ || skip_ "not on MinGW, Cygwin or MSYS, and winepath not available"
;;
esac
END
5 changes: 2 additions & 3 deletions automake1.14/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgname=automake1.14
pkgver=1.14.1
pkgrel=6
pkgrel=7
pkgdesc="A GNU tool for automatically creating Makefiles"
arch=('any')
license=('spdx:GPL-2.0-or-later')
Expand All @@ -12,7 +12,7 @@ msys2_references=(
"cpe: cpe:/a:gnu:automake"
)
depends=('perl' 'bash')
makedepends=('autoconf' 'make')
makedepends=('autoconf' 'make' 'texinfo')
checkdepends=('dejagnu')
source=(https://ftp.gnu.org/gnu/automake/automake-${pkgver}.tar.xz
automake1.14-documentation.patch
Expand All @@ -22,7 +22,6 @@ sha256sums=('a9b4f04b8b69cac2e832a38a718943aa976dbdad0097211f8b3448afdacf0669'
'd08bf56f22e948896a93fb33c81a2a1b3c469487d99b56da60fa915b61cafb09'
'76ac48cce5b6d48dfbd2659e3aeb10144acc932269c94fbed8d6335da773090b'
'34ec3ef555b78e8f19cd87d582102f07a705cd3b98919489274f2dabbd6aade6')
replace=('automake')

prepare() {
cd ${srcdir}/automake-${pkgver}
Expand Down
Loading