mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
gnu: blender: Fix build by specifying path to Python libraries.
* gnu/packages/graphics.scm (blender)[arguments]: Specify the Python dependency paths in #:configure-flags. [inputs]: Replace python-wrapper with python.
This commit is contained in:
parent
eb096cdeba
commit
bb9cd6de32
1 changed files with 44 additions and 35 deletions
|
@ -33,6 +33,7 @@ (define-module (gnu packages graphics)
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
#:use-module (guix build-system python)
|
#:use-module (guix build-system python)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix utils)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
#:use-module (gnu packages algebra)
|
#:use-module (gnu packages algebra)
|
||||||
#:use-module (gnu packages audio)
|
#:use-module (gnu packages audio)
|
||||||
|
@ -88,40 +89,48 @@ (define-public blender
|
||||||
"16f84mdzkmwjmqahjj64kbyk4kagdj4mcr8qjazs1952d7kh7pm9"))))
|
"16f84mdzkmwjmqahjj64kbyk4kagdj4mcr8qjazs1952d7kh7pm9"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(;; Test files are very large and not included in the release tarball.
|
(let ((python-version (version-major+minor (package-version python))))
|
||||||
#:tests? #f
|
`(;; Test files are very large and not included in the release tarball.
|
||||||
#:configure-flags
|
#:tests? #f
|
||||||
(list "-DWITH_CODEC_FFMPEG=ON"
|
#:configure-flags
|
||||||
"-DWITH_CODEC_SNDFILE=ON"
|
(list "-DWITH_CODEC_FFMPEG=ON"
|
||||||
"-DWITH_CYCLES=ON"
|
"-DWITH_CODEC_SNDFILE=ON"
|
||||||
"-DWITH_DOC_MANPAGE=ON"
|
"-DWITH_CYCLES=ON"
|
||||||
"-DWITH_FFTW3=ON"
|
"-DWITH_DOC_MANPAGE=ON"
|
||||||
"-DWITH_GAMEENGINE=ON"
|
"-DWITH_FFTW3=ON"
|
||||||
"-DWITH_IMAGE_OPENJPEG=ON"
|
"-DWITH_GAMEENGINE=ON"
|
||||||
"-DWITH_INPUT_NDOF=ON"
|
"-DWITH_IMAGE_OPENJPEG=ON"
|
||||||
"-DWITH_INSTALL_PORTABLE=OFF"
|
"-DWITH_INPUT_NDOF=ON"
|
||||||
"-DWITH_JACK=ON"
|
"-DWITH_INSTALL_PORTABLE=OFF"
|
||||||
"-DWITH_MOD_OCEANSIM=ON"
|
"-DWITH_JACK=ON"
|
||||||
"-DWITH_PLAYER=ON"
|
"-DWITH_MOD_OCEANSIM=ON"
|
||||||
"-DWITH_PYTHON_INSTALL=OFF"
|
"-DWITH_PLAYER=ON"
|
||||||
"-DWITH_SYSTEM_OPENJPEG=ON")
|
"-DWITH_PYTHON_INSTALL=OFF"
|
||||||
#:phases
|
"-DWITH_PYTHON_INSTALL=OFF"
|
||||||
(modify-phases %standard-phases
|
"-DWITH_SYSTEM_OPENJPEG=ON"
|
||||||
(add-after 'unpack 'fix-broken-import
|
(string-append "-DPYTHON_LIBRARY=python" ,python-version "m")
|
||||||
(lambda _
|
(string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python")
|
||||||
(substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
|
"/lib")
|
||||||
(("import encode_bin") "from . import encode_bin"))
|
(string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python")
|
||||||
#t))
|
"/include/python" ,python-version "m")
|
||||||
(add-after 'set-paths 'add-ilmbase-include-path
|
(string-append "-DPYTHON_VERSION=" ,python-version))
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
#:phases
|
||||||
;; OpenEXR propagates ilmbase, but its include files do not appear
|
(modify-phases %standard-phases
|
||||||
;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
|
(add-after 'unpack 'fix-broken-import
|
||||||
;; the CPATH to satisfy the dependency on "half.h".
|
(lambda _
|
||||||
(setenv "CPATH"
|
(substitute* "release/scripts/addons/io_scene_fbx/json2fbx.py"
|
||||||
(string-append (assoc-ref inputs "ilmbase")
|
(("import encode_bin") "from . import encode_bin"))
|
||||||
"/include/OpenEXR"
|
#t))
|
||||||
":" (or (getenv "CPATH") "")))
|
(add-after 'set-paths 'add-ilmbase-include-path
|
||||||
#t)))))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
;; OpenEXR propagates ilmbase, but its include files do not appear
|
||||||
|
;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
|
||||||
|
;; the CPATH to satisfy the dependency on "half.h".
|
||||||
|
(setenv "CPATH"
|
||||||
|
(string-append (assoc-ref inputs "ilmbase")
|
||||||
|
"/include/OpenEXR"
|
||||||
|
":" (or (getenv "CPATH") "")))
|
||||||
|
#t))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("boost" ,boost)
|
`(("boost" ,boost)
|
||||||
("jemalloc" ,jemalloc)
|
("jemalloc" ,jemalloc)
|
||||||
|
@ -140,7 +149,7 @@ (define-public blender
|
||||||
("freetype" ,freetype)
|
("freetype" ,freetype)
|
||||||
("glew" ,glew)
|
("glew" ,glew)
|
||||||
("openal" ,openal)
|
("openal" ,openal)
|
||||||
("python" ,python-wrapper)
|
("python" ,python)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
(home-page "https://blender.org/")
|
(home-page "https://blender.org/")
|
||||||
(synopsis "3D graphics creation suite")
|
(synopsis "3D graphics creation suite")
|
||||||
|
|
Loading…
Reference in a new issue