guix-commits
[Top][All Lists]
Advanced

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

03/04: gnu: Add opencsg.


From: guix-commits
Subject: 03/04: gnu: Add opencsg.
Date: Tue, 10 Sep 2019 18:10:00 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit c3c0eda646f749d8603fbdacb281fd14112b1139
Author: Steve Sprang <address@hidden>
Date:   Fri Aug 23 15:38:42 2019 -0700

    gnu: Add opencsg.
    
    * gnu/packages/graphics.scm (opencsg): New variable.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/graphics.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b06a369..988b519 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2018 Kei Kebreau <address@hidden>
 ;;; Copyright © 2019 Mark H Weaver <address@hidden>
 ;;; Copyright © 2019 Carlo Zancanaro <address@hidden>
+;;; Copyright © 2019 Steve Sprang <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1018,3 +1019,43 @@ requirements.")
 performance subdivision surface (subdiv) evaluation on massively parallel CPU
 and GPU architectures.")
     (license license:asl2.0)))
+
+(define-public opencsg
+  (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c))))
+    (package
+      (name "opencsg")
+      (version "1.4.2")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/floriankirsch/OpenCSG.git";)
+               (commit (string-append "opencsg-"
+                                      (string-map dot-to-dash version)
+                                      "-release"))))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "00m4vs6jn3scqczscc4591l1d6zg6anqp9v1ldf9ymf70rdyvm7m"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "src/Makefile"
+                 (("/usr/local") (assoc-ref outputs "out")))
+               #t))
+           (add-before 'build 'skip-example
+             (lambda _ (chdir "src") #t)))))
+      (inputs
+       `(("glew" ,glew)
+         ("freeglut" ,freeglut)))
+      (synopsis "Library for rendering Constructive Solid Geometry (CSG)")
+      (description
+       "OpenCSG is a library for rendering Constructive Solid Geometry (CSG) 
using
+OpenGL.  CSG is an approach for modeling complex 3D-shapes using simpler ones.
+For example, two shapes can be combined by uniting them, by intersecting them,
+or by subtracting one shape from the other.")
+      (home-page "http://www.opencsg.org/";)
+      (license license:gpl2))))



reply via email to

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