From c76ce45812746bab5b27c81abab21e373c920d7f Mon Sep 17 00:00:00 2001 From: kestrel Date: Sat, 18 Oct 2025 15:20:20 +0300 Subject: [PATCH] gnu: fgallery: Patch to use 7z from new 7zip. Change-Id: Ia3ece5943a94d03dda84c954b64a70e02594e2fc Signed-off-by: Liliana Marie Prikler --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 9 +++-- .../patches/fgallery-also-look-for-7z.patch | 37 +++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/fgallery-also-look-for-7z.patch diff --git a/gnu/local.mk b/gnu/local.mk index 755b69d32fc9005dd807ae00ad049744bfbf528d..816f68cd6f37229139372caa887cf9496a8caccf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1278,6 +1278,7 @@ dist_patch_DATA = \ %D%/packages/patches/ffmpeg-jami-remove-mjpeg-log.patch \ %D%/packages/patches/ffmpeg-jami-screen-sharing-x11-fix.patch \ %D%/packages/patches/ffmpeg-4-binutils-2.41.patch \ + %D%/packages/patches/fgallery-also-look-for-7z.patch \ %D%/packages/patches/fifengine-boost-compat.patch \ %D%/packages/patches/fifengine-python-3.9-compat.patch \ %D%/packages/patches/fifengine-swig-compat.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index d1ada9ec375a55c7aa0311b519da321b80e9d2a1..ac861f1ef6af397d9b568ad6a980a23fe7d777d3 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2219,7 +2219,10 @@ improve the thumbnail cutting region, so that faces are always centered.") "fgallery-" version ".zip")) (sha256 (base32 - "0zf6r88m2swgj1ylgh3qa1knzb4if501hzvga37h9psy8k179w8n")))) + "0zf6r88m2swgj1ylgh3qa1knzb4if501hzvga37h9psy8k179w8n")) + ;; TODO: Remove this patch when updating the package. + ;; Merged upstream at https://gitlab.com/wavexx/fgallery/-/commit/67b4a41de3f788e77ca619658950bae0e33b277b. + (patches (search-patches "fgallery-also-look-for-7z.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests @@ -2255,7 +2258,7 @@ improve the thumbnail cutting region, so that faces are always centered.") "zip" "jpegoptim" "pngcrush" - "p7zip"))) + "7zip"))) `("PERL5LIB" ":" prefix (,perl5lib))))))))) (native-inputs (list unzip)) @@ -2272,7 +2275,7 @@ improve the thumbnail cutting region, so that faces are always centered.") perl-image-exiftool jpegoptim pngcrush - p7zip)) + 7zip)) (home-page "https://www.thregr.org/~wavexx/software/fgallery/") (synopsis "Static photo gallery generator") (description diff --git a/gnu/packages/patches/fgallery-also-look-for-7z.patch b/gnu/packages/patches/fgallery-also-look-for-7z.patch new file mode 100644 index 0000000000000000000000000000000000000000..207f77ab766322b3c1c20dd52bf1c5f611b494fc --- /dev/null +++ b/gnu/packages/patches/fgallery-also-look-for-7z.patch @@ -0,0 +1,37 @@ +Note: The 7zip package only provides the bin/7z, not bin/7zz or bin/7za. + +From 71148e6f8d98936064733eeeac7d42b4cddddd23 Mon Sep 17 00:00:00 2001 +From: "kestrelwx" +Date: Sat, 18 Oct 2025 14:56:04 +0300 +Subject: [PATCH] Also check for 7z in $PATH. +To: wave++ "Yuri D'Elia" + +From: kestrel + +--- + fgallery | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/fgallery b/fgallery +index 1bf90e5..1da2c82 100755 +--- a/fgallery ++++ b/fgallery +@@ -444,12 +444,14 @@ if($facedet && system("facedetect -h >/dev/null 2>&1")) { + my $p7zipcmd; + if(!system("7zz -h >/dev/null 2>&1")) { + $p7zipcmd = "7zz"; ++} elsif(!system("7z -h >/dev/null 2>&1")) { ++ $p7zipcmd = "7z"; + } elsif(!system("7za -h >/dev/null 2>&1")) { + $p7zipcmd = "7za"; + } else { + $p7zip = 0; + if(system("zip -h >/dev/null 2>&1")) { +- fatal("cannot run \"zip\" (check if 7zz, 7za or zip is installed)"); ++ fatal("cannot run \"zip\" (check if 7zz, 7za, 7z or zip is installed)"); + } + } + +-- +2.51.0 +