From: Andy Tai <atai@atai.org>
To: 50054@debbugs.gnu.org
Cc: Andy Tai <atai@atai.org>
Subject: [bug#50054] [PATCH v2 3/3] gnu: Add bgfx.
Date: Mon, 22 Apr 2024 22:51:50 -0700 [thread overview]
Message-ID: <f9fdb204804babeb24873f783057f26a3951e0db.1713851192.git.atai@atai.org> (raw)
In-Reply-To: <cover.1713851192.git.atai@atai.org>
* gnu/packages/graphics.scm (bgfx): New variable.
Change-Id: I2737803c838229ed04fbfe30d0e67749444d871b
---
gnu/packages/graphics.scm | 85 +++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 88e01b46bf..dce66f63ec 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -3017,6 +3017,91 @@ (define-public bimg
Bgfx graphics library.")
(license license:bsd-2))))
+(define-public bgfx
+ (let ((commit "932302d8f460e514b933deba8c0e575a00f0bcd6")
+ (revision "1"))
+ (package
+ (name "bgfx")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bkaradzic/bgfx")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (sha256
+ (base32 "0by2is3qzbhg0m3wv7np28l6k9hm0lr5ybc2z7fc5c8x3afqcxzr"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ;there are no tests
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+
+ (replace 'build
+ (lambda _
+ (for-each (lambda (target)
+ (invoke "make"
+ "-j"
+ (number->string (parallel-job-count))
+ target
+
+ (string-append "BX_DIR="
+ #$(this-package-input
+ "bx-sources"))
+ (string-append "BIMG_DIR="
+ #$(this-package-input
+ "bimg-sources"))
+ (string-append "NINJA="
+ #$(this-package-native-input
+ "ninja")
+ "/bin/ninja")
+ (string-append "GENIE="
+ #$(this-package-native-input
+ "genie")
+ "/bin/genie")))
+ (list "linux-release64" "tools"))))
+ ;; (replace 'check
+ ;; (lambda _
+ ;; (invoke "make" "test")))
+ (replace 'install
+ (lambda _
+ (for-each (lambda (f)
+ (install-file f
+ (string-append #$output
+ "/bin")))
+ (find-files "./tools/bin/linux"))
+ (for-each (lambda (f)
+ (install-file f
+ (string-append #$output
+ "/lib")))
+ (find-files ".build/linux64_gcc" "\\.a$"))
+ (for-each (lambda (f)
+ (install-file f
+ (string-append #$output
+ "/lib")))
+ (find-files ".build/linux64_gcc" "\\.so$"))
+ (copy-recursively "include/bgfx"
+ (string-append #$output
+ "/include/bgfx"))))
+
+ )))
+ (native-inputs (list genie ninja))
+ (inputs `(("bx-sources" ,(package-source bx))
+ ("bimg-sources" ,(package-source bimg))
+ ("mesa" ,mesa)
+ ("mesa-headers" ,mesa-headers)
+ ("vulkan-headers" ,vulkan-headers)))
+ (home-page "https://bkaradzic.github.io/bgfx/overview.html")
+ (synopsis "Cross-platform rendering library")
+ (description
+ "bgfx is a cross-platform, graphics API agnostic,
+Bring Your Own Engine/Framework' style rendering library supporting Direct3D,
+OpenGL/OpenGL ES, Metal, Vulkan and WebGL.")
+ (license license:bsd-2))))
+
(define-public gpaint
(package
(name "gpaint")
--
2.34.1
prev parent reply other threads:[~2024-04-23 5:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 8:35 [bug#50054] [PATCH] gnu: Add bgfx Andy Tai
[not found] ` <handler.50054.B.162893018622105.ack@debbugs.gnu.org>
2021-08-14 8:51 ` [bug#50054] Acknowledgement ([PATCH] gnu: Add bgfx) Andy Tai
2021-08-14 9:43 ` [bug#50054] [PATCH] gnu: Add bgfx Leo Prikler
2021-08-14 18:07 ` Andy Tai
2021-08-14 18:24 ` Andy Tai
2021-08-14 18:48 ` Leo Prikler
2021-08-16 12:42 ` Andy Tai
2021-08-16 12:52 ` Leo Prikler
2021-08-29 3:16 ` Andy Tai
2021-08-29 3:25 ` Andy Tai
2021-08-29 4:29 ` Andy Tai
2021-08-29 11:41 ` Leo Prikler
2021-08-29 18:21 ` Andy Tai
2021-08-29 20:04 ` Leo Prikler
2021-08-29 23:59 ` Andy Tai
2021-08-27 17:49 ` [bug#50054] dependency Andy Tai
2021-08-27 18:31 ` Tobias Geerinckx-Rice via Guix-patches via
2024-04-23 5:51 ` [bug#50054] [PATCH v2 0/3] *** Add bgfx and dependencies *** Andy Tai
2024-04-23 5:51 ` [bug#50054] [PATCH v2 1/3] gnu: Add bx Andy Tai
2024-04-23 5:51 ` [bug#50054] [PATCH v2 2/3] gnu: Add bimg Andy Tai
2024-04-23 5:51 ` Andy Tai [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9fdb204804babeb24873f783057f26a3951e0db.1713851192.git.atai@atai.org \
--to=atai@atai.org \
--cc=50054@debbugs.gnu.org \
/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 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.