GNU bug report logs -
#42376
[PATCH] Add raylib.
Previous Next
Reported by: trymonv <at> cock.li
Date: Wed, 15 Jul 2020 18:56:01 UTC
Severity: normal
Tags: patch
Done: Jelle Licht <jlicht <at> fsfe.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42376 in the body.
You can then email your comments to 42376 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#42376
; Package
guix-patches
.
(Wed, 15 Jul 2020 18:56:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
trymonv <at> cock.li
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 15 Jul 2020 18:56:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
gnu/packages/game-development.scm | 34 +++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/game-development.scm
b/gnu/packages/game-development.scm
index e45980e7a0..cba9b5bd45 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2489,3 +2489,37 @@ fully dynamic omnidirectional shadows, global
illumination, HDR lighting,
deferred shading, morphological / temporal / multisample anti-aliasing,
and
much more.")
(license license:zlib))))
+
+(define-public raylib
+ (package
+ (name "raylib")
+ (version "3.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/raysan5/raylib/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+
"1chj7sril4l2dxh7flp5ndddydbbf1fhnqlydaysm4m6waxidxmr"))))
+ (build-system cmake-build-system)
+ (arguments '(#:configure-flags `("-DSHARED=OFF" "-DSTATIC=ON")
+ #:tests? #f))
+ (inputs `())
+ (native-inputs `(("alsa-lib", alsa-lib)
+ ("glu", glu)
+ ("libx11", libx11)
+ ("libxrandr", libxrandr)
+ ("libxi", libxi)
+ ("libxinerama", libxinerama)
+ ("libxcursor", libxcursor)
+ ("mesa", mesa)
+ ("pkg-config", pkg-config)))
+ (synopsis "C library for videogame programming")
+ (description "raylib is a library which defines many data
structures and
+methods useful for programming small video games or video game
prototypes in
+plain C. It tries to provide simple bindings for OpenGL in an attempt
to
+conceal technical complexities behind an easy-to-use interface.")
+ (home-page "https://www.raylib.com/")
+ (license license:zlib)))
--
2.27.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#42376
; Package
guix-patches
.
(Sat, 18 Jul 2020 12:03:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Jul 15, 2020 at 04:25:21PM +0200, trymonv <at> cock.li wrote:
> gnu/packages/game-development.scm | 34 +++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
Thanks for the patch! Note that this blob got included as the commit
message, which isn't really desirable. Instead of `git diff', I'd
recommend `git commit', followed by `git format-patch' and/or `git
send-email' (the latter is available as git:send-email - the send-email
output of the git package).
> diff --git a/gnu/packages/game-development.scm
> b/gnu/packages/game-development.scm
> index e45980e7a0..cba9b5bd45 100644
> --- a/gnu/packages/game-development.scm
> +++ b/gnu/packages/game-development.scm
Could you add a Copyright line for yourself?
> +(define-public raylib
> + (package
> + (name "raylib")
> + (version "3.0.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/raysan5/raylib/")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1chj7sril4l2dxh7flp5ndddydbbf1fhnqlydaysm4m6waxidxmr"))))
> + (build-system cmake-build-system)
> + (arguments '(#:configure-flags `("-DSHARED=OFF" "-DSTATIC=ON")
> + #:tests? #f))
If you have to disable tests, put a small explanation in a comment.
However, in this case I managed to get the test suite to pass like this:
(arguments
`(#:configure-flags `("-DSHARED=OFF" "-DSTATIC=ON")
#:phases
(modify-phases %standard-phases
;; check needs to run after install
(delete 'check)
(add-after 'install 'check (assoc-ref %standard-phases 'check))
(add-before 'check 'set-CC
(lambda _
(setenv "CC" ,(cc-for-target))
#t)))))
> + (inputs `())
> + (native-inputs `(("alsa-lib", alsa-lib)
> + ("glu", glu)
> + ("libx11", libx11)
> + ("libxrandr", libxrandr)
> + ("libxi", libxi)
> + ("libxinerama", libxinerama)
> + ("libxcursor", libxcursor)
> + ("mesa", mesa)
> + ("pkg-config", pkg-config)))
I don't think these should be native-inputs. native-inputs are for
things that are ran during compilation, like the compiler itself or
pkg-config. The rest is clearly going to run at runtime, so they should
go in inputs. This distinction is necessary for cross-compilation. If
all your dependencies supported it, you could test it with
guix build --target=aarch64-linux-gnu
but unfortunately mesa's buildsystem refuses to cross-compile. It's
still a good idea to put the inputs in their proper categories, though.
One good heuristic is to run 'guix size raylib' and see which packages
are referenced. Speaking of which - alsa-lib doesn't show up in 'guix
size', and removing it from the inputs doesn't trigger any errors. Are
you sure it's being used? Maybe you're missing some configuration flag?
Also, the source for raylib includes its own copies of many libraries
which are already packaged separately in Guix, such as glfw or stb.
Could you configure raylib to use Guix-provided versions of these
libraries? A good way to make sure it works is to remove the bundled
sources. The preferred way of doing so is a 'snippet', you can find an
example in the rust-curl-sys-0.4 package in gnu/packages/crates-io.scm.
Regards,
Jakub Kądziołka
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#42376
; Package
guix-patches
.
(Thu, 24 Sep 2020 15:46:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 42376 <at> debbugs.gnu.org (full text, mbox):
Ping! :-)
Jakub Kądziołka <kuba <at> kadziolka.net> skribis:
> On Wed, Jul 15, 2020 at 04:25:21PM +0200, trymonv <at> cock.li wrote:
>> gnu/packages/game-development.scm | 34 +++++++++++++++++++++++++++++++
>> 1 file changed, 34 insertions(+)
>
> Thanks for the patch! Note that this blob got included as the commit
> message, which isn't really desirable. Instead of `git diff', I'd
> recommend `git commit', followed by `git format-patch' and/or `git
> send-email' (the latter is available as git:send-email - the send-email
> output of the git package).
>
>> diff --git a/gnu/packages/game-development.scm
>> b/gnu/packages/game-development.scm
>> index e45980e7a0..cba9b5bd45 100644
>> --- a/gnu/packages/game-development.scm
>> +++ b/gnu/packages/game-development.scm
>
> Could you add a Copyright line for yourself?
>
>> +(define-public raylib
>> + (package
>> + (name "raylib")
>> + (version "3.0.0")
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/raysan5/raylib/")
>> + (commit version)))
>> + (file-name (git-file-name name version))
>> + (sha256
>> + (base32
>> + "1chj7sril4l2dxh7flp5ndddydbbf1fhnqlydaysm4m6waxidxmr"))))
>> + (build-system cmake-build-system)
>> + (arguments '(#:configure-flags `("-DSHARED=OFF" "-DSTATIC=ON")
>> + #:tests? #f))
>
> If you have to disable tests, put a small explanation in a comment.
> However, in this case I managed to get the test suite to pass like this:
>
> (arguments
> `(#:configure-flags `("-DSHARED=OFF" "-DSTATIC=ON")
> #:phases
> (modify-phases %standard-phases
> ;; check needs to run after install
> (delete 'check)
> (add-after 'install 'check (assoc-ref %standard-phases 'check))
> (add-before 'check 'set-CC
> (lambda _
> (setenv "CC" ,(cc-for-target))
> #t)))))
>
>> + (inputs `())
>> + (native-inputs `(("alsa-lib", alsa-lib)
>> + ("glu", glu)
>> + ("libx11", libx11)
>> + ("libxrandr", libxrandr)
>> + ("libxi", libxi)
>> + ("libxinerama", libxinerama)
>> + ("libxcursor", libxcursor)
>> + ("mesa", mesa)
>> + ("pkg-config", pkg-config)))
>
> I don't think these should be native-inputs. native-inputs are for
> things that are ran during compilation, like the compiler itself or
> pkg-config. The rest is clearly going to run at runtime, so they should
> go in inputs. This distinction is necessary for cross-compilation. If
> all your dependencies supported it, you could test it with
>
> guix build --target=aarch64-linux-gnu
>
> but unfortunately mesa's buildsystem refuses to cross-compile. It's
> still a good idea to put the inputs in their proper categories, though.
>
> One good heuristic is to run 'guix size raylib' and see which packages
> are referenced. Speaking of which - alsa-lib doesn't show up in 'guix
> size', and removing it from the inputs doesn't trigger any errors. Are
> you sure it's being used? Maybe you're missing some configuration flag?
>
> Also, the source for raylib includes its own copies of many libraries
> which are already packaged separately in Guix, such as glfw or stb.
> Could you configure raylib to use Guix-provided versions of these
> libraries? A good way to make sure it works is to remove the bundled
> sources. The preferred way of doing so is a 'snippet', you can find an
> example in the rust-curl-sys-0.4 package in gnu/packages/crates-io.scm.
>
> Regards,
> Jakub Kądziołka
Reply sent
to
Jelle Licht <jlicht <at> fsfe.org>
:
You have taken responsibility.
(Sun, 28 May 2023 21:55:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
trymonv <at> cock.li
:
bug acknowledged by developer.
(Sun, 28 May 2023 21:55:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 42376-done <at> debbugs.gnu.org (full text, mbox):
Current master has raylib <at> 4.5.0 packages, so closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 26 Jun 2023 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.