Work around gnulib bug enabling weak symbols

This commit is contained in:
Christoph Reiter
2021-12-29 09:18:34 +01:00
parent 84d7affa25
commit e83bfec0d2
2 changed files with 17 additions and 2 deletions

View File

@@ -18,7 +18,8 @@ source=(https://ftp.gnu.org/pub/gnu/gettext/${pkgname}-${pkgver}.tar.gz{,.sig}
0.19.8.1-cygwin-ftm.patch
0.19.8.1-have_wprintf.patch
gettext-0.19.8.1-msys2.patch
gettext-0.19.7-archive.patch)
gettext-0.19.7-archive.patch
gnulib-cygwin-weak-bug.patch)
sha256sums=('ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43'
'SKIP'
'0d3082e9a6b997b61dbb160f5af234a1bc89cddf9dc680999429276cf605b731'
@@ -28,7 +29,8 @@ sha256sums=('ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43'
'22cfaca417f04507a901cba93a7eb219183d5e681b7459d8c0e9660621a9a696'
'd4df598ebde60ea4e069991baed43b00dbb28d3b8a40cc7cf4a6e12847ee3616'
'c049be2f812524647b662d421dc2a5df59e7da68a42ab0e1cef6af6665cb00a0'
'e117ddf7cbb175c0ceabc03d8114f875fa120e8f9999e914ecb2bc4ded8d92ce')
'e117ddf7cbb175c0ceabc03d8114f875fa120e8f9999e914ecb2bc4ded8d92ce'
'8a297177d532e15f7b4eca5c2f56a7b0980ea8ae1432c7d13f500e37e30229c9')
validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871')
prepare() {
@@ -43,6 +45,7 @@ prepare() {
patch -p3 -i $srcdir/0.19.8.1-have_wprintf.patch
# MSYS2 patch
patch -p1 -i $srcdir/gnulib-cygwin-weak-bug.patch
patch -p1 -i $srcdir/gettext-0.19.8.1-msys2.patch
pushd gettext-tools/misc > /dev/null

View File

@@ -0,0 +1,12 @@
--- gettext-0.19.8.1/gettext-runtime/m4/threadlib.m4.orig 2021-12-29 09:09:55.934684000 +0100
+++ gettext-0.19.8.1/gettext-runtime/m4/threadlib.m4 2021-12-29 09:13:14.284107200 +0100
@@ -133,6 +133,9 @@
#pragma weak fputs
int main ()
{
+#ifdef __CYGWIN__
+ return 1;
+#endif
return (fputs == NULL);
}]])],
[gl_cv_have_weak=yes],