[MacPorts] #72197: garagejam 5.0.0 requires xorg-server and the command "sudo port load dbus" must be run before running "garagejam"
MacPorts
noreply at macports.org
Sun Mar 16 11:12:41 UTC 2025
#72197: garagejam 5.0.0 requires xorg-server and the command "sudo port load dbus"
must be run before running "garagejam"
----------------------------+----------------------
Reporter: aamotsoftware | Owner: oleaamot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords:
Port: garagejam |
----------------------------+----------------------
Comment (by aamotsoftware):
Here is a patch for the Portfile of garagejam-5.0.0 to ensure that dbus is
properly loaded upon installation and provide user-friendly instructions
for missing dependencies. This patch includes:
A post-activate script to automatically load dbus
A pre-fetch check to ensure xorg-server is installed
Improved notes for users on manual setup steps if necessary.
diff --git a/Portfile b/Portfile
index abc1234..def5678 100644
--- a/Portfile
+++ b/Portfile
@@ -20,6 +20,9 @@ categories audio gnome
platforms darwin
license GPL-3+
maintainers oleaamot openmaintainer
+# Dependencies
+depends_run port:xorg-server port:dbus
+
description GarageJam is a free and open-source music recording
software for GNOME.
long_description \
GarageJam is a multi-track audio recording and editing software
designed for musicians and producers, \
@@ -48,6 +51,25 @@ configure.args-append --enable-gtk3
build.args-append V=1
destroot.args-append DESTDIR=${destroot}
+# Ensure dbus is loaded after installation
+post-activate {
+ ui_msg "Loading D-Bus service..."
+ system "sudo port load dbus"
+}
+
+# Pre-fetch check for Xorg-server
+pre-fetch {
+ if {![file exists ${prefix}/bin/Xorg]} {
+ ui_warn "Xorg-server is required to run GarageJam but is not
installed."
+ ui_warn "Install it with: sudo port install xorg-server"
+ }
+}
+
+# Inform users about manual dbus activation
+notes "
+GarageJam requires D-Bus to be running. If GarageJam does not start, try
running:
+ sudo port load dbus
+"
livecheck.type github
livecheck.url https://github.com/aamotsoftware/garagejam
Patch Features:
Automatically Loads dbus After Installation
The post-activate hook ensures dbus is loaded immediately after garagejam
is installed.
Checks for Missing xorg-server During Pre-Fetch
Warns users if xorg-server is not installed, preventing runtime issues.
Improved Notes for Users
Provides clear instructions on manually loading dbus if needed.
Next Steps:
Apply this patch and submit a pull request to MacPorts GarageJam.
Test the updated port installation to verify dbus starts correctly.
Would you like assistance in submitting this update to MacPorts? 🚀
--
Ticket URL: <https://trac.macports.org/ticket/72197#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list