This commit is contained in:
Alexander Karatarakis 2017-01-30 17:53:28 -08:00
commit 72ebfe4a14
12 changed files with 135 additions and 223 deletions

View File

@ -7,7 +7,8 @@ For short description of available commands, run `vcpkg help`.
## Quick Start
Prerequisites:
- Visual Studio 2015 Update 3
- Visual Studio 2015 Update 3 or
- Visual Studio 2017
- `git.exe` available in your path
Clone this repository, then run

View File

@ -1,4 +1,4 @@
Source: boost
Version: 1.62-12
Version: 1.63
Description: Peer-reviewed portable C++ source libraries
Build-Depends: zlib, bzip2

View File

@ -1,22 +1,22 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_1_62_0)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_1_63_0)
vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2"
FILENAME "boost_1_62_0.tar.bz2"
SHA512 5385ae3d5255a433a704169ad454d8dc2b0b5bcae3fb23defd6570df4ff7d845cf9fcbeebccdc1c5db0eec9f82ee3d90040de9507c8167467c635d3b215463be
URLS "https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.bz2"
FILENAME "boost_1_63_0.tar.bz2"
SHA512 c915c5f5778dee49b8e9d0a40f37f90f56fb1fdb1d8ce92d97bf48bc7bc462212487badfe4bbe30b06196d1149cfb221da12ac54e97499b0d4cb6466813bb4ad
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
# apply boost range hotfix
vcpkg_download_distfile(DIFF
URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff"
FILENAME "boost-range-has_range_interator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff"
FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff"
SHA512 77dad42bfd9bbab2bbddf361d5b7ad3dd6f812f4294c6dd1a677bb4d0191a4fff43bca32fdd4fce05d428562abb6e38afd0fd33ca6a8b5f28481d70cd2f3dd67
)
FILE(READ "${DIFF}" content)
STRING(REGEX REPLACE "include/" "" content "${content}")
set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_interator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed)
set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed)
FILE(WRITE ${DIFF2} "${content}")
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2})
@ -63,7 +63,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
endif()
# Add build type specific options
set(B2_OPTIONS_DBG
set(B2_OPTIONS_DBG
${B2_OPTIONS}
-sZLIB_BINARY=zlibd
-sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib"
@ -71,7 +71,7 @@ set(B2_OPTIONS_DBG
-sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib"
)
set(B2_OPTIONS_REL
set(B2_OPTIONS_REL
${B2_OPTIONS}
-sZLIB_BINARY=zlib
-sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib"
@ -128,7 +128,7 @@ file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/
message(STATUS "Packaging headers done")
# This function makes the static build lib names match the dynamic build lib names which FindBoost.cmake is looking for by default.
# It also renames a couple of "libboost" lib files in the dynamic build (for example libboost_exception-vc140-mt-1_62.lib).
# It also renames a couple of "libboost" lib files in the dynamic build (for example libboost_exception-vc140-mt-1_63.lib).
function(boost_rename_libs LIBS)
foreach(LIB ${${LIBS}})
get_filename_component(OLD_FILENAME ${LIB} NAME)

View File

@ -1,4 +1,4 @@
Source: harfbuzz
Version: 1.3.4
Version: 1.3.4-2
Description: HarfBuzz OpenType text shaping engine
Build-Depends: freetype
Build-Depends: freetype, glib

View File

@ -11,7 +11,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.4)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src/harfbuzz-1.3.4)
find_program(NMAKE nmake)
vcpkg_download_distfile(ARCHIVE
@ -19,20 +19,35 @@ vcpkg_download_distfile(ARCHIVE
FILENAME "harfbuzz-1.3.4.tar.bz2"
SHA512 72027ce64d735f1f7ecabcc78ba426d6155cebd564439feb77cefdfc28b00bfd9f6314e6735addaa90cee1d98cf6d2c0b61f77b446ba34e11f7eb7cdfdcd386a
)
vcpkg_extract_source_archive(${ARCHIVE})
# Harfbuzz only supports in-source builds, so to make sure we get a clean build, we need to re-extract every time
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src)
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src)
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" FREETYPE_INCLUDE_DIR)
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib" FREETYPE_LIB_DIR_DBG)
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib" FREETYPE_LIB_DIR_REL)
file(WRITE ${SOURCE_PATH}/win32/msvc_recommended_pragmas.h "/* I'm expected to exist */")
# for GObject support, harfbuzz expects glib-mkenums tool (perl script) to be availible in $(PREFIX)/bin
file(COPY ${CURRENT_INSTALLED_DIR}/tools/glib/glib-mkenums DESTINATION ${SOURCE_PATH}/bin)
vcpkg_find_acquire_program(PERL)
file(TO_NATIVE_PATH "${PERL}" PERL_INTERPRETER)
file(TO_NATIVE_PATH "${SOURCE_PATH}" MKENUMS_TOOL_DIR)
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" INCLUDE_DIR)
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib" LIB_DIR_DBG)
file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib" LIB_DIR_REL)
set(DEPENDENCIES FREETYPE=1 GLIB=1 GOBJECT=1)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f Makefile.vc CFG=debug FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} ADDITIONAL_LIB_DIR=${FREETYPE_LIB_DIR_DBG}
COMMAND ${NMAKE} -f Makefile.vc CFG=debug ${DEPENDENCIES} FREETYPE_DIR=${INCLUDE_DIR} ADDITIONAL_LIB_DIR=${LIB_DIR_DBG}
PREFIX=${MKENUMS_TOOL_DIR} PERL=${PERL_INTERPRETER}
WORKING_DIRECTORY ${SOURCE_PATH}/win32/
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f Makefile.vc CFG=release FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} ADDITIONAL_LIB_DIR=${FREETYPE_LIB_DIR_REL}
COMMAND ${NMAKE} -f Makefile.vc CFG=release ${DEPENDENCIES} FREETYPE_DIR=${INCLUDE_DIR} ADDITIONAL_LIB_DIR=${LIB_DIR_REL}
PREFIX=${MKENUMS_TOOL_DIR} PERL=${PERL_INTERPRETER}
WORKING_DIRECTORY ${SOURCE_PATH}/win32/
LOGNAME nmake-build-${TARGET_TRIPLET}-release
)
@ -40,7 +55,7 @@ vcpkg_execute_required_process(
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" NATIVE_PACKAGES_DIR_DBG)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f Makefile.vc CFG=debug FREETYPE=1 PREFIX=${NATIVE_PACKAGES_DIR_DBG} install
COMMAND ${NMAKE} -f Makefile.vc CFG=debug ${DEPENDENCIES} PREFIX=${NATIVE_PACKAGES_DIR_DBG} install
WORKING_DIRECTORY ${SOURCE_PATH}/win32/
LOGNAME nmake-install-${TARGET_TRIPLET}-debug
)
@ -49,11 +64,16 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR_REL)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f Makefile.vc CFG=release FREETYPE=1 PREFIX=${NATIVE_PACKAGES_DIR_REL} install
COMMAND ${NMAKE} -f Makefile.vc CFG=release ${DEPENDENCIES} PREFIX=${NATIVE_PACKAGES_DIR_REL} install
WORKING_DIRECTORY ${SOURCE_PATH}/win32/
LOGNAME nmake-install-${TARGET_TRIPLET}-release
)
file(GLOB EXECUTABLES
${CURRENT_PACKAGES_DIR}/bin/*.exe
${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${EXECUTABLES})
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright)

View File

@ -3,7 +3,7 @@ project(openssl NONE)
include(vcpkg_execute_required_process)
include(vcpkg_apply_patches)
set(SOURCE_PATH ${CMAKE_CURRENT_BINARY_DIR}/openssl-1.0.2j)
set(SOURCE_PATH ${CMAKE_CURRENT_BINARY_DIR}/openssl-${OPENSSL_VERSION})
find_program(PERL perl)
find_program(NMAKE nmake)

View File

@ -1,3 +1,3 @@
Source: openssl
Version: 1.0.2j-2
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
Version: 1.0.2k-2
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.

View File

@ -26,16 +26,16 @@ endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2j_WinRT)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2k_WinRT)
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2j_WinRT.zip"
FILENAME "openssl-microsoft-1.0.2j_WinRT.zip"
SHA512 0860d1f5fca7b1345870e866d7bb78f14672c5bb63c56bb04360ee891be542b4b56625ab971ef9b304b792b6cf36c9508bfd812c4a133f6ba8bafdde5e2f8fcf
URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2k_WinRT.zip"
FILENAME "openssl-microsoft-1.0.2k_WinRT.zip"
SHA512 afb434ef69c399f690f7ce723fabb228f77a12428f19062c5df3b8b841a2a7881c01150fdcfd2fab23867e3963292874a08ad227b37d168907b507fb1d7fede7
)
vcpkg_extract_source_archive(${ARCHIVE})
@ -44,10 +44,6 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll)
file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll)
file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll)
file(COPY
${CMAKE_CURRENT_LIST_DIR}/setVSvars.bat
DESTINATION ${SOURCE_PATH}/ms)
file(COPY
${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat
DESTINATION ${SOURCE_PATH})

View File

@ -4,7 +4,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-1.0.2j)
set(OPENSSL_VERSION 1.0.2k)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})
vcpkg_find_acquire_program(PERL)
find_program(NMAKE nmake)
@ -12,9 +13,9 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
URLS "https://www.openssl.org/source/openssl-1.0.2j.tar.gz"
FILENAME "openssl-1.0.2j.tar.gz"
SHA512 7d6ccae4aa3ccec3a5d128da29c68401cdb1210cba6d212d55235fc3bc63d7085e2f119e2bbee7ddff6b7b5eef07c6196156791724cd2caf313a4c2fef724edd
URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
FILENAME "openssl-${OPENSSL_VERSION}.tar.gz"
SHA512 0d314b42352f4b1df2c40ca1094abc7e9ad684c5c35ea997efdd58204c70f22a1abcb17291820f0fff3769620a4e06906034203d31eb1a4d540df3e0db294016
)
file(COPY
@ -34,7 +35,7 @@ vcpkg_configure_cmake(
-DOPENSSL_SOURCE_ARCHIVE=${OPENSSL_SOURCE_ARCHIVE}
-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
-DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH}
-DVERSION=1.0.2j
-DVERSION=${OPENSSL_VERSION}
-DTARGET_TRIPLET=${TARGET_TRIPLET}
)

View File

@ -1,185 +0,0 @@
@echo off
call:set_%1
exit /b
:set_universal10.0Win32
call:setVar _VS14VC VisualStudio14VC
call "%_VS14VC%vcvarsall" x86 store
set _VCPlatform=x86
set _VCLibPlat=
call:setEnv
goto :eof
:set_universal10.0x64
call:setVar _VS14VC VisualStudio14VC
call "%_VS14VC%vcvarsall" x64 store
set _VCPlatform=x64
set _VCLibPlat=amd64
call:setEnv
goto :eof
:set_universal10.0arm
call:setVar _VS14VC VisualStudio14VC
call "%_VS14VC%vcvarsall" x86_arm store
set _VCPlatform=ARM
set _VCLibPlat=ARM
call:setEnv
goto :eof
:set_universal10.0arm64
call:setVar _VS14VC VisualStudio14VC
call "%_VS14VC%vcvarsall" x86_arm64 store
set _VCPlatform=ARM64
set _VCLibPlat=ARM64
call:setEnv
goto :eof
:set_wp8.1arm
call:setVar _VS12VC VisualStudio12VC
call:setVar _WPKITS81 WindowsPhoneKits8.1
call:setVar _VS14VC VisualStudio14VC
call "%_VS12VC%\vcvarsall" x86_arm
set PATH=%_VS12VC\Bin%;%PATH%
set INCLUDE=%_WPKITS81%\Include;%_WPKITS81%\Include\abi;%_WPKITS81%\Include\mincore;%_WPKITS81%\Include\minwin;%_WPKITS81%\Include\wrl;%INCLUDE%
set LIB=%_WPKITS81%\lib\ARM;%_VS12VC%\lib\store\ARM;
set LIBPATH=%LIBPATH%;%_VS12VC%\vcpackages;%WindowsSDK_ExecutablePath_x86%\..\..\Tools\MDILXAPCompile\WinMDs;%_VS14VC%\vcpackages;
goto :eof
:set_wp8.1Win32
call:setVar _VS12VC VisualStudio12VC
call:setVar _WPKITS81 WindowsPhoneKits8.1
call:setVar _VS14VC VisualStudio14VC
call "%_VS12VC%\vcvarsall" x86
set INCLUDE=%_WPKITS81%\Include;%_WPKITS81%\Include\abi;%_WPKITS81%\Include\mincore;%_WPKITS81%\Include\minwin;%_WPKITS81%\Include\wrl;%INCLUDE%
set LIB=%_WPKITS81%\lib\x86;%_VS12VC%\lib\store;
set LIBPATH=%LIBPATH%;%_VS12VC%\vcpackages;%WindowsSDK_ExecutablePath_x86%\..\..\Tools\MDILXAPCompile\WinMDs;%_VS14VC%\vcpackages;
goto :eof
:set_wp8.0arm
call:setVar _VS11VC VisualStudio11VC
call:setVar _WPKITS80 WindowsPhoneKits8.0
call "%_VS11VC%\WPSDK\WP80\vcvarsphoneall.bat" x86_arm
goto :eof
:set_wp8.0Win32
call:setVar _VS11VC VisualStudio11VC
call:setVar _WPKITS80 WindowsPhoneKits8.0
call "%_VS11VC%\WPSDK\WP80\vcvarsphoneall.bat" x86
goto :eof
:set_ws8.1Win32
call:setVar _VS12VC VisualStudio12VC
call:setVar _WSKITS81 WindowsKits8.1
call:setVar _VS14VC VisualStudio14VC
call "%_VS12VC%\vcvarsall" x86
set INCLUDE=%_VS12VC%\include;%_VS12VC%\atlmfc\include;%_WSKITS81%\Include\um;%_WSKITS81%\Include\shared;%_WSKITS81%\Include\winrt;
set LIB=%_VS12VC%\lib\store;%_VS12VC%\atlmfc\lib;%_WSKITS81%\lib\winv6.3\um\x86;
set LIBPATH=%_WSKITS81%\References\CommonConfiguration\Neutral;%_VS12VC%\atlmfc\lib;%_VS12VC%\lib\store;%_VS12VC%\vcpackages;%WindowsSDK_ExecutablePath_x86%\..\..\Tools\MDILXAPCompile\WinMDs;%_VS14VC%\vcpackages;
goto :eof
:set_ws8.1x64
call:setVar _VS12VC VisualStudio12VC
call:setVar _WSKITS81 WindowsKits8.1
call:setVar _VS14VC VisualStudio14VC
call "%_VS12VC%\vcvarsall" x64
set INCLUDE=%_VS12VC%\include;%_VS12VC%\atlmfc\include;%_WSKITS81%\Include\um;%_WSKITS81%\Include\shared;%_WSKITS81%\Include\winrt;
set LIB=%_VS12VC%\lib\store\amd64;%_VS12VC%\atlmfc\lib\amd64;%_WSKITS81%\lib\winv6.3\um\x64;
set LIBPATH=%_WSKITS81%\References\CommonConfiguration\Neutral;%_VS12VC%\atlmfc\lib\amd64;%_VS12VC%\lib\store;%_VS12VC%\vcpackages;%WindowsSDK_ExecutablePath_x86%\..\..\Tools\MDILXAPCompile\WinMDs;%_VS14VC%\vcpackages;
goto :eof
:set_ws8.1arm
call:setVar _VS12VC VisualStudio12VC
call:setVar _WSKITS81 WindowsKits8.1
call:setVar _VS14VC VisualStudio14VC
call "%_VS12VC%\vcvarsall" x86_arm
set INCLUDE=%_VS12VC%\include;%_VS12VC%\atlmfc\include;%_WSKITS81%\Include\um;%_WSKITS81%\Include\shared;%_WSKITS81%\Include\winrt;
set LIB=%_VS12VC%\lib\store\arm;%_VS12VC%\atlmfc\lib\arm;%_WSKITS81%\lib\winv6.3\um\arm;
set LIBPATH=%_WSKITS81%\References\CommonConfiguration\Neutral;%_VS12VC%\atlmfc\lib\arm;%_VS12VC%\lib\store;%_VS12VC%\vcpackages;%WindowsSDK_ExecutablePath_x86%\..\..\Tools\MDILXAPCompile\WinMDs;%_VS14VC%\vcpackages;
goto :eof
:setVar
call:set%1
if "!%1!"=="" echo warning: could not locate %2
goto :eof
:setRegVar
for /F "usebackq tokens=2*" %%A IN (`reg query %1 /v %2 2^>nul`) do (
set %3=%%B
)
goto :eof
:setAppend
if exist %1%2 set %3=%1%2
goto :eof
:set_VS11VC
if not "%_VS11VC%"=="" goto :eof
call:setRegVar "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\Setup\VC" ProductDir _VS11VC
if not "%_VS11VC%"=="" goto :eof
call:setRegVar "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VC" ProductDir _VS11VC
if not "%_VS11VC%"=="" goto :eof
call:setAppend VSSDK110Install \..\VC _VS11VC
if not "%_VS11VC%"=="" goto :eof
call:setAppend VS110COMNTOOLS \..\..\VC _VS11VC
goto :eof
:set_VS12VC
if not "%_VS12VC%"=="" goto :eof
call:setRegVar "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Setup\VC" ProductDir _VS12VC
if not "%_VS12VC%"=="" goto :eof
call:setRegVar "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Setup\VC" ProductDir _VS12VC
if not "%_VS12VC%"=="" goto :eof
call:setAppend VSSDK120Install \..\VC _VS12VC
if not "%_VS12VC%"=="" goto :eof
call:setAppend VS120COMNTOOLS \..\..\VC _VS12VC
goto :eof
:set_VS14VC
if not "%_VS14VC%"=="" goto :eof
call:setRegVar "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\Setup\VC" ProductDir _VS14VC
if not "%_VS14VC%"=="" goto :eof
call:setRegVar "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\VC" ProductDir _VS14VC
if not "%_VS14VC%"=="" goto :eof
call:setAppend VSSDK140Install \..\VC _VS14VC
if not "%_VS14VC%"=="" goto :eof
call:setAppend VS140COMNTOOLS \..\..\VC _VS14VC
goto :eof
:set_WPKITS80
if not "%_WPKITS80%"=="" goto :eof
call:setRegVar "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows Phone\v8.0" InstallationFolder _WPKITS80
if not "%_WPKITS80%"=="" goto :eof
goto :eof
:set_WPKITS81
if not "%_WPKITS81%"=="" goto :eof
call:setRegVar "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows Phone\v8.1" InstallationFolder _WPKITS81
if not "%_WPKITS81%"=="" goto :eof
goto :eof
:set_WSKITS81
if not "%_WSKITS81%"=="" goto :eof
call:setRegVar "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots" KitsRoot81 _WSKITS81
if not "%_WSKITS81%"=="" goto :eof
goto :eof
:set_WKITS10
if not "%_WKITS10%"=="" goto :eof
call:setRegVar "HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" InstallationFolder _WKITS10
if not "%_WKITS10%"=="" goto :eof
goto :eof
:set_WKITS10VER
if not "%_WKITS10VER%"=="" goto :eof
call:setRegVar "HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" ProductVersion _WKITS10VER
echo %_WKITS10VER%
if not "%_WKITS10VER%"=="" goto :eof
goto :eof
:setEnv
call:setVar _VS14VC VisualStudio14VC
call:setVar _WKITS10 WindowsKits10.0
set PATH=%_VS14VCBin%;%PATH%
set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\"
goto :eof
:end

3
ports/opus/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: opus
Version: 1.1.4
Description: Totally open, royalty-free, highly versatile audio codec

76
ports/opus/portfile.cmake Normal file
View File

@ -0,0 +1,76 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opus-1.1.4)
vcpkg_download_distfile(ARCHIVE
URLS "http://downloads.xiph.org/releases/opus/opus-1.1.4.tar.gz"
FILENAME "opus-1.1.4.tar.gz"
SHA512 57f14b9e8037eaa02a4d86535d3bbcceca249310fbc9ef1a452cc19dd442d4cf338d5db241d20605c236e22549df2c8266b7486c5f1666b80c532afd52cb3585
)
vcpkg_extract_source_archive(${ARCHIVE})
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(RELEASE_CONFIGURATION "Release")
set(DEBUG_CONFIGURATION "Debug")
else()
set(RELEASE_CONFIGURATION "ReleaseDll")
set(DEBUG_CONFIGURATION "DebugDll")
endif()
if(TARGET_TRIPLET MATCHES "x86")
set(ARCH_DIR "Win32")
elseif(TARGET_TRIPLET MATCHES "x64")
set(ARCH_DIR "x64")
else()
message("Architecture not supported")
endif()
function(build_project PROJECT_PATH)
vcpkg_build_msbuild(
PROJECT_PATH ${PROJECT_PATH}
RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION}
DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION}
)
endfunction(build_project)
build_project(${SOURCE_PATH}/win32/VS2015/celt.vcxproj)
build_project(${SOURCE_PATH}/win32/VS2015/silk_common.vcxproj)
build_project(${SOURCE_PATH}/win32/VS2015/silk_float.vcxproj)
build_project(${SOURCE_PATH}/win32/VS2015/silk_fixed.vcxproj)
build_project(${SOURCE_PATH}/win32/VS2015/opus.vcxproj)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
# Install release build
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/celt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_common.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_fixed.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_float.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
# Install debug build
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/celt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/celt.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_common.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_common.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_fixed.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_fixed.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_float.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_float.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
else()
# Install release build
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/)
# Install debug build
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/)
file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/)
endif()
# Install headers
file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME opus)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/opus RENAME copyright)