Subject: bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)

From: "Dr. Arne Babenhauserheide" <[email-masked]>
Date: Wed, 05 Oct 2022 18:04:09 +0200

Liliana Marie Prikler <[email-masked]> writes:

> Am Mittwoch, dem 05.10.2022 um 10:25 +0200 schrieb Dr. Arne
> Babenhauserheide:
>> +(define-public gst-plugins-base-gl
>> +  (package (inherit gst-plugins-base)
>> +    (name "gst-plugins-base-gl")
> Is there a cycle between gst-plugins-base and mesa otherwise?  If not,
> we could merge them on staging.

There’s no cycle, but gst-plugins-base-gl cannot be installed without
mesa and mesa is large.

> Prefer modify-inputs.
> Prefer substitute-keyword-arguments.  

Is it better like this?

From 3c50c737ad24e361b85c8120a20275e91b72c737 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <[email-masked]>
Date: Wed, 24 Nov 2021 01:58:32 +0100
Subject: [PATCH] gnu: gst-plugins-base-gl: add package version that includes
 opengl.

* gnu/packages/gstreamerr.scm (gst-plugins-base-gl): -Dgl=enabled, input: mesa
---
 gnu/packages/gstreamer.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a1503602ad..73d20f836e 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages gstreamer)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages aidc)
@@ -626,6 +627,19 @@ (define-public gst-plugins-base
 for the GStreamer multimedia library.")
     (license license:lgpl2.0+)))
 
+(define-public gst-plugins-base-gl
+  (package
+    (inherit gst-plugins-base)
+    (name "gst-plugins-base-gl")
+    (inputs
+     (modify-inputs (package-inputs gst-plugins-base)
+       (append mesa))) ;; required for libgstgl
+    (arguments
+     (substitute-keyword-arguments (package-arguments gst-plugins-base)
+       ((#:tests? _ #f) #f) ;; check fails with gl
+       ((#:configure-flags flags ''())
+        #~(cons* "-Dgl=enabled" #$flags)))))) ;; requires mesa
+
 (define-public gst-plugins-good
   (package
     (name "gst-plugins-good")
-- 
2.37.3

> Also, why do the checks fail with gl? Is one of them broken?

I don’t know which broke it — I did not have enough time to search deeper.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de