summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Tai <atai@atai.org>2024-04-22 22:51:49 -0700
committerGuix Patches Tester <>2024-04-23 10:04:17 +0200
commitb1356c3d031bc45a018de66b8af06075b1b6aa8c (patch)
treecb1fddf10a52882a1db6b792af87d0600faa0f35
parente63c4302d9755640ed75434ff5d8ef5c68674c96 (diff)
downloadguix-patches-b1356c3d031bc45a018de66b8af06075b1b6aa8c.tar
guix-patches-b1356c3d031bc45a018de66b8af06075b1b6aa8c.tar.gz
gnu: Add bimg.
* gnu/packages/graphics.scm (bimg): New variable. Change-Id: I431bed18c6a63d8b6c073177c01816fd32e005f4
-rw-r--r--gnu/packages/graphics.scm66
1 files changed, 66 insertions, 0 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b64774af58..88e01b46bf 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -2951,6 +2951,72 @@ options.")
Bgfx graphics library.")
(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")