GNU bug report logs - #50054
[PATCH] gnu: Add bgfx

Previous Next

Package: guix-patches;

Reported by: Andy Tai <lichengtai <at> gmail.com>

Date: Sat, 14 Aug 2021 08:37:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Andy Tai <atai <at> atai.org>
To: 50054 <at> debbugs.gnu.org, ludo <at> gnu.org
Cc: Andy Tai <atai <at> atai.org>
Subject: [bug#50054] [PATCH v3 2/3] gnu: Add bimg.
Date: Fri, 17 May 2024 23:22:56 -0700
* gnu/packages/graphics.scm (bimg): New variable.

Change-Id: I431bed18c6a63d8b6c073177c01816fd32e005f4
---
 gnu/packages/graphics.scm | 66 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 5522fffcc8..678e916b7c 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -3023,6 +3023,72 @@ (define-public bx
 @end itemize")
       (license license:bsd-2))))
 
+(define-public bimg
+  (let ((commit "e9fa0ceff2df3399011af136c82652c81655c1d3")
+        (revision "1"))
+    (package
+      (name "bimg")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/bkaradzic/bimg")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (modules '((guix build utils)))
+         (sha256
+          (base32 "0i80r5hwbnh94wfmv4dys6kmy7szvmpqynbb7bvvvhfjn13jh754"))))
+      (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 "NINJA="
+                                                            #$(this-package-native-input
+                                                               "ninja")
+                                                            "/bin/ninja")
+                                             (string-append "GENIE="
+                                                            #$(this-package-native-input
+                                                               "genie")
+                                                            "/bin/genie")))
+                                   (list "linux-release64" "tools"))))
+
+                     (replace 'install
+                       (lambda _
+                         (install-file
+                          ".build/linux64_gcc/obj/x64/Release/texturec/tools/texturec"
+                          (string-append #$output "/bin"))
+                         (for-each (lambda (f)
+                                     (install-file f
+                                                   (string-append #$output
+                                                                  "/lib")))
+                                   (find-files ".build/linux64_gcc" "\\.a$"))
+                         (copy-recursively "include/bimg"
+                                           (string-append #$output
+                                                          "/include/bimg")))))))
+      (native-inputs (list genie ninja))
+      (inputs `(("bx-sources" ,(package-source bx))))
+      (home-page "https://github.com/bkaradzic/bimg")
+      (synopsis "Image library")
+      (description
+       "Bimg is an imaging library that implements low level functions of the
+Bgfx graphics library.")
+      (license license:bsd-2))))
+
 (define-public gpaint
   (package
     (name "gpaint")
-- 
2.34.1





This bug report was last modified 1 year and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.