Skip to content

Commit

Permalink
Merge pull request microsoft#2868 from cmpute/ape
Browse files Browse the repository at this point in the history
Add package Monkey's Audio
  • Loading branch information
alexkaratarakis authored Feb 26, 2018
2 parents dc166b2 + 7aaa4dc commit 99e674d
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ports/monkeys-audio/CONTROL
Original file line number Diff line number Diff line change
@@ -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.

42 changes: 42 additions & 0 deletions ports/monkeys-audio/license
Original file line number Diff line number Diff line change
@@ -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
55 changes: 55 additions & 0 deletions ports/monkeys-audio/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)
36 changes: 36 additions & 0 deletions ports/monkeys-audio/use-dynamic-linkage.patch
Original file line number Diff line number Diff line change
@@ -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 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141_xp</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>

0 comments on commit 99e674d

Please sign in to comment.