[gnome-build-meta/abderrahim/wayland-1-20] freedesktop-sdk.bst: add patch to update wayland




commit 39a7c31e809890a2a02d7401634e799fc4f8a4e8
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Wed Jan 19 11:54:59 2022 +0100

    freedesktop-sdk.bst: add patch to update wayland
    
    This is needed by gtk main

 elements/freedesktop-sdk.bst                       |   4 +
 ...-components-wayland.bst-build-using-meson.patch |  43 ++++
 ...wayland.bst-track-main-and-update-to-1.20.patch | 244 +++++++++++++++++++++
 3 files changed, 291 insertions(+)
---
diff --git a/elements/freedesktop-sdk.bst b/elements/freedesktop-sdk.bst
index 2f8e879aa..2b36ab8fb 100644
--- a/elements/freedesktop-sdk.bst
+++ b/elements/freedesktop-sdk.bst
@@ -4,6 +4,10 @@ sources:
   url: gitlab:freedesktop-sdk/freedesktop-sdk.git
   track: release/21.08
   track-tags: true
+- kind: patch
+  path: files/freedesktop-sdk/0001-components-wayland.bst-build-using-meson.patch
+- kind: patch
+  path: files/freedesktop-sdk/0002-components-wayland.bst-track-main-and-update-to-1.20.patch
 config:
   options:
     target_arch: '%{arch}'
