Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
portmidi: Enable test
  • Loading branch information
ryandesign committed May 23, 2022
1 parent 6103a13 commit fd447d2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions audio/portmidi/Portfile
Expand Up @@ -27,6 +27,10 @@ checksums rmd160 6209405e5e9c4c41d8d474a84f1eba7d25babd56 \
patchfiles patch-CMakeLists.txt.diff \
patch-pm_common-CMakeLists.txt.diff

if {[vercmp ${version} 2.0.4] < 0} {
patchfiles-append \
patch-pm_test-CMakeLists.txt.diff
}

# QOS_CLASS_USER_INTERACTIVE is available since Yosemite.
if {${os.platform} eq "darwin" && ${os.major} < 14} {
Expand All @@ -35,6 +39,16 @@ if {${os.platform} eq "darwin" && ${os.major} < 14} {
}
}

configure.args -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF \
-DBUILD_PORTMIDI_TESTS=ON

# There is no way to run the full test suite automatically.
# See pm_test/README.txt. So this just runs one of the tests
# that doesn't require manual MIDI input.
test.run yes
test.env DYLD_LIBRARY_PATH=.
test.cmd ./qtest

post-destroot {
set docdir ${destroot}${prefix}/share/doc/${name}
xinstall -d ${docdir}
Expand Down
1 change: 1 addition & 0 deletions audio/portmidi/files/patch-CMakeLists.txt.diff
@@ -1,3 +1,4 @@
Don't overwrite the deployment target that MacPorts sets.
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -37,9 +37,6 @@ endif()
Expand Down
11 changes: 11 additions & 0 deletions audio/portmidi/files/patch-pm_test-CMakeLists.txt.diff
@@ -0,0 +1,11 @@
Disable this test; its code was inadvertently omitted from the 2.0.3 distfile.
https://github.com/PortMidi/portmidi/issues/21
https://github.com/PortMidi/portmidi/commit/753dd2417b29e11e084ed4e03ca1cf359c6e07b5
--- pm_test/CMakeLists.txt.orig 2022-02-21 19:54:37.000000000 -0600
+++ pm_test/CMakeLists.txt 2022-05-23 00:28:40.000000000 -0500
@@ -38,5 +38,4 @@
add_test(sendvirtual)
add_test(multivirtual)
add_test(virttest)
-add_test(pmlist)
endif(WIN32)

0 comments on commit fd447d2

Please sign in to comment.