Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/pidgin/files/
Date: Sat, 30 Apr 2022 05:29:29
Message-Id: 1651296504.d149eb150da08aa25941eb21dc7410339bc8b3ac.juippis@gentoo
1 commit: d149eb150da08aa25941eb21dc7410339bc8b3ac
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 30 05:28:24 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 30 05:28:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d149eb15
7
8 net-im/pidgin: restore pidgin-2.14.8-libpurple_test_fix.patch
9
10 - still needed by the stable version.
11
12 Closes: https://bugs.gentoo.org/841782
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 .../files/pidgin-2.14.8-libpurple_test_fix.patch | 52 ++++++++++++++++++++++
16 1 file changed, 52 insertions(+)
17
18 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
19 new file mode 100644
20 index 000000000000..30caaa92e9c5
21 --- /dev/null
22 +++ b/net-im/pidgin/files/pidgin-2.14.8-libpurple_test_fix.patch
23 @@ -0,0 +1,52 @@
24 +# HG changeset patch
25 +# Node ID e8f8e1558e11
26 +# Parent 930e4fb71321
27 +diff --git a/libpurple/tests/test_util.c b/libpurple/tests/test_util.c
28 +--- a/libpurple/tests/test_util.c
29 ++++ b/libpurple/tests/test_util.c
30 +@@ -172,7 +172,7 @@
31 + fail_unless(1282941722 == purple_str_to_time("2010-08-27.204202", TRUE, NULL, NULL, NULL));
32 + fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21.3234", TRUE, NULL, NULL, NULL));
33 + fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21Z", TRUE, NULL, NULL, NULL));
34 +- fail_unless(1631512800 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL));
35 ++ fail_unless(1631491200 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL));
36 +
37 + /* For testing local time we use Asia/Kathmandu because it's +05:45 and
38 + * doesn't have DST which means the test should always pass regardless of
39 +@@ -195,9 +195,14 @@
40 + * localtime.
41 + */
42 + timestamp = purple_str_to_time("09/13/202115:34:34", TRUE, NULL, NULL, &rest);
43 +- fail_unless(1631470500 == timestamp);
44 ++ fail_unless(1631491200 == timestamp);
45 + assert_string_equal("15:34:34", rest);
46 +
47 ++ timestamp = purple_str_to_time("2010-08-27.134202-0700PDT", FALSE, &tm, &tz_off, &rest);
48 ++ fail_unless(1282941722 == timestamp);
49 ++ fail_unless((-7 * 60 * 60) == tz_off);
50 ++ assert_string_equal("PDT", rest);
51 ++
52 + /* finally revert the TZ environment variable */
53 + if(oldtz != NULL) {
54 + g_setenv("TZ", oldtz, TRUE);
55 +diff --git a/libpurple/util.c b/libpurple/util.c
56 +--- a/libpurple/util.c
57 ++++ b/libpurple/util.c
58 +@@ -887,6 +887,17 @@
59 + t.tm_isdst = -1; /* -1 means dst info is not available */
60 + }
61 + }
62 ++ } else {
63 ++ /* If we have a time, figure out if we need to adjust our tz offset. */
64 ++ if(!mktime_with_utc) {
65 ++ if(utc) {
66 ++ mktime_with_utc = TRUE;
67 ++ tzoff = 0;
68 ++ } else {
69 ++ /* Local Time */
70 ++ t.tm_isdst = -1; /* -1 means dst info is not available */
71 ++ }
72 ++ }
73 + }
74 +
75 + g_free(hours);