From af4ce7bd413c3a50733bfcc05370903a1e3808bc Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Wed, 27 Oct 2021 08:58:22 -0700 Subject: gnu: diffoscope: Update to 188. * gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch: Rename patch to... * gnu/packages/patches/diffoscope-fix-llvm-test.patch: This. * gnu/local.mk (dist_patch_DATA): Update patch name. * gnu/packages/diffoscope.scm (diffoscope): Update to 188. [source]: Update patch name. [arguments]: Add skip-python-tests phase. Add fpc-external-tool phase. Add use-dumppdf-py phase. [native-inputs]: Add fpc. --- gnu/packages/diffoscope.scm | 38 ++++++++++++++++++++-- .../patches/diffoscope-fix-llvm-test.patch | 28 ++++++++++++++++ ...scope-fix-test_item3_deflate_llvm_bitcode.patch | 28 ---------------- 3 files changed, 63 insertions(+), 31 deletions(-) create mode 100644 gnu/packages/patches/diffoscope-fix-llvm-test.patch delete mode 100644 gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch (limited to 'gnu/packages') diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm index f96577ce6d..cb4c766f4e 100644 --- a/gnu/packages/diffoscope.scm +++ b/gnu/packages/diffoscope.scm @@ -49,6 +49,7 @@ #:use-module (gnu packages mono) #:use-module (gnu packages ocaml) #:use-module (gnu packages package-management) + #:use-module (gnu packages pascal) #:use-module (gnu packages patchutils) #:use-module (gnu packages pdf) #:use-module (gnu packages python-web) @@ -72,7 +73,7 @@ (define-public diffoscope (package (name "diffoscope") - (version "186") + (version "188") (source (origin (method git-fetch) @@ -81,9 +82,9 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1qlll5jn76ci5jy915v2kvyngfyycwylxpbdylffzaninvdy3dav")) + (base32 "1byd28ihni5g0ikjjcsq68smj1rw33vv9z0cymqa4ds670c77yvn")) (patches - (search-patches "diffoscope-fix-test_item3_deflate_llvm_bitcode.patch")))) + (search-patches "diffoscope-fix-llvm-test.patch")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -108,6 +109,36 @@ (string-append "['" (which "stat") "',")) (("\\['getfacl',") (string-append "['" (which "getfacl") "',"))))) + (add-after 'unpack 'skip-python-tests + (lambda _ + ;; Python tests appear to assume python 3.9, remove + ;; phase when python is upgraded + (substitute* "tests/comparators/test_python.py" + (("def test_identification") + "def skip_test_identification")) + (substitute* "tests/comparators/test_python.py" + (("def test_diff") + "def skip_test_diff")))) + (add-after 'unpack 'use-dumppdf-py + ;; python-pdfminer-six ships "dumppdf" as "dumppdf.py" + ;; https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/283 + ;; Fixed upstream, remove this phase when updating to + ;; diffoscope 189 + (lambda _ + (substitute* "diffoscope/comparators/pdf.py" + (("dumppdf") "dumppdf.py")) + (substitute* "diffoscope/external_tools.py" + (("dumppdf") "dumppdf.py")) + (substitute* "diffoscope/external_tools.py" + (("'debian': 'python3-pdfminer'") + "'debian': 'python3-pdfminer', 'guix': 'python-pdfminer-six'")))) + (add-after 'unpack 'fpc-external-tool + ;; Fixed upstream, remove this phase when updating to + ;; diffoscope 189 + (lambda _ + (substitute* "diffoscope/external_tools.py" + (("'debian': 'fp-utils'") + "'debian': 'fp-utils', 'guix': 'fpc'")))) (add-after 'build 'build-man-page (lambda* (#:key (make-flags '()) #:allow-other-keys) (apply invoke "make" "-C" "doc" make-flags))) @@ -182,6 +213,7 @@ ("dtc" ,dtc) ("e2fsprogs" ,e2fsprogs) ("ffmpeg" ,ffmpeg) + ("fpc" ,fpc) ("gettext" ,gettext-minimal) ("ghostscript" ,ghostscript) ("giflib:bin" ,giflib "bin") diff --git a/gnu/packages/patches/diffoscope-fix-llvm-test.patch b/gnu/packages/patches/diffoscope-fix-llvm-test.patch new file mode 100644 index 0000000000..45e496a128 --- /dev/null +++ b/gnu/packages/patches/diffoscope-fix-llvm-test.patch @@ -0,0 +1,28 @@ +From b7eeac09eb068083bdee1a3aa062d1e52a2fa61a Mon Sep 17 00:00:00 2001 +From: Tobias Geerinckx-Rice +Date: Mon, 4 Oct 2021 21:03:43 +0200 +Subject: [PATCH] gnu: diffoscope: Fix test_item3_deflate_llvm_bitcode. + +Taken verbatim from Nixpkgs[0]. + +[0]: https://github.com/NixOS/nixpkgs/blob/589e03f109092a3ba97781fd0533110bf78a3f97/pkgs/tools/misc/diffoscope/fix-tests.patch +--- + tests/comparators/test_rlib.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py +index 8d201ab..05960aa 100644 +--- a/tests/comparators/test_rlib.py ++++ b/tests/comparators/test_rlib.py +@@ -81,9 +81,6 @@ def rlib_dis_expected_diff(): + if actual_ver >= "7.0": + diff_file = "rlib_llvm_dis_expected_diff_7" + +- if actual_ver >= "10.0": +- diff_file = "rlib_llvm_dis_expected_diff_10" +- + return get_data(diff_file) + + +-- +2.33.0 diff --git a/gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch b/gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch deleted file mode 100644 index 45e496a128..0000000000 --- a/gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b7eeac09eb068083bdee1a3aa062d1e52a2fa61a Mon Sep 17 00:00:00 2001 -From: Tobias Geerinckx-Rice -Date: Mon, 4 Oct 2021 21:03:43 +0200 -Subject: [PATCH] gnu: diffoscope: Fix test_item3_deflate_llvm_bitcode. - -Taken verbatim from Nixpkgs[0]. - -[0]: https://github.com/NixOS/nixpkgs/blob/589e03f109092a3ba97781fd0533110bf78a3f97/pkgs/tools/misc/diffoscope/fix-tests.patch ---- - tests/comparators/test_rlib.py | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py -index 8d201ab..05960aa 100644 ---- a/tests/comparators/test_rlib.py -+++ b/tests/comparators/test_rlib.py -@@ -81,9 +81,6 @@ def rlib_dis_expected_diff(): - if actual_ver >= "7.0": - diff_file = "rlib_llvm_dis_expected_diff_7" - -- if actual_ver >= "10.0": -- diff_file = "rlib_llvm_dis_expected_diff_10" -- - return get_data(diff_file) - - --- -2.33.0 -- cgit 1.4.1