commit:     8b160c7a4ec1f63d76c9cb0781a0c26e4d8194d6
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 25 18:00:46 2019 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 18:01:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b160c7a

media-libs/gstreamer: fix gsturi test with glib-2.60

Closes: https://bugs.gentoo.org/690940
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 .../files/1.14-glib-2.60-tests-compat.patch        | 56 ++++++++++++++++++++++
 media-libs/gstreamer/gstreamer-1.14.4.ebuild       |  4 ++
 2 files changed, 60 insertions(+)

diff --git a/media-libs/gstreamer/files/1.14-glib-2.60-tests-compat.patch 
b/media-libs/gstreamer/files/1.14-glib-2.60-tests-compat.patch
new file mode 100644
index 00000000000..ca74bf0cc2e
--- /dev/null
+++ b/media-libs/gstreamer/files/1.14-glib-2.60-tests-compat.patch
@@ -0,0 +1,56 @@
+From 4a7739f4b6442814696bbd0706ab9a1ce1462d80 Mon Sep 17 00:00:00 2001
+From: Havard Graff <[email protected]>
+Date: Wed, 31 Oct 2018 10:27:23 +0100
+Subject: [PATCH] tests/uri: fix test after GHashTable changes in GLib 2.59
+
+Maybe the implementation should not be dependent on a "random" hash-table
+ordering, but at least this shows the problem clearly.
+---
+ tests/check/gst/gsturi.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/tests/check/gst/gsturi.c b/tests/check/gst/gsturi.c
+index ee623dbcf..fa87c7c77 100644
+--- a/tests/check/gst/gsturi.c
++++ b/tests/check/gst/gsturi.c
+@@ -414,7 +414,11 @@ static const struct URITest url_presenting_tests[] = {
+   {.uri = {"scheme", "user:pass", "host", 1234, "/path/to/dir",
+           {{"query", NULL}, {"key", "value"}}, "fragment"},
+       .str =
++#if GLIB_CHECK_VERSION(2, 59, 0)
++      "scheme://user:pass@host:1234/path/to/dir?key=value&query#fragment"},
++#else
+       "scheme://user:pass@host:1234/path/to/dir?query&key=value#fragment"},
++#endif
+ 
+   /* IPv6 literal should render in square brackets */
+   {.uri = {"scheme", "user:pass", "12:34:56:78:9a:bc:de:f0", 1234,
+@@ -977,14 +981,24 @@ GST_START_TEST (test_url_get_set)
+ 
+   fail_unless (gst_uri_set_query_value (url, "key", "value"));
+   tmp_str = gst_uri_to_string (url);
++#if GLIB_CHECK_VERSION(2, 59, 0)
++  fail_unless_equals_string (tmp_str,
++     "//example.com/path/to/file/there/segment?key=value&query#fragment");
++#else
+   fail_unless_equals_string (tmp_str,
+-      "//example.com/path/to/file/there/segment?query&key=value#fragment");
++     "//example.com/path/to/file/there/segment?query&key=value#fragment");
++#endif
+   g_free (tmp_str);
+ 
+   fail_unless (gst_uri_set_query_value (url, "key", NULL));
+   tmp_str = gst_uri_to_string (url);
++#if GLIB_CHECK_VERSION(2, 59, 0)
++  fail_unless_equals_string (tmp_str,
++      "//example.com/path/to/file/there/segment?key&query#fragment");
++#else
+   fail_unless_equals_string (tmp_str,
+       "//example.com/path/to/file/there/segment?query&key#fragment");
++#endif
+   g_free (tmp_str);
+ 
+   fail_unless (!gst_uri_set_query_value (NULL, "key", "value"));
+-- 
+2.20.1
+

diff --git a/media-libs/gstreamer/gstreamer-1.14.4.ebuild 
b/media-libs/gstreamer/gstreamer-1.14.4.ebuild
index 7bb095742b0..19677ed3d4f 100644
--- a/media-libs/gstreamer/gstreamer-1.14.4.ebuild
+++ b/media-libs/gstreamer/gstreamer-1.14.4.ebuild
@@ -34,6 +34,10 @@ DEPEND="${RDEPEND}
 "
 # gtk-doc-am to install API docs
 
+PATCHES=(
+       "${FILESDIR}"/1.14-glib-2.60-tests-compat.patch
+)
+
 src_configure() {
        if [[ ${CHOST} == *-interix* ]] ; then
                export ac_cv_lib_dl_dladdr=no

Reply via email to