all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#62017] [PATCH 0/2]: gnu: Add cl-raylib.
@ 2023-03-06 23:40 Sharlatan Hellseher
  2023-03-06 23:42 ` [bug#62017] [PATCH 1/2] gnu: raylib: Build shared libraries Sharlatan Hellseher
  2023-03-07 10:40 ` bug#62017: [PATCH 0/2]: " Guillaume Le Vaillant
  0 siblings, 2 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2023-03-06 23:40 UTC (permalink / raw)
  To: 62017; +Cc: Sharlatan Hellseher

Hi Guix!

This patch serials enables shared library build for raylib game library and
provides CFFI bindings for Common Lisp library cl-raylib.

One think to mention - Raylib has a decent amount of bundled sources in
src/external some of them are availalbe in Guix, which can be unbundled.

> ./pre-inst-env guix build --rounds=2 sbcl-cl-raylib ecl-cl-raylib
> /gnu/store/80a82vn5db9law9qldyxwpsac1icajr4-ecl-cl-raylib-0.0.1-0.985ceeb
> /gnu/store/wpnc98flcmh3ynmdnqq0b4raas07nycd-sbcl-cl-raylib-0.0.1-0.985ceeb

Sharlatan Hellseher (2):
  gnu: raylib: Build shared libraries.
  gnu: Add cl-raylib.

 gnu/packages/game-development.scm |  5 +++-
 gnu/packages/lisp-xyz.scm         | 43 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)


base-commit: fd4545a47a527fff437abb9991156cfee4137d2b
-- 
2.39.1





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#62017] [PATCH 1/2] gnu: raylib: Build shared libraries.
  2023-03-06 23:40 [bug#62017] [PATCH 0/2]: gnu: Add cl-raylib Sharlatan Hellseher
@ 2023-03-06 23:42 ` Sharlatan Hellseher
  2023-03-06 23:42   ` [bug#62017] [PATCH 2/2] gnu: Add cl-raylib Sharlatan Hellseher
  2023-03-07 10:40 ` bug#62017: [PATCH 0/2]: " Guillaume Le Vaillant
  1 sibling, 1 reply; 4+ messages in thread
From: Sharlatan Hellseher @ 2023-03-06 23:42 UTC (permalink / raw)
  To: 62017; +Cc: Sharlatan Hellseher

* gnu/packages/game-development.scm (raylib):
  [arguments]{#:configure-flags}: Enable building shared libraries.
---
 gnu/packages/game-development.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index a0de1b339e..a384572a9d 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2847,12 +2847,15 @@ (define-public raylib
                     (url "https://github.com/raysan5/raylib/")
                     (commit version)))
               (file-name (git-file-name name version))
+              ;; TODO: Unbundle src/external
               (sha256
                (base32
                 "14v5iwxh8grywiyw9agpd2sfpyriq1rwwkd9f2s4iihh0z5j7hk8"))))
     (build-system cmake-build-system)
     (arguments
-     (list #:tests? #f)) ;no test
+     (list #:tests? #f  ;no test
+           #:configure-flags
+           #~(list "-DBUILD_SHARED_LIBS=ON" )))
     (inputs (list alsa-lib
                   libx11
                   libxrandr
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#62017] [PATCH 2/2] gnu: Add cl-raylib.
  2023-03-06 23:42 ` [bug#62017] [PATCH 1/2] gnu: raylib: Build shared libraries Sharlatan Hellseher
@ 2023-03-06 23:42   ` Sharlatan Hellseher
  0 siblings, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2023-03-06 23:42 UTC (permalink / raw)
  To: 62017; +Cc: Sharlatan Hellseher

* gnu/packages/lisp-xyz.scm (cl-raylib, ecl-cl-raylib, sbcl-cl-raylib):
  New variables.
---
 gnu/packages/lisp-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index a8792dee52..c3a1cd08d1 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -4289,6 +4289,49 @@ (define-public cl-sqlite
 (define-public ecl-cl-sqlite
   (sbcl-package->ecl-package sbcl-cl-sqlite))
 
+(define-public sbcl-cl-raylib
+  (let ((commit "985ceebef4cb56c651cddc23bd71812f2be38c2d")
+        (revision "0"))
+    (package
+      (name "sbcl-cl-raylib")
+      (version (git-version "0.0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/longlene/cl-raylib")
+               (commit commit)))
+         (file-name (git-file-name "cl-raylib" version))
+         (sha256
+          (base32 "1kighj35g6dn426mhr2ppz3gm49v1q4n42ydn619pclrqwyrnc2z"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:tests? #f ; no tests https://github.com/longlene/cl-raylib/issues/40
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "src/library.lisp"
+                 (("libraylib\\.so")
+                  (search-input-file inputs "/lib/libraylib.so"))))))))
+      (inputs
+       (list raylib
+             sbcl-cffi
+             sbcl-alexandria
+             sbcl-3d-vectors
+             sbcl-3d-matrices))
+      (home-page "https://github.com/longlene/cl-raylib")
+      (synopsis "Common Lisp bindings to raylib")
+      (description "This package provides a Common Lisp CFFI bindings to game
+development library Ralib.")
+      (license license:expat))))
+
+(define-public cl-raylib
+  (sbcl-package->cl-source-package sbcl-cl-raylib))
+
+(define-public ecl-cl-raylib
+  (sbcl-package->ecl-package sbcl-cl-raylib))
+
 (define-public sbcl-cl-redis
   (let ((commit "7d592417421cf7cd1cffa96043b457af0490df7d")
         (revision "0"))
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#62017: [PATCH 0/2]: gnu: Add cl-raylib.
  2023-03-06 23:40 [bug#62017] [PATCH 0/2]: gnu: Add cl-raylib Sharlatan Hellseher
  2023-03-06 23:42 ` [bug#62017] [PATCH 1/2] gnu: raylib: Build shared libraries Sharlatan Hellseher
@ 2023-03-07 10:40 ` Guillaume Le Vaillant
  1 sibling, 0 replies; 4+ messages in thread
From: Guillaume Le Vaillant @ 2023-03-07 10:40 UTC (permalink / raw)
  To: Sharlatan Hellseher; +Cc: 62017-done

[-- Attachment #1: Type: text/plain, Size: 82 bytes --]

Patches pushed as e08ae5900a16ac29e6adc369f513f574137eb86e and
following.
Thanks.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-07 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06 23:40 [bug#62017] [PATCH 0/2]: gnu: Add cl-raylib Sharlatan Hellseher
2023-03-06 23:42 ` [bug#62017] [PATCH 1/2] gnu: raylib: Build shared libraries Sharlatan Hellseher
2023-03-06 23:42   ` [bug#62017] [PATCH 2/2] gnu: Add cl-raylib Sharlatan Hellseher
2023-03-07 10:40 ` bug#62017: [PATCH 0/2]: " Guillaume Le Vaillant

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.