public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-base/xwayland/files/, x11-base/xwayland/
Date: Tue, 27 Feb 2024 22:06:15 +0000 (UTC)	[thread overview]
Message-ID: <1709070386.309b61024f2fa97cb7fdeb82f3c9e26955624cbd.sam@gentoo> (raw)

commit:     309b61024f2fa97cb7fdeb82f3c9e26955624cbd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 27 21:46:26 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 27 21:46:26 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=309b6102

x11-base/xwayland: fix modern C issue

Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-base/xwayland/files/xwayland-23.2.4-c99.patch |  72 ++++++++++++++
 x11-base/xwayland/xwayland-23.2.4-r1.ebuild       | 113 ++++++++++++++++++++++
 2 files changed, 185 insertions(+)

diff --git a/x11-base/xwayland/files/xwayland-23.2.4-c99.patch b/x11-base/xwayland/files/xwayland-23.2.4-c99.patch
new file mode 100644
index 000000000000..21131ea317e4
--- /dev/null
+++ b/x11-base/xwayland/files/xwayland-23.2.4-c99.patch
@@ -0,0 +1,72 @@
+https://gitlab.freedesktop.org/xorg/xserver/-/commit/f0a187f55d76139225c11ce92ab69816d46db55c
+
+From f0a187f55d76139225c11ce92ab69816d46db55c Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 29 Jan 2024 10:31:36 +0100
+Subject: [PATCH] xwayland: Use correct pointer types on i386
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+And other 32-bit architectures, where uint32_t and CARD32 are
+not the same type.  Otherwise the build will fail with GCC 14
+with errors like:
+
+../hw/xwayland/xwayland-glamor.c: In function ‘xwl_glamor_get_formats’:
+../hw/xwayland/xwayland-glamor.c:291:43: error: passing argument 3 of ‘xwl_get_formats_for_device’ from incompatible pointer type [-Wincompatible-pointer-types]
+  291 |                                           num_formats, formats);
+      |                                           ^~~~~~~~~~~
+      |                                           |
+      |                                           CARD32 * {aka long unsigned int *}
+../hw/xwayland/xwayland-glamor.c:238:38: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘CARD32 *’ {aka ‘long unsigned int *’}
+  238 |                            uint32_t *num_formats, uint32_t **formats)
+      |                            ~~~~~~~~~~^~~~~~~~~~~
+../hw/xwayland/xwayland-glamor.c:291:56: error: passing argument 4 of ‘xwl_get_formats_for_device’ from incompatible pointer type [-Wincompatible-pointer-types]
+  291 |                                           num_formats, formats);
+      |                                                        ^~~~~~~
+      |                                                        |
+      |                                                        CARD32 ** {aka long unsigned int **}
+../hw/xwayland/xwayland-glamor.c:238:62: note: expected ‘uint32_t **’ {aka ‘unsigned int **’} but argument is of type ‘CARD32 **’ {aka ‘long unsigned int **’}
+  238 |                            uint32_t *num_formats, uint32_t **formats)
+      |                                                   ~~~~~~~~~~~^~~~~~~
+../hw/xwayland/xwayland-glamor.c:295:28: error: passing argument 3 of ‘xwl_get_formats’ from incompatible pointer type [-Wincompatible-pointer-types]
+  295 |                            num_formats, formats);
+      |                            ^~~~~~~~~~~
+      |                            |
+      |                            CARD32 * {aka long unsigned int *}
+../hw/xwayland/xwayland-glamor.c:217:26: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘CARD32 *’ {aka ‘long unsigned int *’}
+  217 |                uint32_t *num_formats, uint32_t **formats)
+      |                ~~~~~~~~~~^~~~~~~~~~~
+../hw/xwayland/xwayland-glamor.c:295:41: error: passing argument 4 of ‘xwl_get_formats’ from incompatible pointer type [-Wincompatible-pointer-types]
+  295 |                            num_formats, formats);
+      |                                         ^~~~~~~
+      |                                         |
+      |                                         CARD32 ** {aka long unsigned int **}
+../hw/xwayland/xwayland-glamor.c:217:50: note: expected ‘uint32_t **’ {aka ‘unsigned int **’} but argument is of type ‘CARD32 **’ {aka ‘long unsigned int **’}
+  217 |                uint32_t *num_formats, uint32_t **formats)
+      |                                       ~~~~~~~~~~~^~~~~~~
+--- a/hw/xwayland/xwayland-glamor.c
++++ b/hw/xwayland/xwayland-glamor.c
+@@ -212,7 +212,7 @@ xwl_screen_get_main_dev(struct xwl_screen *xwl_screen)
+ 
+ static Bool
+ xwl_get_formats(struct xwl_format *format_array, int format_array_len,
+-               uint32_t *num_formats, uint32_t **formats)
++               CARD32 *num_formats, CARD32 **formats)
+ {
+     *num_formats = 0;
+     *formats = NULL;
+@@ -233,9 +233,9 @@ xwl_get_formats(struct xwl_format *format_array, int format_array_len,
+ 
+ static Bool
+ xwl_get_formats_for_device(struct xwl_dmabuf_feedback *xwl_feedback, drmDevice *device,
+-                           uint32_t *num_formats, uint32_t **formats)
++                           CARD32 *num_formats, CARD32 **formats)
+ {
+-    uint32_t *ret = NULL;
++    CARD32 *ret = NULL;
+     uint32_t count = 0;
+ 
+     /* go through all matching sets of tranches for the window's device */
+-- 
+GitLab

diff --git a/x11-base/xwayland/xwayland-23.2.4-r1.ebuild b/x11-base/xwayland/xwayland-23.2.4-r1.ebuild
new file mode 100644
index 000000000000..2a4fe1f5c0f8
--- /dev/null
+++ b/x11-base/xwayland/xwayland-23.2.4-r1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
+	inherit git-r3
+else
+	SRC_URI="https://xorg.freedesktop.org/archive/individual/xserver/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Standalone X server running under Wayland"
+HOMEPAGE="https://wayland.freedesktop.org/xserver.html"
+
+IUSE="libei selinux systemd video_cards_nvidia unwind xcsecurity"
+
+LICENSE="MIT"
+SLOT="0"
+
+COMMON_DEPEND="
+	dev-libs/libbsd
+	dev-libs/openssl:=
+	>=dev-libs/wayland-1.21.0
+	>=dev-libs/wayland-protocols-1.30
+	media-fonts/font-util
+	>=media-libs/libepoxy-1.5.4[X,egl(+)]
+	media-libs/libglvnd[X]
+	>=media-libs/mesa-21.1[X(+),egl(+),gbm(+)]
+	>=x11-libs/libdrm-2.4.109
+	>=x11-libs/libXau-1.0.4
+	x11-libs/libxcvt
+	>=x11-libs/libXdmcp-1.0.2
+	>=x11-libs/libXfont2-2.0.1
+	x11-libs/libxkbfile
+	>=x11-libs/libxshmfence-1.1
+	>=x11-libs/pixman-0.27.2
+	>=x11-misc/xkeyboard-config-2.4.1-r3
+
+	libei? ( dev-libs/libei )
+	systemd? ( sys-apps/systemd )
+	unwind? ( sys-libs/libunwind )
+	video_cards_nvidia? ( gui-libs/egl-wayland )
+"
+DEPEND="
+	${COMMON_DEPEND}
+	>=x11-base/xorg-proto-2022.2
+	>=x11-libs/xtrans-1.3.5
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	x11-apps/xkbcomp
+
+	libei? ( >=sys-apps/xdg-desktop-portal-1.18.0 )
+	selinux? ( sec-policy/selinux-xserver )
+"
+BDEPEND="
+	app-alternatives/lex
+	dev-util/wayland-scanner
+"
+
+PATCHES=(
+	"${FILESDIR}"/xwayland-drop-redundantly-installed-files.patch
+	"${FILESDIR}"/xwayland-23.2.3-systemd-automagic.patch
+	"${FILESDIR}"/xwayland-23.2.4-c99.patch
+)
+
+src_configure() {
+	local emesonargs=(
+		$(meson_use selinux xselinux)
+		$(meson_use systemd)
+		$(meson_use unwind libunwind)
+		$(meson_use xcsecurity)
+		$(meson_use video_cards_nvidia xwayland_eglstream)
+		-Ddpms=true
+		-Ddri3=true
+		-Ddrm=true
+		-Ddtrace=false
+		-Dglamor=true
+		-Dglx=true
+		-Dipv6=true
+		-Dsecure-rpc=false
+		-Dscreensaver=true
+		-Dsha1=libcrypto
+		-Dxace=true
+		-Dxdmcp=true
+		-Dxinerama=true
+		-Dxvfb=true
+		-Dxv=true
+		-Dxwayland-path="${EPREFIX}"/usr/bin
+		-Dlibdecor=false
+		-Ddocs=false
+		-Ddevel-docs=false
+		-Ddocs-pdf=false
+	)
+
+	if use libei; then
+		emesonargs+=( -Dxwayland_ei=portal )
+	else
+		emesonargs+=( -Dxwayland_ei=false )
+	fi
+
+	meson_src_configure
+}
+
+src_install() {
+	dosym ../bin/Xwayland /usr/libexec/Xwayland
+
+	meson_src_install
+}


             reply	other threads:[~2024-02-27 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 22:06 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-24  0:36 [gentoo-commits] repo/gentoo:master commit in: x11-base/xwayland/files/, x11-base/xwayland/ Matt Turner
2024-05-16 14:16 Matt Turner
2024-04-25 16:10 Matt Turner
2024-01-02  6:00 Sam James
2022-04-18 20:26 Piotr Karbowski
2021-06-22 21:27 Piotr Karbowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1709070386.309b61024f2fa97cb7fdeb82f3c9e26955624cbd.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox