From 8b0ed1961f42c2236d9c876a38381d58e7ef74ec Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 19 Dec 2021 14:20:34 +0000 Subject: x11-drivers/xf86-video-qxl : fix build against xorg 21.0 --- .../x11-drivers/xf86-video-qxl-0.1.5_p20200205-r10 | 16 ++++ metadata/pkg_desc_index | 1 + x11-drivers/xf86-video-qxl/Manifest | 1 + ...video-qxl-0.1.5_p20200205-xorg-21.0-build.patch | 93 ++++++++++++++++++++++ .../xf86-video-qxl-0.1.5_p20200205-r10.ebuild | 52 ++++++++++++ 5 files changed, 163 insertions(+) create mode 100644 metadata/md5-cache/x11-drivers/xf86-video-qxl-0.1.5_p20200205-r10 create mode 100644 x11-drivers/xf86-video-qxl/Manifest create mode 100644 x11-drivers/xf86-video-qxl/files/xf86-video-qxl-0.1.5_p20200205-xorg-21.0-build.patch create mode 100644 x11-drivers/xf86-video-qxl/xf86-video-qxl-0.1.5_p20200205-r10.ebuild diff --git a/metadata/md5-cache/x11-drivers/xf86-video-qxl-0.1.5_p20200205-r10 b/metadata/md5-cache/x11-drivers/xf86-video-qxl-0.1.5_p20200205-r10 new file mode 100644 index 00000000..f26217b8 --- /dev/null +++ b/metadata/md5-cache/x11-drivers/xf86-video-qxl-0.1.5_p20200205-r10 @@ -0,0 +1,16 @@ +BDEPEND=virtual/pkgconfig sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.2-r1:1.16 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) virtual/pkgconfig +DEFINED_PHASES=compile configure install postinst postrm prepare setup unpack +DEPEND=xspice? ( app-emulation/spice python_single_target_python3_8? ( dev-lang/python:3.8 >=dev-lang/python-exec-2:=[python_targets_python3_8] ) python_single_target_python3_9? ( dev-lang/python:3.9 >=dev-lang/python-exec-2:=[python_targets_python3_9] ) ) x11-base/xorg-server[-minimal] >=x11-libs/libdrm-2.4.46 >=app-emulation/spice-protocol-0.12.0 x11-base/xorg-proto x11-base/xorg-proto >=x11-base/xorg-server-1.20[xorg] >=x11-libs/libpciaccess-0.14 +DESCRIPTION=QEMU QXL paravirt video driver +EAPI=7 +HOMEPAGE=https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl +INHERIT=autotools python-single-r1 xorg-3 +IUSE=xspice python_single_target_python3_8 python_single_target_python3_9 +KEYWORDS=amd64 x86 +LICENSE=MIT +RDEPEND=xspice? ( app-emulation/spice python_single_target_python3_8? ( dev-lang/python:3.8 >=dev-lang/python-exec-2:=[python_targets_python3_8] ) python_single_target_python3_9? ( dev-lang/python:3.9 >=dev-lang/python-exec-2:=[python_targets_python3_9] ) ) x11-base/xorg-server[-minimal] >=x11-libs/libdrm-2.4.46 x11-base/xorg-server:= >=x11-base/xorg-server-1.20[xorg] >=x11-libs/libpciaccess-0.14 +REQUIRED_USE=xspice? ( ^^ ( python_single_target_python3_8 python_single_target_python3_9 ) ) +SLOT=0 +SRC_URI=https://dev.gentoo.org/~slashbeast/distfiles/xf86-video-qxl/xf86-video-qxl-0.1.5_p20200205.tar.xz +_eclasses_=autotools c9df06c186913b43eb211100ef5fe2cf eapi8-dosym cd7d420bb5be5ee079f27239ce76b8f5 edos2unix 33e347e171066657f91f8b0c72ec8773 eutils dab5d8ec471d025b79c9e6906bcf3bff flag-o-matic 4134b5c0fb719b9161d10bdaba9e09e5 gnuconfig 262062cef0ba4f22b397193da514a350 libtool 241a8f577b9781a42a7421e53448a44e multilib 4b66d835ec72e021e359bb81eacfe988 multiprocessing 61c959fc55c15c00bbb1079d6a71370b python-single-r1 d46c125afba8be02eb1cd7104bac6e9c python-utils-r1 a8b7938ade305f087865de7e52d079b5 strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 toolchain-funcs 9ea1c67b6f8315fdc2568abb674519aa wrapper 4251d4c84c25f59094fd557e0063a974 xorg-3 cd706b673da66bddf59f910d089761d6 +_md5_=f83d1ac524c39d0d88408bca5d6ad788 diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 77476db8..48829486 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -88,6 +88,7 @@ x11-base/xorg-server 21.1.1-r100: X.Org X servers x11-base/xwayland 21.1.3-r100: Standalone X server running under Wayland x11-drivers/nvidia-drivers 470.63.01: NVIDIA Accelerated Graphics Driver x11-drivers/nvidia-drivers-legacy 390.144-r3: NVIDIA Accelerated Graphics Driver +x11-drivers/xf86-video-qxl 0.1.5_p20200205-r10: QEMU QXL paravirt video driver x11-libs/gtk+ 2.24.33-r10 3.24.29-r10: Gimp ToolKit + x11-misc/nvidia-prime 314: NVIDIA Prime Render Offload configuration and utilities x11-misc/nvidia-settings 470.63.01: NVIDIA Linux X11 Settings Utility diff --git a/x11-drivers/xf86-video-qxl/Manifest b/x11-drivers/xf86-video-qxl/Manifest new file mode 100644 index 00000000..54b4c990 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/Manifest @@ -0,0 +1 @@ +DIST xf86-video-qxl-0.1.5_p20200205.tar.xz 137452 BLAKE2B 1639a393dadcba251a8fe761d52112d51c29e70960524785343379ec088e69c5e2cbd1a9710d72c749dc8b7303b3eceb545fbaec82d5d22613f8ebb0a4e7aca8 SHA512 9a2ba4aa7ef61d3ea0043ff1e3a8f312b7fe00f707045bcb4e4fc1189786b9aba2b6e44696f47e7c215485044f6c953f831ed4da48d4098cd7b62555c74a79f8 diff --git a/x11-drivers/xf86-video-qxl/files/xf86-video-qxl-0.1.5_p20200205-xorg-21.0-build.patch b/x11-drivers/xf86-video-qxl/files/xf86-video-qxl-0.1.5_p20200205-xorg-21.0-build.patch new file mode 100644 index 00000000..b4f9024a --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/xf86-video-qxl-0.1.5_p20200205-xorg-21.0-build.patch @@ -0,0 +1,93 @@ +https://bugs.gentoo.org/827652 +https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/merge_requests/6 + +From 4b083ede3c4a827a84295ff223e34ee3c2e581b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + +Date: Sat, 28 Aug 2021 15:38:40 +0200 +Subject: [PATCH] Fix a build error with Xorg master +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use xf86ReturnOptValBool() in get_bool_option() instead of +options[option_index].value.bool to fix a compiler error with +current Xorg xserver master branch. + +Also use xf86GetOptValInteger() in get_int_option() and +xf86GetOptValString() in get_str_option() for consistency. + +The change causes a slight performance drop during option parsing +because the passed-in index_value is no longer used as an index +into the options array. + +Instead, it's used as a token now for the standard option getter +functions which works since the index_value to the get_*_option() +functions are identical to the value of options[n].token in the +passed-in OptionInfoRec array. + +Also rename "int option_index" to "int token" for clarity in all +three functions. + +Signed-off-by: Zoltán Böszörményi +--- a/src/qxl_option_helpers.c ++++ b/src/qxl_option_helpers.c +@@ -10,31 +10,32 @@ + + #include "qxl_option_helpers.h" + +-int get_int_option(OptionInfoPtr options, int option_index, ++int get_int_option(OptionInfoPtr options, int token, + const char *env_name) + { ++ int value; + if (env_name && getenv(env_name)) { + return atoi(getenv(env_name)); + } +- return options[option_index].value.num; ++ return xf86GetOptValInteger(options, token, &value) ? value : 0; + } + +-const char *get_str_option(OptionInfoPtr options, int option_index, ++const char *get_str_option(OptionInfoPtr options, int token, + const char *env_name) + { + if (getenv(env_name)) { + return getenv(env_name); + } +- return options[option_index].value.str; ++ return xf86GetOptValString(options, token); + } + +-int get_bool_option(OptionInfoPtr options, int option_index, ++int get_bool_option(OptionInfoPtr options, int token, + const char *env_name) + { + const char* value = getenv(env_name); + + if (!value) { +- return options[option_index].value.bool; ++ return xf86ReturnOptValBool(options, token, FALSE); + } + if (strcmp(value, "0") == 0 || + strcasecmp(value, "off") == 0 || +--- a/src/qxl_option_helpers.h ++++ b/src/qxl_option_helpers.h +@@ -4,13 +4,13 @@ + #include + #include + +-int get_int_option(OptionInfoPtr options, int option_index, ++int get_int_option(OptionInfoPtr options, int token, + const char *env_name); + +-const char *get_str_option(OptionInfoPtr options, int option_index, ++const char *get_str_option(OptionInfoPtr options, int token, + const char *env_name); + +-int get_bool_option(OptionInfoPtr options, int option_index, ++int get_bool_option(OptionInfoPtr options, int token, + const char *env_name); + + #endif // OPTION_HELPERS_H +GitLab diff --git a/x11-drivers/xf86-video-qxl/xf86-video-qxl-0.1.5_p20200205-r10.ebuild b/x11-drivers/xf86-video-qxl/xf86-video-qxl-0.1.5_p20200205-r10.ebuild new file mode 100644 index 00000000..adc74580 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/xf86-video-qxl-0.1.5_p20200205-r10.ebuild @@ -0,0 +1,52 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit autotools python-single-r1 xorg-3 + +DESCRIPTION="QEMU QXL paravirt video driver" +SRC_URI="https://dev.gentoo.org/~slashbeast/distfiles/${PN}/${P}.tar.xz" +S="${WORKDIR}" + +KEYWORDS="amd64 x86" +IUSE="xspice" +REQUIRED_USE="xspice? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + xspice? ( + app-emulation/spice + ${PYTHON_DEPS} + ) + x11-base/xorg-server[-minimal] + >=x11-libs/libdrm-2.4.46" +DEPEND=" + ${RDEPEND} + >=app-emulation/spice-protocol-0.12.0 + x11-base/xorg-proto" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-0.1.5_p20200205-xorg-21.0-build.patch +) + +pkg_setup() { + use xspice && python-single-r1_pkg_setup + xorg-3_pkg_setup +} + +src_prepare() { + xorg-3_src_prepare + eautoreconf + + use xspice && python_fix_shebang scripts +} + +src_configure() { + local XORG_CONFIGURE_OPTIONS=( + $(use_enable xspice) + ) + xorg-3_src_configure +} -- cgit v1.2.3