git: 74e4cddbf7be - main - audio/cantata: Update to 3.2.0

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Fri, 14 Jun 2024 05:29:38 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=74e4cddbf7be1f64a8c4987342ce00de01f8fdc7

commit 74e4cddbf7be1f64a8c4987342ce00de01f8fdc7
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-06-14 03:24:10 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-06-14 05:29:26 +0000

    audio/cantata: Update to 3.2.0
    
    Switch to active fork as the original author archived their repo and is
    no longer working on it. [1]
    
    The most notable changes are that the project has been ported to Qt6
    and has added support for TagLib 2.x.
    
    The QT5 option has been renamed to QTMULTIMEDIA. Enable QTMULTIMEDIA for
    streaming support by default instead of VLC as vlc still uses Qt5 and
    pulls in many more unneeded dependencies.
    
    Disable audio CD support by default. It builds, but doesn't work, even
    in the previous version. It will take some more work to port the udisks2
    backend of the internal trimmed-down copy of Solid to bsdisks. This is
    primarily an MPD frontend and optical media has generally fallen out of
    popularity, so this is a bit of a rainy day project.
    
    Pet portclippy(1) and portlint(1). Whitespace cleanup.
    
    PR:             279462 [1]
    Reported by:    diizzy [1]
---
 audio/cantata/Makefile                             | 63 +++++++++++-----------
 audio/cantata/distinfo                             |  6 +--
 .../files/patch-3rdparty_solid-lite_CMakeLists.txt | 10 ++++
 audio/cantata/files/patch-CMakeLists.txt           | 11 ----
 .../cantata/files/patch-cmake_FindCDParanoia.cmake | 50 +++++++++++++++++
 audio/cantata/pkg-plist                            | 29 +++++-----
 6 files changed, 109 insertions(+), 60 deletions(-)

diff --git a/audio/cantata/Makefile b/audio/cantata/Makefile
index a3eda94dca9a..083ebb0b0533 100644
--- a/audio/cantata/Makefile
+++ b/audio/cantata/Makefile
@@ -1,57 +1,56 @@
-PORTNAME=		cantata
+PORTNAME=	cantata
 DISTVERSIONPREFIX=	v
-DISTVERSION=		2.5.0
-PORTREVISION=		4
-CATEGORIES=		audio kde
+DISTVERSION=	3.2.0
+CATEGORIES=	audio kde
 
-MAINTAINER=		kde@FreeBSD.org
-COMMENT=		Graphical client for MPD using Qt5
-WWW=			https://github.com/CDrummond/cantata
+MAINTAINER=	kde@FreeBSD.org
+COMMENT=	Graphical client for MPD using Qt
+WWW=		https://github.com/nullobsi/cantata
 
-LICENSE=		GPLv3
-LICENSE_FILE=		${WRKSRC}/LICENSE
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=			cmake compiler:c++11-lang cpe pkgconfig qt:5 shebangfix
-USE_GITHUB=		yes
-GH_ACCOUNT=		CDrummond
+USES=		cmake compiler:c++17-lang cpe gl pkgconfig qt:6 shebangfix
+CPE_VENDOR=	craig_drummond
+USE_GITHUB=	yes
+GH_ACCOUNT=	nullobsi
+USE_GL=		opengl
+USE_QT=		base sqldriver-sqlite:run svg
 
-USE_QT=			buildtools:build concurrent core dbus gui network \
-			qmake:build sql sql-sqlite3:run svg widgets xml
+SHEBANG_FILES=	playlists/cantata-dynamic.cmake cantata-remote.cmake
 
-CMAKE_ON=		CMAKE_DISABLE_FIND_PACKAGE_UDev
-CMAKE_OFF=		ENABLE_CDIOPARANOIA ENABLE_CDDB
+CMAKE_ON=	CMAKE_DISABLE_FIND_PACKAGE_UDev
+CMAKE_OFF=	ENABLE_CDDB
 
-SHEBANG_FILES=		playlists/cantata-dynamic cantata-remote.cmake
-CPE_VENDOR=		craig_drummond
-USE_LDCONFIG=		yes
+DATADIR=	${PREFIX}/share/Cantata
 
