git: 689fab71e4a0 - main - audio/g4music: Play music elegantly

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Fri, 19 Sep 2025 08:28:49 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=689fab71e4a085a3fa9ff4b8a7a310c132c5f9c7

commit 689fab71e4a085a3fa9ff4b8a7a310c132c5f9c7
Author:     Olivier Duchateau <duchateau.olivier@gmail.com>
AuthorDate: 2025-09-17 18:54:25 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-09-19 08:25:53 +0000

    audio/g4music: Play music elegantly
    
    G4Music is a fast fluent lightweight music player written in GTK4, with
    a beautiful and adaptive user interface, focuses on high performance
    for large music collection.
    
    * Supports most music file types, samba and any other remote protocols
      (depends on GIO and GStreamer).
    * Fast loading and parsing thousands of music files in very few seconds,
      monitor local changes.
    * Low memory usage for large music collection with album covers
      (embedded and external), no thumbnail caches to store.
    * Group and sorts by album/artist/title, shuffle list, full-text searching.
    * Gaussian blurred cover as background, follows GNOME light/dark mode.
    * Drag-drop from GNOME Files, showing music in Files.
    * Supports audio peaks visualizer.
    * Supports gapless playback.
    * Supports normalizing volume with ReplayGain.
    * Supports pipewire and other audio sink.
    * Supports MPRIS control.
    
    WWW: https://gitlab.gnome.org/neithern/g4music
    
    PR:             281983
---
 audio/Makefile                                     |  1 +
 audio/g4music/Makefile                             | 31 +++++++++++++++++++
 audio/g4music/distinfo                             |  3 ++
 ....gnome.gitlab.neithern.g4music.gschema.override |  3 ++
 audio/g4music/files/patch-data_meson.build         | 14 +++++++++
 audio/g4music/pkg-descr                            | 18 +++++++++++
 audio/g4music/pkg-plist                            | 36 ++++++++++++++++++++++
 7 files changed, 106 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index 888717f95499..26cfe4611044 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -198,6 +198,7 @@
     SUBDIR += ft2-clone
     SUBDIR += ft2play
     SUBDIR += furnace
+    SUBDIR += g4music
     SUBDIR += ganv
     SUBDIR += gbsplay
     SUBDIR += geonkick-lv2
