summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2017-03-19 16:32:12 +0200
committerMart Raudsepp <leio@gentoo.org>2017-03-19 16:42:35 +0200
commit8e364f869f1a642b412122e94261b7ccbc380118 (patch)
treee25f3e399fb07250b6db092783031cc9cc54c875 /dev-libs/glib
parentx11-wm/xpra: Version bump (bug 612946), backport fixes/cleanups to 1.0.4 as r... (diff)
downloadgentoo-8e364f869f1a642b412122e94261b7ccbc380118.tar.gz
gentoo-8e364f869f1a642b412122e94261b7ccbc380118.tar.bz2
gentoo-8e364f869f1a642b412122e94261b7ccbc380118.zip
dev-libs/glib: fix gdatetime tests with timezone-data-2017a
The tests were using one of the invented BRT timezones that was removed in favor of just using the offset in timezone-data, the glib upstream patch makes it use a real PST timezone for these tests instead.
Diffstat (limited to 'dev-libs/glib')
-rw-r--r--dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch52
-rw-r--r--dev-libs/glib/glib-2.48.2.ebuild2
-rw-r--r--dev-libs/glib/glib-2.50.3.ebuild3
3 files changed, 57 insertions, 0 deletions
diff --git a/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
new file mode 100644
index 000000000000..6c41c5cf7e53
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.50.3-fix-gdatetime-tests.patch
@@ -0,0 +1,52 @@
+From ec02a1875f29ecb8e46c0d8c1403cd00a0b3a9e4 Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain@orangesquash.org.uk>
+Date: Mon, 13 Mar 2017 16:52:11 +0000
+Subject: [PATCH] tests/gdatetime: Use a real rather than invented timezone
+
+The tzdata maintainers had previously invented abbreviations for
+timezones. As of their 2017a release, the one we were testing ("BRT")
+has been dropped.
+
+Switch to testing PST, which is a real timezone abbreviation.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=779799
+---
+ glib/tests/gdatetime.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
+index dcb8a8f..c54031d 100644
+--- a/glib/tests/gdatetime.c
++++ b/glib/tests/gdatetime.c
+@@ -635,22 +635,22 @@ test_GDateTime_new_full (void)
+ g_date_time_unref (dt);
+
+ #ifdef G_OS_UNIX
+- tz = g_time_zone_new ("America/Recife");
++ tz = g_time_zone_new ("America/Tijuana");
+ #elif defined G_OS_WIN32
+- tz = g_time_zone_new ("E. South America Standard Time");
++ tz = g_time_zone_new ("Pacific Standard Time");
+ #endif
+- dt = g_date_time_new (tz, 2010, 5, 24, 8, 4, 0);
++ dt = g_date_time_new (tz, 2010, 11, 24, 8, 4, 0);
+ g_time_zone_unref (tz);
+ g_assert_cmpint (2010, ==, g_date_time_get_year (dt));
+- g_assert_cmpint (5, ==, g_date_time_get_month (dt));
++ g_assert_cmpint (11, ==, g_date_time_get_month (dt));
+ g_assert_cmpint (24, ==, g_date_time_get_day_of_month (dt));
+ g_assert_cmpint (8, ==, g_date_time_get_hour (dt));
+ g_assert_cmpint (4, ==, g_date_time_get_minute (dt));
+ g_assert_cmpint (0, ==, g_date_time_get_second (dt));
+ #ifdef G_OS_UNIX
+- g_assert_cmpstr ("BRT", ==, g_date_time_get_timezone_abbreviation (dt));
++ g_assert_cmpstr ("PST", ==, g_date_time_get_timezone_abbreviation (dt));
+ #elif defined G_OS_WIN32
+- g_assert_cmpstr ("E. South America Standard Time", ==,
++ g_assert_cmpstr ("Pacific Standard Time", ==,
+ g_date_time_get_timezone_abbreviation (dt));
+ #endif
+ g_assert (!g_date_time_is_daylight_savings (dt));
+--
+2.10.1
+
diff --git a/dev-libs/glib/glib-2.48.2.ebuild b/dev-libs/glib/glib-2.48.2.ebuild
index f1a6e57edd93..d4ff8c694df3 100644
--- a/dev-libs/glib/glib-2.48.2.ebuild
+++ b/dev-libs/glib/glib-2.48.2.ebuild
@@ -112,6 +112,8 @@ src_prepare() {
sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
fi
+ eapply "${FILESDIR}"/${PN}-2.50.3-fix-gdatetime-tests.patch
+
# gdbus-codegen is a separate package
eapply "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch
diff --git a/dev-libs/glib/glib-2.50.3.ebuild b/dev-libs/glib/glib-2.50.3.ebuild
index 50aa9b3736b5..324be5509248 100644
--- a/dev-libs/glib/glib-2.50.3.ebuild
+++ b/dev-libs/glib/glib-2.50.3.ebuild
@@ -117,6 +117,9 @@ src_prepare() {
sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
fi
+ # Fix tests with timezone-data-2017a and newer
+ eapply "${FILESDIR}"/${P}-fix-gdatetime-tests.patch
+
# gdbus-codegen is a separate package
eapply "${FILESDIR}"/${PN}-2.50.0-external-gdbus-codegen.patch