1 |
commit: ab140b6c50407b21f5ed3c91f41f4441c023bf09 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 18 09:21:59 2022 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 18 09:22:24 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab140b6c |
7 |
|
8 |
net-im/pidgin: Fixed test suite |
9 |
|
10 |
Closes: https://bugs.gentoo.org/819774 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
.../files/pidgin-2.14.8-libpurple_test_fix.patch | 52 ++++++++++++++++++++++ |
14 |
net-im/pidgin/pidgin-2.14.8.ebuild | 3 +- |
15 |
2 files changed, 54 insertions(+), 1 deletion(-) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 000000000000..30caaa92e9c5 |
20 |
--- /dev/null |
21 |
+++ b/net-im/pidgin/files/pidgin-2.14.8-libpurple_test_fix.patch |
22 |
@@ -0,0 +1,52 @@ |
23 |
+# HG changeset patch |
24 |
+# Node ID e8f8e1558e11 |
25 |
+# Parent 930e4fb71321 |
26 |
+diff --git a/libpurple/tests/test_util.c b/libpurple/tests/test_util.c |
27 |
+--- a/libpurple/tests/test_util.c |
28 |
++++ b/libpurple/tests/test_util.c |
29 |
+@@ -172,7 +172,7 @@ |
30 |
+ fail_unless(1282941722 == purple_str_to_time("2010-08-27.204202", TRUE, NULL, NULL, NULL)); |
31 |
+ fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21.3234", TRUE, NULL, NULL, NULL)); |
32 |
+ fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21Z", TRUE, NULL, NULL, NULL)); |
33 |
+- fail_unless(1631512800 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL)); |
34 |
++ fail_unless(1631491200 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL)); |
35 |
+ |
36 |
+ /* For testing local time we use Asia/Kathmandu because it's +05:45 and |
37 |
+ * doesn't have DST which means the test should always pass regardless of |
38 |
+@@ -195,9 +195,14 @@ |
39 |
+ * localtime. |
40 |
+ */ |
41 |
+ timestamp = purple_str_to_time("09/13/202115:34:34", TRUE, NULL, NULL, &rest); |
42 |
+- fail_unless(1631470500 == timestamp); |
43 |
++ fail_unless(1631491200 == timestamp); |
44 |
+ assert_string_equal("15:34:34", rest); |
45 |
+ |
46 |
++ timestamp = purple_str_to_time("2010-08-27.134202-0700PDT", FALSE, &tm, &tz_off, &rest); |
47 |
++ fail_unless(1282941722 == timestamp); |
48 |
++ fail_unless((-7 * 60 * 60) == tz_off); |
49 |
++ assert_string_equal("PDT", rest); |
50 |
++ |
51 |
+ /* finally revert the TZ environment variable */ |
52 |
+ if(oldtz != NULL) { |
53 |
+ g_setenv("TZ", oldtz, TRUE); |
54 |
+diff --git a/libpurple/util.c b/libpurple/util.c |
55 |
+--- a/libpurple/util.c |
56 |
++++ b/libpurple/util.c |
57 |
+@@ -887,6 +887,17 @@ |
58 |
+ t.tm_isdst = -1; /* -1 means dst info is not available */ |
59 |
+ } |
60 |
+ } |
61 |
++ } else { |
62 |
++ /* If we have a time, figure out if we need to adjust our tz offset. */ |
63 |
++ if(!mktime_with_utc) { |
64 |
++ if(utc) { |
65 |
++ mktime_with_utc = TRUE; |
66 |
++ tzoff = 0; |
67 |
++ } else { |
68 |
++ /* Local Time */ |
69 |
++ t.tm_isdst = -1; /* -1 means dst info is not available */ |
70 |
++ } |
71 |
++ } |
72 |
+ } |
73 |
+ |
74 |
+ g_free(hours); |
75 |
|
76 |
diff --git a/net-im/pidgin/pidgin-2.14.8.ebuild b/net-im/pidgin/pidgin-2.14.8.ebuild |
77 |
index 9fa6d8518eac..101ef0a63f4f 100644 |
78 |
--- a/net-im/pidgin/pidgin-2.14.8.ebuild |
79 |
+++ b/net-im/pidgin/pidgin-2.14.8.ebuild |
80 |
@@ -1,4 +1,4 @@ |
81 |
-# Copyright 1999-2021 Gentoo Authors |
82 |
+# Copyright 1999-2022 Gentoo Authors |
83 |
# Distributed under the terms of the GNU General Public License v2 |
84 |
|
85 |
EAPI=7 |
86 |
@@ -134,6 +134,7 @@ DYNAMIC_PRPLS="irc,jabber,simple" |
87 |
|
88 |
PATCHES=( |
89 |
"${DISTDIR}/${PN}-2.10.9-irc_join_sleep.patch" # 577286 |
90 |
+ "${FILESDIR}/${P}-libpurple_test_fix.patch" #819774 |
91 |
) |
92 |
|
93 |
pkg_pretend() { |