From 4f889375f2e3c0606e83280cd7deee5c58e11cd4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 3 Mar 2019 17:29:56 +0200 Subject: gnu: libopenshot: Fix tests on other architectures. * gnu/packages/video.scm (libopenshot)[source]: Add patch. * gnu/packages/patches/libopenshot-fixup-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/packages/patches/libopenshot-fixup-tests.patch | 148 +++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 gnu/packages/patches/libopenshot-fixup-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/libopenshot-fixup-tests.patch b/gnu/packages/patches/libopenshot-fixup-tests.patch new file mode 100644 index 0000000000..9a0bcc5e8f --- /dev/null +++ b/gnu/packages/patches/libopenshot-fixup-tests.patch @@ -0,0 +1,148 @@ +From 691536f2f8a9ed7322fedb24d489db08c70705b9 Mon Sep 17 00:00:00 2001 +From: "Dr. Tobias Quathamer" +Date: Sat, 18 Nov 2017 13:54:22 +0100 +Subject: [PATCH] This the combination of two patches: + https://sources.debian.org/data/main/libo/libopenshot/0.2.2+dfsg1-1/debian/patches/0003-Fix-failing-tests-by-using-a-fault-tolerance.patch + https://sources.debian.org/data/main/libo/libopenshot/0.2.2+dfsg1-1/debian/patches/0004-Add-some-more-fault-tolerance-for-arm64.patch + +Together they should fix the test suite on all architectures +--- + tests/FFmpegReader_Tests.cpp | 9 ++++----- + tests/ImageWriter_Tests.cpp | 8 ++++---- + tests/Timeline_Tests.cpp | 28 ++++++++++++++-------------- + 3 files changed, 22 insertions(+), 23 deletions(-) + +diff --git a/tests/FFmpegReader_Tests.cpp b/tests/FFmpegReader_Tests.cpp +index 53563ca..07fc41e 100644 +--- a/tests/FFmpegReader_Tests.cpp ++++ b/tests/FFmpegReader_Tests.cpp +@@ -95,8 +95,8 @@ TEST(FFmpegReader_Check_Video_File) + int pixel_index = 112 * 4; // pixel 112 (4 bytes per pixel) + + // Check image properties on scanline 10, pixel 112 +- CHECK_EQUAL(21, (int)pixels[pixel_index]); +- CHECK_EQUAL(191, (int)pixels[pixel_index + 1]); ++ CHECK_CLOSE(21, (int)pixels[pixel_index], 1); ++ CHECK_CLOSE(191, (int)pixels[pixel_index + 1], 2); + CHECK_EQUAL(0, (int)pixels[pixel_index + 2]); + CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); + +@@ -109,8 +109,8 @@ TEST(FFmpegReader_Check_Video_File) + + // Check image properties on scanline 10, pixel 112 + CHECK_EQUAL(0, (int)pixels[pixel_index]); +- CHECK_EQUAL(96, (int)pixels[pixel_index + 1]); +- CHECK_EQUAL(188, (int)pixels[pixel_index + 2]); ++ CHECK_CLOSE(96, (int)pixels[pixel_index + 1], 1); ++ CHECK_CLOSE(188, (int)pixels[pixel_index + 2], 1); + CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); + + // Close reader +@@ -209,4 +209,3 @@ TEST(FFmpegReader_Multiple_Open_and_Close) + // Close reader + r.Close(); + } +- +diff --git a/tests/ImageWriter_Tests.cpp b/tests/ImageWriter_Tests.cpp +index 107ee39..d10c8bd 100644 +--- a/tests/ImageWriter_Tests.cpp ++++ b/tests/ImageWriter_Tests.cpp +@@ -73,9 +73,9 @@ TEST(ImageWriter_Test_Gif) + int pixel_index = 230 * 4; // pixel 230 (4 bytes per pixel) + + // Check image properties +- CHECK_EQUAL(20, (int)pixels[pixel_index]); +- CHECK_EQUAL(18, (int)pixels[pixel_index + 1]); +- CHECK_EQUAL(11, (int)pixels[pixel_index + 2]); ++ CHECK_CLOSE(20, (int)pixels[pixel_index], 5); ++ CHECK_CLOSE(18, (int)pixels[pixel_index + 1], 2); ++ CHECK_CLOSE(11, (int)pixels[pixel_index + 2], 2); + CHECK_EQUAL(255, (int)pixels[pixel_index + 3]); + } +-#endif +\ No newline at end of file ++#endif +diff --git a/tests/Timeline_Tests.cpp b/tests/Timeline_Tests.cpp +index 8c81579..4d861a6 100644 +--- a/tests/Timeline_Tests.cpp ++++ b/tests/Timeline_Tests.cpp +@@ -119,8 +119,8 @@ TEST(Timeline_Check_Two_Track_Video) + int pixel_index = 230 * 4; // pixel 230 (4 bytes per pixel) + + // Check image properties +- CHECK_EQUAL(21, (int)f->GetPixels(pixel_row)[pixel_index]); +- CHECK_EQUAL(191, (int)f->GetPixels(pixel_row)[pixel_index + 1]); ++ CHECK_CLOSE(21, (int)f->GetPixels(pixel_row)[pixel_index], 2); ++ CHECK_CLOSE(191, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2); + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + +@@ -128,17 +128,17 @@ TEST(Timeline_Check_Two_Track_Video) + f = t.GetFrame(2); + + // Check image properties +- CHECK_EQUAL(176, (int)f->GetPixels(pixel_row)[pixel_index]); ++ CHECK_CLOSE(176, (int)f->GetPixels(pixel_row)[pixel_index], 1); + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 1]); +- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]); ++ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + + // Get frame + f = t.GetFrame(3); + + // Check image properties +- CHECK_EQUAL(23, (int)f->GetPixels(pixel_row)[pixel_index]); +- CHECK_EQUAL(190, (int)f->GetPixels(pixel_row)[pixel_index + 1]); ++ CHECK_CLOSE(23, (int)f->GetPixels(pixel_row)[pixel_index], 1); ++ CHECK_CLOSE(190, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2); + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + +@@ -146,8 +146,8 @@ TEST(Timeline_Check_Two_Track_Video) + f = t.GetFrame(24); + + // Check image properties +- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index]); +- CHECK_EQUAL(106, (int)f->GetPixels(pixel_row)[pixel_index + 1]); ++ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index], 1); ++ CHECK_CLOSE(106, (int)f->GetPixels(pixel_row)[pixel_index + 1], 1); + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + +@@ -155,8 +155,8 @@ TEST(Timeline_Check_Two_Track_Video) + f = t.GetFrame(5); + + // Check image properties +- CHECK_EQUAL(23, (int)f->GetPixels(pixel_row)[pixel_index]); +- CHECK_EQUAL(190, (int)f->GetPixels(pixel_row)[pixel_index + 1]); ++ CHECK_CLOSE(23, (int)f->GetPixels(pixel_row)[pixel_index], 1); ++ CHECK_CLOSE(190, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2); + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + +@@ -165,17 +165,17 @@ TEST(Timeline_Check_Two_Track_Video) + + // Check image properties + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index]); +- CHECK_EQUAL(94, (int)f->GetPixels(pixel_row)[pixel_index + 1]); +- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]); ++ CHECK_CLOSE(94, (int)f->GetPixels(pixel_row)[pixel_index + 1], 1); ++ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + + // Get frame + f = t.GetFrame(4); + + // Check image properties +- CHECK_EQUAL(176, (int)f->GetPixels(pixel_row)[pixel_index]); ++ CHECK_CLOSE(176, (int)f->GetPixels(pixel_row)[pixel_index], 1); + CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 1]); +- CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]); ++ CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1); + CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]); + + // Close reader +-- +2.21.0 + -- cgit v1.2.3 From 74fea1e2df38afc772313b3bd6658c4a337a1e1c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 4 Mar 2019 16:37:09 +0100 Subject: gnu: lyx: Remove obsolete patch. * gnu/packages/patches/lyx-2.2.3-fix-test.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/lyx-2.2.3-fix-test.patch | 13 ------------- 2 files changed, 14 deletions(-) delete mode 100644 gnu/packages/patches/lyx-2.2.3-fix-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 449ee8367d..41c10c82bc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1030,7 +1030,6 @@ dist_patch_DATA = \ %D%/packages/patches/luminance-hdr-qt-printer.patch \ %D%/packages/patches/lvm2-static-link.patch \ %D%/packages/patches/lxsession-use-gapplication.patch \ - %D%/packages/patches/lyx-2.2.3-fix-test.patch \ %D%/packages/patches/make-glibc-compat.patch \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mariadb-client-test-32bit.patch \ diff --git a/gnu/packages/patches/lyx-2.2.3-fix-test.patch b/gnu/packages/patches/lyx-2.2.3-fix-test.patch deleted file mode 100644 index 10b7d2a3a9..0000000000 --- a/gnu/packages/patches/lyx-2.2.3-fix-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -See https://www.lyx.org/trac/ticket/10800#comment:17 -diff --git a/src/tex2lyx/test/test-structure.lyx.lyx b/src/tex2lyx/test/test-structure.lyx.lyx -index feff755cd2..2c7f2ace5c 100644 ---- a/src/tex2lyx/test/test-structure.lyx.lyx -+++ b/src/tex2lyx/test/test-structure.lyx.lyx -@@ -212,7 +212,7 @@ This causes the - \begin_inset Flex Flex:Strong - status collapsed - --\begin_layout Standard -+\begin_layout Plain Layout - logikalmkup - \end_layout -- cgit v1.2.3 From ad257ec8b578b21fc36b142396324df9e6613d4a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 4 Mar 2019 18:36:28 +0100 Subject: gnu: thermald: Update to 1.8. * gnu/packages/admin.scm (thermald): Update to 1.8. [source]: Add patch. * gnu/packages/patches/thermald-make-int-max32-visible.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/admin.scm | 7 ++++--- .../patches/thermald-make-int-max32-visible.patch | 24 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/thermald-make-int-max32-visible.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 01addbd371..60448f9404 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1277,6 +1277,7 @@ dist_patch_DATA = \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/thefuck-test-environ.patch \ + %D%/packages/patches/thermald-make-int-max32-visible.patch \ %D%/packages/patches/tidy-CVE-2015-5522+5523.patch \ %D%/packages/patches/tinyxml-use-stl.patch \ %D%/packages/patches/tipp10-fix-compiling.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 2bc1c325a3..f425c2947c 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -2523,7 +2523,7 @@ make it a perfect utility on modern distros.") (define-public thermald (package (name "thermald") - (version "1.7.2") + (version "1.8") (source (origin (method git-fetch) @@ -2532,8 +2532,9 @@ make it a perfect utility on modern distros.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "1cs2pq8xvfnsvrhg2bxawk4kn3z1qmfrnpnhs178pvfbglzh15hc")))) + (base32 "1g1l7k8yxj8bl1ysdx8v6anv1s7xk9j072y44gwki70dy48n7j92")) + (patches + (search-patches "thermald-make-int-max32-visible.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/thermald-make-int-max32-visible.patch b/gnu/packages/patches/thermald-make-int-max32-visible.patch new file mode 100644 index 0000000000..eddbb23547 --- /dev/null +++ b/gnu/packages/patches/thermald-make-int-max32-visible.patch @@ -0,0 +1,24 @@ +From 5fb947886bf1e40475edf930fb2b284c24c8cb9a Mon Sep 17 00:00:00 2001 +From: Sanel Zukan +Date: Sun, 23 Dec 2018 00:04:34 +0100 +Subject: [PATCH] Make sure INT_MAX32 is visible. + +--- + src/thd_trip_point.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/thd_trip_point.h b/src/thd_trip_point.h +index 0eedc95..89eb083 100644 +--- a/src/thd_trip_point.h ++++ b/src/thd_trip_point.h +@@ -29,6 +29,10 @@ + #include "thd_sys_fs.h" + #include "thd_preference.h" + #include "thd_cdev.h" ++ ++#define __STDC_LIMIT_MACROS ++#include ++ + #include + #include + #include // std::sort -- cgit v1.2.3