pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/kew



Module Name:    pkgsrc
Committed By:   ktnb
Date:           Thu Feb 12 12:55:00 UTC 2026

Modified Files:
        pkgsrc/audio/kew: distinfo options.mk
Added Files:
        pkgsrc/audio/kew/patches: patch-src_sys_mpris.c

Log Message:
kew: fixed bug with non-dbus option


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/audio/kew/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/audio/kew/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/kew/patches/patch-src_sys_mpris.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/kew/distinfo
diff -u pkgsrc/audio/kew/distinfo:1.18 pkgsrc/audio/kew/distinfo:1.19
--- pkgsrc/audio/kew/distinfo:1.18      Mon Dec 29 03:10:14 2025
+++ pkgsrc/audio/kew/distinfo   Thu Feb 12 12:55:00 2026
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.18 2025/12/29 03:10:14 ktnb Exp $
+$NetBSD: distinfo,v 1.19 2026/02/12 12:55:00 ktnb Exp $
 
 BLAKE2s (kew-3.7.3.tar.gz) = 6d1f8b5190f71dc4ee8622ea3fbd6ec3722e5c585c88cecd0792933870809029
 SHA512 (kew-3.7.3.tar.gz) = 208dc0fdf004d8284f6378d863617f8eec5f8e71b8febafca059964a4db07967ceb56950946c588765e5984d58df89f094e438ff878e53514688289932389432
 Size (kew-3.7.3.tar.gz) = 3540842 bytes
 SHA1 (patch-Makefile) = cfff7938e8b325f20c86bc459e76d0617261b1d2
+SHA1 (patch-src_sys_mpris.c) = 26bfe6d50579a8928e86c28571c27fc468c27bf1
 SHA1 (patch-src_ui_common__ui.c) = ed7add1e11f413a83599ce405040e3d3352c1074
 SHA1 (patch-src_ui_input.c) = dd575b6ef6e7b01d18422e8be47d9cd9d2bb9ebc

Index: pkgsrc/audio/kew/options.mk
diff -u pkgsrc/audio/kew/options.mk:1.2 pkgsrc/audio/kew/options.mk:1.3
--- pkgsrc/audio/kew/options.mk:1.2     Fri Dec 13 15:12:57 2024
+++ pkgsrc/audio/kew/options.mk Thu Feb 12 12:55:00 2026
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2024/12/13 15:12:57 ktnb Exp $
+# $NetBSD: options.mk,v 1.3 2026/02/12 12:55:00 ktnb Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.kew
 PKG_SUPPORTED_OPTIONS= dbus
@@ -10,5 +10,8 @@ PKG_SUGGESTED_OPTIONS=
 ###  Include dbus
 ###
 .if !empty(PKG_OPTIONS:Mdbus)
+MAKE_FLAGS+=   USE_DBUS=1
 .include "../../sysutils/dbus/buildlink3.mk"
+.else
+MAKE_FLAGS+=   USE_DBUS=0
 .endif

Added files:

Index: pkgsrc/audio/kew/patches/patch-src_sys_mpris.c
diff -u /dev/null pkgsrc/audio/kew/patches/patch-src_sys_mpris.c:1.1
--- /dev/null   Thu Feb 12 12:55:00 2026
+++ pkgsrc/audio/kew/patches/patch-src_sys_mpris.c      Thu Feb 12 12:55:00 2026
@@ -0,0 +1,131 @@
+$NetBSD: patch-src_sys_mpris.c,v 1.1 2026/02/12 12:55:00 ktnb Exp $
+
+Apply USE_DBUS correctly. https://github.com/ravachol/kew/issues/538
+
+--- src/sys/mpris.c.orig       2026-02-12 02:30:02.240433498 +0000
++++ src/sys/mpris.c
+@@ -23,7 +23,7 @@
+ #include <glib.h>
+ #include <math.h>
+ 
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+ 
+ static guint registration_id;
+ static guint bus_name_id;
+@@ -365,7 +365,7 @@ static void handle_set_position(GDBusConnection *conne
+ }
+ #endif
+ 
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+ static void handle_method_call(GDBusConnection *connection, const gchar *sender,
+                                const gchar *object_path,
+                                const gchar *interface_name,
+@@ -413,7 +413,7 @@ static void handle_method_call(GDBusConnection *connec
+ }
+ #endif
+ 
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+ static void on_bus_name_acquired(GDBusConnection *connection, const gchar *name,
+                                  gpointer user_data)
+ {
+@@ -808,7 +808,7 @@ static gboolean get_can_control(GDBusConnection *conne
+ }
+ #endif
+ 
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+ static GVariant *get_property_callback(GDBusConnection *connection,
+                                        const gchar *sender,
+                                        const gchar *object_path,
+@@ -950,7 +950,7 @@ set_property_callback(GDBusConnection *connection, con
+ }
+ #endif
+ 
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+ // MPRIS MediaPlayer2 interface vtable
+ static const GDBusInterfaceVTable media_player_interface_vtable = {
+     .method_call = handle_method_call, // We're using individual method handlers
+@@ -971,7 +971,7 @@ void emit_playback_stopped_mpris()
+ 
+ void emit_playback_stopped_mpris()
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         if (get_gd_bus_connection()) {
+                 g_dbus_connection_call(
+                     get_gd_bus_connection(), NULL, "/org/mpris/MediaPlayer2",
+@@ -987,7 +987,7 @@ void cleanup_mpris(void)
+ 
+ void cleanup_mpris(void)
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         if (registration_id > 0) {
+                 g_dbus_connection_unregister_object(get_gd_bus_connection(),
+                                                     registration_id);
+@@ -1019,7 +1019,7 @@ void init_mpris(void)
+ 
+ void init_mpris(void)
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         AppState *state = get_app_state();
+ 
+         if (get_g_main_context() == NULL) {
+@@ -1080,7 +1080,7 @@ void emit_start_playing_mpris()
+ 
+ void emit_start_playing_mpris()
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         GVariant *parameters = g_variant_new("(s)", "Playing");
+         g_dbus_connection_emit_signal(
+             get_gd_bus_connection(), NULL, "/org/mpris/MediaPlayer2",
+@@ -1106,14 +1106,14 @@ gchar *sanitize_title(const gchar *title)
+         return sanitized_dup;
+ }
+ 
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+ static guint64 last_emit_time = 0;
+ #endif
+ 
+ void emit_properties_changed(GDBusConnection *connection,
+                              const gchar *property_name, GVariant *new_value)
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         GVariantBuilder changed_properties_builder;
+ 
+         if (connection == NULL || property_name == NULL || new_value == NULL)
+@@ -1151,7 +1151,7 @@ void emit_volume_changed(void)
+ 
+ void emit_volume_changed(void)
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         gdouble newVolume = (gdouble)get_current_volume() / 100;
+ 
+         if (newVolume > 1.0)
+@@ -1165,7 +1165,7 @@ void emit_shuffle_changed(void)
+ 
+ void emit_shuffle_changed(void)
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         gboolean shuffle_enabled = is_shuffle_enabled();
+ 
+         // Emit the PropertiesChanged signal for the volume property
+@@ -1178,7 +1178,7 @@ void emit_metadata_changed(const gchar *title, const g
+                            const gchar *album, const gchar *cover_art_path,
+                            const gchar *track_id, Node *current_song, gint64 length)
+ {
+-#ifndef __APPLE__
++#ifdef USE_DBUS
+         guint64 current_time = g_get_monotonic_time();
+         if (current_time - last_emit_time < 500000) // 0.5 seconds
+         {



Home | Main Index | Thread Index | Old Index