-OPTIONS_DEFINE=		AVAHI CDPARANOIA MTP NLS PROXY TAGLIB
-OPTIONS_GROUP=		CDINFO REPLAYGAIN
-OPTIONS_GROUP_CDINFO=	MUSICBRAINZ
+OPTIONS_DEFINE=		AVAHI MTP NLS PROXY TAGLIB
+OPTIONS_DEFAULT=	AVAHI FFMPEG MPG123 MTP QTMULTIMEDIA TAGLIB
+OPTIONS_GROUP=		AUDIOCD REPLAYGAIN
+OPTIONS_GROUP_AUDIOCD=	CDPARANOIA MUSICBRAINZ
 OPTIONS_GROUP_REPLAYGAIN=	FFMPEG MPG123
 OPTIONS_RADIO=		HSP
-OPTIONS_RADIO_HSP=	QT5 VLC
-OPTIONS_DEFAULT=	AVAHI CDPARANOIA FFMPEG MPG123 MTP MUSICBRAINZ TAGLIB VLC
+OPTIONS_RADIO_HSP=	QTMULTIMEDIA VLC
 OPTIONS_SUB=		yes
 
+AUDIOCD_DESC=		AudioCD support
 AVAHI_DESC=		Automatic MPD Discovery
-CDINFO_DESC=		AudioCD support
 FFMPEG_DESC=		ReplayGain calculation support via FFmpeg
 HSP_DESC=		MPD HTTP stream playback
 MPG123_DESC=		ReplayGain calculation support via mpg123
 MUSICBRAINZ_DESC=	CD info retrieval via MusicBrainz
 PROXY_DESC=		Proxy configuration in settings dialog
-QT5_DESC=		HTTP streams support via QtMultimedia
+QTMULTIMEDIA_DESC=	HTTP streams support via QtMultimedia
 REPLAYGAIN_DESC=	Replaygain calculation support
 TAGLIB_DESC=		Reading and editing Meta-Data of audio files
 VLC_DESC=		HTTP streams support via libVLC
 
-AVAHI_CMAKE_BOOL=	ENABLE_AVAHI
 AVAHI_LIB_DEPENDS=	libavahi-common.so:net/avahi-app
+AVAHI_CMAKE_BOOL=	ENABLE_AVAHI
 
 CDPARANOIA_IMPLIES=	TAGLIB
-CDPARANOIA_LIB_DEPENDS=	libcdda_interface.so:audio/cdparanoia
-CDPARANOIA_CMAKE_BOOL=	ENABLE_CDPARANOIA
+CDPARANOIA_LIB_DEPENDS=	libcdio_paranoia.so:sysutils/libcdio-paranoia
+CDPARANOIA_CMAKE_BOOL=	ENABLE_CDIOPARANOIA
 
 FFMPEG_IMPLIES=		TAGLIB
 FFMPEG_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg
@@ -68,7 +67,7 @@ MUSICBRAINZ_IMPLIES=	CDPARANOIA
 MUSICBRAINZ_LIB_DEPENDS=libmusicbrainz5.so:audio/libmusicbrainz5
 MUSICBRAINZ_CMAKE_BOOL=	ENABLE_MUSICBRAINZ
 
-NLS_USE=		QT=linguisttools:build
+NLS_USE=		QT=tools:build
 NLS_CMAKE_ON=		-DLCONVERT_EXECUTABLE:STRING=${QT_BINDIR}/lconvert \
 			-DLRELEASE_EXECUTABLE:STRING=${QT_BINDIR}/lrelease
 NLS_CMAKE_OFF=		-DLCONVERT_EXECUTABLE:BOOL=FALSE \
@@ -76,7 +75,7 @@ NLS_CMAKE_OFF=		-DLCONVERT_EXECUTABLE:BOOL=FALSE \
 
 PROXY_CMAKE_BOOL=	ENABLE_PROXY_CONFIG
 
-QT5_USE=		QT=multimedia
+QTMULTIMEDIA_USE=	QT=multimedia
 
 TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib
 TAGLIB_USES=		localbase
@@ -94,7 +93,7 @@ PLIST_SUB+=		REPLAYGAIN=""
 PLIST_SUB+=		REPLAYGAIN="@comment "
 .endif
 
