summary refs log tree commit diff
path: root/gnu/packages/emulators.scm
diff options
context:
space:
mode:
authorRutger Helling <rhelling@mykolab.com>2018-02-23 10:13:40 +0100
committerRutger Helling <rhelling@mykolab.com>2018-02-23 10:17:48 +0100
commit6bebad77214860abf787b38a6489f6781a86062c (patch)
treec58d7e2eff6ea8b7e9442631e2d6356fe130e472 /gnu/packages/emulators.scm
parent6ac6055aa27ae0c628696539ca695c515f05e97f (diff)
downloadguix-6bebad77214860abf787b38a6489f6781a86062c.tar.gz
gnu: dolphin-emu: Enable Vulkan video backend.
* gnu/packages/emulators.scm (dolphin-emu): Enable Vulkan video backend.
[inputs]: Add vulkan-icd-loader.
[arguments]: Rename 'generate-fonts to
'generate-fonts&hardcore-libvulkan-path. Hardcode libvulkan.so.
Diffstat (limited to 'gnu/packages/emulators.scm')
-rw-r--r--gnu/packages/emulators.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index d55e68d74e..142603b082 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -143,11 +143,14 @@
 
          #:phases
          (modify-phases %standard-phases
-           (add-before 'configure 'generate-fonts
+           (add-before 'configure 'generate-fonts&hardcore-libvulkan-path
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (let ((fontfile
                       (string-append (assoc-ref inputs "font-wqy-microhei")
-                                     "/share/fonts/truetype/wqy-microhei.ttc")))
+                                     "/share/fonts/truetype/wqy-microhei.ttc"))
+                     (libvulkan
+                      (string-append (assoc-ref inputs "vulkan-icd-loader")
+                                     "/lib/libvulkan.so")))
                  (chdir "docs")
                  (invoke "bash" "-c" "g++ -O2 -std=c++11 $(freetype-config \
 --cflags --libs) gc-font-tool.cpp -o gc-font-tool")
@@ -156,6 +159,8 @@
                  (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin")
                  (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin")
                  (chdir "..")
+                 (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp"
+                              (("libvulkan.so") libvulkan))
                  #t))))
 
          #:configure-flags
@@ -172,7 +177,6 @@
                               (assoc-ref %build-inputs "libx11")
                               "/lib/libX11.so")
                "-DX11_FOUND=1")))
-      ; TODO: Make Vulkan backend work.
       (native-inputs
        `(("pkg-config" ,pkg-config)
          ("gettext" ,gnu-gettext)))
@@ -207,6 +211,7 @@
          ("sfml" ,sfml)
          ("soil" ,soil)
          ("soundtouch" ,soundtouch)
+         ("vulkan-icd-loader" ,vulkan-icd-loader)
          ("wxwidgets" ,wxwidgets-gtk2-3.1)
          ("zlib" ,zlib)))
       (home-page "https://dolphin-emu.org/")