summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostadin Shishmanov <kocelfc@tutanota.com>2024-05-05 15:37:03 +0300
committerSam James <sam@gentoo.org>2024-05-05 13:53:45 +0100
commit330c8f61442cdeba8962c44c186fd0e8c908ac73 (patch)
tree1c1bb294d056558c1dd8fb073e91735bc1cf5465 /net-misc/spice-gtk
parentdev-util/elfshaker: add 0.9.0_p20240122 (diff)
downloadgentoo-330c8f61442cdeba8962c44c186fd0e8c908ac73.tar.gz
gentoo-330c8f61442cdeba8962c44c186fd0e8c908ac73.tar.bz2
gentoo-330c8f61442cdeba8962c44c186fd0e8c908ac73.zip
net-misc/spice-gtk: enable py3.12, backport lld 17 fix
Closes: https://bugs.gentoo.org/915210 Closes: https://bugs.gentoo.org/929731 Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com> Closes: https://github.com/gentoo/gentoo/pull/36566 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/spice-gtk')
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.42-lld17-fix.patch167
-rw-r--r--net-misc/spice-gtk/spice-gtk-0.42-r4.ebuild160
-rw-r--r--net-misc/spice-gtk/spice-gtk-9999.ebuild2
3 files changed, 328 insertions, 1 deletions
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.42-lld17-fix.patch b/net-misc/spice-gtk/files/spice-gtk-0.42-lld17-fix.patch
new file mode 100644
index 000000000000..b6197fb15ba3
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.42-lld17-fix.patch
@@ -0,0 +1,167 @@
+https://gitlab.freedesktop.org/spice/spice-gtk/-/merge_requests/121
+https://bugs.gentoo.org/915210
+
+From 7e87382b585a799ced543b0c3fd127b2a813285f Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <freddy77@gmail.com>
+Date: Fri, 23 Jun 2023 21:17:26 +0100
+Subject: [PATCH] Split symbol file in 2 files
+
+One file for spice-glib and another for spice-gtk.
+This avoid having duplicate exports in the future.
+spice_g_signal_connect_object, spice_util_get_debug,
+spice_util_get_version_string, spice_util_set_debug and
+spice_uuid_to_string are exported by both libraries to keep ABI
+compatibility.
+
+Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
+---
+ src/{map-file => map-file-glib} | 22 ---------------------
+ src/map-file-gtk | 35 +++++++++++++++++++++++++++++++++
+ src/meson.build | 17 ++++++++++------
+ 3 files changed, 46 insertions(+), 28 deletions(-)
+ rename src/{map-file => map-file-glib} (89%)
+ create mode 100644 src/map-file-gtk
+
+diff --git a/src/map-file b/src/map-file-glib
+similarity index 89%
+rename from src/map-file
+rename to src/map-file-glib
+index c0d8ca6e..ef0a31f3 100644
+--- a/src/map-file
++++ b/src/map-file-glib
+@@ -31,18 +31,8 @@ spice_display_channel_get_primary;
+ spice_display_channel_get_type;
+ spice_display_channel_gl_draw_done;
+ spice_display_get_gl_scanout;
+-spice_display_get_grab_keys;
+-spice_display_get_pixbuf;
+ spice_display_get_primary;
+-spice_display_get_type;
+ spice_display_gl_draw_done;
+-spice_display_key_event_get_type;
+-spice_display_keyboard_ungrab;
+-spice_display_mouse_ungrab;
+-spice_display_new;
+-spice_display_new_with_monitor;
+-spice_display_send_keys;
+-spice_display_set_grab_keys;
+ spice_file_transfer_task_cancel;
+ spice_file_transfer_task_get_filename;
+ spice_file_transfer_task_get_progress;
+@@ -52,17 +42,7 @@ spice_file_transfer_task_get_type;
+ spice_get_option_group;
+ spice_gl_scanout_free;
+ spice_gl_scanout_get_type;
+-spice_grab_sequence_as_string;
+-spice_grab_sequence_copy;
+-spice_grab_sequence_free;
+-spice_grab_sequence_get_type;
+-spice_grab_sequence_new;
+-spice_grab_sequence_new_from_string;
+ spice_g_signal_connect_object;
+-spice_gtk_session_copy_to_guest;
+-spice_gtk_session_get;
+-spice_gtk_session_get_type;
+-spice_gtk_session_paste_from_guest;
+ spice_inputs_button_press;
+ spice_inputs_button_release;
+ spice_inputs_channel_button_press;
+@@ -185,8 +165,6 @@ spice_usb_device_manager_is_redirecting;
+ spice_usb_device_manager_allocate_device_for_file_descriptor;
+ spice_usb_device_manager_create_shared_cd_device;
+ spice_usb_device_manager_is_device_shared_cd;
+-spice_usb_device_widget_get_type;
+-spice_usb_device_widget_new;
+ spice_usbredir_channel_get_type;
+ spice_util_get_debug;
+ spice_util_get_version_string;
+diff --git a/src/map-file-gtk b/src/map-file-gtk
+new file mode 100644
+index 00000000..ca5dd446
+--- /dev/null
++++ b/src/map-file-gtk
+@@ -0,0 +1,35 @@
++SPICEGTK_1 {
++global:
++spice_display_get_grab_keys;
++spice_display_get_pixbuf;
++spice_display_get_type;
++spice_display_key_event_get_type;
++spice_display_keyboard_ungrab;
++spice_display_mouse_ungrab;
++spice_display_new;
++spice_display_new_with_monitor;
++spice_display_send_keys;
++spice_display_set_grab_keys;
++spice_grab_sequence_as_string;
++spice_grab_sequence_copy;
++spice_grab_sequence_free;
++spice_grab_sequence_get_type;
++spice_grab_sequence_new;
++spice_grab_sequence_new_from_string;
++spice_gtk_session_copy_to_guest;
++spice_gtk_session_get;
++spice_gtk_session_get_type;
++spice_gtk_session_paste_from_guest;
++spice_usb_device_widget_get_type;
++spice_usb_device_widget_new;
++
++/* FIXME: remove the following 5 duplicated symbols in next ABI break */
++spice_g_signal_connect_object;
++spice_util_get_debug;
++spice_util_get_version_string;
++spice_util_set_debug;
++spice_uuid_to_string;
++
++local:
++*;
++};
+diff --git a/src/meson.build b/src/meson.build
+index 852217ac..68fe7ab2 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -185,14 +185,20 @@ test_syms_path = meson.current_source_dir() / 'test-map-file'
+ test_version_script = '-Wl,--version-script=@0@'.format(test_syms_path)
+ spice_has_version_script = compiler.has_link_argument(test_version_script)
+
+-spice_client_glib_syms = files('map-file')
+-spice_client_glib_syms_path = meson.current_source_dir() / 'map-file'
+-spice_gtk_version_script = '-Wl,--version-script=@0@'.format(spice_client_glib_syms_path)
+-if not spice_has_version_script
++if spice_has_version_script
++ spice_client_glib_syms = files('map-file-glib')
++ spice_client_gtk_syms = files('map-file-gtk')
++ spice_client_glib_syms_path = meson.current_source_dir() / 'map-file-glib'
++ spice_client_gtk_syms_path = meson.current_source_dir() / 'map-file-gtk'
++ spice_glib_version_script = '-Wl,--version-script=@0@'.format(spice_client_glib_syms_path)
++ spice_gtk_version_script = '-Wl,--version-script=@0@'.format(spice_client_gtk_syms_path)
++else
+ if host_machine.system() == 'linux'
+ error('Version scripts should be supported on Linux')
+ endif
+ spice_client_glib_syms = []
++ spice_client_gtk_syms = []
++ spice_glib_version_script = []
+ spice_gtk_version_script = []
+ endif
+
+@@ -210,7 +216,7 @@ spice_client_glib_lib = library('spice-client-glib-2.0', spice_client_glib_sourc
+ version : spice_client_glib_so_version,
+ install : true,
+ include_directories : spice_gtk_include,
+- link_args : [spice_gtk_version_script],
++ link_args : [spice_glib_version_script],
+ link_depends : spice_client_glib_syms,
+ dependencies : spice_glib_deps)
+
+@@ -377,7 +383,6 @@ if spice_gtk_has_gtk
+ #
+ # libspice-client-gtk.so
+ #
+- spice_client_gtk_syms = spice_client_glib_syms
+
+ # soversion
+ # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+--
+GitLab
+
diff --git a/net-misc/spice-gtk/spice-gtk-0.42-r4.ebuild b/net-misc/spice-gtk/spice-gtk-0.42-r4.ebuild
new file mode 100644
index 000000000000..677217bfee91
--- /dev/null
+++ b/net-misc/spice-gtk/spice-gtk-0.42-r4.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit desktop meson optfeature python-any-r1 readme.gentoo-r1 vala xdg
+
+DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
+HOMEPAGE="https://www.spice-space.org https://cgit.freedesktop.org/spice/spice-gtk/"
+if [[ ${PV} == *9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.freedesktop.org/git/spice/spice-gtk.git"
+ inherit git-r3
+
+ SPICE_PROTOCOL_VER=9999
+else
+ SRC_URI="https://www.spice-space.org/download/gtk/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+ SPICE_PROTOCOL_VER=0.14.3
+fi
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="gtk-doc +gtk3 +introspection lz4 mjpeg policykit sasl smartcard usbredir vala valgrind wayland webdav"
+
+# TODO:
+# * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
+# * use external pnp.ids as soon as that means not pulling in gnome-desktop
+RDEPEND="
+ >=dev-libs/glib-2.46:2
+ dev-libs/json-glib:0=
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gstreamer:1.0[introspection?]
+ media-libs/opus
+ media-libs/libjpeg-turbo:=
+ sys-libs/zlib
+ >=x11-libs/cairo-1.2
+ >=x11-libs/pixman-0.17.7
+ x11-libs/libX11
+ gtk3? ( x11-libs/gtk+:3[introspection?] )
+ introspection? ( dev-libs/gobject-introspection )
+ dev-libs/openssl:=
+ lz4? ( app-arch/lz4 )
+ policykit? (
+ >=sys-auth/polkit-0.110-r1
+ )
+ sasl? ( dev-libs/cyrus-sasl )
+ smartcard? ( app-emulation/qemu[smartcard] )
+ usbredir? (
+ sys-apps/hwdata
+ >=sys-apps/usbredir-0.4.2
+ virtual/acl
+ virtual/libusb:1
+ )
+ webdav? (
+ net-libs/phodav:3.0
+ net-libs/libsoup:3.0
+ )
+"
+# TODO: spice-gtk has an automagic dependency on media-libs/libva without a
+# configure knob. The package is relatively lightweight so we just depend
+# on it unconditionally for now. It would be cleaner to transform this into
+# a USE="vaapi" conditional and patch the buildsystem...
+RDEPEND="
+ ${RDEPEND}
+ amd64? ( media-libs/libva:= )
+ arm64? ( media-libs/libva:= )
+ x86? ( media-libs/libva:= )
+"
+DEPEND="
+ ${RDEPEND}
+ >=app-emulation/spice-protocol-${SPICE_PROTOCOL_VER}
+ valgrind? ( dev-debug/valgrind )
+"
+BDEPEND="
+ $(python_gen_any_dep '
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ dev-perl/Text-CSV
+ dev-util/glib-utils
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ gtk-doc? ( dev-util/gtk-doc )
+ vala? ( $(vala_depend) )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.42-libtool-export-symbols-fix.patch"
+ "${FILESDIR}/${PN}-0.42-lld17-fix.patch"
+)
+
+python_check_deps() {
+ python_has_version "dev-python/six[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/pyparsing[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ default
+
+ python_fix_shebang subprojects/keycodemapdb/tools/keymap-gen
+
+ use vala && vala_setup
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature gtk-doc gtk_doc)
+ $(meson_feature gtk3 gtk)
+ $(meson_feature introspection)
+ $(meson_use mjpeg builtin-mjpeg)
+ $(meson_feature policykit polkit)
+ $(meson_feature lz4)
+ $(meson_feature sasl)
+ $(meson_feature smartcard)
+ $(meson_feature usbredir)
+ $(meson_feature vala vapi)
+ $(meson_use valgrind)
+ $(meson_feature webdav)
+ $(meson_feature wayland wayland-protocols)
+ )
+
+ if use elibc_musl; then
+ emesonargs+=(
+ -Dcoroutine=gthread
+ )
+ fi
+
+ if use usbredir; then
+ emesonargs+=(
+ -Dusb-acl-helper-dir=/usr/libexec
+ -Dusb-ids-path="${EPREFIX}"/usr/share/hwdata/usb.ids
+ )
+ fi
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ if use usbredir && use policykit; then
+ # bug #775554 (and bug #851657)
+ fowners root:root /usr/libexec/spice-client-glib-usb-acl-helper
+ fperms 4755 /usr/libexec/spice-client-glib-usb-acl-helper
+ fi
+
+ make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "Sound support (via pulseaudio)" media-plugins/gst-plugins-pulse
+}
diff --git a/net-misc/spice-gtk/spice-gtk-9999.ebuild b/net-misc/spice-gtk/spice-gtk-9999.ebuild
index 37eef00f49c0..5f81513a6c11 100644
--- a/net-misc/spice-gtk/spice-gtk-9999.ebuild
+++ b/net-misc/spice-gtk/spice-gtk-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
VALA_USE_DEPEND="vapigen"
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit desktop meson optfeature python-any-r1 readme.gentoo-r1 vala xdg