diff options
author | Rutger Helling <rhelling@mykolab.com> | 2018-01-31 09:34:47 +0100 |
---|---|---|
committer | Rutger Helling <rhelling@mykolab.com> | 2018-01-31 09:42:05 +0100 |
commit | 39b4744a07069882f38a86240d22eacb6f19a895 (patch) | |
tree | 270517afdc766db6445fdd05ae75d5240ca5d723 /gnu | |
parent | 8b9dbdf36fa89b7eb02876900d6979908336375c (diff) | |
download | guix-39b4744a07069882f38a86240d22eacb6f19a895.tar.gz |
gnu: wine-staging: Enable Vulkan support.
* gnu/packages/wine.scm (wine-staging)[inputs]: Add vulkan-icd-loader. [arguments]: Don't inherit phases. Add 'hardcode-libvulkan-path phase.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/wine.scm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 754389979a..51e0600234 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -54,6 +54,7 @@ #:use-module (gnu packages scanner) #:use-module (gnu packages tls) #:use-module (gnu packages video) + #:use-module (gnu packages vulkan) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (ice-9 match)) @@ -227,7 +228,32 @@ integrate Windows applications into your desktop.") "1pjaxj7h3q6y356np908fvsx0bf7yx5crqvgl4hza6gfssdmsr5r")))) (inputs `(("gtk+", gtk+) ("libva", libva) + ("vulkan-icd-loader" ,vulkan-icd-loader) ,@(package-inputs wine))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'hardcode-libvulkan-path + (lambda* (#:key outputs #:allow-other-keys) + (let* ((libvulkan (string-append (assoc-ref %build-inputs + "vulkan-icd-loader") "/lib/libvulkan.so"))) + ;; Hard-code the path to libvulkan.so. + (substitute* "dlls/vulkan/vulkan_thunks.c" (("libvulkan.so") + libvulkan)) + #t))) + (add-after 'configure 'patch-dlopen-paths + ;; Hardcode dlopened sonames to absolute paths. + (lambda _ + (let* ((library-path (search-path-as-string->list + (getenv "LIBRARY_PATH"))) + (find-so (lambda (soname) + (search-path library-path soname)))) + (substitute* "include/config.h" + (("(#define SONAME_.* )\"(.*)\"" _ defso soname) + (format #f "~a\"~a\"" defso (find-so soname)))) + #t)))) + ,@(strip-keyword-arguments '(#:phases) + (package-arguments wine)))) (synopsis "Implementation of the Windows API (staging branch, 32-bit only)") (description "Wine-Staging is the testing area of Wine. It contains bug fixes and features, which have not been integrated into |