git: 0006e598ab7a - main - audio/hydrogen: Update to 1.2.6 and move to QT6

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sat, 04 Oct 2025 08:13:40 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0006e598ab7a0872622361a287880ba1b0deaf50

commit 0006e598ab7a0872622361a287880ba1b0deaf50
Author:     Shane Ambler <FreeBSD@Shaneware.biz>
AuthorDate: 2025-10-04 08:02:42 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-10-04 08:11:49 +0000

    audio/hydrogen: Update to 1.2.6 and move to QT6
    
    Additional changes to submitted patch:
    
    * Remove dead MASTER_SITES
    * Remove DEBUG option, rely on framework instead
    * Disable autodetection of Doxygen
    * Don't override framework optimization
    * Small changes to port Makefile
      Use DISTVERSION consistently
      Remove redundant LDFLAGS definitons
      Minor Makefile layout changes to more closely follow Porters Handbook
    
    References:
    https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags
    
    Changelog: https://github.com/hydrogen-music/hydrogen/releases/tag/1.2.6
    
    PR:             289524
---
 audio/hydrogen/Makefile                   | 57 +++++++++++-----------
 audio/hydrogen/distinfo                   |  6 +--
 audio/hydrogen/files/patch-CMakeLists.txt | 78 +++++++++++++++++--------------
 audio/hydrogen/pkg-plist                  |  7 +--
 4 files changed, 79 insertions(+), 69 deletions(-)

diff --git a/audio/hydrogen/Makefile b/audio/hydrogen/Makefile
index f9548e73d221..a19e5712e983 100644
--- a/audio/hydrogen/Makefile
+++ b/audio/hydrogen/Makefile
@@ -1,9 +1,7 @@
 PORTNAME=	hydrogen
-DISTVERSION=	1.2.1
-PORTREVISION=	2
+DISTVERSION=	1.2.6
 CATEGORIES=	audio
-MASTER_SITES=	https://github.com/hydrogen-music/${PORTNAME}/releases/download/${DISTVERSION}/ \
-		SF/hydrogen/Hydrogen/${DISTVERSION}%20Sources/
+MASTER_SITES=	SF/hydrogen/Hydrogen/${DISTVERSION}%20Sources/
 
 MAINTAINER=	FreeBSD@ShaneWare.Biz
 COMMENT=	Advanced drum machine
@@ -15,31 +13,32 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libsndfile.so:audio/libsndfile \
 		liblo.so:audio/liblo
 
-USES=		cmake compiler:c++17-lang desktop-file-utils pkgconfig \
-		localbase qt:5
+USES=		cmake compiler:c++17-lang desktop-file-utils gl libarchive \
+		pkgconfig localbase:ldflags qt:6
+USE_GL=		gl
 USE_LDCONFIG=	yes
-USE_QT=		core gui network widgets xml xmlpatterns buildtools:build \
-		linguisttools:build qmake:build svg testlib:build
+USE_QT=		base svg tools
 
-PLIST_SUB=	HYDROGEN_VERSION="${PORTVERSION}"
+LDFLAGS+=	-lexecinfo
+PLIST_SUB=	HYDROGEN_VERSION="${DISTVERSION}"
 
-OPTIONS_DEFINE=		ALSA DEBUG JACK LADSPA LASH OSS PORTAUDIO \
-			PULSEAUDIO RDF TEST
-OPTIONS_DEFAULT=	JACK LADSPA LIBARCHIVE OSS RDF
-OPTIONS_SINGLE=		EXPORT
-OPTIONS_SINGLE_EXPORT=	LIBARCHIVE LIBTAR
+CMAKE_ARGS=	-DCMAKE_INSTALL_MANDIR=${LOCALBASE}/share/man
+CMAKE_ON=	CMAKE_DISABLE_FIND_PACKAGE_Doxygen \
+		WANT_LIBARCHIVE \
+		WANT_QT6
 
-EXPORT_DESC=		Export support for drumkit
-LIBARCHIVE_DESC=	LibArchive support
-LIBTAR_DESC=		Libtar support
+OPTIONS_DEFINE=		ALSA JACK LADSPA LASH OSS PORTAUDIO \
+			PORTMIDI PULSEAUDIO RDF RUBBERBAND TEST
+OPTIONS_DEFAULT=	JACK LADSPA OSS RDF
+
+PORTMIDI_DESC=		PortMidi support
 RDF_DESC=		RDF File support
+RUBBERBAND_DESC=	librubberband for time stretching
 
 ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
 ALSA_RUN_DEPENDS=	alsa-plugins>=0:audio/alsa-plugins
 ALSA_CMAKE_BOOL=	WANT_ALSA
 
-DEBUG_CMAKE_BOOL=	WANT_DEBUG
-
 JACK_LIB_DEPENDS=	libjack.so:audio/jack
 JACK_CMAKE_BOOL=	WANT_JACK WANT_JACKSESSION
 
@@ -51,30 +50,30 @@ LADSPA_CMAKE_ON=	-DLADSPA_LIBRARIES:STRING=${LOCALBASE}/lib/ladspa
 LASH_LIB_DEPENDS=	liblash.so:audio/lash
 LASH_CMAKE_BOOL=	WANT_LASH
 
