From 40e575e0f5a3fe03e17ac28f1c36b7b8e89d4793 Mon Sep 17 00:00:00 2001 From: dagargo Date: Sun, 26 Apr 2026 11:22:10 +0200 Subject: [PATCH 1/4] Remove unneeded header --- src/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.c b/src/main.c index ba72b73..9200bad 100644 --- a/src/main.c +++ b/src/main.c @@ -20,7 +20,6 @@ #define _GNU_SOURCE #include -#include #include #include #include From 08d3b8115ce96e7c8e44e1337a9e7b130cd6fe76 Mon Sep 17 00:00:00 2001 From: dagargo Date: Sun, 26 Apr 2026 12:14:44 +0200 Subject: [PATCH 2/4] Improve autotools portability Fix operator. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9f58f82..1e25d86 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_DEFINE([PACKAGE_SERVICE_DBUS_NAME], ["io.github.dagargo.OverwitchService"], " AC_PROG_CC # Define conditional prior to package checks -AM_CONDITIONAL([CLI_ONLY], [test "${CLI_ONLY}" == yes]) +AM_CONDITIONAL([CLI_ONLY], [test "${CLI_ONLY}" = yes]) AM_CONDITIONAL([GUI], [test "${CLI_ONLY}" != yes]) AM_COND_IF(GUI, [PKG_CHECK_MODULES(GTK4, gtk4 >= 4.14)]) From 642b83923f8246b7b3fdcb8d561dd50e50639a21 Mon Sep 17 00:00:00 2001 From: dagargo Date: Sun, 26 Apr 2026 12:35:30 +0200 Subject: [PATCH 3/4] Service: Skip systemd calls As the service is used by both the systemd service and the D-Bus service, this needs to be considered for non-systemd systems. --- src/Makefile.am | 4 ++++ src/main-service.c | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index a388083..cff6249 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,4 +55,8 @@ SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ SNDFILE_LIBS = @SNDFILE_LIBS@ +if HAVE_SYSTEMD +AM_CPPFLAGS = -DDATADIR='"$(datadir)/$(PACKAGE)"' -DLOCALEDIR='"$(localedir)"' -DHAVE_SYSTEMD='"yes"' +else AM_CPPFLAGS = -DDATADIR='"$(datadir)/$(PACKAGE)"' -DLOCALEDIR='"$(localedir)"' +endif diff --git a/src/main-service.c b/src/main-service.c index 58c19c9..3d20c95 100644 --- a/src/main-service.c +++ b/src/main-service.c @@ -21,7 +21,9 @@ #define _GNU_SOURCE #include #include +#ifdef HAVE_SYSTEMD #include +#endif #include #include "../config.h" #include "jclient.h" @@ -141,16 +143,19 @@ signal_handler (int signum) { struct timespec ts; clock_gettime (CLOCK_MONOTONIC, &ts); +#ifdef HAVE_SYSTEMD sd_notifyf (0, "RELOADING=1\nMONOTONIC_USEC=%" PRIdMAX "%06d", (intmax_t) ts.tv_sec, (int) (ts.tv_nsec / 1000)); +#endif handle_start (); +#ifdef HAVE_SYSTEMD sd_notify (0, "READY=1"); +#endif } else { error_print ("Signal not handled"); } - } static void * @@ -544,7 +549,9 @@ app_startup (GApplication *app, gpointer *user_data) startup (); g_application_hold (app); g_application_activate (app); +#ifdef HAVE_SYSTEMD sd_notify (0, "READY=1"); +#endif } } From cb08f45c3d1498730ff797f91704790eba4cebb4 Mon Sep 17 00:00:00 2001 From: dagargo Date: Sun, 26 Apr 2026 13:15:28 +0200 Subject: [PATCH 4/4] Documentation: Add notes for Void Linux --- README.md | 12 ++++++++++++ docs/installation.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 77ac27d..eb28f90 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,12 @@ sudo make install sudo ldconfig ``` +On Void Linux, additional arguments need to be passed to `./configure`. + +``` +./configure CFLAGS="-I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include" LDFLAGS=-ljack +``` + Some udev rules might need to be installed manually with `sudo make install` from the `udev` directory as they are not part of the `install` target. This is not needed when packaging or when distributions already provide them. The package dependencies for Debian based distributions are: @@ -76,6 +82,12 @@ For Arch, no additional dependencies are needed. As this will install `jackd2`, you would be asked to configure it to be run with real time priority. Be sure to answer yes. With this, the `audio` group would be able to run processes with real time priority. Be sure to be in the `audio` group too. +For Void Linux, run this to install the dependencies. Notice that, since this distribution is not based on `systemd`, the Overwitch service based on it will not be installed. + +``` +sudo xbps-install base-devel gettext-devel pipewire libjack-pipewire jack-devel libusb-devel glib-devel json-glib-devel libsndfile-devel libsamplerate-devel gtk4-devel +``` + ### systemd service For embedded systems or users not wanting to use the GUI, it is recommended to install the systemd service unit by running `sudo make install` from the `systemd` directory. Notice `overwitch.service` is installed as a user service. diff --git a/docs/installation.md b/docs/installation.md index e0c1e95..077dc8e 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -19,6 +19,12 @@ sudo make install sudo ldconfig ``` +On Void Linux, additional arguments need to be passed to `./configure`. + +``` +./configure CFLAGS="-I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include" LDFLAGS=-ljack +``` + Some udev rules might need to be installed manually with `sudo make install` from the `udev` directory as they are not part of the `install` target. This is not needed when packaging or when distributions already provide them. The package dependencies for Debian based distributions are: @@ -51,6 +57,12 @@ For Arch, no additional dependencies are needed. As this will install `jackd2`, you would be asked to configure it to be run with real time priority. Be sure to answer yes. With this, the `audio` group would be able to run processes with real time priority. Be sure to be in the `audio` group too. +For Void Linux, run this to install the dependencies. Notice that, since this distribution is not based on `systemd`, the Overwitch service based on it will not be installed. + +``` +sudo xbps-install base-devel gettext-devel pipewire libjack-pipewire jack-devel libusb-devel glib-devel json-glib-devel libsndfile-devel libsamplerate-devel gtk4-devel +``` + ### systemd service For embedded systems or users not wanting to use the GUI, it is recommended to install the systemd service unit by running `sudo make install` from the `systemd` directory. Notice `overwitch.service` is installed as a user service.