Commit 3f94dc69 authored by Rasmus Thomsen's avatar Rasmus Thomsen Committed by Natanael Copa

main/gettext: upgrade to 0.20.1

* Remove unneccesary patches
* fix license
parent e4e34b86
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gettext
pkgver=0.19.8.1
pkgrel=4
pkgver=0.20.1
pkgrel=0
pkgdesc="GNU locale utilities"
url="https://www.gnu.org/software/gettext/gettext.html"
arch="all"
license="GPL-3.0+ AND LGPL-2.1+ AND MIT"
depends=
# do _not_ add the optional dependencies on libcroco or glib
# they depend on gettext and would introduce cyclic dependencies
makedepends="perl ncurses-dev libxml2-dev libunistring-dev"
makedepends="perl ncurses-dev libxml2-dev libunistring-dev xz"
checkdepends="coreutils"
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
disable-gettext-runtime-test-lock.patch
fix-abi.patch
localename-fix.patch
skip-tests-musl.patch
skip-tests-alpine.patch
unbundle-libunistring.patch
fix-crash-of-xgettext-with--its-option.patch
"
skip-tests-musl.patch"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang libintl $pkgname-asprintf $pkgname-libs"
build() {
cd "$builddir"
# make sure we dont bundle libunistring bits
rm -r gettext-tools/gnulib-lib/unilbrk \
gettext-tools/libgettextpo/unilbrk
# force using system posix complaint printf
# the test is broken and fails with ash
......@@ -51,7 +41,6 @@ check() {
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/charset.alias
}
static() {
......@@ -62,7 +51,7 @@ static() {
libintl() {
pkgdesc="GNU gettext runtime library"
license="LGPL-2.1+"
license="LGPL-2.1-or-later"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libintl.so.* "$subpkgdir"/usr/lib
chmod +x "$subpkgdir"/usr/lib/libintl.so.*
......@@ -70,16 +59,10 @@ libintl() {
asprintf() {
pkgdesc="GNU gettext asprintf library"
license="LGPL-2.1+"
license="LGPL-2.1-or-later"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libasprintf.so.* "$subpkgdir"/usr/lib
}
sha512sums="3553227b62f2a7d9b67c881ef889c030a6a21d5ecd210c4bf3d649df0b37193a99a68cf8fd5f2c69b6a87e847035dd9576f9bcb9363422866e26b04f4f6dd431 gettext-0.19.8.1.tar.xz
eb505507f7cc1114edb29267b864e2dd28683cdcd08da0195181ee7641e7ca197362c7e7b3df5f9ab4291a07de88410ed1e0d976f11e57c2f3740a00b91ce888 disable-gettext-runtime-test-lock.patch
f517a351864bb194117e7147015db9a9b0ffbb1feb22ecf39bc1c99ad904420467e267a893c3b1a76c1adb810d1b37b1c2c1273cda861ff1d260102701bc644a fix-abi.patch
2765f8d9d72d85ad0adb87ee0edd83d3aec59995ef21a3c8bbd1ac20a3680058a2122bd3f6c37be3f50cb5ea00c19b3ad569a47ceedc8ae2cb4a6e8d4e30976d localename-fix.patch
8fced6ec5c1f54686545aa91759f8501a0ccfa4bb66a781d282e65f7309c70ab74bf753f4969374facb135b7b9341e26d8a3e27679ea09cb1543b82dfb8a16dd skip-tests-musl.patch
4171b52abb9a34cc30ad9d737a6d4fc94d7365781f13522eef9111e2fc34f08f3206508471b2c2ab70ae95ecb110bc569535ca949bded3e8896c83e9d752d06e skip-tests-alpine.patch
86dcba9b53048b01c8912bdcfc7e9372a37f196352ef366d5192af204cb1bad95c31803991e0a408ab16b0c7094846df5ef95243bb09894e3dc9b3c4e5daaa43 unbundle-libunistring.patch
3ad909028d887429248b79ef3f2289d8934a5dd9337e51abbf05cece2fed3e2b12d228a587ebcbd0e775380b86825a6f796d2d0392b24384f5f8d298f78965ea fix-crash-of-xgettext-with--its-option.patch"
sha512sums="82ffa5a28068272d0587262f8d9269f9629c601da5d122b6645c9c4cf98bfe4149df01bb58522ccf8fe25b931672e18551d7fb34de1cbf6a0463a87f9f8ee221 gettext-0.20.1.tar.xz
9fae1898eaf7a871876d2eaeffdf6ab759455bc8062fc232992526d697752d864b6079eb3c1053aea08d3a41892008b201566564fa62275d0ced5cfa6088a4c0 skip-tests-musl.patch"
commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb
Author: rpm-build <rpm-build>
AuthorDate: Wed Dec 21 12:50:54 2016 +0100
Commit: rpm-build <rpm-build>
CommitDate: Wed Dec 21 12:52:36 2016 +0100
disable-gettext-runtime-test-lock.patch
diff --git a/gettext-runtime/tests/Makefile.am b/gettext-runtime/tests/Makefile.am
index 88a0684..3a27b79 100644
--- a/gettext-runtime/tests/Makefile.am
+++ b/gettext-runtime/tests/Makefile.am
@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests subdir-objects
EXTRA_DIST =
-TESTS = test-lock
+TESTS =
AM_CPPFLAGS = \
-I.. \
diff --git a/gettext-runtime/tests/Makefile.in b/gettext-runtime/tests/Makefile.in
index 4327733..5879146 100644
--- a/gettext-runtime/tests/Makefile.in
+++ b/gettext-runtime/tests/Makefile.in
@@ -86,7 +86,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-TESTS = test-lock$(EXEEXT)
+TESTS =
check_PROGRAMS = test-lock$(EXEEXT)
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff --git a/gettext-tools/gnulib-tests/Makefile.in b/gettext-tools/gnulib-tests/Makefile.in
index 26becd9..4b9d0e4 100644
--- a/gettext-tools/gnulib-tests/Makefile.in
+++ b/gettext-tools/gnulib-tests/Makefile.in
@@ -143,7 +143,7 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \
test-isnanl-nolibm$(EXEEXT) test-isnanl$(EXEEXT) \
test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \
test-linkedhash_list$(EXEEXT) test-locale$(EXEEXT) \
- test-localename$(EXEEXT) test-lock$(EXEEXT) \
+ test-localename$(EXEEXT) \
test-log10$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \
test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \
test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
--- gettext-0.19.7.orig/gettext-runtime/intl/printf.c
+++ gettext-0.19.7/gettext-runtime/intl/printf.c
@@ -44,7 +44,7 @@
#include <stdio.h>
-#if !HAVE_POSIX_PRINTF
+#if 1 || !HAVE_POSIX_PRINTF
#include <errno.h>
#include <limits.h>
From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Fri, 9 Dec 2016 21:04:31 +0100
Subject: Fix crash of xgettext with --its option.
* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it
was initialized. Fixes bug introduced on 2016-05-16.
---
gettext-tools/src/xgettext.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c
index f848d76..a80ee51 100644
--- a/gettext-tools/src/xgettext.c
+++ b/gettext-tools/src/xgettext.c
@@ -330,7 +330,7 @@ main (int argc, char *argv[])
bool sort_by_msgid = false;
bool sort_by_filepos = false;
char **dirs;
- char **its_dirs;
+ char **its_dirs = NULL;
char *explicit_its_filename = NULL;
const char *file_name;
const char *files_from = NULL;
@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension)
if (its_locating_rules)
locating_rule_list_free (its_locating_rules);
- for (i = 0; its_dirs[i] != NULL; i++)
- free (its_dirs[i]);
- free (its_dirs);
+ if (its_dirs != NULL)
+ {
+ for (i = 0; its_dirs[i] != NULL; i++)
+ free (its_dirs[i]);
+ free (its_dirs);
+ }
exit (EXIT_SUCCESS);
}
--
cgit v1.0-41-gc330
--- gettext-0.19.8.1/gettext-tools/gnulib-lib/localename.c.old 2016-12-31 13:54:43.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/gnulib-lib/localename.c 2017-07-30 16:40:47.098541270 +0000
@@ -40,7 +40,7 @@
# if defined __APPLE__ && defined __MACH__
# include <xlocale.h>
# endif
-# if __GLIBC__ >= 2 && !defined __UCLIBC__
+# if defined __linux__
# include <langinfo.h>
# endif
# if !defined IN_LIBINTL
@@ -2692,16 +2692,19 @@
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
{
-# if __GLIBC__ >= 2 && !defined __UCLIBC__
+# if defined(_NL_LOCALE_NAME)
+ const char *name = nl_langinfo(_NL_LOCALE_NAME(category));
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
/* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
glibc < 2.12.
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
- const char *name =
- nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
+ if (name[0] == '\0')
+ name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
if (name[0] == '\0')
/* Fallback code for glibc < 2.4, which did not implement
nl_langinfo (_NL_LOCALE_NAME (category)). */
name = thread_locale->__names[category];
+# endif
return name;
# elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
/* FreeBSD, Mac OS X */
--- gettext-0.19.8.1.orig/gettext-tools/gnulib-tests/test-copy-file-1.sh
+++ gettext-0.19.8.1/gettext-tools/gnulib-tests/test-copy-file-1.sh
@@ -3,6 +3,8 @@
# Test copy-file on the file system of /var/tmp, which usually is a local
# file system.
+exit 77
+
if test -d /var/tmp; then
TMPDIR=/var/tmp
else
--- gettext-0.19.8.1/gettext-tools/tests/msgconv-2.old 2016-06-09 22:56:00.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/tests/msgconv-2 2017-08-11 17:54:55.677206381 +0000
@@ -4,6 +4,8 @@
# Test conversion from UTF-8 to BIG5.
# Test that encoding names are case insensitive.
As upstream notes:
# Note: This test fails on Linux with musl libc versions that don't support
# the BIG5 encoding in 'iconv'.
diff --git a/gettext-tools/tests/msgconv-2 b/gettext-tools/tests/msgconv-2
index d286cda..d96c487 100755
--- a/gettext-tools/tests/msgconv-2
+++ b/gettext-tools/tests/msgconv-2
@@ -7,6 +7,8 @@
# Note: This test fails on Linux with musl libc versions that don't support
# the BIG5 encoding in 'iconv'.
+Exit 77
+
cat <<\EOF > mco-test2.po
# Chinese translation for GNU gettext messages.
#
--- gettext-0.19.8.1/gettext-tools/tests/msgmerge-compendium-6.old 2016-06-09 22:56:00.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/tests/msgmerge-compendium-6 2017-08-11 17:55:41.440408716 +0000
@@ -7,6 +7,8 @@
# mm-ko.ascii.pot mm-ko.euc-kr.po mm-ko-comp.euc-kr.po
# mm-ko.utf-8.pot mm-ko.utf-8.po mm-ko-comp.utf-8.po
diff --git a/gettext-tools/tests/msgmerge-compendium-6 b/gettext-tools/tests/msgmerge-compendium-6
index 0afbe1e..1b2fe6b 100755
--- a/gettext-tools/tests/msgmerge-compendium-6
+++ b/gettext-tools/tests/msgmerge-compendium-6
@@ -10,6 +10,8 @@
# Note: This test fails on Linux with musl libc versions that don't support
# the EUC-KR encoding in 'iconv'.
+Exit 77
+
: ${MSGCONV=msgconv}
${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot "$abs_srcdir"/mm-ko.ascii.pot
${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot "$wabs_srcdir"/mm-ko.ascii.pot
--- gettext-0.19.8.1/gettext-tools/tests/xgettext-python-3.old 2016-06-09 22:56:00.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/tests/xgettext-python-3 2017-08-11 17:54:26.533956530 +0000
@@ -1,6 +1,8 @@
#!/bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
diff --git a/gettext-tools/tests/xgettext-python-3 b/gettext-tools/tests/xgettext-python-3
index ca0926d..2c49fd7 100755
--- a/gettext-tools/tests/xgettext-python-3
+++ b/gettext-tools/tests/xgettext-python-3
@@ -6,6 +6,8 @@
# Note: This test fails on Linux with musl libc versions that don't support
# the EUC-JP encoding in 'iconv'.
+Exit 77
+
# Test Python support: --from-code option and encoding recognition.
cat <<\EOF > xg-py-3a.py
--- gettext-0.19.8.1/gettext-tools/gnulib-tests/test-striconveha.c.old 2016-06-11 13:00:04.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/gnulib-tests/test-striconveha.c 2017-08-11 18:12:12.294469761 +0000
@@ -308,6 +308,7 @@
/* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__ || defined __sun)
+ if (iconv_open("ISO-2022-JP-2", "UTF-8") != -1) {
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
@@ -399,6 +400,7 @@
free (result);
}
}
+ }
# endif
# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
@@ -547,6 +547,7 @@
/* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__ || defined __sun)
/* Test conversions from autodetect_jp to UTF-8. */
+ if (iconv_open("ISO-2022-JP-2", "UTF-8") != -1) {
for (h = 0; h < SIZEOF (handlers); h++)
{
enum iconv_ilseq_handler handler = handlers[h];
@@ -577,6 +578,7 @@
ASSERT (strcmp (result, expected) == 0);
free (result);
}
+ }
# endif
# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) && !defined __UCLIBC__) || _LIBICONV_VERSION >= 0x0105
--- gettext-0.19.8.1/gettext-tools/gnulib-tests/test-mbrtowc5.sh.old 2016-12-31 13:54:43.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/gnulib-tests/test-mbrtowc5.sh 2017-07-30 17:29:50.879924130 +0000
@@ -1,6 +1,2 @@
#!/bin/sh
-# Test whether the POSIX locale has encoding errors.
-LC_ALL=C \
-./test-mbrtowc${EXEEXT} 5 || exit
-LC_ALL=POSIX \
-./test-mbrtowc${EXEEXT} 5
+exit 77
--- gettext-0.19.8.1/gettext-tools/gnulib-tests/uniconv/test-u8-conv-from-enc.c.old 2016-06-11 13:00:04.000000000 +0000
+++ gettext-0.19.8.1/gettext-tools/gnulib-tests/uniconv/test-u8-conv-from-enc.c 2017-08-11 18:26:43.888920845 +0000
@@ -113,6 +113,7 @@
/* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__ || defined __sun)
/* Test conversions from autodetect_jp to UTF-8. */
+ if (iconv_open("ISO-2022-JP-2", "UTF-8") != -1) {
for (h = 0; h < SIZEOF (handlers); h++)
{
enum iconv_ilseq_handler handler = handlers[h];
@@ -197,6 +198,7 @@
free (result);
}
}
+ }
# endif
#endif
#!/usr/bin/env python
# TRANSLATORS: Franois Pinard is a hero.
diff --git a/gettext-tools/gnulib-lib/Makefile.in b/gettext-tools/gnulib-lib/Makefile.in
index a8e89eb..4fc24d7 100644
--- a/gettext-tools/gnulib-lib/Makefile.in
+++ b/gettext-tools/gnulib-lib/Makefile.in
@@ -593,8 +593,8 @@ am_libgettextlib_la_OBJECTS = copy-acl.lo set-acl.lo \
striconveha.lo strnlen1.lo styled-ostream.lo tempname.lo \
term-ostream.lo $(am__objects_4) $(am__objects_5) \
glthread/threadlib.lo glthread/tls.lo tmpdir.lo trim.lo \
- $(am__objects_6) $(am__objects_7) unilbrk/lbrktables.lo \
- $(am__objects_8) $(am__objects_9) unilbrk/ulc-common.lo \
+ $(am__objects_6) $(am__objects_7) \
+ $(am__objects_8) $(am__objects_9) \
$(am__objects_10) $(am__objects_11) unistd.lo dup-safer.lo \
fd-safer.lo pipe-safer.lo $(am__objects_12) $(am__objects_13) \
$(am__objects_14) $(am__objects_15) $(am__objects_16) \
@@ -2400,8 +2400,8 @@ libgettextlib_la_SOURCES = copy-acl.c set-acl.c acl-errno-valid.c \
tempname.c term-ostream.c $(am__append_19) $(am__append_20) \
glthread/threadlib.c glthread/tls.h glthread/tls.c tmpdir.h \
tmpdir.c trim.c $(am__append_21) $(am__append_22) \
- unilbrk/lbrktables.c $(am__append_23) $(am__append_24) \
- unilbrk/ulc-common.c $(am__append_25) $(am__append_26) \
+ $(am__append_23) $(am__append_24) \
+ $(am__append_25) $(am__append_26) \
unistd.c dup-safer.c fd-safer.c pipe-safer.c $(am__append_27) \
$(am__append_28) $(am__append_29) $(am__append_30) \
$(am__append_31) $(am__append_32) $(am__append_33) \
diff --git a/gettext-tools/libgettextpo/Makefile.in b/gettext-tools/libgettextpo/Makefile.in
index 5f9550d..bd684cb 100644
--- a/gettext-tools/libgettextpo/Makefile.in
+++ b/gettext-tools/libgettextpo/Makefile.in
@@ -554,8 +554,8 @@ am_libgnu_la_OBJECTS = basename.lo c-ctype.lo c-strcasecmp.lo \
malloca.lo markup.lo mbswidth.lo ostream.lo progname.lo \
striconv.lo striconveh.lo striconveha.lo glthread/threadlib.lo \
glthread/tls.lo $(am__objects_3) $(am__objects_4) \
- $(am__objects_5) unilbrk/lbrktables.lo $(am__objects_6) \
- $(am__objects_7) unilbrk/ulc-common.lo $(am__objects_8) \
+ $(am__objects_5) $(am__objects_6) \
+ $(am__objects_7) $(am__objects_8) \
unistd.lo $(am__objects_9) $(am__objects_10) $(am__objects_11) \
$(am__objects_12) $(am__objects_13) $(am__objects_14) \
$(am__objects_15) $(am__objects_16) $(am__objects_17) \
@@ -2179,8 +2179,8 @@ libgnu_la_SOURCES = basename.h basename.c c-ctype.h c-ctype.c \
striconv.c striconveh.h striconveh.c striconveha.h \
striconveha.c glthread/threadlib.c glthread/tls.h \
glthread/tls.c $(am__append_6) $(am__append_7) $(am__append_8) \
- unilbrk/lbrktables.c $(am__append_9) $(am__append_10) \
- unilbrk/ulc-common.c $(am__append_11) unistd.c \
+ $(am__append_9) $(am__append_10) \
+ $(am__append_11) unistd.c \
$(am__append_12) $(am__append_13) $(am__append_14) \
$(am__append_15) $(am__append_16) $(am__append_17) \
$(am__append_18) $(am__append_19) $(am__append_20) \
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