commit: e50e5e28a52ead4714c53bf090b6457c86dcfed8 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> AuthorDate: Sat May 18 08:45:10 2024 +0000 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> CommitDate: Sat May 18 08:47:26 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e50e5e28
media-sound/rhythmbox: Multiple bugfixes Cherry picks from upstream master to fix implicit declarations, libxml2 and python 3.12 compat issues. Closes: https://bugs.gentoo.org/898926 Closes: https://bugs.gentoo.org/929668 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> .../rhythmbox-3.4.7-implicit-declaration.patch | 72 +++++++++++ .../files/rhythmbox-3.4.7-libxml-entities.patch | 36 ++++++ .../files/rhythmbox-3.4.7-libxml2-2.12.patch | 38 ++++++ .../files/rhythmbox-3.4.7-python3.12.patch | 30 +++++ .../files/rhythmbox-3.4.7-skip-broken-test.patch | 24 ++++ media-sound/rhythmbox/rhythmbox-3.4.7-r4.ebuild | 143 +++++++++++++++++++++ 6 files changed, 343 insertions(+) diff --git a/media-sound/rhythmbox/files/rhythmbox-3.4.7-implicit-declaration.patch b/media-sound/rhythmbox/files/rhythmbox-3.4.7-implicit-declaration.patch new file mode 100644 index 000000000000..2595561ad779 --- /dev/null +++ b/media-sound/rhythmbox/files/rhythmbox-3.4.7-implicit-declaration.patch @@ -0,0 +1,72 @@ +From 10369b9a6b896dc79d7ae715fe67bf3b4c581c22 Mon Sep 17 00:00:00 2001 +From: Matt Turner <matts...@gmail.com> +Date: Tue, 9 May 2023 15:48:56 -0400 +Subject: [PATCH] build: Define _GNU_SOURCE for pthread_getname_np + +With clang-16, implicit function definitions are treated as errors. As a +result, the check for pthread_getname_np fails because +pthread_getname_np is only provided under _GNU_SOURCE (see +pthread_getname_np(3)) + +> Checking if "pthread_getname_np" : links: NO + +The compilation failure is + +> error: implicit declaration of function 'pthread_getname_np' [-Werror,-Wimplicit-function-declaration] + +The inclusion of pthread.h lib/rb-debug.c must be moved above the system +headers because they may include pthread.h themselves (and in practice +unistd.h does). If that change is not done, lib/rb-debug.c will fail to +compile for the same reason as the configure test. + +Note that to test this, one must disable prctl() detection. + +Bug: https://bugs.gentoo.org/898926 +--- + lib/rb-debug.c | 11 ++++++----- + meson.build | 1 + + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/lib/rb-debug.c b/lib/rb-debug.c +index a5b4ccac6..b9e0ec81d 100644 +--- a/lib/rb-debug.c ++++ b/lib/rb-debug.c +@@ -30,17 +30,18 @@ + + #include "config.h" + ++#if defined(HAVE_PRCTL) ++#include <sys/prctl.h> ++#elif defined(HAVE_PTHREAD_GETNAME_NP) ++#define _GNU_SOURCE ++#include <pthread.h> ++#endif + #include <unistd.h> + #include <stdio.h> + #include <string.h> + #include <stdarg.h> + #include <signal.h> + #include <time.h> +-#if defined(HAVE_PRCTL) +-#include <sys/prctl.h> +-#elif defined(HAVE_PTHREAD_GETNAME_NP) +-#include <pthread.h> +-#endif + + #include <glib.h> + +diff --git a/meson.build b/meson.build +index 681e084e8..bbe014246 100644 +--- a/meson.build ++++ b/meson.build +@@ -110,6 +110,7 @@ have_prctl = cc.has_function('prctl', prefix: '#include <sys/prctl.h>') + cdata.set('HAVE_PRCTL', have_prctl) + + have_pthread_getname_np = cc.links(''' ++ #define _GNU_SOURCE + #include <pthread.h> + int main() { + char nm[17]; +-- +GitLab + diff --git a/media-sound/rhythmbox/files/rhythmbox-3.4.7-libxml-entities.patch b/media-sound/rhythmbox/files/rhythmbox-3.4.7-libxml-entities.patch new file mode 100644 index 000000000000..b542224d2fbe --- /dev/null +++ b/media-sound/rhythmbox/files/rhythmbox-3.4.7-libxml-entities.patch @@ -0,0 +1,36 @@ +From: =?utf-8?q?J=C3=BCrg_Billeter?= <j...@bitron.ch> +Date: Tue, 28 Nov 2023 20:12:07 +0100 +Subject: Add missing <libxml/entities.h> include + +(cherry picked from commit 4a906b33535c794f45d3bbc816f3b56a729529b4) + +Origin: upstream, after 3.4.7 +--- + rhythmdb/rhythmdb-query.c | 1 + + sources/rb-static-playlist-source.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/rhythmdb/rhythmdb-query.c b/rhythmdb/rhythmdb-query.c +index 0d1c24c..0009dde 100644 +--- a/rhythmdb/rhythmdb-query.c ++++ b/rhythmdb/rhythmdb-query.c +@@ -30,6 +30,7 @@ + + #include <string.h> + ++#include <libxml/entities.h> + #include <glib.h> + #include <glib-object.h> + #include <gobject/gvaluecollector.h> +diff --git a/sources/rb-static-playlist-source.c b/sources/rb-static-playlist-source.c +index 4c60f70..9d8606a 100644 +--- a/sources/rb-static-playlist-source.c ++++ b/sources/rb-static-playlist-source.c +@@ -46,6 +46,7 @@ + + #include <string.h> + ++#include <libxml/entities.h> + #include <libxml/tree.h> + #include <glib/gi18n.h> + #include <gtk/gtk.h> diff --git a/media-sound/rhythmbox/files/rhythmbox-3.4.7-libxml2-2.12.patch b/media-sound/rhythmbox/files/rhythmbox-3.4.7-libxml2-2.12.patch new file mode 100644 index 000000000000..7d95cb439d57 --- /dev/null +++ b/media-sound/rhythmbox/files/rhythmbox-3.4.7-libxml2-2.12.patch @@ -0,0 +1,38 @@ +From: =?utf-8?q?J=C3=BCrg_Billeter?= <j...@bitron.ch> +Date: Tue, 28 Nov 2023 20:04:17 +0100 +Subject: playlist-manager: Fix crash with libxml2 2.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +The missing include resulted in an implicit function declaration, which +may result in a segmentation fault on startup. + + ../shell/rb-playlist-manager.c: In function ‘rb_playlist_manager_load_playlists’: + ../shell/rb-playlist-manager.c:374:23: warning: implicit declaration of function ‘xmlParseMemory’ [-Wimplicit-function-declaration] + 374 | doc = xmlParseMemory (g_bytes_get_data (data, NULL), g_bytes_get_size (data)); + | ^~~~~~~~~~~~~~ + ../shell/rb-playlist-manager.c:374:23: warning: nested extern declaration of ‘xmlParseMemory’ [-Wnested-externs] + ../shell/rb-playlist-manager.c:374:21: warning: assignment to ‘xmlDocPtr’ {aka ‘struct _xmlDoc *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] + 374 | doc = xmlParseMemory (g_bytes_get_data (data, NULL), g_bytes_get_size (data)); + | ^ + +(cherry picked from commit 66da2f843e84bfa85870a4ace4054aa91ea07951) + +Origin: upstream, after 3.4.7 +--- + shell/rb-playlist-manager.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/shell/rb-playlist-manager.c b/shell/rb-playlist-manager.c +index 4974c9f..e0a54c6 100644 +--- a/shell/rb-playlist-manager.c ++++ b/shell/rb-playlist-manager.c +@@ -41,6 +41,7 @@ + #include <stdio.h> /* rename() */ + #include <unistd.h> /* unlink() */ + ++#include <libxml/parser.h> + #include <libxml/tree.h> + #include <glib/gi18n.h> + #include <gtk/gtk.h> diff --git a/media-sound/rhythmbox/files/rhythmbox-3.4.7-python3.12.patch b/media-sound/rhythmbox/files/rhythmbox-3.4.7-python3.12.patch new file mode 100644 index 000000000000..fb38b66c89d4 --- /dev/null +++ b/media-sound/rhythmbox/files/rhythmbox-3.4.7-python3.12.patch @@ -0,0 +1,30 @@ +From: Jonathan Matthew <jonat...@d14n.org> +Date: Mon, 4 Dec 2023 08:15:19 +1000 +Subject: artsearch: fix regex strings so python 3.12 stops complaining + +(cherry picked from commit ceeed5736c3e25d33fec5a100afde20ef485e07e) + +Origin: upstream, after 3.4.7 +--- + plugins/artsearch/lastfm.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/plugins/artsearch/lastfm.py b/plugins/artsearch/lastfm.py +index 0409105..82d5eeb 100644 +--- a/plugins/artsearch/lastfm.py ++++ b/plugins/artsearch/lastfm.py +@@ -49,10 +49,10 @@ API_URL = 'https://ws.audioscrobbler.com/2.0/' + # LASTFM_TOOLTIP = (LASTFM_LOGO, _("Image provided by Last.fm")) + + DISC_NUMBER_REGEXS = ( +- "\(disc *[0-9]+\)", +- "\(cd *[0-9]+\)", +- "\[disc *[0-9]+\]", +- "\[cd *[0-9]+\]", ++ "\\(disc *[0-9]+\\)", ++ "\\(cd *[0-9]+\\)", ++ "\\[disc *[0-9]+\\]", ++ "\\[cd *[0-9]+\\]", + " - disc *[0-9]+$", + " - cd *[0-9]+$", + " disc *[0-9]+$", diff --git a/media-sound/rhythmbox/files/rhythmbox-3.4.7-skip-broken-test.patch b/media-sound/rhythmbox/files/rhythmbox-3.4.7-skip-broken-test.patch new file mode 100644 index 000000000000..6cfccb262f7c --- /dev/null +++ b/media-sound/rhythmbox/files/rhythmbox-3.4.7-skip-broken-test.patch @@ -0,0 +1,24 @@ +From: Jeremy Bicha <jeremy.bi...@canonical.com> +Date: Thu, 23 Jun 2022 10:12:20 -0400 +Subject: tests: Skip load_query_multiple + +This test fails on arm64 only + +https://gitlab.gnome.org/GNOME/rhythmbox/-/issues/1993 +--- + tests/test-widgets.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test-widgets.c b/tests/test-widgets.c +index 0f725ed..60b194d 100644 +--- a/tests/test-widgets.c ++++ b/tests/test-widgets.c +@@ -291,7 +291,7 @@ rb_query_creator_suite (void) + tcase_add_checked_fixture (tc_qls, test_rhythmdb_setup, test_rhythmdb_shutdown); + tcase_add_test (tc_qls, test_query_creator_load_query_empty); + tcase_add_test (tc_qls, test_query_creator_load_query_simple); +- tcase_add_test (tc_qls, test_query_creator_load_query_multiple); ++ /* tcase_add_test (tc_qls, test_query_creator_load_query_multiple); */ + tcase_add_test (tc_qls, test_query_creator_load_query_disjunction); + tcase_add_test (tc_qls, test_query_creator_load_limit_count); + tcase_add_test (tc_qls, test_query_creator_load_limit_minutes); diff --git a/media-sound/rhythmbox/rhythmbox-3.4.7-r4.ebuild b/media-sound/rhythmbox/rhythmbox-3.4.7-r4.ebuild new file mode 100644 index 000000000000..16d56c63e54b --- /dev/null +++ b/media-sound/rhythmbox/rhythmbox-3.4.7-r4.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_REQ_USE="xml(+)" + +inherit gnome.org gnome2-utils python-single-r1 meson virtualx xdg + +DESCRIPTION="Music management and playback software for GNOME" +HOMEPAGE="https://wiki.gnome.org/Apps/Rhythmbox" + +LICENSE="GPL-2" +SLOT="0" + +IUSE="cdr daap dbus keyring gtk-doc ipod libnotify lirc mtp +python test +udev upnp-av" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + ipod? ( udev ) + mtp? ( udev ) + dbus? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + +DEPEND=" + x11-libs/cairo + >=x11-libs/gdk-pixbuf-2.18:2 + >=dev-libs/glib-2.66.0:2 + >=dev-libs/gobject-introspection-0.10:= + >=media-libs/gstreamer-1.4.0:1.0[introspection] + >=media-libs/gst-plugins-base-1.4.0:1.0[introspection] + >=x11-libs/gtk+-3.20.0:3[introspection] + dev-libs/json-glib + >=dev-libs/libpeas-0.7.3:0[gtk] + >=net-libs/libsoup-3.0.7:3.0 + >=dev-libs/libxml2-2.7.8:2 + x11-libs/pango + >=sys-libs/tdb-1.2.6 + >=dev-libs/totem-pl-parser-3.2:= + + cdr? ( >=app-cdr/brasero-2.91.90 ) + daap? ( + >=net-libs/libdmapsharing-3.9.11:4.0= + >=media-plugins/gst-plugins-soup-1.4:1.0 + ) + keyring? ( >=app-crypt/libsecret-0.18 ) + libnotify? ( >=x11-libs/libnotify-0.7.0 ) + lirc? ( app-misc/lirc ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + >=dev-python/pygobject-3.0:3[${PYTHON_USEDEP}] + ') + ) + udev? ( + dev-libs/libgudev:= + ipod? ( >=media-libs/libgpod-0.7.92[udev] ) + mtp? ( >=media-libs/libmtp-0.3 ) + ) +" +RDEPEND="${DEPEND} + media-plugins/gst-plugins-soup:1.0 + || ( + media-plugins/gst-plugins-cdparanoia:1.0 + media-plugins/gst-plugins-cdio:1.0 + ) + media-plugins/gst-plugins-meta:1.0 + media-plugins/gst-plugins-taglib:1.0 + x11-themes/adwaita-icon-theme + python? ( + >=dev-libs/libpeas-0.7.3:0[python,${PYTHON_SINGLE_USEDEP}] + net-libs/libsoup:3.0[introspection] + x11-libs/gdk-pixbuf:2[introspection] + x11-libs/gtk+:3[introspection] + x11-libs/pango[introspection] + + dbus? ( sys-apps/dbus ) + keyring? ( >=app-crypt/libsecret-0.18[introspection] ) + ) + upnp-av? ( + >=media-libs/grilo-0.3.15-r1:0.3 + >=media-plugins/grilo-plugins-0.3.16:0.3[upnp-av] + ) +" +BDEPEND=" + gtk-doc? ( dev-util/gtk-doc ) + dev-util/itstool + virtual/pkgconfig + test? ( dev-libs/check ) +" + +PATCHES=( + "${FILESDIR}"/${P}-implicit-declaration.patch + "${FILESDIR}"/${P}-libxml2-2.12.patch + "${FILESDIR}"/${P}-libxml-entities.patch + "${FILESDIR}"/${P}-python3.12.patch + "${FILESDIR}"/${P}-skip-broken-test.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local emesonargs=( + $(meson_feature cdr brasero) + $(meson_feature daap) + -Dfm_radio=enabled + $(meson_feature upnp-av grilo) + $(meson_feature udev gudev) + $(meson_feature ipod) + $(meson_feature libnotify) + $(meson_feature keyring libsecret) + $(meson_feature lirc) + $(meson_feature mtp) + $(meson_feature python plugins_python) + -Dplugins_vala=disabled + -Dsample-plugins=false + + -Dhelp=true + $(meson_use gtk-doc gtk_doc) + $(meson_feature test tests) + ) + meson_src_configure +} + +src_test() { + unset SESSION_MANAGER + "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/data" || die + GSETTINGS_SCHEMA_DIR="${S}/data" virtx meson_src_test +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +}