[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
111/416: gnu: glslang: Install all libraries.
From: |
guix-commits |
Subject: |
111/416: gnu: glslang: Install all libraries. |
Date: |
Fri, 14 Apr 2023 15:25:32 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 031fab603b50055053d4b089845a7484e0202fc6
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Mon Dec 12 10:47:29 2022 +0100
gnu: glslang: Install all libraries.
* gnu/packages/patches/glslang-install-static-libs.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/vulkan.scm (glslang)[source](patches): New field.
---
gnu/local.mk | 1 +
.../patches/glslang-install-static-libs.patch | 61 ++++++++++++++++++++++
gnu/packages/vulkan.scm | 1 +
3 files changed, 63 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 61623c801d..9bd2b7e374 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1249,6 +1249,7 @@ dist_patch_DATA =
\
%D%/packages/patches/glibc-2.29-supported-locales.patch \
%D%/packages/patches/glibc-static-nss.patch \
%D%/packages/patches/glibc-supported-locales.patch \
+ %D%/packages/patches/glslang-install-static-libs.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
%D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnash-fix-giflib-version.patch \
diff --git a/gnu/packages/patches/glslang-install-static-libs.patch
b/gnu/packages/patches/glslang-install-static-libs.patch
new file mode 100644
index 0000000000..a155dde30e
--- /dev/null
+++ b/gnu/packages/patches/glslang-install-static-libs.patch
@@ -0,0 +1,61 @@
+Install OGLCompiler et.al. even when building shared libraries. Also fix
+CMake file locations.
+
+Patch taken from Gentoo:
+
+
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/glslang/files/glslang-1.3.231-Install-static-libs.patch
+
+diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
+--- a/OGLCompilersDLL/CMakeLists.txt
++++ b/OGLCompilersDLL/CMakeLists.txt
+@@ -41,7 +41,7 @@ if(WIN32)
+ source_group("Source" FILES ${SOURCES})
+ endif(WIN32)
+
+-if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
++if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS OGLCompiler EXPORT glslang-targets)
+
+ # Backward compatibility
+@@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
+ message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use
`find_package(glslang)` to find glslang CMake targets.\")
+
+ if (NOT TARGET glslang::OGLCompiler)
+-
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
++
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
+ endif()
+
+ add_library(OGLCompiler ALIAS glslang::OGLCompiler)
+diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
+--- a/glslang/CMakeLists.txt
++++ b/glslang/CMakeLists.txt
+@@ -203,7 +203,7 @@ endif()
+
################################################################################
+ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS glslang EXPORT glslang-targets)
+- if(NOT BUILD_SHARED_LIBS)
++ if(BUILD_SHARED_LIBS)
+ install(TARGETS MachineIndependent EXPORT glslang-targets)
+ install(TARGETS GenericCodeGen EXPORT glslang-targets)
+
+diff --git a/glslang/OSDependent/Unix/CMakeLists.txt
b/glslang/OSDependent/Unix/CMakeLists.txt
+--- a/glslang/OSDependent/Unix/CMakeLists.txt
++++ b/glslang/OSDependent/Unix/CMakeLists.txt
+@@ -52,7 +52,7 @@ else()
+ target_link_libraries(OSDependent Threads::Threads)
+ endif()
+
+-if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
++if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS OSDependent EXPORT glslang-targets)
+
+ # Backward compatibility
+@@ -60,7 +60,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
+ message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use
`find_package(glslang)` to find glslang CMake targets.\")
+
+ if (NOT TARGET glslang::OSDependent)
+-
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
++
include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
+ endif()
+
+ add_library(OSDependent ALIAS glslang::OSDependent)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 8d2c93c5dc..dffc6c2cdd 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -161,6 +161,7 @@ SPIR-V, aiming to emit GLSL or MSL that looks like
human-written code.")
(uri (git-reference
(url "https://github.com/KhronosGroup/glslang")
(commit version)))
+ (patches (search-patches "glslang-install-static-libs.patch"))
(sha256
(base32
"12a1zl8qxa28nbf6m67260c0lwdw3bqbj0jz1382wgm5px1fpqw6"))
- 179/416: gnu: rust-libm-0.2: Update to 0.2.6., (continued)
- 179/416: gnu: rust-libm-0.2: Update to 0.2.6., guix-commits, 2023/04/14
- 180/416: gnu: rust-new-debug-unreachable-1: Update to 1.0.4., guix-commits, 2023/04/14
- 181/416: gnu: rust-num-rational-0.2: Update to 0.2.4., guix-commits, 2023/04/14
- 184/416: gnu: rust-pin-project-0.4: Update to 0.4.30., guix-commits, 2023/04/14
- 182/416: gnu: rust-rand-pcg-0.3: Update to 0.3.1., guix-commits, 2023/04/14
- 188/416: gnu: Remove lash., guix-commits, 2023/04/14
- 198/416: gnu: rust-curl-sys-0.4: Update to 0.4.53+curl-7.82.0., guix-commits, 2023/04/14
- 87/416: gnu: rust-serde-derive: Skip build., guix-commits, 2023/04/14
- 97/416: gnu: Add rust-ciborium-io., guix-commits, 2023/04/14
- 98/416: gnu: Add rust-ciborium-ll., guix-commits, 2023/04/14
- 111/416: gnu: glslang: Install all libraries.,
guix-commits <=
- 118/416: gnu: vulkan-loader: Don't build (and install) googletest., guix-commits, 2023/04/14
- 119/416: gnu: rust-crossbeam-utils-0.8: Update to 0.8.14., guix-commits, 2023/04/14
- 113/416: gnu: sdl2: Update to 2.26.1., guix-commits, 2023/04/14
- 114/416: gnu: postgresql@14: Update to 14.6., guix-commits, 2023/04/14
- 120/416: gnu: rust-lock-api-0.4: Update to 0.4.9., guix-commits, 2023/04/14
- 122/416: gnu: rust-parking-lot-0.12: Fix build., guix-commits, 2023/04/14
- 128/416: gnu: rust-serde-derive-1: Update to 1.0.152., guix-commits, 2023/04/14
- 123/416: gnu: rust-parking-lot-core-0.9: Update to 0.9.6., guix-commits, 2023/04/14
- 132/416: gnu: rust-codespan-reporting-0.11: Update to 0.11.1., guix-commits, 2023/04/14
- 139/416: gnu: rust-serde-path-to-error-0.1: Update to 0.1.9., guix-commits, 2023/04/14