From 503fb0dcb4cab921b5e280f119725850e65abbc9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 17 Sep 2022 18:00:27 +0200 Subject: [PATCH] gnu: ungoogled-chromium: Generalize OpenJPEG substitution. * gnu/packages/chromium.scm (ungoogled-chromium)[arguments]: Don't hard code openjpeg version. --- gnu/packages/chromium.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index e0a9f5fbad..37b74833e1 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -613,11 +613,12 @@ (define-public ungoogled-chromium #~(modify-phases %standard-phases (add-after 'unpack 'patch-stuff (lambda* (#:key inputs #:allow-other-keys) - (let ((openjpeg (search-input-directory - inputs "include/openjpeg-2.4"))) + (let* ((libopenjp2 (search-input-file inputs "lib/libopenjp2.so")) + (openjpeg (dirname (dirname libopenjp2)))) (substitute* "third_party/pdfium/BUILD.gn" ;; This include path is added by Debians openjpeg patch. - (("/usr/include/openjpeg-2.4") openjpeg)) + (("/usr/include/openjpeg-") + (string-append openjpeg "/include/openjpeg-"))) ;; Adjust minizip header inclusions. (substitute* (find-files "third_party/tflite_support\