diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2016-10-12 12:46:51 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2016-10-12 12:46:51 -0700 |
| commit | 2f0d6b074a1f7eb1162f952f247eee83723afda6 (patch) | |
| tree | 7d7ba8fff2fab2f5a94c3354f0e42e2af00f8a5c | |
| parent | 6f727f6571b713f28ab3b823f46322236f114ca8 (diff) | |
| parent | 1babdd467b025f05a2e0278722b718a53936031f (diff) | |
| download | vcpkg-2f0d6b074a1f7eb1162f952f247eee83723afda6.tar.gz vcpkg-2f0d6b074a1f7eb1162f952f247eee83723afda6.zip | |
Merge branch 'master' of https://github.com/ZeroCrunch/vcpkg into ZeroCrunch-master
| -rw-r--r-- | ports/double-conversion/CONTROL | 3 | ||||
| -rw-r--r-- | ports/double-conversion/mscv_vers.patch | 46 | ||||
| -rw-r--r-- | ports/double-conversion/portfile.cmake | 71 |
3 files changed, 120 insertions, 0 deletions
diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL new file mode 100644 index 000000000..b997336e7 --- /dev/null +++ b/ports/double-conversion/CONTROL @@ -0,0 +1,3 @@ +Source: double-conversion +Version: 2.0.1 +Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/mscv_vers.patch b/ports/double-conversion/mscv_vers.patch new file mode 100644 index 000000000..911ccee84 --- /dev/null +++ b/ports/double-conversion/mscv_vers.patch @@ -0,0 +1,46 @@ +--- a/msvc/double-conversion.vcxproj ++++ b/msvc/double-conversion.vcxproj +@@ -1,5 +1,5 @@ + <?xml version="1.0" encoding="utf-8"?> +-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ++<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> +@@ -22,31 +22,32 @@ + <ProjectGuid>{6863544A-0CE8-4CA9-A132-74116FD9D9BB}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>doubleconversion</RootNamespace> ++ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> +- <PlatformToolset>v120</PlatformToolset> ++ <PlatformToolset>v140</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> +- <PlatformToolset>v120</PlatformToolset> ++ <PlatformToolset>v140</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> +- <PlatformToolset>v120</PlatformToolset> ++ <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> +- <PlatformToolset>v120</PlatformToolset> ++ <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake new file mode 100644 index 000000000..f30e72e70 --- /dev/null +++ b/ports/double-conversion/portfile.cmake @@ -0,0 +1,71 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +include(${CMAKE_TRIPLET_FILE}) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/double-conversion-d4d68e4e788bec89d55a6a3e33af674087837c82) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/google/double-conversion/archive/d4d68e4e788bec89d55a6a3e33af674087837c82.zip" + FILENAME "d4d68e4e788bec89d55a6a3e33af674087837c82.zip" + SHA512 1406dc22b4ea71e1a2490f96cfed3230e122b97607c83ba106df4e90c7e4bfdcfc136c88741e7f1127237b38b4944d462ec5a4627a71f5ea3fe14afbcc64cd44 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/mscv_vers.patch +) + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/msvc/double-conversion.vcxproj +) + +message(STATUS "Installing") +file(INSTALL + ${SOURCE_PATH}/msvc/Debug/Win32/double-conversion.lib + ${SOURCE_PATH}/msvc/Debug/Win32/double-conversion.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file(INSTALL + ${SOURCE_PATH}/msvc/Release/Win32/double-conversion.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) + +file(COPY ${SOURCE_PATH}/double-conversion DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +message(STATUS "Installing done") + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/doubleconversion) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doubleconversion/LICENSE ${CURRENT_PACKAGES_DIR}/share/doubleconversion/copyright) + +# Move the Release CMake files. +file(GLOB cacheFiles ${CURRENT_PACKAGES_DIR}/CMake/*.cmake) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/doubleconversion/release) +foreach(cacheFile ${cacheFiles}) + get_filename_component(filename ${cacheFile} NAME) + file(RENAME ${cacheFile} ${CURRENT_PACKAGES_DIR}/share/doubleconversion/release/${filename}) +endforeach() +# Remove the original directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake) + +# Move the Debug CMake files. +file(GLOB cacheFiles ${CURRENT_PACKAGES_DIR}/debug/CMake/*.cmake) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/doubleconversion/debug) +foreach(cacheFile ${cacheFiles}) + get_filename_component(filename ${cacheFile} NAME) + file(RENAME ${cacheFile} ${CURRENT_PACKAGES_DIR}/share/doubleconversion/debug/${filename}) +endforeach() +# Remove the original directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) + |
