[monkeys-audio] Update to 5.14, add feature tools (#9760)

* [monkeys-audio] Update to 5.14, add feature tools

* [monkeys-audio] Use macro MA_VERSION
This commit is contained in:
Jack·Boos·Yu 2020-01-22 04:29:39 +08:00 committed by Victor Romero
parent 127d497681
commit 70ee8b83e5
3 changed files with 53 additions and 27 deletions

View File

@ -1,5 +1,8 @@
Source: monkeys-audio
Version: 4.8.3-1
Version: 5.14
Homepage: https://monkeysaudio.com
Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods.
Audio files compressed with it ends with .ape extension.
Feature: tools
Description: Build monkeys-audio tools

View File

@ -1,17 +1,13 @@
include(vcpkg_common_functions)
vcpkg_fail_port_install(ON_TARGET "UWP" "OSX" "Linux")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT)
set(VERSION 4.7)
set(MA_VERSION 514)
vcpkg_download_distfile(ARCHIVE
URLS "http://monkeysaudio.com/files/MAC_SDK_483.zip"
FILENAME "MAC_SDK_483.zip"
SHA512 c080aa87997def3b970050f6bd334b6908884cc521f192abc02d774a8b3067207781dcab30f052015d4ae891fc6390c6f0b33ed319d9d7fd0850dab6fcded8f0
URLS "https://monkeysaudio.com/files/MAC_SDK_${MA_VERSION}.zip"
FILENAME "MAC_SDK_${MA_VERSION}.zip"
SHA512 b0bad044bb639ddf5db6b1234ea07f878f2ed1192f7704c22ed1bc482f3ac7a1abbd318d81114d416ee1d93dccf41ef31d617d6c2b82e819fc2848e01ba4bcd4
)
vcpkg_extract_source_archive_ex(
@ -20,16 +16,49 @@ vcpkg_extract_source_archive_ex(
NO_REMOVE_ONE_LEVEL
)
file(REMOVE
${SOURCE_PATH}/Shared/MACDll.dll
${SOURCE_PATH}/Shared/MACDll.lib
${SOURCE_PATH}/Shared/MACLib.lib
file(REMOVE_RECURSE
${SOURCE_PATH}/Shared/32
${SOURCE_PATH}/Shared/64
)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH Source/Projects/VS2019/Console/Console.vcxproj
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(PLATFORM Win32)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(PLATFORM x64)
else()
message(FATAL_ERROR "Unsupported architecture")
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH Source/Projects/VS2019/MACDll/MACDll.vcxproj
PLATFORM ${PLATFORM}
)
else()
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH Source/Projects/VS2019/MACLib/MACLib.vcxproj
PLATFORM ${PLATFORM}
)
endif()
if ("tools" IN_LIST FEATURES)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH Source/Projects/VS2019/Console/Console.vcxproj
PLATFORM ${PLATFORM}
)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/MACLib.lib ${CURRENT_PACKAGES_DIR}/debug/lib/MACLib.lib)
endif()
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/Shared/
@ -37,9 +66,4 @@ file(COPY ${SOURCE_PATH}/Shared/
FILES_MATCHING PATTERN "*.h")
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1065,8 +1065,7 @@ monkeys-audio:arm-uwp=fail
monkeys-audio:x64-linux=fail
monkeys-audio:x64-osx=fail
monkeys-audio:x64-uwp=fail
monkeys-audio:x64-windows=fail
monkeys-audio:x86-windows=fail
monkeys-audio:x64-windows-static=fail
moos-core:arm-uwp=fail
moos-core:x64-uwp=fail
moos-core:x64-windows=ignore