-LIBARCHIVE_USES=	libarchive
-LIBARCHIVE_CMAKE_BOOL=	WANT_LIBARCHIVE
-
-LIBTAR_LIB_DEPENDS=	libtar.so:devel/libtar
-LIBTAR_CMAKE_BOOL=	WANT_LIBTAR
-LIBTAR_CMAKE_ON=	-DCMAKE_REQUIRED_INCLUDES:STRING=${LOCALBASE}/include/
-
 OSS_CMAKE_BOOL=		WANT_OSS
 
 PORTAUDIO_LIB_DEPENDS=	libportaudio.so:audio/portaudio
 PORTAUDIO_CMAKE_BOOL=	WANT_PORTAUDIO
 
+PORTMIDI_LIB_DEPENDS=	libportmidi.so:audio/portmidi
+PORTMIDI_CMAKE_BOOL=	WANT_PORTMIDI
+
 PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 PULSEAUDIO_CMAKE_BOOL=	WANT_PULSEAUDIO
 
 RDF_LIB_DEPENDS=	liblrdf.so:textproc/liblrdf
 RDF_CMAKE_BOOL=		WANT_LRDF
-RDF_CMAKE_ON=		-DLRDF_INCLUDE_DIR:STRING=${LOCALBASE}/include/raptor2
+
+# using librubberband is experimental and current versions have bad timing
+# installing the rubberband cli tool still works as before
+RUBBERBAND_LIB_DEPENDS=	librubberband.so:audio/rubberband
+RUBBERBAND_CMAKE_BOOL=	WANT_RUBBERBAND
+#RUBBERBAND_CMAKE_ON=	-DRUBBERBAND_INCLUDE_DIR:STRING=${LOCALBASE}/include/rubberband
 
 TEST_BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/cppunit.pc:devel/cppunit
 TEST_CMAKE_BOOL=	WANT_CPPUNIT
-TEST_LDFLAGS=		-lexecinfo
 
 do-test-TEST-on:
-	cd ${WRKSRC} && ./src/tests/tests
+	cd ${WRKSRC} && ${WRKDIR}/.build/src/tests/tests
 
 .include <bsd.port.mk>
diff --git a/audio/hydrogen/distinfo b/audio/hydrogen/distinfo
index 399aae334ea7..a011e96916f8 100644
--- a/audio/hydrogen/distinfo
+++ b/audio/hydrogen/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1691792032
-SHA256 (hydrogen-1.2.1.tar.gz) = bc338a36b7119ca8caa266eeb05d8298ef7d137b7864560e32fa3fadd3d528ae
-SIZE (hydrogen-1.2.1.tar.gz) = 12920203
+TIMESTAMP = 1757839706
+SHA256 (hydrogen-1.2.6.tar.gz) = efba32610498acde76fa2e147017c91b20c13ec945e05e348cd4183fd1613be1
+SIZE (hydrogen-1.2.6.tar.gz) = 14412178
diff --git a/audio/hydrogen/files/patch-CMakeLists.txt b/audio/hydrogen/files/patch-CMakeLists.txt
index 42b168534178..638d79557be9 100644
--- a/audio/hydrogen/files/patch-CMakeLists.txt
+++ b/audio/hydrogen/files/patch-CMakeLists.txt
@@ -1,36 +1,46 @@
---- CMakeLists.txt.orig	2023-03-31 14:32:25 UTC
+--- CMakeLists.txt.orig	2025-07-29 17:36:04 UTC
 +++ CMakeLists.txt
-@@ -206,9 +206,9 @@ CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
- CHECK_INCLUDE_FILES(libtar.h HAVE_LIBTAR_H)
- CHECK_INCLUDE_FILES(execinfo.h HAVE_EXECINFO_H)
- FIND_PACKAGE(Backtrace)
--CHECK_LIBRARY_EXISTS(tar tar_open "" HAVE_LIBTAR_OPEN)
--CHECK_LIBRARY_EXISTS(tar tar_close "" HAVE_LIBTAR_CLOSE)
--CHECK_LIBRARY_EXISTS(tar tar_extract_all "" HAVE_LIBTAR_EXTRACT_ALL)
-+CHECK_LIBRARY_EXISTS(/usr/local/lib/libtar.so tar_open "" HAVE_LIBTAR_OPEN)
-+CHECK_LIBRARY_EXISTS(/usr/local/lib/libtar.so tar_close "" HAVE_LIBTAR_CLOSE)
-+CHECK_LIBRARY_EXISTS(/usr/local/lib/libtar.so tar_extract_all "" HAVE_LIBTAR_EXTRACT_ALL)
- IF(HAVE_LIBTAR_H AND HAVE_LIBTAR_OPEN AND HAVE_LIBTAR_CLOSE AND HAVE_LIBTAR_EXTRACT_ALL)
-     SET(LIBTAR_OK TRUE)
- ELSE()
-@@ -222,6 +222,11 @@ ENDIF()
- FIND_HELPER(LIBARCHIVE libarchive archive.h archive)
- IF( WANT_LIBARCHIVE AND LIBARCHIVE_FOUND)
-     SET(WANT_LIBTAR FALSE)
-+    SET(LIBTAR_LIBRARIES "")
-+    SET(LIBTAR_INCLUDE_DIRS "")
-+ELSE()
-+    SET(LIBARCHIVE_LIBRARIES "")
-+    SET(LIBARCHIVE_INCLUDE_DIRS "")
- ENDIF()
- FIND_HELPER(LIBSNDFILE sndfile sndfile.h sndfile)
- FIND_HELPER(ALSA alsa alsa/asoundlib.h asound )
-@@ -231,6 +236,8 @@ FIND_HELPER(OSC liblo lo/lo.h lo)
+@@ -77,7 +77,11 @@ set(WANT_LIBTAR TRUE)
+ # CONFIG OPTIONS
+ #
+ set(WANT_LIBTAR TRUE)
++if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+ option(WANT_DEBUG           "Build with debug information" ON)
++else()
++option(WANT_DEBUG           "Build with debug information" OFF)
++endif()
+ if(APPLE)
+     option(WANT_SHARED      "Build the core library shared." OFF)
+     option(WANT_ALSA        "Include ALSA (Advanced Linux Sound Architecture) support" OFF)
+@@ -130,10 +134,8 @@ if(WANT_DEBUG)
+ include(StatusSupportOptions)
  
