@@ 36,6 36,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix gexp)
#:use-module (guix download)
@@ 514,17 515,41 @@ scene to produce an image that looks much like a tone-mapped image.")
(base32 "1lwf3cwldvh9qfmh3w7nqqildfmxx2i5f5bn0vr8y6qc5kh7a1s9"))))
(build-system cmake-build-system)
(arguments
- `(,@(if (any (cute string-prefix? <> (or (%current-system)
- (%current-target-system)))
- '("x86_64" "i686"))
- ;; SSE and SSE2 are supported only on Intel processors.
- '()
- '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF")))
- #:tests? #f)) ; There are no tests to run.
+ (list
+ #:imported-modules `(,@%cmake-build-system-modules
+ ,@%pyproject-build-system-modules)
+ #:modules '((guix build cmake-build-system)
+ ((guix build pyproject-build-system) #:prefix py:)
+ (guix build utils))
+ #:configure-flags
+ (if (any (cute string-prefix? <> (or (%current-system)
+ (%current-target-system)))
+ '("x86_64" "i686"))
+ ;; SSE and SSE2 are supported only on Intel processors.
+ #~'()
+ #~'("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF"))
+ #:tests? #f ; There are no tests to run.
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-egg
+ (lambda _
+ (substitute* "apps/CMakeLists.txt"
+ ;; Prevent creation of Python egg.
+ (("\\$\\{SETUP_PY\\} install")
+ "${SETUP_PY} install --single-version-externally-managed --root=/"))))
+ (add-after 'install 'python-wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each (lambda (program)
+ (wrap-program (search-input-file outputs program)
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")
+ ,(py:site-packages inputs outputs)))))
+ (list "bin/lensfun-update-data"
+ "bin/lensfun-add-adapter")))))))
(native-inputs
(list pkg-config))
(inputs
- (list glib))
+ (list bash-minimal glib python))
(home-page "https://lensfun.github.io/")
(synopsis "Library to correct optical lens defects with a lens database")
(description "Digital photographs are not ideal. Of course, the better is