Sync mingw-w64-gettext with AUR
This commit is contained in:
parent
7d30e2aebf
commit
eb5ce560b9
|
@ -1,9 +1,6 @@
|
|||
# Contributor: Filip Brcic <brcha@gna.org>
|
||||
# Contributor: Martchus <martchus@gmx.net>
|
||||
|
||||
pkgname=mingw-w64-gettext
|
||||
pkgver=0.19.8.1
|
||||
pkgrel=3
|
||||
pkgver=0.21
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
pkgdesc='GNU internationalization library (mingw-w64)'
|
||||
depends=('mingw-w64-termcap' 'mingw-w64-libunistring')
|
||||
|
@ -11,55 +8,33 @@ makedepends=('gettext' 'mingw-w64-configure')
|
|||
options=(!strip !buildflags staticlibs)
|
||||
license=("GPL")
|
||||
url="http://www.gnu.org/software/gettext/"
|
||||
source=("http://ftp.gnu.org/pub/gnu/gettext/gettext-${pkgver}.tar.gz"{,.sig}
|
||||
"00-relocatex-libintl-0.18.3.1.patch"
|
||||
"05-always-use-libintl-vsnprintf.mingw.patch"
|
||||
"06-dont-include-ctype-after-gnulibs-wctype.mingw.patch"
|
||||
"07-fix-asprintf-conflict.mingw.patch"
|
||||
"08-vs-compatible.patch"
|
||||
"09-gnulib-fix-underscore-cond.patch"
|
||||
"intl.pc")
|
||||
md5sums=('97e034cf8ce5ba73a28ff6c3c0638092'
|
||||
'SKIP'
|
||||
'6f43ea4763a0cd461f60c71197832fba'
|
||||
'27852a388b8cf38188dc392c244230ff'
|
||||
'f69747f43f279b8a81286cfe5916b82f'
|
||||
'3ebccf730ec3377b068027eb2283afb2'
|
||||
'f5b611172ae58f1e4589a8d0c1d53414'
|
||||
'bed0da63d251975a21ca830f2f156766'
|
||||
'b0a123ec7ad1a345d0d712dae986a543')
|
||||
validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
|
||||
source=(http://ftp.gnu.org/pub/gnu/gettext/gettext-${pkgver}.tar.gz{,.sig}
|
||||
gettext-printf_collision.patch
|
||||
gettext_formatstring-ruby.patch
|
||||
intl.pc)
|
||||
sha256sums=('c77d0da3102aec9c07f43671e60611ebff89a996ef159497ce8e59d075786b12'
|
||||
'SKIP'
|
||||
'7da6794550b0704a58ed9984913ebf671d98ab3178dbc58dd88337c35c8cdadb'
|
||||
'380910da75c5aa62524acb18fc54415b2c0ad391f6385ea4369bbd1e6e0d29ef'
|
||||
'0dc8a3e2c95d79aacaeaacd3c90e41c0f5d6ba9cfbc949a0ca55f4b0fd389d9c')
|
||||
validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871' # Daiki Ueno
|
||||
'68D94D8AAEEAD48AE7DC5B904F494A942E4616C2'
|
||||
'9001B85AF9E1B83DF1BDA942F5BE8B267C6A406D') # Bruno Haible (Open Source Development)
|
||||
|
||||
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
|
||||
|
||||
prepare() {
|
||||
cd gettext-$pkgver
|
||||
rm -f gettext-runtime/intl/canonicalize.c
|
||||
rm -f gettext-runtime/intl/relocatex.{h,c}
|
||||
rm -f MINGW-PATCHES/README-relocatex-libintl.txt
|
||||
patch -p1 -i ${srcdir}/00-relocatex-libintl-0.18.3.1.patch
|
||||
patch -p0 -i ${srcdir}/05-always-use-libintl-vsnprintf.mingw.patch
|
||||
patch -p0 -i ${srcdir}/06-dont-include-ctype-after-gnulibs-wctype.mingw.patch
|
||||
patch -p0 -i ${srcdir}/07-fix-asprintf-conflict.mingw.patch
|
||||
patch -p0 -i ${srcdir}/08-vs-compatible.patch
|
||||
# prevents "Cannot export rpl_printf: symbol not found"
|
||||
patch -p0 -i ${srcdir}/09-gnulib-fix-underscore-cond.patch
|
||||
autoreconf -i
|
||||
patch -p1 -i "${srcdir}"/gettext-printf_collision.patch
|
||||
patch -p1 -i "${srcdir}"/gettext_formatstring-ruby.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd gettext-${pkgver}
|
||||
unset LDFLAGS
|
||||
for _arch in ${_architectures}; do
|
||||
mkdir -p build-${_arch} && pushd build-${_arch}
|
||||
# define USER_LABEL_PREFIX_UNDERSCORE to prevent undefined reference to `__imp_exit_failure'
|
||||
# and similar errors
|
||||
local underscore_flag=''
|
||||
[[ ${_arch} == i686-w64-mingw32 ]] && underscore_flag='-DUSER_LABEL_PREFIX_UNDERSCORE'
|
||||
export CFLAGS="$underscore_flag"
|
||||
export CXXFLAGS="$underscore_flag"
|
||||
export LDFLAGS="-lssp"
|
||||
${_arch}-configure \
|
||||
export MINGW_LDFLAGS="-Wl,--enable-auto-import"
|
||||
LIBS="-lssp" ${_arch}-configure \
|
||||
--disable-java \
|
||||
--disable-native-java \
|
||||
--disable-csharp \
|
||||
|
@ -77,7 +52,7 @@ package() {
|
|||
rm "$pkgdir/usr/${_arch}/bin/"{autopoint,gettext.sh,gettextize}
|
||||
rm -r "$pkgdir/usr/${_arch}/lib/gettext"
|
||||
rm -r "$pkgdir/usr/${_arch}/share"
|
||||
${_arch}-strip --strip-all "$pkgdir"/usr/${_arch}/bin/*.exe
|
||||
rm "$pkgdir"/usr/${_arch}/bin/*.exe
|
||||
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
|
||||
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
|
||||
# provide pkgconfig file for iconv library
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
diff -rupN --no-dereference gettext-0.21/gettext-runtime/intl/libgnuintl.in.h gettext-0.21-new/gettext-runtime/intl/libgnuintl.in.h
|
||||
--- gettext-0.21/gettext-runtime/intl/libgnuintl.in.h 2020-07-26 22:13:34.000000000 +0200
|
||||
+++ gettext-0.21-new/gettext-runtime/intl/libgnuintl.in.h 2020-08-03 11:57:20.495613456 +0200
|
||||
@@ -431,6 +431,7 @@ extern int vasprintf (char **, const cha
|
||||
#endif
|
||||
|
||||
#if @HAVE_WPRINTF@
|
||||
+#ifndef __cplusplus
|
||||
|
||||
#undef fwprintf
|
||||
#define fwprintf libintl_fwprintf
|
||||
@@ -455,6 +456,8 @@ extern int vswprintf (wchar_t *, size_t,
|
||||
|
||||
#endif
|
||||
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
diff -rupN gettext-0.21/gettext-tools/woe32dll/gettextsrc-exports.c gettext-0.21-new/gettext-tools/woe32dll/gettextsrc-exports.c
|
||||
--- gettext-0.21/gettext-tools/woe32dll/gettextsrc-exports.c 2019-12-23 12:21:12.000000000 +0100
|
||||
+++ gettext-0.21-new/gettext-tools/woe32dll/gettextsrc-exports.c 2020-08-03 14:22:17.096473605 +0200
|
||||
@@ -50,6 +50,7 @@ VARIABLE(formatstring_python)
|
||||
VARIABLE(formatstring_python_brace)
|
||||
VARIABLE(formatstring_qt)
|
||||
VARIABLE(formatstring_qt_plural)
|
||||
+VARIABLE(formatstring_ruby)
|
||||
VARIABLE(formatstring_scheme)
|
||||
VARIABLE(formatstring_sh)
|
||||
VARIABLE(formatstring_smalltalk)
|
Loading…
Reference in New Issue