guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 7c239087919d3011e3637b89de66c0120d15d495
Author: Sughosha <[email protected]>
AuthorDate: Sun May 17 12:17:01 2026 +0530
gnu: Add openjph.
* gnu/packages/image.scm (openjph): New variable.
Change-Id: Id1f082e887672e854d23191efd3cfe47630d0c49
Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
gnu/packages/image.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 027df968dc..16f08ada7d 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2025 Junker <[email protected]>
;;; Copyright © 2025 Hugo Buddelmeijer <[email protected]>
;;; Copyright © 2026 Carlos Durán Domínguez <[email protected]>
+;;; Copyright © 2026 Sughosha <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1180,6 +1181,63 @@ JPEG 2000 Reference Software.")
(home-page "https://github.com/uclouvain/openjpeg")
(license license:bsd-2)))
+(define jp2k-test-codestreams
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aous72/jp2k_test_codestreams")
+ (commit "eda0844b9f3be47d9b64194bcea5eb1ac2285e39")))
+ (sha256
+ (base32 "1sci4a4dvgrgmrf942zdf0hqhcx30a5lffwfy6r3hya35l3q8q8f"))))
+
+(define-public openjph
+ (package
+ (name "openjph")
+ (version "0.27.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aous72/OpenJPH")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1knygwn4bf6n53qr12w05yava7464x3c70rf5r20sz8adjcfccvx"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(if #$(%current-target-system)
+ '()
+ '("-DOJPH_BUILD_TESTS=ON"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "tests/CMakeLists.txt"
+ (("^FetchContent_MakeAvailable\\(googletest\\)")
+ #$(if (%current-target-system)
+ ""
+ "find_package(GTest REQUIRED)"))
+ (("^FetchContent_MakeAvailable\\(jp2k_test_codestreams\\).*")
+ ""))))
+ #$@(if (%current-target-system)
+ #~()
+ #~((add-before 'check 'unpack-jp2k-test-codestreams
+ (lambda _
+ (copy-recursively #$jp2k-test-codestreams
+ "tests/jp2k_test_codestreams"))))))))
+ (native-inputs (if (%current-target-system)
+ '()
+ (list googletest)))
+ (inputs (list libtiff))
+ (home-page "https://github.com/aous72/OpenJPH")
+ (synopsis "JPEG2000 Part-15 (or JPH or HTJ2K) implementation")
+ (description
+ "OpenJPH is an implementation of @acronym{HTJ2K, High-throughput
JPEG2000},
+also known as JPH, JPEG2000 Part 15, ISO/IEC 15444-15, and ITU-T T.814.")
+ (license license:bsd-2)))
+
(define-public openslide
(package
(name "openslide")