From 5d7ed46541d1459aac84454edbca6f0eb4cc9414 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 13 Jan 2021 14:03:39 +0000 Subject: main/gettext: fix testsuite musl's realpath("//", NULL) returns "//", which is not expected by gettexts' test suite. make test suite accept the "//", since both are correct according POSIX. --- main/gettext/APKBUILD | 8 +++++--- main/gettext/musl-realpath.patch | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 main/gettext/musl-realpath.patch diff --git a/main/gettext/APKBUILD b/main/gettext/APKBUILD index 52c8e2de13c..5dfa4e2d19c 100644 --- a/main/gettext/APKBUILD +++ b/main/gettext/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Carlo Landmeter pkgname=gettext pkgver=0.20.2 -pkgrel=1 +pkgrel=2 pkgdesc="GNU locale utilities" url="https://www.gnu.org/software/gettext/gettext.html" arch="all" @@ -13,7 +13,8 @@ license="GPL-3.0-or-later AND LGPL-2.1-or-later AND MIT" makedepends="perl ncurses-dev libxml2-dev libunistring-dev" checkdepends="coreutils" source="https://ftp.gnu.org/gnu/gettext/gettext-$pkgver.tar.xz - skip-tests-musl.patch" + skip-tests-musl.patch + musl-realpath.patch" subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang libintl $pkgname-asprintf $pkgname-libs" # secfixes: @@ -65,4 +66,5 @@ asprintf() { } sha512sums="08d20c659004a77e607af17df15f5ce9bd4fc0feca9436aa206b0cbd2516f9f0c98c7ee1faacf7ff429f9b0dd9de219947b300216887a60727602a688acabc82 gettext-0.20.2.tar.xz -9fae1898eaf7a871876d2eaeffdf6ab759455bc8062fc232992526d697752d864b6079eb3c1053aea08d3a41892008b201566564fa62275d0ced5cfa6088a4c0 skip-tests-musl.patch" +9fae1898eaf7a871876d2eaeffdf6ab759455bc8062fc232992526d697752d864b6079eb3c1053aea08d3a41892008b201566564fa62275d0ced5cfa6088a4c0 skip-tests-musl.patch +515ba4034e09ada1ca58e23488387fa7761c7cafb53e31605c82cc826d3cf6ddafbfa1cdea5aca957903695168d0ec6a4db98f82a70858cd0365ec57dfbf04b9 musl-realpath.patch" diff --git a/main/gettext/musl-realpath.patch b/main/gettext/musl-realpath.patch new file mode 100644 index 00000000000..009ebfd95fd --- /dev/null +++ b/main/gettext/musl-realpath.patch @@ -0,0 +1,15 @@ +diff --git a/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c b/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c +index ff82981..17842e8 100644 +--- a/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c ++++ b/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c +@@ -208,8 +208,8 @@ main (void) + #ifndef __MVS__ + if (SAME_INODE (st1, st2)) + { +- ASSERT (strcmp (result1, "/") == 0); +- ASSERT (strcmp (result2, "/") == 0); ++ ASSERT (strcmp (result1, "/") == 0 || strcmp (result1, "//") == 0); ++ ASSERT (strcmp (result2, "/") == 0 || strcmp (result2, "//") == 0); + } + else + #endif -- cgit v1.2.3