guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: raylib: Fix audio and use system glfw.


From: guix-commits
Subject: 02/02: gnu: raylib: Fix audio and use system glfw.
Date: Sat, 13 May 2023 05:36:23 -0400 (EDT)

iyzsong pushed a commit to branch master
in repository guix.

commit 1fa30c597b220bc14681ac1463371377af85a323
Author: 宋文武 <iyzsong@member.fsf.org>
AuthorDate: Sun May 7 19:50:49 2023 +0800

    gnu: raylib: Fix audio and use system glfw.
    
    * gnu/packages/game-development.scm (raylib)[inputs]: Use glfw and 
pluseaudio.
    [arguments]: Set flags for glfw and pulseaudio.
---
 gnu/packages/game-development.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/game-development.scm 
b/gnu/packages/game-development.scm
index 560765fd64..0d519fb7ed 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2868,14 +2868,22 @@ progresses the level, or you may regenerate tiles as 
the world changes.")
     (arguments
      (list #:tests? #f  ;no test
            #:configure-flags
-           #~(list "-DBUILD_SHARED_LIBS=ON" )))
-    (inputs (list alsa-lib
-                  libx11
-                  libxrandr
-                  libxi
-                  libxinerama
-                  libxcursor
-                  mesa))
+           #~(list "-DBUILD_SHARED_LIBS=ON"
+                   "-DUSE_EXTERNAL_GLFW=ON"
+                   "-DCMAKE_C_FLAGS=-lpulse")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'configure-miniaudio
+                 ;; Use PulseAudio as raudio backend.
+                 (lambda _
+                   (substitute* "src/raudio.c"
+                     (("^#include \"external/miniaudio\\.h\"") "
+#define MA_NO_RUNTIME_LINKING
+#define MA_ENABLE_ONLY_SPECIFIC_BACKENDS
+#define MA_ENABLE_PULSEAUDIO
+#include \"external/miniaudio.h\"
+")))))))
+    (inputs (list glfw pulseaudio))
     (native-inputs (list pkg-config))
     (synopsis "C library for videogame programming")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]