diff mbox series

[bug#56806,5/9] gnu: Add mikktspace.

Message ID -SOYDPbYrBg0NM1yceWAD9ce-EZEBGIZPvbH8NlKBtyfPWxXrOR2t9AO65XwSEGnjBfMLMkOt6yX-X0iQOcQY9E__nBU-Ajzc4Lwi4aqw0E=@protonmail.com
State Accepted
Headers show
Series Add the Haxe language and tools. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

John Kehayias July 28, 2022, 4:10 a.m. UTC
Empty Message
diff mbox series

Patch

From 441a3faaa94688ff01313644d7ee0bd83cf067e9 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Wed, 27 Jul 2022 23:32:42 -0400
Subject: [PATCH 5/9] gnu: Add mikktspace.

* gnu/packages/graphics.scm (mikktspace): New variable.
---
 gnu/packages/graphics.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index c193be1efb..1acec5ea76 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -584,6 +584,45 @@  (define-public assimp
 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")
-- 
2.37.1