diff --git a/audio/g4music/Makefile b/audio/g4music/Makefile
new file mode 100644
index 000000000000..0a60d22586e0
--- /dev/null
+++ b/audio/g4music/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	g4music
+DISTVERSIONPREFIX=	v
+DISTVERSION=	4.5
+CATEGORIES=	audio
+
+MAINTAINER=	duchateau.olivier@gmail.com
+COMMENT=	Play music elegantly
+WWW=		https://gitlab.gnome.org/neithern/g4music
+
+LICENSE=	GPLv3
+
+LIB_DEPENDS=	libgraphene-1.0.so:graphics/graphene
+RUN_DEPENDS=	dbus>0:devel/dbus
+
+USES=		desktop-file-utils gettext-tools gnome gstreamer meson \
+		pkgconfig tar:bz2 vala:build
+USE_GNOME=	gdkpixbuf glib20 gtk40 libadwaita
+USE_GSTREAMER=	good faad flac lame libav ogg opus pulse taglib vorbis wavpack
+
+USE_GITLAB=	yes
+GL_SITE=	https://gitlab.gnome.org
+GL_ACCOUNT=	neithern
+
+GLIB_SCHEMAS=	com.github.neithern.g4music.gschema.xml \
+		05_org.gnome.gitlab.neithern.g4music.gschema.override
+
+post-extract:
+	${CP} ${FILESDIR}/05_org.gnome.gitlab.neithern.g4music.gschema.override \
+		${WRKSRC}/data/
+
+.include <bsd.port.mk>
diff --git a/audio/g4music/distinfo b/audio/g4music/distinfo
new file mode 100644
index 000000000000..7da9b3f66992
--- /dev/null
+++ b/audio/g4music/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1754839808
+SHA256 (g4music-v4.5.tar.bz2) = b44ce30fcc78ecc87f4ff21f41cd9455e27a7c41847086e2bb230d5c786b46ae
+SIZE (g4music-v4.5.tar.bz2) = 145380
diff --git a/audio/g4music/files/05_org.gnome.gitlab.neithern.g4music.gschema.override b/audio/g4music/files/05_org.gnome.gitlab.neithern.g4music.gschema.override
new file mode 100644
index 000000000000..1bceaade6915
--- /dev/null
+++ b/audio/g4music/files/05_org.gnome.gitlab.neithern.g4music.gschema.override
@@ -0,0 +1,3 @@
+[com.github.neithern.g4music]
+# ossink (or osssink4) through autoaudiosink crashes G4Music
+audio-sink='pulsesink'
diff --git a/audio/g4music/files/patch-data_meson.build b/audio/g4music/files/patch-data_meson.build
new file mode 100644
index 000000000000..ba04ec56e1cc
--- /dev/null
+++ b/audio/g4music/files/patch-data_meson.build
@@ -0,0 +1,14 @@
+--- data/meson.build.orig	2023-10-15 09:07:10 UTC
++++ data/meson.build
+@@ -68,6 +68,11 @@ install_data(
+   install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
+ )
+ 
++install_data(
++  '05_org.gnome.gitlab.neithern.g4music.gschema.override',
++  install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
++)
++
+ compile_schemas = find_program('glib-compile-schemas', required: false)
+ if compile_schemas.found()
+   test('Validate schema file', compile_schemas,
diff --git a/audio/g4music/pkg-descr b/audio/g4music/pkg-descr
new file mode 100644
index 000000000000..81bee8ed96ed
--- /dev/null
+++ b/audio/g4music/pkg-descr
@@ -0,0 +1,18 @@
+G4Music is a fast fluent lightweight music player written in GTK4, with
+a beautiful and adaptive user interface, focuses on high performance
+for large music collection.
+
+* Supports most music file types, samba and any other remote protocols
+  (depends on GIO and GStreamer).
+* Fast loading and parsing thousands of music files in very few seconds,
+  monitor local changes.
+* Low memory usage for large music collection with album covers
+  (embedded and external), no thumbnail caches to store.
+* Group and sorts by album/artist/title, shuffle list, full-text searching.
+* Gaussian blurred cover as background, follows GNOME light/dark mode.
+* Drag-drop from GNOME Files, showing music in Files.
+* Supports audio peaks visualizer.
+* Supports gapless playback.
+* Supports normalizing volume with ReplayGain.
+* Supports pipewire and other audio sink.
+* Supports MPRIS control.
diff --git a/audio/g4music/pkg-plist b/audio/g4music/pkg-plist
new file mode 100644
index 000000000000..b43ac62b8cd9
--- /dev/null
+++ b/audio/g4music/pkg-plist
@@ -0,0 +1,36 @@
+bin/g4music
+share/applications/com.github.neithern.g4music.desktop
+share/dbus-1/services/com.github.neithern.g4music.service
+share/icons/hicolor/scalable/apps/com.github.neithern.g4music.svg
+share/icons/hicolor/symbolic/apps/com.github.neithern.g4music-symbolic.svg
+share/locale/be/LC_MESSAGES/g4music.mo
+share/locale/bg/LC_MESSAGES/g4music.mo
+share/locale/cs/LC_MESSAGES/g4music.mo
+share/locale/da/LC_MESSAGES/g4music.mo
+share/locale/de/LC_MESSAGES/g4music.mo
+share/locale/es/LC_MESSAGES/g4music.mo
+share/locale/et/LC_MESSAGES/g4music.mo
+share/locale/eu/LC_MESSAGES/g4music.mo
+share/locale/fa/LC_MESSAGES/g4music.mo
+share/locale/fi/LC_MESSAGES/g4music.mo
+share/locale/fr/LC_MESSAGES/g4music.mo
+share/locale/he/LC_MESSAGES/g4music.mo
+share/locale/hi/LC_MESSAGES/g4music.mo
+share/locale/hu/LC_MESSAGES/g4music.mo
+share/locale/id/LC_MESSAGES/g4music.mo
+share/locale/it/LC_MESSAGES/g4music.mo
+share/locale/ja/LC_MESSAGES/g4music.mo
+share/locale/ka/LC_MESSAGES/g4music.mo
+share/locale/nl/LC_MESSAGES/g4music.mo
+share/locale/oc/LC_MESSAGES/g4music.mo
+share/locale/pt_BR/LC_MESSAGES/g4music.mo
+share/locale/ro/LC_MESSAGES/g4music.mo
+share/locale/ru/LC_MESSAGES/g4music.mo
+share/locale/sk/LC_MESSAGES/g4music.mo
+share/locale/sl/LC_MESSAGES/g4music.mo
+share/locale/sv/LC_MESSAGES/g4music.mo
+share/locale/tr/LC_MESSAGES/g4music.mo
+share/locale/uk/LC_MESSAGES/g4music.mo
+share/locale/zh_CN/LC_MESSAGES/g4music.mo
+share/locale/zh_TW/LC_MESSAGES/g4music.mo
+share/metainfo/com.github.neithern.g4music.metainfo.xml