Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rtmidi] Update to version 4.0.0 #6635

Merged
merged 2 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/rtmidi/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: rtmidi
Version: 2.1.1-2
Version: 4.0.0
Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia)
17 changes: 17 additions & 0 deletions ports/rtmidi/fix-POSIXname.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/rtmidi_c.cpp b/rtmidi_c.cpp
index 248c9e5..ec1dd38 100644
--- a/rtmidi_c.cpp
+++ b/rtmidi_c.cpp
@@ -136,7 +136,11 @@ const char* rtmidi_get_port_name (RtMidiPtr device, unsigned int portNumber)
{
try {
std::string name = ((RtMidi*) device->ptr)->getPortName (portNumber);
- return strdup (name.c_str ());
+#if defined(_WIN) || defined(WINAPI_FAMILY) //Windows platform
+ return _strdup (name.c_str ());
+#else // Unix platform
+ return strdup (name.c_str ());
+#endif

} catch (const RtMidiError & err) {
device->ok = false;
8 changes: 5 additions & 3 deletions ports/rtmidi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO thestk/rtmidi
REF 2.1.1
SHA512 4d378720dd0f7c0e1a87741c088756839878ed56465b053040f70a1e039828fe221a6b1669b77b2fdd146cb192934c5719cc934c2c6a6304f44dbee2972c68e8
REF 4.0.0
SHA512 39383f121320c9471b31f8b9d283167bfadf4c7328b6664d1d54a4c52e3dd9b76362875258d90363c6044e87fcee31ccce80e19435dc620c88e6d60fc82d0f9d
HEAD_REF master
PATCHES
fix-POSIXname.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

Expand All @@ -17,4 +19,4 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()

file(INSTALL ${SOURCE_PATH}/readme DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright)
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright)