>From 959496bd6461474a30ce0e28ee0f6765a7523671 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Sun, 11 Aug 2019 21:25:14 +1000 Subject: [PATCH] gnu: Add opensubdiv. * gnu/packages/graphics.scm (opensubdiv): New variable. --- gnu/packages/graphics.scm | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index bc3a418e99..11ea550039 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2018 Alex Kost ;;; Copyright © 2018 Kei Kebreau ;;; Copyright © 2019 Mark H Weaver +;;; Copyright © 2019 Carlo Zancanaro ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,48 @@ #:use-module (guix packages) #:use-module (guix utils)) +(define-public opensubdiv + (package + (name "opensubdiv") + (version "3.4.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_4_0.tar.gz")) + (sha256 + (base32 + "1r3ki5lql9i71c775n6d8gxix4svg9f17ck0i58wfw9kz29b4cnr")))) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'set-glew-location + (lambda* (#:key inputs #:allow-other-keys) + (setenv "GLEW_LOCATION" (assoc-ref inputs "glew")) + #t)) + (add-before 'check 'start-xorg-server + (lambda* (#:key inputs #:allow-other-keys) + ;; The test suite requires a running X server. + (system (string-append (assoc-ref inputs "xorg-server") + "/bin/Xvfb :1 &")) + (setenv "DISPLAY" ":1") + #t))))) + (native-inputs + `(("xorg-server" ,xorg-server))) + (inputs + `(("glew" ,glew) + ("libxrandr" ,libxrandr) + ("libxcursor" ,libxcursor) + ("libxinerama" ,libxinerama) + ("libxi" ,libxi) + ("zlib" ,zlib) + ("glfw" ,glfw))) + (home-page "http://graphics.pixar.com/opensubdiv/") + (synopsis "High performance subdivision surface evaluation") + (description + "OpenSubdiv is a set of libraries that implement high performance +subdivision surface (subdiv) evaluation on massively parallel CPU and GPU +architectures.") + (license license:asl2.0))) + (define-public blender (package (name "blender") -- 2.22.0