[gnome-boxes/flatpak-master-fixup] flatpak: Add "mesa" so virglrender can have "libgbm"



commit 9c67c2993c4372b1d32e01c5c17803dafa7b83e7
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Aug 5 15:05:56 2019 +0200

    flatpak: Add "mesa" so virglrender can have "libgbm"
    
    This should be fixed in the freedesktop Sdk instead.
    
    https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/821
    doesn't seem to fix it.

 .../mesa-break-build-dep-libdrm-nouveau.patch      | 20 ++++++++
 build-aux/flatpak/mesa-disable-gbm-backends.patch  | 13 ++++++
 build-aux/flatpak/org.gnome.Boxes.json             | 53 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)
---
diff --git a/build-aux/flatpak/mesa-break-build-dep-libdrm-nouveau.patch 
b/build-aux/flatpak/mesa-break-build-dep-libdrm-nouveau.patch
new file mode 100644
index 00000000..1ec85ec0
--- /dev/null
+++ b/build-aux/flatpak/mesa-break-build-dep-libdrm-nouveau.patch
@@ -0,0 +1,20 @@
+diff --git a/src/loader/pci_id_driver_map.c b/src/loader/pci_id_driver_map.c
+index 8b2079e4354..c06c2ce8561 100644
+--- a/src/loader/pci_id_driver_map.c
++++ b/src/loader/pci_id_driver_map.c
+@@ -27,7 +27,14 @@ int is_nouveau_vieux(int fd);
+ 
+ #include <stdlib.h>
+ #include <xf86drm.h>
+-#include <nouveau_drm.h>
++/* #include <nouveau_drm.h> */
++#define NOUVEAU_GETPARAM_CHIPSET_ID      11
++#define DRM_NOUVEAU_GETPARAM           0x00
++
++struct drm_nouveau_getparam {
++        uint64_t param;
++        uint64_t value;
++};
+ 
+ static int
+ nouveau_chipset(int fd)
diff --git a/build-aux/flatpak/mesa-disable-gbm-backends.patch 
b/build-aux/flatpak/mesa-disable-gbm-backends.patch
new file mode 100644
index 00000000..7210f3b7
--- /dev/null
+++ b/build-aux/flatpak/mesa-disable-gbm-backends.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
+index 37ec9c16f40..b4e1a08bc1a 100644
+--- a/src/gbm/main/backend.c
++++ b/src/gbm/main/backend.c
+@@ -43,7 +43,7 @@ struct backend_desc {
+ };
+ 
+ static const struct backend_desc backends[] = {
+-   { "gbm_dri.so", &gbm_dri_backend },
++/*   { "gbm_dri.so", &gbm_dri_backend }, */
+ };
+ 
+ static const void *
diff --git a/build-aux/flatpak/org.gnome.Boxes.json b/build-aux/flatpak/org.gnome.Boxes.json
index c4f16c87..974255aa 100644
--- a/build-aux/flatpak/org.gnome.Boxes.json
+++ b/build-aux/flatpak/org.gnome.Boxes.json
@@ -331,6 +331,59 @@
                 }
             ]
         },
+        {
+            "name" : "python-mako",
+            "buildsystem" : "simple",
+            "build-commands" : [
+                "pip3 install --prefix=/app --no-deps ."
+            ],
+            "sources" : [
+                {
+                    "type" : "archive",
+                    "url" : 
"https://files.pythonhosted.org/packages/b0/3c/8dcd6883d009f7cae0f3157fb53e9afb05a0d3d33b3db1268ec2e6f4a56b/Mako-1.1.0.tar.gz";,
+                    "sha256" : "a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"
+                }
+            ]
+        },
+        {
+            "name" : "mesa",
+            "buildsystem" : "meson",
+            "config-opts" : [
+                "-Db_ndebug=true",
+                "-Dvulkan-drivers=",
+                "-Ddri-drivers=",
+                "-Dgallium-drivers=",
+                "-Dplatforms=",
+                "-Ddri3=true",
+                "-Ddri2=false",
+                "-Ddri=false",
+                "-Degl=false",
+                "-Dgbm=true",
+                "-Dgles1=false",
+                "-Dgles2=false",
+                "-Dglx=disabled",
+                "-Dlmsensors=false",
+                "-Dosmesa=none",
+                "-Dselinux=false",
+                "-Dshared-glapi=false",
+                "-Dvalgrind=false"
+            ],
+            "sources" : [
+                {
+                    "type" : "archive",
+                    "url" : "https://mesa.freedesktop.org/archive/mesa-19.1.3.tar.xz";,
+                    "sha256" : "845460b2225d15c15d4a9743dec798ff0b7396b533011d43e774e67f7825b7e0"
+                },
+                {
+                    "type" : "patch",
+                    "path" : "mesa-break-build-dep-libdrm-nouveau.patch"
+                },
+                {
+                    "type" : "patch",
+                    "path" : "mesa-disable-gbm-backends.patch"
+                }
+            ]
+        },
         {
             "name" : "virglrenderer",
             "sources" : [


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