diff options
-rw-r--r-- | user/pidgin/APKBUILD | 9 | ||||
-rw-r--r-- | user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch | 52 |
2 files changed, 58 insertions, 3 deletions
diff --git a/user/pidgin/APKBUILD b/user/pidgin/APKBUILD index c8d292636..9cb65dc8e 100644 --- a/user/pidgin/APKBUILD +++ b/user/pidgin/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=pidgin pkgver=2.14.8 -pkgrel=0 +pkgrel=1 pkgdesc="Multi-protocol instant messaging client" url="https://pidgin.im/" arch="all" @@ -13,7 +13,9 @@ makedepends="gtk+2.0-dev perl-dev libsm-dev startup-notification-dev cyrus-sasl-dev ncurses-dev nss-dev tcl-dev tk-dev intltool gtkspell-dev gst-plugins-base-dev farstream-dev libgnt-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang finch libpurple" -source="https://downloads.sourceforge.net/pidgin/$pkgname-$pkgver.tar.bz2" +source="https://downloads.sourceforge.net/pidgin/$pkgname-$pkgver.tar.bz2 + pidgin-2.14.8-libpurple_test_fix.patch + " build() { LIBS="-lX11 -ltinfo" ./configure \ @@ -64,4 +66,5 @@ libpurple() { "$subpkgdir"/usr/share/ } -sha512sums="23975501b07d14829edab7b92628703962d7a8f90849b303e2a765ec6e47d1fcbdeff62539811e26682e300a2f94520193369844de3b1c0e87f99721ca0255e6 pidgin-2.14.8.tar.bz2" +sha512sums="23975501b07d14829edab7b92628703962d7a8f90849b303e2a765ec6e47d1fcbdeff62539811e26682e300a2f94520193369844de3b1c0e87f99721ca0255e6 pidgin-2.14.8.tar.bz2 +9b328516173c8c81bc99c3045fc91c1cd99a4b74a26b37b93ba9ec2fbfb7560bcaf0c5b8890a8ee02bbb19052a774f608d9a4061eb9966f70e5b19cd1dc144eb pidgin-2.14.8-libpurple_test_fix.patch" diff --git a/user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch b/user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch new file mode 100644 index 000000000..30caaa92e --- /dev/null +++ b/user/pidgin/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); |