gnu: shaderc: Update to 2020.0.
* gnu/packages/vulkan.scm (shaderc): Update to 2020.0. [build-system]: Change to CMAKE-BUILD-SYSTEM. [arguments]: Move custom configure invokation to #:configure-flags. Add phase to prevent using bundled code. [inputs]: Add GLSLANG, SPIRV-HEADERS, and SPIRV-TOOLS. [native-inputs]: Remove CMAKE-MINIMAL, GLSLANG:SOURCE, SPIRV-HEADERS:SOURCE, and SPIRV-TOOLS:SOURCE.
This commit is contained in:
		
							parent
							
								
									f26bceb470
								
							
						
					
					
						commit
						4c5e45eb6b
					
				
					 1 changed files with 26 additions and 45 deletions
				
			
		|  | @ -253,7 +253,7 @@ API.") | ||||||
| (define-public shaderc | (define-public shaderc | ||||||
|   (package |   (package | ||||||
|     (name "shaderc") |     (name "shaderc") | ||||||
|     (version "2019.0") |     (version "2020.0") | ||||||
|     (source |     (source | ||||||
|      (origin |      (origin | ||||||
|        (method git-fetch) |        (method git-fetch) | ||||||
|  | @ -263,56 +263,37 @@ API.") | ||||||
|        (file-name (git-file-name name version)) |        (file-name (git-file-name name version)) | ||||||
|        (sha256 |        (sha256 | ||||||
|         (base32 |         (base32 | ||||||
|          "1l5mmyxhzsbp0a6y2d86i8jmf46c6bjgjkdgkr5l8hmhflmm7gi2")))) |          "1kqqvsvib01bsmfbdy3fbwwpvkcdlfb6k71kjvzb3crql7w0rxff")))) | ||||||
|     (build-system meson-build-system) |     (build-system cmake-build-system) | ||||||
|     (arguments |     (arguments | ||||||
|      `(#:tests? #f ; FIXME: Tests fail. |      `(#:tests? #f ; FIXME: Tests fail. | ||||||
|  |        #:configure-flags '("-DSHADERC_SKIP_TESTS=ON") | ||||||
|        #:phases |        #:phases | ||||||
|        (modify-phases %standard-phases |        (modify-phases %standard-phases | ||||||
|          (replace 'configure |          (add-after 'unpack 'do-not-look-for-bundled-sources | ||||||
|            (lambda* (#:key outputs #:allow-other-keys) |            (lambda _ | ||||||
|              (let ((out (assoc-ref outputs "out"))) |  | ||||||
|                ;; Remove various lines and touch build-version.inc or |  | ||||||
|                ;; configuring won't work. |  | ||||||
|                (invoke "touch" "glslc/src/build-version.inc") |  | ||||||
|                (substitute* "CMakeLists.txt" (("..PYTHON_EXE..*") "")) |  | ||||||
|              (substitute* "CMakeLists.txt" |              (substitute* "CMakeLists.txt" | ||||||
|                  ((".*update_build_version.py..*") "")) |                (("add_subdirectory\\(third_party\\)") | ||||||
|                (substitute* "CMakeLists.txt" |  | ||||||
|                  ((".*add_custom_target.build-version.*") "")) |  | ||||||
|                (substitute* "CMakeLists.txt" |  | ||||||
|                  ((".*spirv-tools_SOURCE_DIR.*glslang_SOURCE_DIR.*") |  | ||||||
|                 "")) |                 "")) | ||||||
|                (substitute* "CMakeLists.txt" | 
 | ||||||
|                  ((".*Update build-version.inc.*") "")) |              ;; Do not attempt to use git to encode version information. | ||||||
|                (substitute* "CMakeLists.txt" ((".*--check.*") "")) |              (substitute* "glslc/CMakeLists.txt" | ||||||
|                (substitute* "glslc/src/main.cc" ((".*build-version.inc.*") |                (("add_dependencies\\(glslc_exe build-version\\)") | ||||||
|                                                  "\"1\"")) |                 "")) | ||||||
|                (invoke "cmake" "-GNinja" "-DCMAKE_BUILD_TYPE=Release" |              (call-with-output-file "glslc/src/build-version.inc" | ||||||
|                        "-DSHADERC_SKIP_TESTS=ON" |                (lambda (port) | ||||||
|                        "-DCMAKE_INSTALL_LIBDIR=lib" |                  (format port "\"~a\"\n\"~a\"\n\"~a\"~%" | ||||||
|                        (string-append "-DCMAKE_INSTALL_PREFIX=" |                          ,version | ||||||
|                                       out))))) |                          ,(package-version spirv-tools) | ||||||
|          (add-after 'unpack 'unpack-sources |                          ,(package-version glslang)))) | ||||||
|            (lambda* (#:key inputs #:allow-other-keys) |              #t))))) | ||||||
|              (let ((spirv-tools-source (assoc-ref inputs "spirv-tools-source")) |  | ||||||
|                    (spirv-headers-source (assoc-ref inputs "spirv-headers-source")) |  | ||||||
|                    (glslang-source (assoc-ref inputs "glslang-source"))) |  | ||||||
|                (copy-recursively spirv-tools-source "third_party/spirv-tools") |  | ||||||
|                (copy-recursively spirv-headers-source |  | ||||||
|                                  (string-append "third_party/spirv-tools" |  | ||||||
|                                                 "/external/spirv-headers")) |  | ||||||
|                (copy-recursively glslang-source "third_party/glslang") |  | ||||||
|                #t)))))) |  | ||||||
|     (inputs |     (inputs | ||||||
|      `(("googletest" ,googletest) |      `(("glslang" ,glslang) | ||||||
|        ("python" ,python))) |        ("python" ,python) | ||||||
|  |        ("spirv-headers" ,spirv-headers) | ||||||
|  |        ("spirv-tools" ,spirv-tools))) | ||||||
|     (native-inputs |     (native-inputs | ||||||
|      `(("cmake" ,cmake-minimal) |      `(("pkg-config" ,pkg-config))) | ||||||
|        ("glslang-source" ,(package-source glslang)) |  | ||||||
|        ("pkg-config" ,pkg-config) |  | ||||||
|        ("spirv-headers-source" ,(package-source spirv-headers)) |  | ||||||
|        ("spirv-tools-source" ,(package-source spirv-tools)))) |  | ||||||
|     (home-page "https://github.com/google/shaderc") |     (home-page "https://github.com/google/shaderc") | ||||||
|     (synopsis "Tools for shader compilation") |     (synopsis "Tools for shader compilation") | ||||||
|     (description "Shaderc is a collection of tools, libraries, and tests for |     (description "Shaderc is a collection of tools, libraries, and tests for | ||||||
|  |  | ||||||
		Reference in a new issue