[PATCH 0/2]: gnu: Add cl-raylib.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 2 years ago
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230306234034.29330-1-sharlatanus@gmail.com
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.

Toggle quote (4 lines)
> ./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
Sharlatan Hellseher wrote 2 years ago
[PATCH 1/2] gnu: raylib: Build shared libraries.
(address . 62017@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230306234224.29498-1-sharlatanus@gmail.com
* 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(-)

Toggle diff (23 lines)
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
Sharlatan Hellseher wrote 2 years ago
[PATCH 2/2] gnu: Add cl-raylib.
(address . 62017@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230306234224.29498-2-sharlatanus@gmail.com
* 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(+)

Toggle diff (56 lines)
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
Guillaume Le Vaillant wrote 2 years ago
Re: [bug#62017] [PATCH 0/2]: gnu: Add cl-raylib.
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 62017-done@debbugs.gnu.org)
87y1o8etcn.fsf@kitej
Patches pushed as e08ae5900a16ac29e6adc369f513f574137eb86e and
following.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZAcU6A8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j8enwEAn+1+sqduVnFaJNrBA9Lr33RqkwHSixuiCssv
Kjgcbh0A/Ap00LJBCpYDyPYyVGLQbJaZ+QFqC5GO2P8CAA306p1E
=fxsn
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62017@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62017
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help