diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2022-01-18 10:21:59 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2022-01-18 10:22:24 +0100 |
commit | ab140b6c50407b21f5ed3c91f41f4441c023bf09 (patch) | |
tree | be58f9d75b59e8ca336db99faf956a4fc16840fb /net-im | |
parent | dev-java/xmlunit: MAVEN_ID, min java 1.8:* (diff) | |
download | gentoo-ab140b6c50407b21f5ed3c91f41f4441c023bf09.tar.gz gentoo-ab140b6c50407b21f5ed3c91f41f4441c023bf09.tar.bz2 gentoo-ab140b6c50407b21f5ed3c91f41f4441c023bf09.zip |
net-im/pidgin: Fixed test suite
Closes: https://bugs.gentoo.org/819774
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/pidgin/files/pidgin-2.14.8-libpurple_test_fix.patch | 52 | ||||
-rw-r--r-- | net-im/pidgin/pidgin-2.14.8.ebuild | 3 |
2 files changed, 54 insertions, 1 deletions
diff --git a/net-im/pidgin/files/pidgin-2.14.8-libpurple_test_fix.patch b/net-im/pidgin/files/pidgin-2.14.8-libpurple_test_fix.patch new file mode 100644 index 000000000000..30caaa92e9c5 --- /dev/null +++ b/net-im/pidgin/files/pidgin-2.14.8-libpurple_test_fix.patch @@ -0,0 +1,52 @@ +# HG changeset patch +# Node ID e8f8e1558e11 +# Parent 930e4fb71321 +diff --git a/libpurple/tests/test_util.c b/libpurple/tests/test_util.c +--- a/libpurple/tests/test_util.c ++++ b/libpurple/tests/test_util.c +@@ -172,7 +172,7 @@ + fail_unless(1282941722 == purple_str_to_time("2010-08-27.204202", TRUE, NULL, NULL, NULL)); + fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21.3234", TRUE, NULL, NULL, NULL)); + fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21Z", TRUE, NULL, NULL, NULL)); +- fail_unless(1631512800 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL)); ++ fail_unless(1631491200 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL)); + + /* For testing local time we use Asia/Kathmandu because it's +05:45 and + * doesn't have DST which means the test should always pass regardless of +@@ -195,9 +195,14 @@ + * localtime. + */ + timestamp = purple_str_to_time("09/13/202115:34:34", TRUE, NULL, NULL, &rest); +- fail_unless(1631470500 == timestamp); ++ fail_unless(1631491200 == timestamp); + assert_string_equal("15:34:34", rest); + ++ timestamp = purple_str_to_time("2010-08-27.134202-0700PDT", FALSE, &tm, &tz_off, &rest); ++ fail_unless(1282941722 == timestamp); ++ fail_unless((-7 * 60 * 60) == tz_off); ++ assert_string_equal("PDT", rest); ++ + /* finally revert the TZ environment variable */ + if(oldtz != NULL) { + g_setenv("TZ", oldtz, TRUE); +diff --git a/libpurple/util.c b/libpurple/util.c +--- a/libpurple/util.c ++++ b/libpurple/util.c +@@ -887,6 +887,17 @@ + t.tm_isdst = -1; /* -1 means dst info is not available */ + } + } ++ } else { ++ /* If we have a time, figure out if we need to adjust our tz offset. */ ++ if(!mktime_with_utc) { ++ if(utc) { ++ mktime_with_utc = TRUE; ++ tzoff = 0; ++ } else { ++ /* Local Time */ ++ t.tm_isdst = -1; /* -1 means dst info is not available */ ++ } ++ } + } + + g_free(hours); diff --git a/net-im/pidgin/pidgin-2.14.8.ebuild b/net-im/pidgin/pidgin-2.14.8.ebuild index 9fa6d8518eac..101ef0a63f4f 100644 --- a/net-im/pidgin/pidgin-2.14.8.ebuild +++ b/net-im/pidgin/pidgin-2.14.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -134,6 +134,7 @@ DYNAMIC_PRPLS="irc,jabber,simple" PATCHES=( "${DISTDIR}/${PN}-2.10.9-irc_join_sleep.patch" # 577286 + "${FILESDIR}/${P}-libpurple_test_fix.patch" #819774 ) pkg_pretend() { |