mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-21 17:50:34 +02:00
gnu: lensfun: Fix tools.
The included tools to, e.g., update the local lens database, wouldn't work due to incorrect handling of the Python package and missing wrapping. Now, for instance, "guix shell lensfun -- lensfun-update-data" works. * gnu/packages/photo.scm (lensfun)[arguments]: Add imported-modules and modules; add the fix-egg and python-wrap phases. Use g-exps for configure-flags. Change-Id: If462dcddf91e13508253e43c015d1eb1b5fb428a
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user