[Top][All Lists]

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

01/01: gnu: mesa: Add libva input.

From: Taylan Ulrich B.
Subject: 01/01: gnu: mesa: Add libva input.
Date: Sat, 02 May 2015 08:53:39 +0000

taylanub pushed a commit to branch core-updates
in repository guix.

commit 7e31978b72120a26c769ecddba83405b223e045d
Author: Taylan Ulrich Bayırlı/Kammer <address@hidden>
Date:   Tue Apr 28 15:08:47 2015 +0200

    gnu: mesa: Add libva input.
    There is a circular dependency between Mesa and libVA, so we use a
    libva-no-mesa package that builds libVA without GLX and EGL support, and use
    that for building Mesa.
    * gnu/packages/gl.scm (libva-for-mesa): New variable.
    (mesa): Add as input.
 gnu/packages/gl.scm |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index e640f83..ea38f1e 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -21,11 +21,13 @@
 (define-module (gnu packages gl)
   #:use-module (ice-9 match)
+  #:use-module (guix build utils)
   #:use-module ((guix licenses) #:prefix l:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
@@ -37,6 +39,7 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xdisorg))
 (define-public glu
@@ -159,6 +162,23 @@ Polygon meshes, and Extruded polygon meshes")
 also known as DXTn or DXTC) for Mesa.")
     (license l:expat)))
+;;; Mesa needs LibVA headers to build its Gallium-based VA API implementation;
+;;; LibVA itself depends on Mesa.  We use the following to solve the circular
+;;; dependency.
+(define libva-without-mesa
+  ;; Delay to work around circular import problem.
+  (delay
+    (package
+      (inherit libva)
+      (name "libva-without-mesa")
+      (inputs (alist-delete "mesa" (package-inputs libva)))
+      (arguments
+       (strip-keyword-arguments
+        '(#:make-flags)
+        (substitute-keyword-arguments (package-arguments libva)
+          ((#:configure-flags flags)
+           '(list "--disable-glx" "--disable-egl"))))))))
 (define-public mesa
     (name "mesa")
@@ -187,8 +207,8 @@ also known as DXTn or DXTC) for Mesa.")
         ("dri3proto" ,dri3proto)
         ("presentproto" ,presentproto)
         ("expat" ,expat)
+        ("libva" ,(force libva-without-mesa))
         ("libxml2" ,libxml2)
-        ;; TODO: Add 'libva'
         ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
         ("makedepend" ,makedepend)
         ("s2tc" ,s2tc)))

reply via email to

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