diff --git a/files/freedesktop-sdk/0001-components-wayland.bst-build-using-meson.patch 
b/files/freedesktop-sdk/0001-components-wayland.bst-build-using-meson.patch
new file mode 100644
index 000000000..3416ed5fd
--- /dev/null
+++ b/files/freedesktop-sdk/0001-components-wayland.bst-build-using-meson.patch
@@ -0,0 +1,43 @@
+From 75690ec8f0d2d3f4b3c5a5e8f24cbe29cba227a9 Mon Sep 17 00:00:00 2001
+From: Abderrahim Kitouni <akitouni gnome org>
+Date: Wed, 19 Jan 2022 12:22:39 +0100
+Subject: [PATCH 1/2] components/wayland.bst: build using meson
+
+---
+ elements/components/wayland.bst | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/elements/components/wayland.bst b/elements/components/wayland.bst
+index bd7810bc9..e95c2b851 100644
+--- a/elements/components/wayland.bst
++++ b/elements/components/wayland.bst
+@@ -1,16 +1,17 @@
+-kind: autotools
++kind: meson
++
++build-depends:
++- public-stacks/buildsystem-meson.bst
+ 
+ depends:
+-- filename: bootstrap-import.bst
+-- filename: public-stacks/buildsystem-autotools.bst
+-  type: build
+-- filename: components/expat.bst
+-- filename: components/libxml2.bst
+-- filename: components/libffi.bst
++- bootstrap-import.bst
++- components/expat.bst
++- components/libxml2.bst
++- components/libffi.bst
+ 
+ variables:
+-  conf-local: |
+-    --disable-documentation
++  meson-local: >-
++    -Ddocumentation=false
+ 
+ public:
+   bst:
+-- 
+2.34.1
+
diff --git a/files/freedesktop-sdk/0002-components-wayland.bst-track-main-and-update-to-1.20.patch 
b/files/freedesktop-sdk/0002-components-wayland.bst-track-main-and-update-to-1.20.patch
new file mode 100644
index 000000000..0ce0b7f04
--- /dev/null
+++ b/files/freedesktop-sdk/0002-components-wayland.bst-track-main-and-update-to-1.20.patch
@@ -0,0 +1,244 @@
+From 481c63965c55950004c6047aa6c020a56216165e Mon Sep 17 00:00:00 2001
+From: Abderrahim Kitouni <akitouni gnome org>
+Date: Wed, 19 Jan 2022 11:46:04 +0100
+Subject: [PATCH 2/2] components/wayland.bst: track main and update to 1.20
+
+---
+ elements/components/wayland.bst               |   6 +-
+ patches/wayland/wayland-cursor-xdg-dirs.patch | 208 ------------------
+ 2 files changed, 2 insertions(+), 212 deletions(-)
+ delete mode 100644 patches/wayland/wayland-cursor-xdg-dirs.patch
+
+diff --git a/elements/components/wayland.bst b/elements/components/wayland.bst
+index e95c2b851..76dcd37cb 100644
+--- a/elements/components/wayland.bst
++++ b/elements/components/wayland.bst
+@@ -27,9 +27,7 @@ public:
+ sources:
+ - kind: git_tag
+   url: freedesktop:wayland/wayland.git
+-  track: master
++  track: main
+   exclude:
+   - '*.*.9*'
+-  ref: 1.19.0-0-ge60398b1755bfcdf09f040d3769131fe0d9762fc
+-- kind: patch
+-  path: patches/wayland/wayland-cursor-xdg-dirs.patch
++  ref: 1.20.0-0-g75c1a93e2067220fa06208f20f8f096bb463ec08
+diff --git a/patches/wayland/wayland-cursor-xdg-dirs.patch b/patches/wayland/wayland-cursor-xdg-dirs.patch
+deleted file mode 100644
+index b148946e4..000000000
+--- a/patches/wayland/wayland-cursor-xdg-dirs.patch
++++ /dev/null
+@@ -1,208 +0,0 @@
+-From abea67d38acecdcf6e70f2f4bce090b158dee161 Mon Sep 17 00:00:00 2001
+-From: Robert McQueen <rob endlessm com>
+-Date: Wed, 16 May 2018 14:43:34 +0100
+-Subject: [PATCH] cursor: check XDG_DATA_HOME and XDG_DATA_DIRS for cursor
+- themes
+-
+-Use the XDG-defined user and system dirs to look for icons/ directories
+-before falling back to hardcoded default/legacy XCURSOR_PATH values. Fixes
+-the availability of themed cursors in sandboxed and other environments
+-that rely on XDG_DATA_DIRS being set and respected.
+----
+- cursor/xcursor.c | 150 +++++++++++++++++++++++++++++++++++++++++++++----------
+- 1 file changed, 125 insertions(+), 25 deletions(-)
+-
+-diff --git a/cursor/xcursor.c b/cursor/xcursor.c
+-index 689c702..8ed15fc 100644
+---- a/cursor/xcursor.c
+-+++ b/cursor/xcursor.c
+-@@ -24,6 +24,8 @@
+-  */
+- 
+- #include "xcursor.h"
+-+
+-+#define _GNU_SOURCE
+- #include <stdio.h>
+- #include <stdlib.h>
+- #include <string.h>
+-@@ -608,6 +610,14 @@ XcursorFileLoadImages (FILE *file, int size)
+-     return XcursorXcFileLoadImages (&f, size);
+- }
+- 
+-+#ifndef USER_DATA_DIR
+-+#define USER_DATA_DIR ".local/share/"
+-+#endif
+-+
+-+#ifndef ICON_SUBDIR
+-+#define ICON_SUBDIR "icons/"
+-+#endif
+-+
+- /*
+-  * From libXcursor/src/library.c
+-  */
+-@@ -617,23 +627,9 @@ XcursorFileLoadImages (FILE *file, int size)
+- #endif
+- 
+- #ifndef XCURSORPATH
+--#define XCURSORPATH 
"~/.icons:/usr/share/icons:/usr/share/pixmaps:~/.cursors:/usr/share/cursors/xorg-x11:"ICONDIR
+-+#define XCURSORPATH "~/.icons/:/usr/share/pixmaps/:~/.cursors/:/usr/share/cursors/xorg-x11/:"ICONDIR
+- #endif
+- 
+--static const char *
+--XcursorLibraryPath (void)
+--{
+--    static const char        *path;
+--
+--    if (!path)
+--    {
+--     path = getenv ("XCURSOR_PATH");
+--     if (!path)
+--         path = XCURSORPATH;
+--    }
+--    return path;
+--}
+--
+- static  void
+- _XcursorAddPathElt (char *path, const char *elt, int len)
+- {
+-@@ -657,6 +653,120 @@ _XcursorAddPathElt (char *path, const char *elt, int len)
+-     path[pathlen + len] = '\0';
+- }
+- 
+-+static const char *
+-+_XcursorNextPath (const char *path)
+-+{
+-+    char    *colon = strchr (path, ':');
+-+
+-+    if (!colon)
+-+     return NULL;
+-+    return colon + 1;
+-+}
+-+
+-+static const char *
+-+_XcursorDataDirs (void)
+-+{
+-+    static char              *data_dirs = NULL;
+-+    const char          *xdg_data_home = NULL;
+-+    const char          *xdg_data_dirs = NULL;
+-+    char                *user_data_dir = NULL;
+-+    int                 user_data_dir_len;
+-+
+-+    if (data_dirs)
+-+        return data_dirs;
+-+
+-+    xdg_data_home = getenv ("XDG_DATA_HOME");
+-+    if (!xdg_data_home || !xdg_data_home[0])
+-+        xdg_data_home = "~/";
+-+
+-+    xdg_data_dirs = getenv ("XDG_DATA_DIRS");
+-+    if (!xdg_data_dirs || !xdg_data_dirs[0])
+-+        xdg_data_dirs = "/usr/local/share/:/usr/share/";
+-+
+-+    /* home dir + / + .local/share/ + NULL */
+-+    user_data_dir_len = strlen (xdg_data_home) + 1 + strlen (USER_DATA_DIR) + 1;
+-+    user_data_dir = malloc (user_data_dir_len);
+-+    if (!user_data_dir)
+-+        return NULL;
+-+
+-+    strcpy (user_data_dir, xdg_data_home);
+-+    _XcursorAddPathElt (user_data_dir, USER_DATA_DIR, strlen (USER_DATA_DIR));
+-+
+-+    data_dirs = NULL;
+-+    asprintf (&data_dirs, "%s:%s", user_data_dir, xdg_data_dirs);
+-+    free (user_data_dir);
+-+
+-+    return data_dirs;
+-+}
+-+
+-+static const char *
+-+XcursorLibraryPath (void)
+-+{
+-+    static char *path = NULL;
+-+    const char *dir;
+-+    const char *colon;
+-+    char *tmp;
+-+    char *oldpath;
+-+    int dirlen;
+-+    int len;
+-+
+-+    if (path)
+-+        return path;
+-+
+-+    path = getenv ("XCURSOR_PATH");
+-+    if (path)
+-+        return path;
+-+
+-+    for (dir = _XcursorDataDirs ();
+-+      dir;
+-+      dir = _XcursorNextPath (dir))
+-+    {
+-+        colon = strchr (dir, ':');
+-+        if (!colon)
+-+         colon = dir + strlen (dir);
+-+
+-+        dirlen = colon - dir;
+-+
+-+        len = dirlen + 1 + strlen (ICON_SUBDIR) + 1;
+-+        tmp = malloc (len);
+-+        if (!tmp)
+-+        {
+-+            free (path);
+-+            path = NULL;
+-+            return NULL;
+-+        }
+-+
+-+        strncpy (tmp, dir, dirlen);
+-+        tmp[dirlen] = '\0';
+-+        _XcursorAddPathElt (tmp, ICON_SUBDIR, strlen (ICON_SUBDIR));
+-+
+-+        if (!path)
+-+        {
+-+            path = tmp;
+-+            continue;
+-+        }
+-+
+-+        oldpath = path;
+-+        path = NULL;
+-+        asprintf (&path, "%s:%s", oldpath, tmp);
+-+        if (!path)
+-+        {
+-+            free (tmp);
+-+            return NULL;
+-+        }
+-+
+-+        free (tmp);
+-+        free (oldpath);
+-+    }
+-+
+-+    oldpath = path;
+-+    path = NULL;
+-+    asprintf (&path, "%s:%s", oldpath, XCURSORPATH);
+-+    free (oldpath);
+-+
+-+    return path;
+-+}
+-+
+- static char *
+- _XcursorBuildThemeDir (const char *dir, const char *theme)
+- {
+-@@ -732,16 +842,6 @@ _XcursorBuildFullname (const char *dir, const char *subdir, const char *file)
+-     return full;
+- }
+- 
+--static const char *
+--_XcursorNextPath (const char *path)
+--{
+--    char    *colon = strchr (path, ':');
+--
+--    if (!colon)
+--     return NULL;
+--    return colon + 1;
+--}
+--
+- #define XcursorWhite(c)      ((c) == ' ' || (c) == '\t' || (c) == '\n')
+- #define XcursorSep(c) ((c) == ';' || (c) == ',')
+- 
+--- 
+-2.11.0
+-
+-- 
+2.34.1
+


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