-.if ${PORT_OPTIONS:MQT5} || ${PORT_OPTIONS:MVLC}
+.if ${PORT_OPTIONS:MQTMULTIMEDIA} || ${PORT_OPTIONS:MVLC}
 CMAKE_ARGS+=		-DENABLE_HTTP_STREAM_PLAYBACK:BOOL=TRUE
 .else
 CMAKE_ARGS+=		-DENABLE_HTTP_STREAM_PLAYBACK:BOOL=FALSE
diff --git a/audio/cantata/distinfo b/audio/cantata/distinfo
index a54153711f89..fe30928a2775 100644
--- a/audio/cantata/distinfo
+++ b/audio/cantata/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1646322889
-SHA256 (CDrummond-cantata-v2.5.0_GH0.tar.gz) = cfb16c3e1c4135bd37bed85b5611806244cadda497e05dc7f1e616ca1c2a4b86
-SIZE (CDrummond-cantata-v2.5.0_GH0.tar.gz) = 4079771
+TIMESTAMP = 1717390697
+SHA256 (nullobsi-cantata-v3.2.0_GH0.tar.gz) = bdebab0a781e98f058032374bac5d3375f2a9dcaa2906a6b125d63fb5aae5d17
+SIZE (nullobsi-cantata-v3.2.0_GH0.tar.gz) = 4783573
diff --git a/audio/cantata/files/patch-3rdparty_solid-lite_CMakeLists.txt b/audio/cantata/files/patch-3rdparty_solid-lite_CMakeLists.txt
new file mode 100644
index 000000000000..2dbb92f8b65d
--- /dev/null
+++ b/audio/cantata/files/patch-3rdparty_solid-lite_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- 3rdparty/solid-lite/CMakeLists.txt.orig	2024-05-30 23:46:53 UTC
++++ 3rdparty/solid-lite/CMakeLists.txt
+@@ -245,6 +245,7 @@ target_link_libraries(
+     solidlite
+     PRIVATE
+         Qt${QT_VERSION_MAJOR}::Core
++        Qt${QT_VERSION_MAJOR}::DBus
+         Qt${QT_VERSION_MAJOR}::Widgets
+         ${solidlite_OPTIONAL_LIBS}
+ )
diff --git a/audio/cantata/files/patch-CMakeLists.txt b/audio/cantata/files/patch-CMakeLists.txt
deleted file mode 100644
index a41231b4d0b1..000000000000
--- a/audio/cantata/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- CMakeLists.txt.orig	2018-04-27 18:02:32 UTC
-+++ CMakeLists.txt
-@@ -100,7 +100,7 @@ elseif (NOT HAIKU)
-     set(CANTATA_ICON_INSTALL_PREFIX ${SHARE_INSTALL_PREFIX}/icons/hicolor)
- endif ()
- 
--if (NOT WIN32 AND NOT APPLE AND ENABLE_DEVICES_SUPPORT AND ENABLE_UDISKS2)
-+if (LINUX AND ENABLE_DEVICES_SUPPORT AND ENABLE_UDISKS2)
-     set(WITH_SOLID_UDISKS2 ON)
- endif ()
- 
diff --git a/audio/cantata/files/patch-cmake_FindCDParanoia.cmake b/audio/cantata/files/patch-cmake_FindCDParanoia.cmake
new file mode 100644
index 000000000000..b50623e7be26
--- /dev/null
+++ b/audio/cantata/files/patch-cmake_FindCDParanoia.cmake
@@ -0,0 +1,50 @@
+--- cmake/FindCDParanoia.cmake.orig	2024-05-30 23:46:53 UTC
++++ cmake/FindCDParanoia.cmake
+@@ -43,10 +43,13 @@ The following cache variables may also be set:
+   The directory containing ``cdda_interface.h``.
+ #]===]
+ 
++include(CheckCSourceCompiles)
++
+ # First use PKG-Config as a starting point.
+ find_package(PkgConfig)
+ if(PKG_CONFIG_FOUND)
+-  pkg_check_modules(PC_CDParanoia QUIET cdparanoia)
++  pkg_check_modules(PC_CDParanoia QUIET libcdio_paranoia)
++  pkg_check_modules(PC_CDDA QUIET libcdio_cdda)
+ endif(PKG_CONFIG_FOUND)
+ 
+ find_path(CDParanoia_PARANOIA_INCLUDE_DIR
+@@ -56,7 +59,7 @@ find_path(CDParanoia_INTERFACE_INCLUDE_DIR
+ )
+ find_path(CDParanoia_INTERFACE_INCLUDE_DIR
+         NAMES cdda_interface.h
+-        PATHS ${PC_CDParanoia_INCLUDE_DIRS}
++        PATHS ${PC_CDDA_INCLUDE_DIRS}
+         PATH_SUFFIXES cdda
+ )
+ 
+@@ -66,7 +69,7 @@ find_library(CDParanoia_INTERFACE_LIBRARY
+ )
+ find_library(CDParanoia_INTERFACE_LIBRARY
+         NAMES cdda_interface
+-        PATHS ${PC_CDParanoia_LIBRARY_DIRS}
++        PATHS ${PC_CDDA_LIBRARY_DIRS}
+ )
+ 
+ # Set version from PC if applicable.
+@@ -96,6 +99,7 @@ if(CDParanoia_FOUND)
+     )
+   endif ()
+   if(NOT TARGET CDDA::Interface)
++    add_library(CDDA::Interface UNKNOWN IMPORTED)
+     set_target_properties(CDDA::Interface PROPERTIES
+             IMPORTED_LOCATION "${CDParanoia_INTERFACE_LIBRARY}"
+             INTERFACE_COMPILE_OPTIONS "${PC_CDParanoia_CFLAGS_OTHER}"
+@@ -118,4 +122,4 @@ mark_as_advanced(
+         CDParanoia_INTERFACE_INCLUDE_DIR
+         CDParanoia_PARANOIA_LIBRARY
+         CDParanoia_INTERFACE_LIBRARY
+-)
+\ No newline at end of file
++)
diff --git a/audio/cantata/pkg-plist b/audio/cantata/pkg-plist
index 8a202c6d35fc..a31f8205134e 100644
--- a/audio/cantata/pkg-plist
+++ b/audio/cantata/pkg-plist
@@ -1,7 +1,7 @@
 bin/cantata
