summaryrefslogtreecommitdiff
path: root/package/xwayland
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2021-12-24 00:02:14 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2022-02-10 13:28:20 +0100
commit9879794a9be40d98570d8983885b8090da06aa4b (patch)
tree1e08686346a6c995291cb4e52c0bd418b5d7b779 /package/xwayland
parent694fdfb78db45ffb88e48f18c703020a10bdd9fa (diff)
proof-of-concept weston/wayland packaging
Diffstat (limited to 'package/xwayland')
-rw-r--r--package/xwayland/Makefile39
-rw-r--r--package/xwayland/patches/patch-hw_xwayland_xwayland-glx_c12
-rw-r--r--package/xwayland/patches/patch-include_misc_h51
3 files changed, 102 insertions, 0 deletions
diff --git a/package/xwayland/Makefile b/package/xwayland/Makefile
new file mode 100644
index 000000000..2e0848cdd
--- /dev/null
+++ b/package/xwayland/Makefile
@@ -0,0 +1,39 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= xwayland
+PKG_VERSION:= 21.1.3
+PKG_RELEASE:= 1
+PKG_HASH:= ebc2757f39fd4c7db1654fd86591589c211aa20172d43a54f77ae567cedbf8a2
+PKG_DESCR:= wayland server
+PKG_SECTION:= x11/drivers
+PKG_DEPENDS:= wayland wayland-protocols libepoxy libtirpc
+PKG_DEPENDS+= pixman libxkbfile libxfont2 font-util libressl
+PKG_DEPENDS+= libxdmcp libxshmfence libx11 libxcb libxext
+PKG_DEPENDS+= libxau libfreetype libfontenc
+PKG_BUILDDEP:= wayland wayland-protocols libepoxy libtirpc
+PKG_BUILDDEP+= pixman xorgproto libxkbfile libXfont2 font-util
+PKG_BUILDDEP+= libressl libXdmcp libxshmfence libX11 libxcb
+PKG_BUILDDEP+= libXext libXau freetype libfontenc
+PKG_URL:= https://xorg.freedesktop.org/
+PKG_SITES:= https://www.x.org/releases/individual/xserver/
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,XWAYLAND,xwayland,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+WRKBUILD= $(WRKDIR)/$(PKG_NAME)-obj
+
+CONFIG_STYLE:= meson
+BUILD_STYLE:= meson
+INSTALL_STYLE:= meson
+
+
+xwayland-install:
+ $(INSTALL_DIR) $(IDIR_XWAYLAND)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/Xwayland \
+ $(IDIR_XWAYLAND)/usr/bin
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/xwayland/patches/patch-hw_xwayland_xwayland-glx_c b/package/xwayland/patches/patch-hw_xwayland_xwayland-glx_c
new file mode 100644
index 000000000..57cca337d
--- /dev/null
+++ b/package/xwayland/patches/patch-hw_xwayland_xwayland-glx_c
@@ -0,0 +1,12 @@
+--- xwayland-21.1.3.orig/hw/xwayland/xwayland-glx.c 2021-11-08 11:37:14.863922600 +0100
++++ xwayland-21.1.3/hw/xwayland/xwayland-glx.c 2021-11-14 05:31:50.673075155 +0100
+@@ -45,6 +45,9 @@
+
+ #include "xwayland-screen.h"
+
++#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B
++#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339
++
+ /* Can't get these from <GL/glx.h> since it pulls in client headers */
+ #define GLX_RGBA_BIT 0x00000001
+ #define GLX_WINDOW_BIT 0x00000001
diff --git a/package/xwayland/patches/patch-include_misc_h b/package/xwayland/patches/patch-include_misc_h
new file mode 100644
index 000000000..6707a70ed
--- /dev/null
+++ b/package/xwayland/patches/patch-include_misc_h
@@ -0,0 +1,51 @@
+--- xwayland-21.1.3.orig/include/misc.h 2021-11-08 11:37:14.869922600 +0100
++++ xwayland-21.1.3/include/misc.h 2021-11-14 05:17:02.367154956 +0100
+@@ -298,34 +298,12 @@ __builtin_constant_p(int x)
+ }
+ #endif
+
+-static inline uint64_t
+-bswap_64(uint64_t x)
+-{
+- return (((x & 0xFF00000000000000ull) >> 56) |
+- ((x & 0x00FF000000000000ull) >> 40) |
+- ((x & 0x0000FF0000000000ull) >> 24) |
+- ((x & 0x000000FF00000000ull) >> 8) |
+- ((x & 0x00000000FF000000ull) << 8) |
+- ((x & 0x0000000000FF0000ull) << 24) |
+- ((x & 0x000000000000FF00ull) << 40) |
+- ((x & 0x00000000000000FFull) << 56));
+-}
+-
+ #define swapll(x) do { \
+ if (sizeof(*(x)) != 8) \
+ wrong_size(); \
+ *(x) = bswap_64(*(x)); \
+ } while (0)
+
+-static inline uint32_t
+-bswap_32(uint32_t x)
+-{
+- return (((x & 0xFF000000) >> 24) |
+- ((x & 0x00FF0000) >> 8) |
+- ((x & 0x0000FF00) << 8) |
+- ((x & 0x000000FF) << 24));
+-}
+-
+ static inline Bool
+ checked_int64_add(int64_t *out, int64_t a, int64_t b)
+ {
+@@ -361,13 +339,6 @@ checked_int64_subtract(int64_t *out, int
+ *(x) = bswap_32(*(x)); \
+ } while (0)
+
+-static inline uint16_t
+-bswap_16(uint16_t x)
+-{
+- return (((x & 0xFF00) >> 8) |
+- ((x & 0x00FF) << 8));
+-}
+-
+ #define swaps(x) do { \
+ if (sizeof(*(x)) != 2) \
+ wrong_size(); \