Commit 55c7973a authored by Jeff Huang's avatar Jeff Huang 🤔

[skip-ci] gettext: update to 0.20.1

parent 3bf69ab7
Pipeline #4452 skipped
pkgname=gettext
pkgver=0.19.8.1
pkgrel=3
pkgver=0.20.1
pkgrel=1
pkgdesc="GNU internationalization library"
arch=('x86_64')
url="http://www.gnu.org/software/gettext"
license=('GPL')
groups=('base')
depends=('acl' 'gcc-libs' 'glib2' 'libcroco' 'sh' 'pcre' 'ncurses')
url="https://www.gnu.org/software/gettext/"
arch=(x86_64)
license=(GPL)
groups=(base base-devel)
depends=(gcc-libs acl sh glib2 libunistring libcroco)
makedepends=(gettext emacs git)
optdepends=('git: for autopoint infrastructure updates')
options=(!docs)
install=gettext.install
source=(ftp://ftp.gnu.org/pub/gnu/gettext/${pkgname}-${pkgver}.tar.gz{,.sig})
validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
md5sums=('97e034cf8ce5ba73a28ff6c3c0638092'
'SKIP')
source=(https://ftp.gnu.org/pub/gnu/gettext/$pkgname-$pkgver.tar.gz{,.sig}
fix-empty-po.patch)
sha256sums=('66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c'
'SKIP'
'8d0773334af935060762a3dfc756c997d216df04b8875df508a9598195b60dbe')
validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871' # Daiki Ueno
'68D94D8AAEEAD48AE7DC5B904F494A942E4616C2') # Bruno Haible (Open Source Development)
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
prepare() {
cd $pkgname-$pkgver
./configure --prefix=/usr --enable-csharp
make
# Get GCR 3.33.4 to build: https://gitlab.gnome.org/GNOME/gcr/issues/25
patch -Np1 -i ../fix-empty-po.patch
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make check || true
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/usr \
--enable-csharp \
--enable-nls \
--with-xz \
--without-included-gettext
sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' \
-i gettext-{tools,runtime,runtime/libasprintf}/libtool
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
}
From 2336451ed68d91ff4b5ae1acbc1eca30e47a86a9 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Sun, 19 May 2019 13:10:06 +0200
Subject: [PATCH] msgmerge: Fix behaviour of --for-msgfmt on PO files with no
translations.
Reported by Don Lawrence <dlawrence@iecok.com>
in <https://lists.freedesktop.org/archives/p11-glue/2019-May/000700.html>
via Daiki Ueno
in <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00124.html>.
* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt
is true.
* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations.
---
gettext-tools/src/msgmerge.c | 4 ++--
gettext-tools/tests/msgmerge-26 | 36 +++++++++++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c
index cd762c0..92c9b7a 100644
--- a/gettext-tools/src/msgmerge.c
+++ b/gettext-tools/src/msgmerge.c
@@ -520,8 +520,8 @@ There is NO WARRANTY, to the extent permitted by law.\n\
else
{
/* Write the merged message list out. */
- msgdomain_list_print (result, output_file, output_syntax, force_po,
- false);
+ msgdomain_list_print (result, output_file, output_syntax,
+ for_msgfmt || force_po, false);
}
exit (EXIT_SUCCESS);
diff --git a/gettext-tools/tests/msgmerge-26 b/gettext-tools/tests/msgmerge-26
index cd3862e..b86f7a0 100755
--- a/gettext-tools/tests/msgmerge-26
+++ b/gettext-tools/tests/msgmerge-26
@@ -73,7 +73,37 @@ msgstr "Papaya"
EOF
: ${DIFF=diff}
-${DIFF} mm-test26.ok mm-test26.out
-result=$?
+${DIFF} mm-test26.ok mm-test26.out || Exit 1
-exit $result
+# Test with a PO file that has no translated messages.
+
+cat <<\EOF > mm-test26a.in1
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+
+msgid "Hello world"
+msgstr "Hallo Welt"
+EOF
+
+cat <<\EOF > mm-test26a.in2
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=ASCII\n"
+
+msgid "Hello, world!"
+msgstr ""
+EOF
+
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} --for-msgfmt -o mm-test26a.tmp mm-test26a.in1 mm-test26a.in2 \
+ || Exit 1
+LC_ALL=C tr -d '\r' < mm-test26a.tmp > mm-test26a.out || Exit 1
+
+cat <<\EOF > mm-test26a.ok
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8\n"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test26a.ok mm-test26a.out || Exit 1
--
1.9.1
infodir=/usr/share/info
filelist=(gettext.info.gz autosprintf.info.gz)
post_install() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info $infodir/$file $infodir/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info --delete $infodir/$file $infodir/dir 2> /dev/null
done
}
# vim:set ts=2 sw=2 et:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment