wayland: update to 1.23.0
authorDaniel Golle <daniel@makrotopia.org>
Tue, 5 Nov 2024 04:37:21 +0000 (04:37 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 5 Dec 2024 01:15:41 +0000 (01:15 +0000)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
frameworks/wayland/Makefile
frameworks/wayland/files/video.hotplug [new file with mode: 0644]
frameworks/wayland/files/xdg-runtime-dir.profile [new file with mode: 0644]
frameworks/wayland/patches/001-fix-wayland-scanner-detect.patch

index 192fc9e0a52cd525a975b3478bb5c941960b2889..c10c6e682995d1641ea5b6a1a7b24758cb52e1a8 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wayland
-PKG_VERSION:=1.20.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=1.23.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://wayland.freedesktop.org/releases
-PKG_HASH:=b8a034154c7059772e0fdbd27dbfcda6c732df29cae56a82274f6ec5d7cd8725
+PKG_SOURCE_URL:=https://gitlab.freedesktop.org/wayland/wayland/-/releases/$(PKG_VERSION)/downloads/
+PKG_HASH:=05b3e1574d3e67626b5974f862f36b5b427c7ceeb965cb36a4e6c2d342e45ab2
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=MIT
@@ -27,6 +27,7 @@ define Package/libwayland
   TITLE:=wayland
   URL:=https://wayland.freedesktop.org/
   DEPENDS:=+libexpat +libffi
+  USERID:=:video=40
 endef
 
 define Package/libwayland/description
@@ -47,6 +48,7 @@ endef
 MESON_HOST_ARGS += \
        -Dscanner=true \
        -Dlibraries=false \
+       -Dtests=false \
        -Ddocumentation=false \
        -Ddtd_validation=true
 
@@ -66,11 +68,16 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
+       $(SED) 's/^wayland_scanner=$$$${bindir}\/\(.*\)/wayland_scanner=$$$${prefix_hostpkg}\/bin\/\1/' $(1)/usr/lib/pkgconfig/wayland-scanner.pc
 endef
 
 define Package/libwayland/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc/profile.d
+       $(INSTALL_DATA) ./files/xdg-runtime-dir.profile $(1)/etc/profile.d/xdr-runtime-dir.sh
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/drm
+       $(INSTALL_BIN) ./files/video.hotplug $(1)/etc/hotplug.d/drm/wayland
 endef
 
 define Package/wayland-scanner/install
diff --git a/frameworks/wayland/files/video.hotplug b/frameworks/wayland/files/video.hotplug
new file mode 100644 (file)
index 0000000..fe21322
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && {
+       chown root:video "/dev/$DEVNAME"
+       chmod 0660 "/dev/$DEVNAME"
+}
diff --git a/frameworks/wayland/files/xdg-runtime-dir.profile b/frameworks/wayland/files/xdg-runtime-dir.profile
new file mode 100644 (file)
index 0000000..d031cd6
--- /dev/null
@@ -0,0 +1,2 @@
+export XDG_RUNTIME_DIR="/tmp/run/$LOGNAME"
+mkdir -m 0700 -p "$XDG_RUNTIME_DIR"
index 6a066019928864c7abccd0609f698fd959b582b5..4c380230a535a1fe85b3c674b180f94e346a1215 100644 (file)
@@ -1,30 +1,30 @@
 --- a/src/meson.build
 +++ b/src/meson.build
-@@ -70,8 +70,12 @@ if get_option('scanner')
+@@ -81,8 +81,12 @@ if get_option('scanner')
  endif
  
  if meson.is_cross_build() or not get_option('scanner')
 -      scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
--      wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
+-      wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))
 +      if (get_option('scanner_bin') != '')
 +              wayland_scanner_for_build = get_option('scanner_bin')
 +      else
 +              scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
-+              wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
++              wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))
 +      endif
  else
        wayland_scanner_for_build = wayland_scanner
  endif
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -10,6 +10,10 @@ option('tests',
-   description: 'Compile Wayland tests',
+@@ -6,6 +6,10 @@ option('scanner',
+   description: 'Compile wayland-scanner binary',
    type: 'boolean',
-   value: 'true')
+   value: true)
 +option('scanner_bin',
 +  description: 'Path to wayland-scanner binary',
 +  type: 'string',
 +  value: '')
- option('documentation',
-   description: 'Build the documentation (requires Doxygen, dot, xmlto, xsltproc)',
+ option('tests',
+   description: 'Compile Wayland tests',
    type: 'boolean',