- IF("${CMAKE_SYSTEM_NAME}" MATCHES "NetBSD")
- 	FIND_HELPER(OSS oss sys/soundcard.h ossaudio )
-+ELSEIF("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
-+	FIND_HELPER(OSS oss sys/soundcard.h c )
- ELSE()
- 	FIND_HELPER(OSS oss sys/soundcard.h OSSlib )
- ENDIF()
+ if(WANT_DEBUG)
+-    set(CMAKE_BUILD_TYPE Debug)
+     set(H2CORE_HAVE_DEBUG TRUE)
+ else()
+-    set(CMAKE_BUILD_TYPE Release)
+     set(H2CORE_HAVE_DEBUG FALSE)
+ endif()
+ 
+@@ -172,9 +174,9 @@ if(WANT_DEBUG)
+ endif()
+ 
+ if(WANT_DEBUG)
+-	set(CMAKE_CXX_FLAGS "$ENV{CMAKE_CXX_FLAGS} -O0")
++	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ else()
+-	set(CMAKE_CXX_FLAGS "$ENV{CMAKE_CXX_FLAGS} -O3 -ffast-math")
++	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ endif()
+ 
+ if(WANT_APPIMAGE)
+@@ -304,6 +306,8 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "NetBSD")
+ 
+ if("${CMAKE_SYSTEM_NAME}" MATCHES "NetBSD")
+ 	find_helper(OSS oss sys/soundcard.h ossaudio )
++elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
++	find_helper(OSS oss sys/soundcard.h c )
+ else()
+ 	find_helper(OSS oss sys/soundcard.h OSSlib )
+ endif()
diff --git a/audio/hydrogen/pkg-plist b/audio/hydrogen/pkg-plist
index 546583b010cf..ce2fad9f4c80 100644
--- a/audio/hydrogen/pkg-plist
+++ b/audio/hydrogen/pkg-plist
@@ -28,6 +28,7 @@ include/hydrogen/core/Globals.h
 include/hydrogen/core/H2Exception.h
 include/hydrogen/core/Helpers/Files.h
 include/hydrogen/core/Helpers/Filesystem.h
+include/hydrogen/core/Helpers/Future.h
 include/hydrogen/core/Helpers/Legacy.h
 include/hydrogen/core/Helpers/Random.h
 include/hydrogen/core/Helpers/Translations.h
@@ -64,8 +65,8 @@ include/hydrogen/core/Preferences/Preferences.h
 include/hydrogen/core/Preferences/Theme.h
 include/hydrogen/core/Sampler/Interpolation.h
 include/hydrogen/core/Sampler/Sampler.h
-include/hydrogen/core/Smf/SMF.h
-include/hydrogen/core/Smf/SMFEvent.h
+include/hydrogen/core/SMF/SMF.h
+include/hydrogen/core/SMF/SMFEvent.h
 include/hydrogen/core/SoundLibrary/SoundLibraryDatabase.h
 include/hydrogen/core/SoundLibrary/SoundLibraryInfo.h
 include/hydrogen/core/Synth/Synth.h
@@ -75,7 +76,7 @@ include/hydrogen/core/Version.h
 include/hydrogen/core/rt_clock.h
 lib/libhydrogen-core-%%HYDROGEN_VERSION%%.so
 share/man/man1/hydrogen.1.gz
-share/appdata/org.hydrogenmusic.Hydrogen.appdata.xml
+share/metainfo/org.hydrogenmusic.Hydrogen.metainfo.xml
 share/applications/org.hydrogenmusic.Hydrogen.desktop
 %%DATADIR%%/data/click.wav
 %%DATADIR%%/data/demo_songs/GM_kit_Diddley.h2song