From: "Ludovic Courtès" <ludo@gnu.org>
To: "Jakub Kądziołka" <kuba@kadziolka.net>
Cc: 42376@debbugs.gnu.org, trymonv@cock.li
Subject: [bug#42376] [PATCH] Add raylib.
Date: Thu, 24 Sep 2020 17:45:15 +0200 [thread overview]
Message-ID: <87v9g35gc4.fsf@gnu.org> (raw)
In-Reply-To: <20200718120210.d23vaoormh6uev2s@gravity> ("Jakub Kądziołka"'s message of "Sat, 18 Jul 2020 14:02:10 +0200")
Ping! :-)
Jakub Kądziołka <kuba@kadziolka.net> skribis:
> On Wed, Jul 15, 2020 at 04:25:21PM +0200, trymonv@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
next prev parent reply other threads:[~2020-09-24 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 14:25 [bug#42376] [PATCH] Add raylib trymonv
2020-07-18 12:02 ` Jakub Kądziołka
2020-09-24 15:45 ` Ludovic Courtès [this message]
2023-05-28 21:54 ` bug#42376: " Jelle Licht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9g35gc4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=42376@debbugs.gnu.org \
--cc=kuba@kadziolka.net \
--cc=trymonv@cock.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).