summaryrefslogtreecommitdiff
path: root/x11-libs/libxcb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /x11-libs/libxcb
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'x11-libs/libxcb')
-rw-r--r--x11-libs/libxcb/Manifest3
-rw-r--r--x11-libs/libxcb/files/libxcb-1.14-tests-don-t-use-deprecated-fail_unless-check-API.patch86
-rw-r--r--x11-libs/libxcb/libxcb-1.14.ebuild6
3 files changed, 93 insertions, 2 deletions
diff --git a/x11-libs/libxcb/Manifest b/x11-libs/libxcb/Manifest
index b0bf73af95a7..7d4e65e7e558 100644
--- a/x11-libs/libxcb/Manifest
+++ b/x11-libs/libxcb/Manifest
@@ -1,3 +1,4 @@
+AUX libxcb-1.14-tests-don-t-use-deprecated-fail_unless-check-API.patch 5795 BLAKE2B 0a864b0fbd998fdc6c151b9f9cdb2a31797ac693b4ffa164a6f9a3c0fc1c5430454ec97be4c52ed48489cb08e820a998086fc588cdd2348b16da122bd483b8bc SHA512 e5148c7c310ca395b7e0f3b76ef98d79e50d0ac58935ad6df3c71bfd426166ce736ccfff4970e9523a2418820cd7cb2cba6e8818f23dd5cc21dac69accc1c3f9
DIST libxcb-1.14.tar.xz 439404 BLAKE2B 63605e02dd32b4d26b3ac6d3b93b7383dbc30701b9a063e8efa5b387215c9325196451f80c7b0b357df1773c6fd1224eea8eeca2a456055a2cdc61082c726111 SHA512 b90a23204b0d2c29d8b115577edb01df0465e02d6a8876550fecd62375d24a5d5f872ddd5946772ddba077cadce75b12c7a6d218469dc30b5b92bc82188e8bc6
-EBUILD libxcb-1.14.ebuild 1291 BLAKE2B 0e06425687545c28a3d6bcae02546b789d311d35af3ac64995c76084a33c4d07507847a38505716a10c9e3668e6fc78e303783657c2c8d44367abf5826bcab0d SHA512 0fa5b030cc8e53b7a53662627b6fb57e52a622447bb25447e63e06f2387123ddd1599dc5a5c8ac3730228e821579a21597cd024f0436290779141307c84305b5
+EBUILD libxcb-1.14.ebuild 1377 BLAKE2B 470d39085f4b4dbce2a936ce68e44d4e15bf30e309ac5a5ac13d6dd9a3505589b6fb00bef265f0223f3b7dcefc3a670028b5ad976284ea1958f19c0da3c13269 SHA512 635ed02a865f029738dd50033201b754de4563b8cbcb84b684ab58b61cd66f844024e2338be1e08d6c1fbd5091bd61651483a3289979137a207852df28460bc9
MISC metadata.xml 400 BLAKE2B e4de0bffe9b79f7c4a715ade0014f14d85ae7389a3fa523572b4abed6ed6849250902ea479e9aa90745f104c9020d671742d0aec8bffa539e20f0bd7b48f2e64 SHA512 f9688e8ee148768a072e6da7f72985a7a3971a445117bbfa8448f2337ce1b601296501eda1da531c6bcb50a0d3106376e8cda0b98ef10219882c2f66fe02f40f
diff --git a/x11-libs/libxcb/files/libxcb-1.14-tests-don-t-use-deprecated-fail_unless-check-API.patch b/x11-libs/libxcb/files/libxcb-1.14-tests-don-t-use-deprecated-fail_unless-check-API.patch
new file mode 100644
index 000000000000..cc7f22ba4e9d
--- /dev/null
+++ b/x11-libs/libxcb/files/libxcb-1.14-tests-don-t-use-deprecated-fail_unless-check-API.patch
@@ -0,0 +1,86 @@
+From f01f3c378eb0168fbb055c7be1c2d08a7acd3752 Mon Sep 17 00:00:00 2001
+From: Ran Benita <ran@unusedvar.com>
+Date: Tue, 17 Nov 2020 23:43:06 +0200
+Subject: [PATCH] tests: don't use deprecated fail_unless check API
+
+It causes errors like this when running make check:
+
+check_public.c:40:24: error: too many arguments for format [-Werror=format-extra-args]
+ 40 | fail_unless(success, "unexpected parse failure %sfor '%s'", test_string[test_type], name);
+
+Closes: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/49
+Tested-by: Matt Turner <mattst88@gmail.com>
+Signed-off-by: Ran Benita <ran@unusedvar.com>
+---
+ configure.ac | 2 +-
+ tests/check_public.c | 30 +++++++++++++++---------------
+ 2 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/tests/check_public.c b/tests/check_public.c
+index 2094bfe..aed40c8 100644
+--- a/tests/check_public.c
++++ b/tests/check_public.c
+@@ -37,18 +37,18 @@ static void parse_display_pass(const char *name, const char *host, const int dis
+ got_display = got_screen = -42;
+ mark_point();
+ success = xcb_parse_display(argument, &got_host, &got_display, &got_screen);
+- fail_unless(success, "unexpected parse failure %sfor '%s'", test_string[test_type], name);
+- fail_unless(strcmp(host, got_host) == 0, "parse %sproduced unexpected hostname '%s' for '%s': expected '%s'", test_string[test_type], got_host, name, host);
+- fail_unless(display == got_display, "parse %sproduced unexpected display '%d' for '%s': expected '%d'", test_string[test_type], got_display, name, display);
+- fail_unless(screen == got_screen, "parse %sproduced unexpected screen '%d' for '%s': expected '%d'", test_string[test_type], got_screen, name, screen);
++ ck_assert_msg(success, "unexpected parse failure %sfor '%s'", test_string[test_type], name);
++ ck_assert_msg(strcmp(host, got_host) == 0, "parse %sproduced unexpected hostname '%s' for '%s': expected '%s'", test_string[test_type], got_host, name, host);
++ ck_assert_msg(display == got_display, "parse %sproduced unexpected display '%d' for '%s': expected '%d'", test_string[test_type], got_display, name, display);
++ ck_assert_msg(screen == got_screen, "parse %sproduced unexpected screen '%d' for '%s': expected '%d'", test_string[test_type], got_screen, name, screen);
+
+ got_host = (char *) -1;
+ got_display = got_screen = -42;
+ mark_point();
+ success = xcb_parse_display(argument, &got_host, &got_display, 0);
+- fail_unless(success, "unexpected screenless parse failure %sfor '%s'", test_string[test_type], name);
+- fail_unless(strcmp(host, got_host) == 0, "screenless parse %sproduced unexpected hostname '%s' for '%s': expected '%s'", test_string[test_type], got_host, name, host);
+- fail_unless(display == got_display, "screenless parse %sproduced unexpected display '%d' for '%s': expected '%d'", test_string[test_type], got_display, name, display);
++ ck_assert_msg(success, "unexpected screenless parse failure %sfor '%s'", test_string[test_type], name);
++ ck_assert_msg(strcmp(host, got_host) == 0, "screenless parse %sproduced unexpected hostname '%s' for '%s': expected '%s'", test_string[test_type], got_host, name, host);
++ ck_assert_msg(display == got_display, "screenless parse %sproduced unexpected display '%d' for '%s': expected '%d'", test_string[test_type], got_display, name, display);
+ }
+ putenv("DISPLAY=");
+ }
+@@ -79,18 +79,18 @@ static void parse_display_fail(const char *name)
+ got_display = got_screen = -42;
+ mark_point();
+ success = xcb_parse_display(argument, &got_host, &got_display, &got_screen);
+- fail_unless(!success, "unexpected parse success %sfor '%s'", test_string[test_type], name);
+- fail_unless(got_host == (char *) -1, "host changed on parse failure %sfor '%s': got %p", test_string[test_type], name, got_host);
+- fail_unless(got_display == -42, "display changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_display);
+- fail_unless(got_screen == -42, "screen changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_screen);
++ ck_assert_msg(!success, "unexpected parse success %sfor '%s'", test_string[test_type], name);
++ ck_assert_msg(got_host == (char *) -1, "host changed on parse failure %sfor '%s': got %p", test_string[test_type], name, got_host);
++ ck_assert_msg(got_display == -42, "display changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_display);
++ ck_assert_msg(got_screen == -42, "screen changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_screen);
+
+ got_host = (char *) -1;
+ got_display = got_screen = -42;
+ mark_point();
+ success = xcb_parse_display(argument, &got_host, &got_display, 0);
+- fail_unless(!success, "unexpected screenless parse success %sfor '%s'", test_string[test_type], name);
+- fail_unless(got_host == (char *) -1, "host changed on parse failure %sfor '%s': got %p", test_string[test_type], name, got_host);
+- fail_unless(got_display == -42, "display changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_display);
++ ck_assert_msg(!success, "unexpected screenless parse success %sfor '%s'", test_string[test_type], name);
++ ck_assert_msg(got_host == (char *) -1, "host changed on parse failure %sfor '%s': got %p", test_string[test_type], name, got_host);
++ ck_assert_msg(got_display == -42, "display changed on parse failure %sfor '%s': got %d", test_string[test_type], name, got_display);
+ }
+ putenv("DISPLAY=");
+ }
+@@ -183,7 +183,7 @@ END_TEST
+
+ static void popcount_eq(uint32_t bits, int count)
+ {
+- fail_unless(xcb_popcount(bits) == count, "unexpected popcount(%08x) != %d", bits, count);
++ ck_assert_msg(xcb_popcount(bits) == count, "unexpected popcount(%08x) != %d", bits, count);
+ }
+
+ START_TEST(popcount)
+--
+2.26.2
+
diff --git a/x11-libs/libxcb/libxcb-1.14.ebuild b/x11-libs/libxcb/libxcb-1.14.ebuild
index 24e099c8ef9e..979e3d9e1894 100644
--- a/x11-libs/libxcb/libxcb-1.14.ebuild
+++ b/x11-libs/libxcb/libxcb-1.14.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
PYTHON_REQ_USE=xml
XORG_TARBALL_SUFFIX="xz"
@@ -34,6 +34,10 @@ BDEPEND="${PYTHON_DEPS}
$(python_gen_any_dep '>=x11-base/xcb-proto-1.14[${PYTHON_USEDEP}]')
"
+PATCHES=(
+ "${FILESDIR}"/${P}-tests-don-t-use-deprecated-fail_unless-check-API.patch
+)
+
python_check_deps() {
has_version -b ">=x11-base/xcb-proto-1.14[${PYTHON_USEDEP}]"
}