From 44204b98aaee8e12aab6cd28bb4a5712fc96e39f Mon Sep 17 00:00:00 2001 From: wolfgitpr <133209402+wolfgitpr@users.noreply.github.com> Date: Sat, 23 Nov 2024 03:32:07 +0800 Subject: [PATCH] [wolf-midi] Add new port (#42160) --- ports/wolf-midi/portfile.cmake | 25 +++++++++++++++++++++++++ ports/wolf-midi/usage | 4 ++++ ports/wolf-midi/vcpkg.json | 17 +++++++++++++++++ versions/baseline.json | 4 ++++ versions/w-/wolf-midi.json | 9 +++++++++ 5 files changed, 59 insertions(+) create mode 100644 ports/wolf-midi/portfile.cmake create mode 100644 ports/wolf-midi/usage create mode 100644 ports/wolf-midi/vcpkg.json create mode 100644 versions/w-/wolf-midi.json diff --git a/ports/wolf-midi/portfile.cmake b/ports/wolf-midi/portfile.cmake new file mode 100644 index 0000000000..adfdb7e020 --- /dev/null +++ b/ports/wolf-midi/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wolfgitpr/wolf-midi + REF "${VERSION}" + SHA512 6359707d2631bd2e6e3f2e34b6ca1da3718a312c09968323b1598e83085beae8417d0c8d465ce50550af6843c9c5f060f799ef6d5a78a013a08cfbaa84506cff + HEAD_REF main +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WOLF_MIDI_BUILD_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DWOLF_MIDI_BUILD_STATIC=${WOLF_MIDI_BUILD_STATIC} + -DWOLF_MIDI_BUILD_TESTS=FALSE +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) diff --git a/ports/wolf-midi/usage b/ports/wolf-midi/usage new file mode 100644 index 0000000000..d922854d11 --- /dev/null +++ b/ports/wolf-midi/usage @@ -0,0 +1,4 @@ +wolf-midi provides CMake targets: + + find_package(wolf-midi CONFIG REQUIRED) + target_link_libraries(main PRIVATE wolf-midi::wolf-midi) diff --git a/ports/wolf-midi/vcpkg.json b/ports/wolf-midi/vcpkg.json new file mode 100644 index 0000000000..cd4f0bba8e --- /dev/null +++ b/ports/wolf-midi/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "wolf-midi", + "version": "1.0.1", + "description": "A lightweight MIDI file read-write library.", + "homepage": "https://github.com/wolfgitpr/wolf-midi", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index f4a53f6cc4..854199b4eb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9676,6 +9676,10 @@ "baseline": "1.0.2", "port-version": 4 }, + "wolf-midi": { + "baseline": "1.0.1", + "port-version": 0 + }, "wolfmqtt": { "baseline": "1.19.0", "port-version": 0 diff --git a/versions/w-/wolf-midi.json b/versions/w-/wolf-midi.json new file mode 100644 index 0000000000..093f5bc4be --- /dev/null +++ b/versions/w-/wolf-midi.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "29df2327bba3b60ffed9b02ef8ff967887771f02", + "version": "1.0.1", + "port-version": 0 + } + ] +}