diff --git a/ports/monkeys-audio/CONTROL b/ports/monkeys-audio/CONTROL new file mode 100644 index 00000000000000..7b28d4c085da81 --- /dev/null +++ b/ports/monkeys-audio/CONTROL @@ -0,0 +1,5 @@ +Source: monkeys-audio +Version: 4.3.3 +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. + \ No newline at end of file diff --git a/ports/monkeys-audio/license b/ports/monkeys-audio/license new file mode 100644 index 00000000000000..a4ab2f09a61a28 --- /dev/null +++ b/ports/monkeys-audio/license @@ -0,0 +1,42 @@ +Monkey's Audio Program License Agreement +======================================== + +1. Monkey's Audio is completely free for personal, educational, or commercial use. + +2. Although the software has been tested thoroughly, the author is in no way responsible for + damages due to bugs or misuse. + +3. The redistribution of Monkey's Audio is only allowed in cases where the original installer and + components therein have not been modified. + +4. The use of Monkey's Audio or any component thereof from another program requires + compliance with the 'Monkey's Audio SDK and Source Code License Agreement'. + +5. Installing and using Monkey's Audio signifies the acceptance of these terms. If you do not + agree with any of the above terms, you must cease using Monkey's Audio and remove it from + your storage device. + + +Monkey's Audio SDK and Source Code License Agreement +==================================================== + +1. The Monkey's Audio SDK and source code can be freely used to add APE format playback, + encoding, or tagging support to any product, free or commercial. + +2. Monkey's Audio source can be included in GPL and open-source software, although Monkey's + Audio itself will not be subjected to external licensing requirements or other viral source + restrictions. + +3. Code changes and improvements must be contributed back to the Monkey's Audio project or + made freely available, unless exempted by written consent of the author. + +4. Any source code, ideas, or libraries used must be plainly acknowledged in the software using + the code. + +5. Although the software has been tested thoroughly, the author is in no way responsible for + damages due to bugs or misuse. + +6. If you do not completely agree with all of the previous stipulations, you must cease using this + source code and remove it from your storage device. + +All materials and programs copyrighted ©2000-2018 by Matt Ashland diff --git a/ports/monkeys-audio/portfile.cmake b/ports/monkeys-audio/portfile.cmake new file mode 100644 index 00000000000000..58a33673736bcd --- /dev/null +++ b/ports/monkeys-audio/portfile.cmake @@ -0,0 +1,55 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "${PORT} currently only support static build") +endif() + +include(vcpkg_common_functions) + +set(VERSION 4.7) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +set(PROJECT_PATH ${SOURCE_PATH}/Source/Projects/VS2017) + +vcpkg_download_distfile(ARCHIVE + URLS "http://monkeysaudio.com/files/MAC_SDK_433.zip" + FILENAME "MAC_SDK_433.zip" + SHA512 957ba262da29a8542ab82dc828328b19bf80ecf0d09165db935924b390cb6a3a2d9303a2e07b86b28ecf4210a66dd5c4be840205a9f09518189101033f1a13c8 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-dynamic-linkage.patch + ) +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${PROJECT_PATH}/Console/Console.vcxproj +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/Shared/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio + FILES_MATCHING PATTERN "*.h") +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) + +file(COPY + ${PROJECT_PATH}/MACLib/Debug/MACLib.lib + ${PROJECT_PATH}/MACLib/Debug/MACLib.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file(COPY + ${PROJECT_PATH}/MACLib/Release/MACLib.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL ${PROJECT_PATH}/Console/Release/Console.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio + RENAME 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) diff --git a/ports/monkeys-audio/use-dynamic-linkage.patch b/ports/monkeys-audio/use-dynamic-linkage.patch new file mode 100644 index 00000000000000..ab16f635342893 --- /dev/null +++ b/ports/monkeys-audio/use-dynamic-linkage.patch @@ -0,0 +1,36 @@ +diff --git a/Source/Projects/VS2017/MACLib/MACLib.vcxproj b/Source/Projects/VS2017/MACLib/MACLib.vcxproj +index ec3cf92..44c8e65 100644 +--- a/Source/Projects/VS2017/MACLib/MACLib.vcxproj ++++ b/Source/Projects/VS2017/MACLib/MACLib.vcxproj +@@ -25,27 +25,27 @@ + + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode + false + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode + false + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode