diff --git a/ALSA-Avoid-listing-ports-that-are-usually-from-3rd-party.patch b/ALSA-Avoid-listing-ports-that-are-usually-from-3rd-party.patch new file mode 100644 index 0000000..1322046 --- /dev/null +++ b/ALSA-Avoid-listing-ports-that-are-usually-from-3rd-party.patch @@ -0,0 +1,25 @@ +From b70cfd8763fcdbbade6e57b81d2bc06dbd925e84 Mon Sep 17 00:00:00 2001 +From: rncbc +Date: Thu, 21 Sep 2023 14:56:49 +0100 +Subject: [PATCH] ALSA: Avoid listing ports that are usually from 3rd.party + managers or clients that have no subscriptable ports at all. + +--- + RtMidi.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/RtMidi.cpp b/RtMidi.cpp +index 0c3dcbe..2216d50 100644 +--- a/RtMidi.cpp ++++ b/RtMidi.cpp +@@ -2087,7 +2087,9 @@ unsigned int portInfo( snd_seq_t *seq, snd_seq_port_info_t *pinfo, unsigned int + ( ( atyp & SND_SEQ_PORT_TYPE_APPLICATION ) == 0 ) ) continue; + + unsigned int caps = snd_seq_port_info_get_capability( pinfo ); +- if ( ( caps & type ) != type ) continue; ++ if ( ( ( caps & type ) != type ) || ++ ( ( caps & SND_SEQ_PORT_CAP_NO_EXPORT ) != 0 ) ) continue; ++ + if ( count == portNumber ) return 1; + ++count; + } diff --git a/rtmidi-4.0.0-pkgconfig.patch b/rtmidi-6.0.0-pkgconfig.patch similarity index 62% rename from rtmidi-4.0.0-pkgconfig.patch rename to rtmidi-6.0.0-pkgconfig.patch index d57a444..9eadbcd 100644 --- a/rtmidi-4.0.0-pkgconfig.patch +++ b/rtmidi-6.0.0-pkgconfig.patch @@ -1,15 +1,14 @@ -Index: rtmidi-5.0.0/rtmidi.pc.in -=================================================================== ---- rtmidi-5.0.0.orig/rtmidi.pc.in -+++ rtmidi-5.0.0/rtmidi.pc.in +diff --git a/rtmidi.pc.in b/rtmidi.pc.in +index acb6888..0639c83 100644 +--- a/rtmidi.pc.in ++++ b/rtmidi.pc.in @@ -1,12 +1,12 @@ prefix=@prefix@ --exec_prefix=${prefix} + exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include/rtmidi -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ ++libdir=${exec_prefix}/@libdir@ ++includedir=${prefix}/@includedir@ -Name: librtmidi +Name: rtmidi diff --git a/rtmidi-cmake.patch b/rtmidi-cmake.patch index 35cb7b3..7515997 100644 --- a/rtmidi-cmake.patch +++ b/rtmidi-cmake.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3a85a03..867f179 100644 +index 3a85a03..a75cce4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ @@ -11,7 +11,16 @@ index 3a85a03..867f179 100644 # Define a C++ project. project(RtMidi LANGUAGES CXX C) -@@ -262,7 +262,7 @@ install(TARGETS ${LIB_TARGETS} +@@ -248,6 +248,8 @@ string(REPLACE ";" " " req "${PKGCONFIG_REQUIRES}") + string(REPLACE ";" " " req_libs "${LIBS_REQUIRES}") + string(REPLACE ";" " " api "${API_DEFS}") + set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(libdir ${CMAKE_INSTALL_LIBDIR}) ++set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rtmidi.pc.in" "rtmidi.pc" @ONLY) + + # Add install rule. +@@ -262,7 +264,7 @@ install(TARGETS ${LIB_TARGETS} export(PACKAGE RtMidi) # Set installation path for CMake files. diff --git a/rtmidi.changes b/rtmidi.changes index 8c17787..982cc9f 100644 --- a/rtmidi.changes +++ b/rtmidi.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Nov 26 04:39:30 UTC 2023 - Konstantin Voinov + +- fix rtmidi.pc: + rework rtmidi-4.0.0-pkgconfig.patch to rtmidi-6.0.0-pkgconfig.patch + update rtmidi-cmake.patch +- add ALSA-Avoid-listing-ports-that-are-usually-from-3rd-party.patch + from upstream + ------------------------------------------------------------------- Sun Nov 19 10:51:00 UTC 2023 - Konstantin Voinov diff --git a/rtmidi.spec b/rtmidi.spec index 7c100e8..f83825f 100644 --- a/rtmidi.spec +++ b/rtmidi.spec @@ -27,9 +27,13 @@ Group: Productivity/Multimedia/Sound/Utilities URL: https://www.music.mcgill.ca/~gary/rtmidi/index.html Source0: https://www.music.mcgill.ca/~gary/rtmidi/release/%{name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE pkgconfig.patch avvissu@yandex.ru -Patch0: rtmidi-4.0.0-pkgconfig.patch +Patch0: rtmidi-6.0.0-pkgconfig.patch # PATCH-FIX-OPENSUSE set proper .cmake files path, lower cmake version for Leap (3.24 is required for Android) Patch1: rtmidi-cmake.patch +# PATCH-FIX-UPSTREAM ALSA: Avoid listing ports that are usually from 3rd.party +Patch2: ALSA-Avoid-listing-ports-that-are-usually-from-3rd-party.patch +BuildRequires: autoconf +BuildRequires: automake BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig