%global commit 9a55c402aa803fb10e39ab4fd18a709d0cd06fd4 %global shortcommit %(c=%{commit}; echo ${c:0:7}) #global gitdate 20230426 %global pkgname %{?gitdate:xserver}%{!?gitdate:xwayland} %global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" Summary: Xwayland Name: x11-server-xwayland Version: 24.1.9 Release: %mkrel 3.1 Group: System/Wayland License: MIT URL: https://www.x.org/ %if 0%{?gitdate} Source0: https://gitlab.freedesktop.org/xorg/%{pkgname}/-/archive/%{commit}/%{pkgname}-%{shortcommit}.tar.gz %else Source0: https://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.xz %endif # # Patches from git upstream (https://gitlab.freedesktop.org/xorg/xserver) # avoid potential out-of-bounds access at logs (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2061) Patch0103: 1051-os-avoid-potential-out-of-bounds-access-at-logVHdrMe.patch # dri: prevent out-of-bounds read (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2085) Patch0105: 1090-dri-prevent-out-of-bounds-read-in-dri3_fd_from_pixma.patch # Avoid double free in glamor (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094) Patch0106: 1091-glamor-handle-potential-NULL-return-from-GetPictureS.patch Patch0107: 1092-glamor-handle-allocation-failure-in-glamor_create_pi.patch Patch0108: 1095-glamor-avoid-null-dereference-in-glamor_dash_setup.patch Patch0109: 1096-glamor-avoid-null-dereference-in-glamor_composite_cl.patch Patch0110: 1097-glamor-avoid-double-free-in-glamor_make_pixmap_expor.patch # fix Option "GlxVendorLibrary" in glamor (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2096) Patch0111: 1101-glamor-fix-Option-GlxVendorLibrary.patch # Fix incorrect pointer coordinates to X clients on pointer enter events # (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2113) Patch0112: 1103-xwayland-Fix-incorrect-pointer-coordinates-in-enter-.patch # Prevent NULL pointer dereference (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2115) Patch0113: 1104-os-avoid-closing-null-fd-at-Fopen.patch # RandR emulation improvements (https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2095) Patch0114: 1108-xwayland-Use-separate-comment-for-each-xwl_output_fa.patch Patch0115: 1109-xwayland-Sort-xwl_output_fake_modes-entries.patch Patch0116: 1110-xwayland-Use-logical_-prefix-for-logical-coordinate-.patch Patch0117: 1111-xwayland-Refactor-output_get_logical_mode-extents-he.patch Patch0118: 1112-xwayland-Set-output-mode-size-as-reported-by-the-wl_.patch Patch0119: 1113-xwayland-Do-not-assume-the-first-RandR-mode-is-the-l.patch Patch0120: 1114-xwayland-Add-RandR-mode-for-the-native-resolution-if.patch Patch0121: 1115-xwayland-Clear-ConstrainCursorHarder-in-xwl_screen_i.patch Patch0122: 1116-xwayland-Add-emulated-modes-larger-than-the-logical-.patch Patch0123: 1117-xwayland-Adjust-RandR-emulation-for-rotation.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1491 Patch0200: 0242-xwayland-use-array-for-protocol-XML-files.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1511 Patch0201: 0273-xwayland-present-Drop-vblank-flip_ready-assignment.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570 Patch0202: 0333-xwayland-Drop-pixmap-parameter-from-xwl_present_mayb.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570 Patch0203: 0334-xwayland-Only-ignore-manual-redirection-by-clients-f.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570 Patch0204: 0335-xwayland-Try-manual-redirection-for-surface-window-i.patch # https://gitlab.freedesktop.org/xorg/xserver/-/work_items/1724 Patch0205: 0454-xwayland-glamor-Try-manual-redirect-only-if-parent-w.patch # https://gitlab.freedesktop.org/xorg/xserver/-/work_items/1724 Patch0206: 0455-xwayland-present-Update-surface-window-again-if-manu.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1742 Patch0207: 0506-xwayland-Add-xdg-system-bell-support.patch # https://gitlab.freedesktop.org/xorg/xserver/-/issues/1811 Patch0209: 0730-xwayland-Do-not-pretend-leaving-the-X11-surface-if-b.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2047 Patch0210: 0745-xwayland-present-Only-flip-if-the-window-pixmap-dime.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1906 Patch0211: 0748-os-use-close-on-exec-for-X-server-socket-to-prevent-.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056 Patch0212: 0759-xwayland-fix-builds-with-xace-disabled.patch # https://gitlab.freedesktop.org/xorg/xserver/-/issues/1853 Patch0213: 0830-xwayland-Avoid-premature-surface-commit-running-root.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2121 Patch0214: 0831-xwayland-Expand-tab-characters.patch Patch0215: 0832-xwayland-Clean-up-stray-newlines.patch Patch0216: 0833-xwayland-ci-Enforce-various-code-style-checks.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2112 Patch0217: 0834-xwayland-prevent-X11-get-enter-event-when-pointer-is.patch # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2123 Patch0218: 0836-xwayland-wrong-expecting_event.patch # https://gitlab.freedesktop.org/xorg/xserver/-/issues/1862 Patch0220: 0877-xwayland-Update-surface-window-from-xwl_unrealize_wi.patch # https://gitlab.freedesktop.org/xorg/xserver/-/issues/1862 Patch0221: 0878-xwayland-Use-WindowPtr-for-damage-closure-again.patch # https://gitlab.freedesktop.org/xorg/xserver/-/issues/1862 Patch0222: 0879-Revert-xwayland-Call-register_damage-depending-on-en.patch # https://gitlab.freedesktop.org/xorg/xserver/-/issues/1875 Patch0223: 0891-xwayland-Use-viewport-scale-for-warping-coordinates.patch Requires: x11-server-common Requires: xkbcomp #Requires: libEGL #Requires: libepoxy >= 1.5.5 BuildRequires: gcc BuildRequires: git-core BuildRequires: meson BuildRequires: rendercheck BuildRequires: wayland-devel BuildRequires: pkgconfig(wayland-client) >= 1.21.0 BuildRequires: pkgconfig(wayland-protocols) >= 1.34 BuildRequires: pkgconfig(wayland-eglstream-protocols) BuildRequires: pkgconfig(epoxy) >= 1.5.5 BuildRequires: pkgconfig(fontenc) BuildRequires: pkgconfig(libdrm) >= 2.4.89 BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(libtirpc) BuildRequires: pkgconfig(pixman-1) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xau) BuildRequires: pkgconfig(xdmcp) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) BuildRequires: pkgconfig(xfont2) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xkbcomp) BuildRequires: pkgconfig(xkbfile) BuildRequires: pkgconfig(xmu) BuildRequires: pkgconfig(xorg-macros) >= 1.17 BuildRequires: pkgconfig(xpm) BuildRequires: pkgconfig(xrender) BuildRequires: pkgconfig(xres) BuildRequires: pkgconfig(xshmfence) >= 1.1 BuildRequires: pkgconfig(xtrans) >= 1.3.2 BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(xv) BuildRequires: x11-proto-devel >= 2024.1 BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(libxcvt) BuildRequires: pkgconfig(libbsd-overlay) BuildRequires: pkgconfig(libdecor-0) >= 0.1.1 BuildRequires: pkgconfig(liboeffis-1.0) >= 1.0.0 BuildRequires: pkgconfig(libei-1.0) >= 1.0.0 BuildRequires: audit-libs-devel #BuildRequires: libselinux-devel >= 2.0.86-1 # libunwind is Exclusive for the following arches %ifarch aarch64 %{arm} hppa ia64 mips ppc ppc64 %{ix86} x86_64 %if !0%{?rhel} BuildRequires: pkgconfig(libunwind) %endif %endif BuildRequires: pkgconfig(xcb-aux) BuildRequires: pkgconfig(xcb-image) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-keysyms) BuildRequires: pkgconfig(xcb-renderutil) %description Xwayland is an X server for running X clients under Wayland. %package devel Summary: Development package for %{name} Group: Development/Wayland Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel The development package provides the developmental files which are necessary for developing Wayland compositors using Xwayland. %prep %autosetup -S git_am -n %{pkgname}-%{?gitdate:%{commit}}%{!?gitdate:%{version}} %build %meson \ %{?gitdate:-Dxwayland=true -D{xorg,xnest,xvfb,udev}=false} \ -Ddefault_font_path=%{default_font_path} \ -Dbuilder_string="Build ID: %{name} %{version}-%{release}" \ -Dvendor_name="The Mageia.Org" \ -Dvendor_name_short="%{_vendor}" \ -Dvendor_web="https://www.mageia.org" \ -Dxkb_output_dir=%{_localstatedir}/lib/xkb \ -Dserverconfigdir=%{_datadir}/xwayland \ -Dxselinux=false \ -Dxcsecurity=true \ -Dglamor=true \ -Ddri3=true %meson_build %install %meson_install # Remove unwanted files/dirs rm %{buildroot}%{_mandir}/man1/Xserver.1* rm -Rf %{buildroot}%{_includedir}/xorg rm -Rf %{buildroot}%{_datadir}/aclocal rm -f %{buildroot}%{_datadir}/doc/xorg-server/Xserver-DTrace.{pdf,html}{,db} %files %dir %{_datadir}/xwayland %{_bindir}/Xwayland %{_mandir}/man1/Xwayland.1* %{_datadir}/applications/org.freedesktop.Xwayland.desktop %{_datadir}/xwayland/protocol.txt %files devel %{_libdir}/pkgconfig/xwayland.pc