aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/monkeys-audio
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/monkeys-audio')
-rw-r--r--vcpkg/ports/monkeys-audio/fix-outdir.patch18
-rw-r--r--vcpkg/ports/monkeys-audio/license42
-rw-r--r--vcpkg/ports/monkeys-audio/portfile.cmake92
-rw-r--r--vcpkg/ports/monkeys-audio/remove-certificate-step.patch54
-rw-r--r--vcpkg/ports/monkeys-audio/vcpkg.json24
5 files changed, 230 insertions, 0 deletions
diff --git a/vcpkg/ports/monkeys-audio/fix-outdir.patch b/vcpkg/ports/monkeys-audio/fix-outdir.patch
new file mode 100644
index 0000000..1263b65
--- /dev/null
+++ b/vcpkg/ports/monkeys-audio/fix-outdir.patch
@@ -0,0 +1,18 @@
+diff --git a/Source/Projects/VS2022/MACDll/MACDll.vcxproj b/Source/Projects/VS2022/MACDll/MACDll.vcxproj
+index f5b20e8eb..d9fd63c20 100644
+--- a/Source/Projects/VS2022/MACDll/MACDll.vcxproj
++++ b/Source/Projects/VS2022/MACDll/MACDll.vcxproj
+@@ -150,10 +150,10 @@
+ <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+- <OutDir>C:\Applications\Winamp\plugins\</OutDir>
+- <IntDir>$(Configuration)\</IntDir>
++ <OutDir>$(Platform)\$(Configuration)\</OutDir>
++ <IntDir>$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+- <TargetName>in_APE</TargetName>
++ <TargetName>MACDll</TargetName>
+ <TargetExt>.dll</TargetExt>
+ <EnableClangTidyCodeAnalysis>true</EnableClangTidyCodeAnalysis>
+ <ClangTidyChecks>-clang-diagnostic-c++98-compat,-clang-diagnostic-zero-as-null-pointer-constant,-clang-diagnostic-language-extension-token,-clang-diagnostic-global-constructors,-clang-diagnostic-exit-time-destructors</ClangTidyChecks>
diff --git a/vcpkg/ports/monkeys-audio/license b/vcpkg/ports/monkeys-audio/license
new file mode 100644
index 0000000..a4ab2f0
--- /dev/null
+++ b/vcpkg/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/vcpkg/ports/monkeys-audio/portfile.cmake b/vcpkg/ports/monkeys-audio/portfile.cmake
new file mode 100644
index 0000000..d919e98
--- /dev/null
+++ b/vcpkg/ports/monkeys-audio/portfile.cmake
@@ -0,0 +1,92 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
+
+set(MA_VERSION 1008)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://monkeysaudio.com/files/MAC_${MA_VERSION}_SDK.zip"
+ FILENAME "MAC_${MA_VERSION}_SDK.zip"
+ SHA512 0c96b6fa8da9d412679e8c9b43e98d475a650899694a9d085c3b0272775cf229bb09c7c4f24a18ab7ee5516d2d34f7acd59e4216aca8fe08ed04f75e33e29322
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ NO_REMOVE_ONE_LEVEL
+ PATCHES
+ remove-certificate-step.patch
+ fix-outdir.patch
+)
+
+file(REMOVE_RECURSE
+ "${SOURCE_PATH}/Shared/32"
+ "${SOURCE_PATH}/Shared/64"
+)
+
+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()
+
+# Use /Z7 rather than /Zi to avoid "fatal error C1090: PDB API call failed, error code '23': (0x00000006)"
+foreach(VCXPROJ IN ITEMS
+ "${SOURCE_PATH}/Source/Projects/VS2022/Console/Console.vcxproj"
+ "${SOURCE_PATH}/Source/Projects/VS2022/DirectShow Filter/APE Decoder.vcxproj"
+ "${SOURCE_PATH}/Source/Projects/VS2022/MAC/MAC.vcxproj"
+ "${SOURCE_PATH}/Source/Projects/VS2022/MACDll/MACDll.vcxproj"
+ "${SOURCE_PATH}/Source/Projects/VS2022/MACLib/MACLib.vcxproj")
+ vcpkg_replace_string(
+ "${VCXPROJ}"
+ "<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>"
+ "<DebugInformationFormat>OldStyle</DebugInformationFormat>"
+ IGNORE_UNCHANGED
+ )
+ vcpkg_replace_string(
+ "${VCXPROJ}"
+ "<DebugInformationFormat>EditAndContinue</DebugInformationFormat>"
+ "<DebugInformationFormat>OldStyle</DebugInformationFormat>"
+ IGNORE_UNCHANGED
+ )
+endforeach()
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ list(APPEND VCPKG_C_FLAGS "-D_AFXDLL")
+ list(APPEND VCPKG_CXX_FLAGS "-D_AFXDLL")
+ vcpkg_msbuild_install(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PROJECT_SUBPATH "Source/Projects/VS2022/MACDll/MACDll.vcxproj"
+ PLATFORM ${PLATFORM}
+ )
+else()
+ vcpkg_msbuild_install(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PROJECT_SUBPATH "Source/Projects/VS2022/MACLib/MACLib.vcxproj"
+ PLATFORM ${PLATFORM}
+ )
+endif()
+
+if ("tools" IN_LIST FEATURES)
+ vcpkg_msbuild_install(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PROJECT_SUBPATH "Source/Projects/VS2022/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/"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include/monkeys-audio"
+ FILES_MATCHING PATTERN "*.h")
+
+vcpkg_install_copyright(FILE_LIST "${CMAKE_CURRENT_LIST_DIR}/license")
diff --git a/vcpkg/ports/monkeys-audio/remove-certificate-step.patch b/vcpkg/ports/monkeys-audio/remove-certificate-step.patch
new file mode 100644
index 0000000..5799520
--- /dev/null
+++ b/vcpkg/ports/monkeys-audio/remove-certificate-step.patch
@@ -0,0 +1,54 @@
+diff --git a/Source/Projects/VS2022/Console/Console.vcxproj b/Source/Projects/VS2022/Console/Console.vcxproj
+index e7eea4d..754e209 100644
+--- a/Source/Projects/VS2022/Console/Console.vcxproj
++++ b/Source/Projects/VS2022/Console/Console.vcxproj
+@@ -273,9 +273,6 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+- <PostBuildEvent>
+- <Command>..\..\..\Certificate\signtool.exe sign /f ..\..\..\Certificate\MAC.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)"</Command>
+- </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <ClCompile>
+@@ -299,9 +296,6 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+- <PostBuildEvent>
+- <Command>..\..\..\Certificate\signtool.exe sign /f ..\..\..\Certificate\MAC.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)"</Command>
+- </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+@@ -388,9 +382,6 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+- <PostBuildEvent>
+- <Command>..\..\..\Certificate\signtool.exe sign /f ..\..\..\Certificate\MAC.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)"</Command>
+- </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
+ <ClCompile>
+@@ -414,9 +405,6 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+- <PostBuildEvent>
+- <Command>..\..\..\Certificate\signtool.exe sign /f ..\..\..\Certificate\MAC.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)"</Command>
+- </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <ClCompile>
+@@ -440,9 +428,6 @@
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+- <PostBuildEvent>
+- <Command>..\..\..\Certificate\signtool.exe sign /f ..\..\..\Certificate\MAC.pfx /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /fd sha256 /a /as /p password "$(TargetPath)"</Command>
+- </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\Console\Console.cpp" />
diff --git a/vcpkg/ports/monkeys-audio/vcpkg.json b/vcpkg/ports/monkeys-audio/vcpkg.json
new file mode 100644
index 0000000..99811ee
--- /dev/null
+++ b/vcpkg/ports/monkeys-audio/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "monkeys-audio",
+ "version-string": "10.08",
+ "port-version": 2,
+ "description": [
+ "Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods.",
+ "Audio files compressed with it end with .ape extension."
+ ],
+ "homepage": "https://monkeysaudio.com",
+ "license": null,
+ "supports": "!(uwp | osx | linux)",
+ "dependencies": [
+ {
+ "name": "vcpkg-msbuild",
+ "host": true,
+ "platform": "windows"
+ }
+ ],
+ "features": {
+ "tools": {
+ "description": "Build monkeys-audio tools"
+ }
+ }
+}