-%%REPLAYGAIN%%lib/cantata/cantata-replaygain
-%%TAGLIB%%lib/cantata/cantata-tags
-share/applications/cantata.desktop
+%%REPLAYGAIN%%libexec/Cantata/cantata-replaygain
+%%TAGLIB%%libexec/Cantata/cantata-tags
+share/applications/dog.unix.cantata.Cantata.desktop
 %%DATADIR%%/icons/podcasts.png
 %%DATADIR%%/icons/soundcloud.png
 %%DATADIR%%/icons/stream.png
@@ -23,14 +23,15 @@ share/applications/cantata.desktop
 %%NLS%%%%DATADIR%%/translations/cantata_pt_BR.qm
 %%NLS%%%%DATADIR%%/translations/cantata_ru.qm
 %%NLS%%%%DATADIR%%/translations/cantata_zh_CN.qm
-share/icons/hicolor/128x128/apps/cantata.png
-share/icons/hicolor/16x16/apps/cantata.png
-share/icons/hicolor/22x22/apps/cantata.png
-share/icons/hicolor/24x24/apps/cantata.png
-share/icons/hicolor/256x256/apps/cantata.png
-share/icons/hicolor/32x32/apps/cantata.png
-share/icons/hicolor/48x48/apps/cantata.png
-share/icons/hicolor/512x512/apps/cantata.png
-share/icons/hicolor/64x64/apps/cantata.png
-share/icons/hicolor/scalable/apps/cantata.svg
-share/icons/hicolor/symbolic/apps/cantata-symbolic.svg
+share/icons/hicolor/128x128/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/16x16/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/22x22/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/24x24/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/256x256/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/32x32/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/48x48/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/512x512/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/64x64/apps/dog.unix.cantata.Cantata.png
+share/icons/hicolor/scalable/apps/dog.unix.cantata.Cantata.svg
+share/icons/hicolor/symbolic/apps/dog.unix.cantata.Cantata-symbolic.svg
+share/metainfo/dog.unix.cantata.Cantata.metainfo.xml