guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: Add mesa-demos.


From: Taylan Ulrich Bayırlı/Kammer
Subject: Re: [PATCH] gnu: Add mesa-demos.
Date: Tue, 17 Mar 2015 12:49:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

address@hidden (Taylan Ulrich "Bayırlı/Kammer") writes:

> Updated patches below.

Apologies; the latter patch was untested and (of course) contained silly
bugs.

>From 807816ec67414770cf5a6fa82c863096e14b276e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <address@hidden>
Date: Fri, 13 Mar 2015 15:58:25 +0100
Subject: [PATCH 4/5] gnu: Add mesa-utils.

* gnu/packages/gl.scm (mesa-utils): New variable.
(mesa-demos-source): New procedure.
---
 gnu/packages/gl.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 4866464..5e2f72a 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -260,6 +260,50 @@ emulation to complete hardware acceleration for modern 
GPUs.")
                                                  (assoc-ref outputs "out")
                                                  "/include")))))))))
 
+;;; The mesa-demos distribution contains non-free files, many files with no
+;;; clear license information, and many demos that aren't useful for most
+;;; people, so we just use this for the mesa-utils package below, and possibly
+;;; other packages in the future.  This is modeled after Debian's solution.
+(define (mesa-demos-source version)
+  (origin
+    (method url-fetch)
+    (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/demos/"; version
+                        "/mesa-demos-" version ".tar.bz2"))
+    (sha256 (base32 "14msj0prbl3ljwd24yaqv9pz1xzicdmqgg616xxlppbdh6syrgz4"))))
+
+(define-public mesa-utils
+  (package
+    (name "mesa-utils")
+    (version "8.2.0")
+    (source (mesa-demos-source version))
+    (build-system gnu-build-system)
+    (inputs
+     `(("mesa" ,mesa)
+       ("glut" ,freeglut)
+       ("glew" ,glew)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace
+          install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (mkdir-p (string-append out "/bin"))
+              (for-each
+               (lambda (file)
+                 (copy-file file (string-append out "/bin/" (basename file))))
+               '("src/xdemos/glxdemo" "src/xdemos/glxgears"
+                 "src/xdemos/glxinfo" "src/xdemos/glxheads"))))))))
+    (home-page "http://mesa3d.org/";)
+    (synopsis "Utility tools for Mesa")
+    (description
+     "The mesa-utils package contains several utility tools for Mesa: glxdemo,
+glxgears, glxheads, and glxinfo.")
+    ;; glxdemo is public domain; others expat.
+    (license (list l:expat l:public-domain))))
+
 (define-public glew
   (package
     (name "glew")
-- 
2.2.1


reply via email to

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