guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/07: gnu: Add mikktspace.


From: guix-commits
Subject: 05/07: gnu: Add mikktspace.
Date: Wed, 3 Aug 2022 02:23:48 -0400 (EDT)

iyzsong pushed a commit to branch master
in repository guix.

commit bf74f708d35b704ad2ead82890fb3dde50849d56
Author: John Kehayias <john.kehayias@protonmail.com>
AuthorDate: Wed Jul 27 23:32:42 2022 -0400

    gnu: Add mikktspace.
    
    * gnu/packages/graphics.scm (mikktspace): New variable.
    
    Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
---
 gnu/packages/graphics.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 38e6533a43..fc90c72bed 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -584,6 +584,45 @@ vertices, sorting by primitive type, merging of redundant 
materials and many
 more.")
     (license license:bsd-3)))
 
+(define-public mikktspace
+  ;; The latest commit is used as there is no release.
+  (let ((commit   "3e895b49d05ea07e4c2133156cfa94369e19e409")
+        (revision "0"))
+    (package
+      (name "mikktspace")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/mmikk/MikkTSpace";)
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1rjh9zflx51hdhnfadal87v4hhkrbprkv692hjkg9wkxx0ch39zi"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f
+             #:phases
+             #~(modify-phases %standard-phases
+                 (delete 'configure)
+                 (replace 'build
+                   (lambda* (#:key make-flags parallel-build? 
#:allow-other-keys)
+                     (invoke #$(cc-for-target) "mikktspace.c" "-O2" "-g" 
"-fPIC"
+                             "-shared" "-o" "libmikktspace.so")))
+                 (replace 'install
+                   (lambda _
+                     (install-file "mikktspace.h"
+                                   (string-append #$output "/include"))
+                     (install-file "libmikktspace.so"
+                                   (string-append #$output "/lib")))))))
+      (home-page "http://www.mikktspace.com/";)
+      (synopsis "Library for a common standard for tangent spaces")
+      (description
+       "This package provides a common standard tangent space library used in
+baking tools to produce normal maps.")
+      (license license:zlib))))
+
 (define-public openshadinglanguage
   (package
     (name "openshadinglanguage")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]