From 234a8aa071fb2a72890006bf4064b9a260e4f77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Thu, 19 Jun 2025 14:29:33 +0200 Subject: [PATCH] portmidi: bump to version 2.0.5 the pmdefaults tool was removed. --- .../additional-files/pmdefaults.rdef.in | 12 --- .../portmidi/patches/portmidi-2.0.5.patchset | 93 +++++++++++++++++++ ...idi-2.0.4.recipe => portmidi-2.0.5.recipe} | 46 ++------- 3 files changed, 100 insertions(+), 51 deletions(-) delete mode 100644 media-libs/portmidi/additional-files/pmdefaults.rdef.in create mode 100644 media-libs/portmidi/patches/portmidi-2.0.5.patchset rename media-libs/portmidi/{portmidi-2.0.4.recipe => portmidi-2.0.5.recipe} (73%) diff --git a/media-libs/portmidi/additional-files/pmdefaults.rdef.in b/media-libs/portmidi/additional-files/pmdefaults.rdef.in deleted file mode 100644 index db8fc598a..000000000 --- a/media-libs/portmidi/additional-files/pmdefaults.rdef.in +++ /dev/null @@ -1,12 +0,0 @@ - -resource app_version { - major = @MAJOR@, - middle = @MIDDLE@, - minor = @MINOR@, - variety = B_APPV_FINAL, - internal = 0, - short_info = "Preferences app to set default PortMidi devices", - long_info = "PortMidi is a cross-platform MIDI input/output library." -}; - -resource app_signature "application/x-vnd.PortMidi.pmdefaults"; diff --git a/media-libs/portmidi/patches/portmidi-2.0.5.patchset b/media-libs/portmidi/patches/portmidi-2.0.5.patchset new file mode 100644 index 000000000..ebe5a310f --- /dev/null +++ b/media-libs/portmidi/patches/portmidi-2.0.5.patchset @@ -0,0 +1,93 @@ +From 1bb4da36e430f407e665316b8ae2aec35bb2e50b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Thu, 19 Jun 2025 14:00:06 +0200 +Subject: gcc2 fixes + + +diff --git a/pm_common/portmidi.h b/pm_common/portmidi.h +index f4cf9f3..905bc69 100755 +--- a/pm_common/portmidi.h ++++ b/pm_common/portmidi.h +@@ -267,7 +267,7 @@ typedef struct { + struct { + enum PmSysDepPropertyKey key; + const void *value; +- } properties[]; ++ } properties[0]; + } PmSysDepInfo; + + /** Version number of PmSysDepInfo, stored in #structVersion field */ +diff --git a/pm_test/recvvirtual.c b/pm_test/recvvirtual.c +index ee2b24a..387a76b 100644 +--- a/pm_test/recvvirtual.c ++++ b/pm_test/recvvirtual.c +@@ -32,6 +32,7 @@ static void set_sysdepinfo(char m_or_p, const char *name) + printf("Error: sysdepinfo was allocated to hold 2 parameters\n"); + exit(1); + } ++ { + int i = sysdepinfo->length++; + enum PmSysDepPropertyKey k = pmKeyNone; + if (m_or_p == 'm') k = pmKeyCoreMidiManufacturer; +@@ -39,6 +40,7 @@ static void set_sysdepinfo(char m_or_p, const char *name) + else if (m_or_p == 'c') k = pmKeyAlsaClientName; + sysdepinfo->properties[i].key = k; + sysdepinfo->properties[i].value = name; ++ } + } + + +diff --git a/pm_test/sendvirtual.c b/pm_test/sendvirtual.c +index 793016b..5c4d4db 100644 +--- a/pm_test/sendvirtual.c ++++ b/pm_test/sendvirtual.c +@@ -34,6 +34,7 @@ static void set_sysdepinfo(char m_or_p, const char *name) + printf("Error: sysdepinfo was allocated to hold 2 parameters\n"); + exit(1); + } ++ { + int i = sysdepinfo->length++; + enum PmSysDepPropertyKey k = pmKeyNone; + if (m_or_p == 'm') k = pmKeyCoreMidiManufacturer; +@@ -41,6 +42,7 @@ static void set_sysdepinfo(char m_or_p, const char *name) + else if (m_or_p == 'c') k = pmKeyAlsaClientName; + sysdepinfo->properties[i].key = k; + sysdepinfo->properties[i].value = name; ++ } + } + + +diff --git a/pm_test/testio.c b/pm_test/testio.c +index f63a0c0..5149815 100755 +--- a/pm_test/testio.c ++++ b/pm_test/testio.c +@@ -61,6 +61,7 @@ static void set_sysdepinfo(char m_or_p, const char *name) + printf("Error: sysdepinfo was allocated to hold 2 parameters\n"); + exit(1); + } ++ { + int i = sysdepinfo->length++; + enum PmSysDepPropertyKey k = pmKeyNone; + if (m_or_p == 'm') k = pmKeyCoreMidiManufacturer; +@@ -68,6 +69,7 @@ static void set_sysdepinfo(char m_or_p, const char *name) + else if (m_or_p == 'c') k = pmKeyAlsaClientName; + sysdepinfo->properties[i].key = k; + sysdepinfo->properties[i].value = name; ++ } + } + + +@@ -483,8 +485,9 @@ int main(int argc, char *argv[]) + if (strcmp(argv[i], "-h") == 0) { + exit(0); + } else if (strcmp(argv[i], "-p") == 0 && (i + 1 < argc)) { ++ const char *port_name; + i = i + 1; +- const char *port_name = argv[i]; ++ port_name = argv[i]; + set_sysdepinfo('p', port_name); + printf("Port name will be %s\n", port_name); + } else if (strcmp(argv[i], "-c") == 0 && (i + 1 < argc)) { +-- +2.48.1 + diff --git a/media-libs/portmidi/portmidi-2.0.4.recipe b/media-libs/portmidi/portmidi-2.0.5.recipe similarity index 73% rename from media-libs/portmidi/portmidi-2.0.4.recipe rename to media-libs/portmidi/portmidi-2.0.5.recipe index 8a0745e61..2bba55757 100644 --- a/media-libs/portmidi/portmidi-2.0.4.recipe +++ b/media-libs/portmidi/portmidi-2.0.5.recipe @@ -4,17 +4,16 @@ HOMEPAGE="https://github.com/PortMidi/portmidi" COPYRIGHT="1999-2000 Ross Bencina and Phil Burk 2001-2009 Roger B. Dannenberg" LICENSE="MIT" -REVISION="2" +REVISION="1" SOURCE_URI="https://github.com/PortMidi/portmidi/archive/refs/tags/v$portVersion.tar.gz" -CHECKSUM_SHA256="64893e823ae146cabd3ad7f9a9a9c5332746abe7847c557b99b2577afa8a607c" +CHECKSUM_SHA256="97a30eb0ca3fed39bcdcffea06392a82daa325dadc88b0ba083dac1518a57bd3" SOURCE_DIR="portmidi-$portVersion" -ADDITIONAL_FILES="pmdefaults.rdef.in" +PATCHES="portmidi-$portVersion.patchset" ARCHITECTURES="all" SECONDARY_ARCHITECTURES="x86" -# This uses the wrong libVersion from upstream - change this back to $portVersion when fixed -libVersion="2.0.3" +libVersion="2.0.4" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" @@ -106,7 +105,7 @@ BUILD() extraCMakeArgs= if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then source /system/data/profile.d/openjdk.sh - extraCMakeArgs="-DBUILD_JAVA_NATIVE_INTERFACE=ON -DBUILD_PMDEFAULTS=ON" + extraCMakeArgs="-DBUILD_JAVA_NATIVE_INTERFACE=ON" fi cmake .. -DCMAKE_BUILD_TYPE=Release $cmakeDirArgs \ -DBUILD_PORTMIDI_TESTS=ON $extraCMakeArgs @@ -120,38 +119,10 @@ INSTALL() cd .. if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then - cp pm_java/pmdefaults/pmdefaults.jar $libDir - - mkdir $preferencesDir - - # the included pmdefaults script would need changes anyway, so we just create our own - cat <<- EOF > "$preferencesDir/PortMidi Setup" - #!/bin/sh - $JAVA_HOME/bin/java -Djava.library.path=$libDir -jar $libDir/pmdefaults.jar - EOF - - chmod +x "$preferencesDir/PortMidi Setup" - - local MAJOR="`echo "$portVersion" | cut -d. -f1`" - local MIDDLE="`echo "$portVersion" | cut -d. -f2`" - local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -d~ -f1`" - sed \ - -e "s|@MAJOR@|$MAJOR|" \ - -e "s|@MIDDLE@|$MIDDLE|" \ - -e "s|@MINOR@|$MINOR|" \ - $portDir/additional-files/pmdefaults.rdef.in \ - > pmdefaults.rdef - - rc pmdefaults.rdef - settype -t application/x-vnd.Be-elfexecutable "$preferencesDir/PortMidi Setup" - resattr -o "$preferencesDir/PortMidi Setup" pmdefaults.rsrc - - addPreferencesDeskbarSymlink "$preferencesDir/PortMidi Setup" - prepareInstalledDevelLib libpmjni # the java bindings need an unversioned libpmjni.so - ln -s libpmjni.so.${portVersion%~*} $libDir/libpmjni.so + ln -s libpmjni.so.$libVersion $libDir/libpmjni.so fi # install test tools @@ -175,10 +146,7 @@ INSTALL() if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then packageEntries java \ - $libDir/libpmjni.so* \ - $libDir/pmdefaults.jar \ - "$preferencesDir/PortMidi Setup" \ - $dataDir # this contains the Deskbar symlink + $libDir/libpmjni.so* fi }