Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2023 02:36:24 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7c7d9b873b75 - main - audio/libremidi: update 4.2.2 =?utf-8?Q?=E2=86=92?= 4.2.3
Message-ID:  <202310100236.39A2aOKK003018@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7c7d9b873b756c939ffbb3a7d8b7ce207d8c3791

commit 7c7d9b873b756c939ffbb3a7d8b7ce207d8c3791
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-10-10 02:34:06 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-10-10 02:36:21 +0000

    audio/libremidi: update 4.2.2 → 4.2.3
    
    Also add JACK and ALSA options for audio backends.
    
    Reported by:    portscout
---
 audio/libremidi/Makefile                   | 22 ++++++++++++++++++----
 audio/libremidi/distinfo                   |  6 +++---
 audio/libremidi/files/patch-CMakeLists.txt | 13 +++++++++++++
 3 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/audio/libremidi/Makefile b/audio/libremidi/Makefile
index b391d4a3fcb4..30bafd8daa11 100644
--- a/audio/libremidi/Makefile
+++ b/audio/libremidi/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	libremidi
 DISTVERSIONPREFIX=	v
-DISTVERSION=	4.2.2
+DISTVERSION=	4.2.3
 CATEGORIES=	audio
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -10,7 +10,6 @@ WWW=		https://github.com/jcelerier/libremidi
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-LIB_DEPENDS=	libjack.so:audio/jack
 TEST_DEPENDS=	catch2>0:devel/catch2
 
 USES=		cmake:testing compiler:c++20-lang localbase
@@ -18,11 +17,26 @@ USES=		cmake:testing compiler:c++20-lang localbase
 USE_GITHUB=	yes
 GH_ACCOUNT=	jcelerier
 
-CMAKE_ON=	BUILD_SHARED_LIBS \
-		LIBREMIDI_NO_ALSA # ALSA support requires libalsa, sys/eventfd.h, sys/timerfd.h
+#CMAKE_ON=	BUILD_SHARED_LIBS # this doesn't work on libremidi form some reason - see the patch
 CMAKE_OFF=	LIBREMIDI_TESTS
 CMAKE_TESTING_ON=	LIBREMIDI_TESTS # 1 test fails: https://github.com/jcelerier/libremidi/issues/86
 
+OPTIONS_DEFINE=		JACK
+OPTIONS_DEFAULT=	JACK
+
+.if exists(/usr/include/sys/eventfd.h) && exists(/usr/include/sys/timerfd.h)
+OPTIONS_DEFINE+=	ALSA
+OPTIONS_DEFAULT+=	ALSA # ALSA support requires libalsa, sys/eventfd.h, sys/timerfd.h
+
+ALSA_CMAKE_OFF=		-DLIBREMIDI_NO_ALSA=ON
+ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
+.else
+CMAKE_ON=		LIBREMIDI_NO_ALSA
+.endif
+
+JACK_CMAKE_OFF=		-DLIBREMIDI_NO_JACK=ON
+JACK_LIB_DEPENDS=	libjack.so:audio/jack
+
 # This library can also be used as a header-only library
 
 .include <bsd.port.mk>
diff --git a/audio/libremidi/distinfo b/audio/libremidi/distinfo
index 84bf03005369..5f195ea51be5 100644
--- a/audio/libremidi/distinfo
+++ b/audio/libremidi/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1696689481
-SHA256 (jcelerier-libremidi-v4.2.2_GH0.tar.gz) = 5bdb8e9183fd59747e9f1fd10547edc60154f026af6765c2c5d29d6a0b2f2724
-SIZE (jcelerier-libremidi-v4.2.2_GH0.tar.gz) = 15518342
+TIMESTAMP = 1696890835
+SHA256 (jcelerier-libremidi-v4.2.3_GH0.tar.gz) = e0b6f1fc9b9f4f625c55371db140f9c91e4dcd4747b3672f5ee4d68a1294cb85
+SIZE (jcelerier-libremidi-v4.2.3_GH0.tar.gz) = 15518519
diff --git a/audio/libremidi/files/patch-CMakeLists.txt b/audio/libremidi/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..23ace240b524
--- /dev/null
+++ b/audio/libremidi/files/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+- BUILD_SHARED_LIBS doesn't work for some reason
+
+--- CMakeLists.txt.orig	2023-10-09 23:50:56 UTC
++++ CMakeLists.txt
+@@ -57,7 +57,7 @@ if(LIBREMIDI_HEADER_ONLY)
+   set(_private INTERFACE)
+   target_compile_definitions(libremidi ${_public} LIBREMIDI_HEADER_ONLY)
+ else()
+-  add_library(libremidi
++  add_library(libremidi SHARED
+     include/libremidi/backends/alsa_seq/config.hpp
+     include/libremidi/backends/alsa_seq/helpers.hpp
+     include/libremidi/backends/alsa_seq/midi_in.hpp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310100236.39A2aOKK003018>