summaryrefslogtreecommitdiff
path: root/app-office/gnucash/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-02-24 19:58:07 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-02-24 19:58:07 +0000
commit99abbc5e5a6ecd3fc981b45646fd8cb5d320377b (patch)
treeda76713365257a445f3ae3b95470917f59d46728 /app-office/gnucash/files
parent4935506e9a5cbfabd37c64093eac5f36c2ff0017 (diff)
gentoo resync : 24.02.2018
Diffstat (limited to 'app-office/gnucash/files')
-rw-r--r--app-office/gnucash/files/gnucash-2.7.3-no-gtest-src.patch15
-rw-r--r--app-office/gnucash/files/gnucash-2.7.4-double_free.patch12
-rw-r--r--app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch56
3 files changed, 68 insertions, 15 deletions
diff --git a/app-office/gnucash/files/gnucash-2.7.3-no-gtest-src.patch b/app-office/gnucash/files/gnucash-2.7.3-no-gtest-src.patch
deleted file mode 100644
index 66c1f9fec852..000000000000
--- a/app-office/gnucash/files/gnucash-2.7.3-no-gtest-src.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Bug: https://bugs.gentoo.org/643566
-
---- a/common/test-core/Makefile.am
-+++ b/common/test-core/Makefile.am
-@@ -80,9 +80,9 @@
- libgmock.a
- nodist_libgtest_a_SOURCES = ${GTEST_SRC}/src/gtest-all.cc
- libgtest_a_CPPFLAGS = ${AM_CPPFLAGS} -I${GTEST_HEADERS} -I${GTEST_SRC}
--endif
- nodist_libgmock_a_SOURCES = ${GMOCK_SRC_PATH}/gmock-all.cc
- libgmock_a_CPPFLAGS = ${libgtest_a_CPPFLAGS} -I${GMOCK_HEADERS} -I${GMOCK_SRC}
-+endif
-
- gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash
- gncscmmod_DATA = unittest-support.scm
diff --git a/app-office/gnucash/files/gnucash-2.7.4-double_free.patch b/app-office/gnucash/files/gnucash-2.7.4-double_free.patch
new file mode 100644
index 000000000000..9d82e72f96b3
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-2.7.4-double_free.patch
@@ -0,0 +1,12 @@
+diff --git a/libgnucash/core-utils/test/test-userdata-dir.c b/libgnucash/core-utils/test/test-userdata-dir.c
+index 5a8cd5c50..a702a56aa 100644
+--- a/libgnucash/core-utils/test/test-userdata-dir.c
++++ b/libgnucash/core-utils/test/test-userdata-dir.c
+@@ -338,7 +338,6 @@ main(int argc, char **argv)
+
+ /* Clean up the temporaries that were created for the GNC_DATA_HOME test run */
+ g_free (home_dir);
+- g_free (tmp_dir);
+ tmp_dir = g_build_filename(gnc_data_home_dir, "data", (gchar *)NULL);
+ g_rmdir (tmp_dir);
+ g_free (tmp_dir);
diff --git a/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch b/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch
new file mode 100644
index 000000000000..ec0e83a80bf5
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch
@@ -0,0 +1,56 @@
+From 3a0d2009741cdf825492020acab7c85867a60589 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 22 Feb 2018 12:27:36 +0100
+Subject: [PATCH] tests: Skip tests for dates on 32-bit platforms which cannot
+ be representated
+
+Tests "test_IANA_Perth_tz" and "test_IANA_Minsk_tz" are failing on 32-bit
+platforms because the earliest timestamp which can be representated on a
+32-bit platform is "1901-12-13 20:45:52" but the test ranges start before
+that date.
+
+To be safe, this commit will add code to skip tests before year 1902 on
+32-bit platforms.
+
+Bug: https://bugs.gentoo.org/647596
+---
+ libgnucash/engine/test/gtest-gnc-timezone.cpp | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/libgnucash/engine/test/gtest-gnc-timezone.cpp b/libgnucash/engine/test/gtest-gnc-timezone.cpp
+index 5c46b2618..298220f6e 100644
+--- a/libgnucash/engine/test/gtest-gnc-timezone.cpp
++++ b/libgnucash/engine/test/gtest-gnc-timezone.cpp
+@@ -154,6 +154,14 @@ TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
+ }
+ else if (year < 1916)
+ #else
++ if (year < 1902)
++ {
++ // Earliest timestamp which can be represented on a 32-bit
++ // system is "1901-12-13 20:45:52" -- so skip tests until we
++ // reach a year >1901 to be safe
++ continue;
++ }
++
+ if (year < 1916)
+ #endif
+ {
+@@ -216,6 +224,14 @@ TEST(gnc_timezone_constructors, test_IANA_Minsk_tz)
+ }
+ else if (year < 1924)
+ #else
++ if (year < 1902)
++ {
++ // Earliest timestamp which can be represented on a 32-bit
++ // system is "1901-12-13 20:45:52" -- so skip tests until we
++ // reach a year >1901 to be safe
++ continue;
++ }
++
+ if (year < 1924)
+ #endif
+ {
+--
+2.16.2
+