aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fussell <thomas.fussell@gmail.com>2017-01-01 18:28:56 -0500
committerThomas Fussell <thomas.fussell@gmail.com>2017-01-01 18:28:56 -0500
commit32dd084deadecd726172b85239c30bbbf683f62b (patch)
tree492044fa3bce12e930d6c565d92095d71fac68e5
parent937c246ac2aa6ec11a02d0cb36a4e50919842c8a (diff)
parentbc8cca82a297e37bf9dde387991c1d51618273b7 (diff)
downloadvcpkg-32dd084deadecd726172b85239c30bbbf683f62b.tar.gz
vcpkg-32dd084deadecd726172b85239c30bbbf683f62b.zip
Merge branch 'master' of http://github.com/Microsoft/vcpkg
-rw-r--r--CHANGELOG.md45
-rw-r--r--README.md2
-rw-r--r--docs/FAQ.md3
-rw-r--r--ports/anax/Add-bin-output.patch10
-rw-r--r--ports/anax/CONTROL2
-rw-r--r--ports/anax/portfile.cmake11
-rw-r--r--ports/antlr4/CONTROL3
-rw-r--r--ports/antlr4/crt_mt.patch36
-rw-r--r--ports/antlr4/portfile.cmake74
-rw-r--r--ports/antlr4/static.patch12
-rw-r--r--ports/asio/portfile.cmake2
-rw-r--r--ports/assimp/portfile.cmake5
-rw-r--r--ports/aws-sdk-cpp/CONTROL3
-rw-r--r--ports/aws-sdk-cpp/drop_git.patch13
-rw-r--r--ports/aws-sdk-cpp/portfile.cmake55
-rw-r--r--ports/aws-sdk-cpp/shared_define.patch10
-rw-r--r--ports/azure-storage-cpp/CONTROL5
-rw-r--r--ports/azure-storage-cpp/cmake.patch169
-rw-r--r--ports/azure-storage-cpp/portfile.cmake33
-rw-r--r--ports/boost/CONTROL3
-rw-r--r--ports/boost/portfile.cmake31
-rw-r--r--ports/charls/0001_cmake.patch12
-rw-r--r--ports/charls/CONTROL3
-rw-r--r--ports/charls/portfile.cmake27
-rw-r--r--ports/curl/0001_cmake.patch13
-rw-r--r--ports/curl/CONTROL4
-rw-r--r--ports/curl/portfile.cmake6
-rw-r--r--ports/dimcli/CONTROL4
-rw-r--r--ports/dimcli/portfile.cmake37
-rw-r--r--ports/fastlz/portfile.cmake7
-rw-r--r--ports/freeglut/portfile.cmake5
-rw-r--r--ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch70
-rw-r--r--ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch50
-rw-r--r--ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch26
-rw-r--r--ports/gdal/CONTROL4
-rw-r--r--ports/gdal/portfile.cmake133
-rw-r--r--ports/geos/portfile.cmake11
-rw-r--r--ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch51
-rw-r--r--ports/gflags/CONTROL2
-rw-r--r--ports/gflags/portfile.cmake58
-rw-r--r--ports/glbinding/portfile.cmake6
-rw-r--r--ports/glew/portfile.cmake104
-rw-r--r--ports/gli/CONTROL3
-rw-r--r--ports/gli/portfile.cmake20
-rw-r--r--ports/globjects/portfile.cmake4
-rw-r--r--ports/glslang/CONTROL2
-rw-r--r--ports/glslang/portfile.cmake18
-rw-r--r--ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch40
-rw-r--r--ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch28
-rw-r--r--ports/harfbuzz/CONTROL2
-rw-r--r--ports/harfbuzz/portfile.cmake20
-rw-r--r--ports/http-parser/CMakeLists.txt17
-rw-r--r--ports/http-parser/CONTROL3
-rw-r--r--ports/http-parser/portfile.cmake29
-rw-r--r--ports/icu/CONTROL2
-rw-r--r--ports/icu/portfile.cmake11
-rw-r--r--ports/libbson/CONTROL2
-rw-r--r--ports/libbson/portfile.cmake102
-rw-r--r--ports/libflac/CMakeLists.txt73
-rw-r--r--ports/libflac/CONTROL4
-rw-r--r--ports/libflac/portfile.cmake35
-rw-r--r--ports/liblzma/CMakeLists.txt104
-rw-r--r--ports/liblzma/CONTROL3
-rw-r--r--ports/liblzma/auto-define-lzma-api-static.patch14
-rw-r--r--ports/liblzma/portfile.cmake29
-rw-r--r--ports/libmodplug/CONTROL3
-rw-r--r--ports/libmodplug/automagically-define-modplug-static.patch13
-rw-r--r--ports/libmodplug/portfile.cmake30
-rw-r--r--ports/libssh2/CONTROL4
-rw-r--r--ports/libssh2/LICENSE41
-rw-r--r--ports/libssh2/portfile.cmake32
-rw-r--r--ports/lua/CMakeLists.txt17
-rw-r--r--ports/lua/CONTROL2
-rw-r--r--ports/lua/portfile.cmake1
-rw-r--r--ports/lz4/CMakeLists.txt26
-rw-r--r--ports/lz4/CONTROL3
-rw-r--r--ports/lz4/auto-define-import-macro.patch28
-rw-r--r--ports/lz4/portfile.cmake29
-rw-r--r--ports/mongo-c-driver/CONTROL2
-rw-r--r--ports/mongo-c-driver/portfile.cmake92
-rw-r--r--ports/mongo-cxx-driver/portfile.cmake175
-rw-r--r--ports/nana/CONTROL4
-rw-r--r--ports/nana/fix-linking.patch51
-rw-r--r--ports/nana/portfile.cmake36
-rw-r--r--ports/ogre/0001-use-vcpkg-freeimage.patch17
-rw-r--r--ports/ogre/0002-ogre-cmake-dir-as-option.patch19
-rw-r--r--ports/ogre/0003-use-flat-installation.patch41
-rw-r--r--ports/ogre/CONTROL4
-rw-r--r--ports/ogre/OGREConfig.cmake37
-rw-r--r--ports/ogre/portfile.cmake60
-rw-r--r--ports/openssl/CONTROL2
-rw-r--r--ports/openssl/portfile-uwp.cmake8
-rw-r--r--ports/qca/0001-fix-path-for-vcpkg.patch63
-rw-r--r--ports/qca/CONTROL4
-rw-r--r--ports/qca/mk-ca-bundle.pl554
-rw-r--r--ports/qca/portfile.cmake123
-rw-r--r--ports/qt5/CONTROL4
-rw-r--r--ports/qt5/portfile.cmake20
-rw-r--r--ports/ragel/portfile.cmake2
-rw-r--r--ports/sdl2/CONTROL4
-rw-r--r--ports/sdl2/dont-ignore-default-libs.patch22
-rw-r--r--ports/sdl2/portfile.cmake35
-rw-r--r--ports/sfml/CMakeLists.txt122
-rw-r--r--ports/sfml/CONTROL4
-rw-r--r--ports/sfml/portfile.cmake34
-rw-r--r--ports/shaderc/0001-Do-not-generate-build-version.inc.patch30
-rw-r--r--ports/shaderc/CMakeLists.txt29
-rw-r--r--ports/shaderc/CMakeLists_spirv.txt14
-rw-r--r--ports/shaderc/CONTROL4
-rw-r--r--ports/shaderc/build-version.inc3
-rw-r--r--ports/shaderc/portfile.cmake79
-rw-r--r--ports/smpeg2/CMakeLists.txt57
-rw-r--r--ports/smpeg2/CONTROL4
-rw-r--r--ports/smpeg2/correct-sdl-headers-dir.patch17
-rw-r--r--ports/smpeg2/portfile.cmake27
-rw-r--r--ports/spirv-tools/CONTROL3
-rw-r--r--ports/spirv-tools/portfile.cmake78
-rw-r--r--ports/sqlite3/CMakeLists.txt3
-rw-r--r--ports/uwebsockets/0001_cmake.patch40
-rw-r--r--ports/uwebsockets/CONTROL4
-rw-r--r--ports/uwebsockets/portfile.cmake26
-rw-r--r--scripts/buildsystems/msbuild/vcpkg.targets6
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake9
-rw-r--r--scripts/ports.cmake1
-rw-r--r--toolsrc/VERSION.txt2
-rw-r--r--toolsrc/include/BuildInfo.h2
-rw-r--r--toolsrc/include/coff_file_reader.h4
-rw-r--r--toolsrc/include/metrics.h1
-rw-r--r--toolsrc/include/vcpkg_Commands.h4
-rw-r--r--toolsrc/include/vcpkg_Files.h8
-rw-r--r--toolsrc/include/vcpkg_Input.h4
-rw-r--r--toolsrc/include/vcpkg_Strings.h6
-rw-r--r--toolsrc/include/vcpkg_System.h28
-rw-r--r--toolsrc/include/vcpkg_cmd_arguments.h6
-rw-r--r--toolsrc/src/BuildInfo.cpp2
-rw-r--r--toolsrc/src/Paragraphs.cpp2
-rw-r--r--toolsrc/src/coff_file_reader.cpp4
-rw-r--r--toolsrc/src/commands_cache.cpp8
-rw-r--r--toolsrc/src/commands_create.cpp4
-rw-r--r--toolsrc/src/commands_edit.cpp2
-rw-r--r--toolsrc/src/commands_hash.cpp6
-rw-r--r--toolsrc/src/commands_import.cpp2
-rw-r--r--toolsrc/src/commands_installation.cpp55
-rw-r--r--toolsrc/src/commands_integration.cpp4
-rw-r--r--toolsrc/src/commands_list.cpp2
-rw-r--r--toolsrc/src/commands_other.cpp7
-rw-r--r--toolsrc/src/commands_owns.cpp2
-rw-r--r--toolsrc/src/commands_portsdiff.cpp4
-rw-r--r--toolsrc/src/commands_remove.cpp4
-rw-r--r--toolsrc/src/commands_search.cpp2
-rw-r--r--toolsrc/src/commands_update.cpp2
-rw-r--r--toolsrc/src/main.cpp3
-rw-r--r--toolsrc/src/metrics.cpp34
-rw-r--r--toolsrc/src/post_build_lint.cpp2
-rw-r--r--toolsrc/src/vcpkg.cpp129
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp2
-rw-r--r--toolsrc/src/vcpkg_Files.cpp35
-rw-r--r--toolsrc/src/vcpkg_Input.cpp4
-rw-r--r--toolsrc/src/vcpkg_Strings.cpp34
-rw-r--r--toolsrc/src/vcpkg_System.cpp4
-rw-r--r--toolsrc/src/vcpkg_cmd_arguments.cpp8
-rw-r--r--toolsrc/src/vcpkg_metrics_uploader.cpp2
162 files changed, 3756 insertions, 605 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4e056cdc..464d5c3e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,48 @@
+vcpkg (0.0.65)
+--------------
+ * Add ports:
+ - anax 2.1.0-1
+ - aws-sdk-cpp 1.0.34-1
+ - azure-storage-cpp 2.5.0
+ - charls 2.0.0
+ - dimcli 1.0.3
+ - entityx 1.2.0
+ - freeimage 3.17.0
+ - gdal 1.11.3
+ - globjects 1.0.0
+ - http-parser 2.7.1
+ - icu 58.1
+ - libflac 1.3.1-1
+ - libssh2 1.8.0
+ - nana 1.4.1
+ - qca 2.2.0
+ - sfml 2.4.1
+ - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958
+ - uwebsockets 0.12.0
+ - yaml-cpp 0.5.4 candidate
+ * Update ports:
+ - boost 1.62-6 -> 1.62-8
+ - curl 7.51.0-1 -> 7.51.0-2
+ - gflags 2.1.2 -> 2.2.0-2
+ - glbinding 2.1.1 -> 2.1.1-1
+ - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3 -> 1c573fbcfba6b3d631008b1babc838501ca925d3-1
+ - harfbuzz 1.3.2 -> 1.3.4
+ - jxrlib 1.1-1 -> 1.1-2
+ - libraw 0.17.2 -> 0.17.2-2
+ - lua 5.3.3 -> 5.3.3-1
+ - openssl 1.0.2j -> 1.0.2j-1
+ * Improvements in the post-build checks:
+ - Add check for files in the `<package>\` dir and `<package>\debug\` dir
+ * Introduce pre-install checks:
+ - The `install` command now checks that files will not be overwrriten when installing a package. A particular file can only be owned by a single package
+ * Introduce 'lib\manul-link\' directory. Libraries placing the lib files in that directory are not automatically added to the link line
+ * Disable all interactions with CMake registry
+ * `vcpkg /?` is now a valid equivalent of `vcpkg help`
+ * Fixes and improvements in existing portfiles and the `vcpkg` tool itself
+
+-- vcpkg team <vcpkg@microsoft.com> MON, 12 Dec 2016 18:15:00 -0800
+
+
vcpkg (0.0.61)
--------------
* Add ports:
diff --git a/README.md b/README.md
index 99d8dc0b3..78470dd0c 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ Finally, create a New Project (or open an existing one) in Visual Studio 2015 or
## Examples
See the [`docs\EXAMPLES.md`](docs/EXAMPLES.md) document for specific walkthroughs, including using a package and adding a new package.
-See a 4 mm [demo in video](https://www.youtube.com/watch?v=y41WFKbQFTw).
+See a 4 minute [demo in video](https://www.youtube.com/watch?v=y41WFKbQFTw).
## Contributing
Vcpkg is built with your contributions. Here are some ways you can contribute:
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 7bc57f605..0a82d320e 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -61,6 +61,9 @@ In a corporate scenario, we currently recommend building the libraries once and
## What Visual C++ toolsets are supported?
We plan to only support Visual Studio 2015 and above.
+## Why does Visual Studio not use my libraries with user-wide integration enabled?
+Enabling user-wide integration (`vcpkg integrate install`) changes the default for some project properties. In particular, "C/C++/General/Additional Include Directories" and "Linker/General/Additional Library Directories" are normally blank *without* user-wide integration. *With* integration, a blank value means that the augmented default supplied by vcpkg is overridden, and headers/libraries will not be found. To reinstate the default, set the properties to inherit from parent.
+
## Can I acquire my package's sources by Git url+tag?
Yes, however we prefer compressed archives of the specific release/commit since the internal downloads and build trees are meant to be read only. Github provides archives for every commit, tag, and branch, so it's always possible to perform this substitution for repositories hosted there.
diff --git a/ports/anax/Add-bin-output.patch b/ports/anax/Add-bin-output.patch
new file mode 100644
index 000000000..333a92fdc
--- /dev/null
+++ b/ports/anax/Add-bin-output.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt Tue Oct 13 13:47:40 2015
++++ b/CMakeLists.txt Tue Dec 06 11:13:23 2016
+@@ -161,6 +161,7 @@
+ # Library files
+ install(
+ TARGETS ${ANAX_LIBRARY_NAME}
++ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL
index f6d285b4c..ce3da2f57 100644
--- a/ports/anax/CONTROL
+++ b/ports/anax/CONTROL
@@ -1,3 +1,3 @@
Source: anax
-Version: 2.1.0
+Version: 2.1.0-1
Description: An open source C++ entity system. <https://github.com/miguelmartin75/anax>
diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake
index ae22332cf..ef14f7264 100644
--- a/ports/anax/portfile.cmake
+++ b/ports/anax/portfile.cmake
@@ -6,10 +6,6 @@
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- message(STATUS "Warning: Dynamic building not supported yet. Building static.")
- set(VCPKG_LIBRARY_LINKAGE static)
-endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/anax-2.1.0)
@@ -20,8 +16,15 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/Add-bin-output.patch
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
)
vcpkg_install_cmake()
diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL
new file mode 100644
index 000000000..dbcf5219c
--- /dev/null
+++ b/ports/antlr4/CONTROL
@@ -0,0 +1,3 @@
+Source: antlr4
+Version: 4.6
+Description: ANother Tool for Language Recognition \ No newline at end of file
diff --git a/ports/antlr4/crt_mt.patch b/ports/antlr4/crt_mt.patch
new file mode 100644
index 000000000..d2e8a28da
--- /dev/null
+++ b/ports/antlr4/crt_mt.patch
@@ -0,0 +1,36 @@
+diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj
+index 85fa3da..540f031 100644
+--- a/runtime/antlr4cpp-vs2015.vcxproj
++++ b/runtime/antlr4cpp-vs2015.vcxproj
+@@ -201,6 +201,7 @@
+ <DisableSpecificWarnings>4251</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <MinimalRebuild>false</MinimalRebuild>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+@@ -239,6 +240,7 @@
+ <DisableSpecificWarnings>4251</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <MinimalRebuild>false</MinimalRebuild>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+@@ -281,6 +283,7 @@
+ </ForcedIncludeFiles>
+ <DisableSpecificWarnings>4251</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+@@ -325,6 +328,7 @@
+ </ForcedIncludeFiles>
+ <DisableSpecificWarnings>4251</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake
new file mode 100644
index 000000000..8b11c95b0
--- /dev/null
+++ b/ports/antlr4/portfile.cmake
@@ -0,0 +1,74 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/runtime)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.antlr.org/download/antlr4-cpp-runtime-4.6-source.zip"
+ FILENAME "antlr4-cpp-runtime-4.6-source.zip"
+ SHA512 e123c2227e41ce80da5a3758725a018690ed70a4e10c23da26c966259e6bdafa192f4363f5a7e1181ef9a47bf3cc50d6b0ca7b26c8dd2b19222a7edf54de8de2
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/crt_mt.patch
+)
+
+if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
+ set(DEBUG_CONFIG "Debug Static")
+ set(RELEASE_CONFIG "Release Static")
+else()
+ set(DEBUG_CONFIG "Debug DLL")
+ set(RELEASE_CONFIG "Release DLL")
+endif()
+
+vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/antlr4cpp-vs2015.vcxproj
+ DEBUG_CONFIGURATION ${DEBUG_CONFIG}
+ RELEASE_CONFIGURATION ${RELEASE_CONFIG}
+)
+
+file (MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/include)
+FILE(COPY ${SOURCE_PATH}/src/
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+ FILES_MATCHING PATTERN "*.h")
+
+file (MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+
+if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch
+ )
+else()
+ file (MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/bin
+ ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+ file(COPY
+ ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.dll
+ ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(COPY
+ ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.dll
+ ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+endif()
+
+
+# license not exist in antlr folder.
+vcpkg_download_distfile(LICENSE
+ URLS https://raw.githubusercontent.com/antlr/antlr4/master/LICENSE.txt
+ FILENAME "antlr4-copyright"
+ SHA512 c72ae3d5c9f3f07160405b5ca44f01116a9602d82291d6cd218fcc5ec6e8baf985e4baa2acf3d621079585385708bd171c96ef44dd808e60c40a48bc1f56c9ae
+)
+file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright)
+
+message(STATUS "Installing done") \ No newline at end of file
diff --git a/ports/antlr4/static.patch b/ports/antlr4/static.patch
new file mode 100644
index 000000000..fb54c5ae4
--- /dev/null
+++ b/ports/antlr4/static.patch
@@ -0,0 +1,12 @@
+diff --git a/antlr4-common.h b/antlr4-common.h
+index 197fd6d..34a62c8 100644
+--- a/antlr4-common.h
++++ b/antlr4-common.h
+@@ -34,6 +34,7 @@
+ #include <bitset>
+ #include <condition_variable>
+
++#define ANTLR4CPP_STATIC
+ // Defines for the Guid class and other platform dependent stuff.
+ #ifdef _WIN32
+ #pragma warning (disable: 4250) // Class inherits by dominance.
diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake
index c966b157e..345ddd673 100644
--- a/ports/asio/portfile.cmake
+++ b/ports/asio/portfile.cmake
@@ -9,7 +9,7 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(${ARCHIVE})
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/asio-asio-1-10-6/asio/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/asio/COPYING ${CURRENT_PACKAGES_DIR}/share/asio/copyright)
# Copy the asio header files
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 04d19cdd3..452233265 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -7,6 +7,7 @@
#
include(vcpkg_common_functions)
+SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/assimp/assimp/archive/v3.3.1.zip"
FILENAME "assimp-3.3.1.zip"
@@ -15,7 +16,7 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1
+ SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DASSIMP_BUILD_TESTS=False
-DASSIMP_BUILD_ASSIMP_VIEW=False
-DASSIMP_BUILD_ZLIB=False
@@ -33,7 +34,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp)
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright)
vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL
new file mode 100644
index 000000000..989d3a9eb
--- /dev/null
+++ b/ports/aws-sdk-cpp/CONTROL
@@ -0,0 +1,3 @@
+Source: aws-sdk-cpp
+Version: 1.0.47
+Description: AWS SDK for C++
diff --git a/ports/aws-sdk-cpp/drop_git.patch b/ports/aws-sdk-cpp/drop_git.patch
new file mode 100644
index 000000000..491831bd7
--- /dev/null
+++ b/ports/aws-sdk-cpp/drop_git.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9d2a98a..ce58b68 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,7 +22,7 @@ if(CMAKE_MAJOR_VERSION LESS 3)
+ endif()
+
+ # git is required for Android builds and optional for all other platforms
+-find_package(Git)
++#find_package(Git)
+
+ # Cmake invocation variables:
+ # CUSTOM_MEMORY_MANAGEMENT - if set to 1, generates the sdk project files with custom memory management enabled, otherwise disables it
diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake
new file mode 100644
index 000000000..5313e85b7
--- /dev/null
+++ b/ports/aws-sdk-cpp/portfile.cmake
@@ -0,0 +1,55 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.47)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.47.tar.gz"
+ FILENAME "aws-sdk-cpp-1.0.47.tar.gz"
+ SHA512 ce7471bafe2763f1c382eed8afeaf6422058599a3aa11ae52909da668c45d12827fcd06b9b3ce34e3c2fa33297fd2e09421b8a89833d581efaf62b7108232acf
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/drop_git.patch
+)
+
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(FORCE_SHARED_CRT OFF)
+else()
+ set(FORCE_SHARED_CRT ON)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DENABLE_TESTING=OFF
+ -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/lib/pkgconfig
+ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
+ ${CURRENT_PACKAGES_DIR}/nuget
+ ${CURRENT_PACKAGES_DIR}/debug/nuget)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib)
+ file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib)
+ file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES})
+
+ vcpkg_apply_patches( #define USE_IMPORT_EXPORT in SDKConfig.h
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/shared_define.patch
+ )
+endif()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) \ No newline at end of file
diff --git a/ports/aws-sdk-cpp/shared_define.patch b/ports/aws-sdk-cpp/shared_define.patch
new file mode 100644
index 000000000..96657b33e
--- /dev/null
+++ b/ports/aws-sdk-cpp/shared_define.patch
@@ -0,0 +1,10 @@
+diff --git a/aws/core/SDKConfig.h b/aws/core/SDKConfig.h
+index 130c9dd..66b2630 100644
+--- a/aws/core/SDKConfig.h
++++ b/aws/core/SDKConfig.h
+@@ -17,3 +17,4 @@
+
+ #define JSON_USE_EXCEPTION 0
+
++#define USE_IMPORT_EXPORT
+\ No newline at end of file
diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL
new file mode 100644
index 000000000..29c80c703
--- /dev/null
+++ b/ports/azure-storage-cpp/CONTROL
@@ -0,0 +1,5 @@
+Source: azure-storage-cpp
+Version: 2.6.0
+Build-Depends: cpprestsdk
+Description: Microsoft Azure Storage Client SDK for C++
+ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file
diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch
new file mode 100644
index 000000000..9487ab458
--- /dev/null
+++ b/ports/azure-storage-cpp/cmake.patch
@@ -0,0 +1,169 @@
+diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt
+index f037c7f..a4dd278 100644
+--- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt
++++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt
+@@ -51,20 +51,25 @@ if(UNIX)
+ find_package(UnitTest++ REQUIRED)
+ endif()
+
+- option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
+
+- file(GLOB WAS_HEADERS includes/was/*.h)
+- install(FILES ${WAS_HEADERS} DESTINATION include/was)
+- file(GLOB WASCORE_HEADERS includes/wascore/*.h)
+- install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore)
+- file(GLOB WASCORE_DATA includes/wascore/*.dat)
+- install(FILES ${WASCORE_DATA} DESTINATION include/wascore)
++elseif(WIN32)
++ message("-- Setting WIN32 options")
++ find_package(Casablanca REQUIRED)
++ add_definitions(-DUNICODE -D_UNICODE -D_WIN32)
+ else()
+ message("-- Unsupported Build Platform.")
+ endif()
+
++option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
++option(WASTORE_INSTALL_HEADERS "Install header files." ON)
++if(WASTORE_INSTALL_HEADERS)
++ file(GLOB WAS_HEADERS includes/was/*.h)
++ file(GLOB WASCORE_HEADERS includes/wascore/basic_types.h includes/wascore/constants.h)
++ file(GLOB WASCORE_DATA includes/wascore/*.dat)
++endif()
++
+ # Compiler (not platform) specific settings
+-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
++if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ message("-- Setting gcc options")
+
+ set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code")
+@@ -81,22 +86,29 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+ endif()
+ add_definitions(-D_TURN_OFF_PLATFORM_STRING)
+-elseif((CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+- message("-- Setting clang options")
++elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
++ message("-- Setting clang options")
+
+- set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls")
+- set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs")
+- set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}")
++ set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls")
++ set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs")
++ set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}")
+
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
+- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
+- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
++ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
++ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
+
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
+- if (BUILD_SHARED_LIBS)
+- add_definitions(-DBOOST_LOG_DYN_LINK)
+- endif()
+- add_definitions(-D_TURN_OFF_PLATFORM_STRING)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
++ if (BUILD_SHARED_LIBS)
++ add_definitions(-DBOOST_LOG_DYN_LINK)
++ endif()
++ add_definitions(-D_TURN_OFF_PLATFORM_STRING)
++elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
++ message("-- Setting MSVC options")
++ add_compile_options(/bigobj)
++ add_compile_options(/MP)
++ if(BUILD_SHARED_LIBS)
++ add_definitions(-DWASTORAGE_DLL -D_USRDLL)
++ endif()
+ else()
+ message("-- Unknown compiler, success is doubtful.")
+ endif()
+@@ -109,7 +121,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
+ set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes)
+ set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS})
+
+-
+ set(AZURESTORAGE_LIBRARY azurestorage)
+ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES})
+
+diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake
+index 5c1df3c..da66eb4 100644
+--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake
++++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake
+@@ -27,6 +27,7 @@ find_path(CASABLANCA_INCLUDE_DIR
+ find_library(CASABLANCA_LIBRARY
+ NAMES
+ cpprest
++ cpprest_2_9.lib
+ PATHS
+ ${CASABLANCA_PKGCONF_LIBRARY_DIRS}
+ ${CASABLANCA_DIR}
+diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt
+index b08111f..74ba2fb 100644
+--- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt
++++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt
+@@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR})
+ include_directories(${AZURESTORAGE_INCLUDE_DIRS})
+
+ # THE ORDER OF FILES IS VERY /VERY/ IMPORTANT
+-if(UNIX)
++if(UNIX OR WIN32)
+ set(SOURCES
+ xmlhelpers.cpp
+ response_parsers.cpp
+@@ -64,24 +64,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+ endif()
+ if (APPLE)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}")
+ else()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++endif()
++
++if(MSVC)
++ add_compile_options(/Yustdafx.h)
++ set_source_files_properties(stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h")
++
++ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*")
++ set_property(SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch")
++ set_property(SOURCE ${SOURCES} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch")
++ endif()
++
++ list(APPEND SOURCES stdafx.cpp)
+ endif()
+
+ add_library(${AZURESTORAGE_LIBRARY} ${SOURCES})
+
+ target_link_libraries(${AZURESTORAGE_LIBRARIES})
++if(WIN32)
++ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib)
++endif()
+
+ # Portions specific to azure storage binary versioning and installation.
+ if(UNIX)
+ set_target_properties(${AZURESTORAGE_LIBRARY} PROPERTIES
+ SOVERSION ${AZURESTORAGE_VERSION_MAJOR}
+ VERSION ${AZURESTORAGE_VERSION_MAJOR}.${AZURESTORAGE_VERSION_MINOR})
+-
+- install(
+- TARGETS ${AZURESTORAGE_LIBRARY}
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
+- )
++elseif(WIN32)
++ set_target_properties(${AZURESTORAGE_LIBRARY} PROPERTIES OUTPUT_NAME "wastorage")
+ endif()
++
++install(FILES ${WAS_HEADERS} DESTINATION include/was)
++install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore)
++install(FILES ${WASCORE_DATA} DESTINATION include/wascore)
++
++install(
++ TARGETS ${AZURESTORAGE_LIBRARY}
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++)
diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake
new file mode 100644
index 000000000..d83a6d854
--- /dev/null
+++ b/ports/azure-storage-cpp/portfile.cmake
@@ -0,0 +1,33 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/azure-storage-cpp-2.6.0)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/Azure/azure-storage-cpp/archive/v2.6.0.tar.gz"
+ FILENAME "azure-storage-cpp/v2.6.0.tar.gz"
+ SHA512 383fc709b04b7a116b553575f27a95b95a66105fe9b96d412fc4f1938e51288f81e49a9578c02993d0bc2a4771265694117b82fd5beaeaf4c32f81eeb8f9be6a
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/cmake.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/Microsoft.WindowsAzure.Storage
+ OPTIONS
+ -DBUILD_TESTS=OFF
+ -DBUILD_SAMPLES=OFF
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL
+ ${SOURCE_PATH}/LICENSE.txt
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-storage-cpp RENAME copyright)
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include)
+
+vcpkg_copy_pdbs()
+
diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL
index 57dfe58e3..9e2afdf8a 100644
--- a/ports/boost/CONTROL
+++ b/ports/boost/CONTROL
@@ -1,3 +1,4 @@
Source: boost
-Version: 1.62-6
+Version: 1.62-9
Description: Peer-reviewed portable C++ source libraries
+Build-Depends: zlib
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
index 7cc0d60b0..6cc21a091 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -31,12 +31,15 @@ endif()
message(STATUS "Bootstrapping done")
set(B2_OPTIONS
+ -sZLIB_BINARY=zlib
+ -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include"
+ -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib"
+ -sNO_BZIP2=1
-j$ENV{NUMBER_OF_PROCESSORS}
--debug-configuration
--hash
--without-python
- --layout=system
toolset=msvc
threading=multi
)
@@ -56,11 +59,20 @@ endif()
if(TRIPLET_SYSTEM_ARCH MATCHES "x64")
list(APPEND B2_OPTIONS address-model=64)
endif()
-if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
+if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
list(APPEND B2_OPTIONS windows-api=store)
set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR})
endif()
+# Add build type specific options
+set(B2_OPTIONS_DBG
+ ${B2_OPTIONS}
+ -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib"
+)
+set(B2_OPTIONS_REL
+ ${B2_OPTIONS}
+ -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib"
+)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
@@ -70,7 +82,7 @@ vcpkg_execute_required_process_repeat(
COMMAND "${SOURCE_PATH}/b2.exe"
--stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage
--build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
- ${B2_OPTIONS}
+ ${B2_OPTIONS_REL}
variant=release
debug-symbols=on
WORKING_DIRECTORY ${SOURCE_PATH}
@@ -83,7 +95,7 @@ vcpkg_execute_required_process_repeat(
COMMAND "${SOURCE_PATH}/b2.exe"
--stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage
--build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
- ${B2_OPTIONS}
+ ${B2_OPTIONS_DBG}
variant=debug
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME build-${TARGET_TRIPLET}-dbg
@@ -101,16 +113,19 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
"\n#define BOOST_ALL_DYN_LINK\n"
)
endif()
-file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_AUTO_LINK_NOMANGLE\n")
file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost RENAME copyright)
message(STATUS "Packaging headers done")
-function(boost_remove_lib_prefix_from_lib_files LIBS)
+# 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).
+function(boost_rename_libs LIBS)
foreach(LIB ${${LIBS}})
get_filename_component(OLD_FILENAME ${LIB} NAME)
get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY)
string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME})
+ string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs
+ string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs
if (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME})
file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME})
else()
@@ -129,7 +144,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
FILES_MATCHING PATTERN "*.dll")
endif()
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/libboost*.lib)
-boost_remove_lib_prefix_from_lib_files(RELEASE_LIBS)
+boost_rename_libs(RELEASE_LIBS)
message(STATUS "Packaging ${TARGET_TRIPLET}-rel done")
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg")
@@ -142,7 +157,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
FILES_MATCHING PATTERN "*.dll")
endif()
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/libboost*.lib)
-boost_remove_lib_prefix_from_lib_files(DEBUG_LIBS)
+boost_rename_libs(DEBUG_LIBS)
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done")
vcpkg_copy_pdbs()
diff --git a/ports/charls/0001_cmake.patch b/ports/charls/0001_cmake.patch
new file mode 100644
index 000000000..7f50a98e6
--- /dev/null
+++ b/ports/charls/0001_cmake.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1aa40a8..1051997 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,6 +33,7 @@ option (BUILD_TESTING "Build tests" ON)
+ if (WIN32)
+ if (BUILD_SHARED_LIBS)
+ add_definitions(-D CHARLS_DLL)
++ set_source_files_properties(src/interface.cpp PROPERTIES COMPILE_FLAGS -DCHARLS_DLL_BUILD)
+ else()
+ add_definitions(-D CHARLS_STATIC)
+ endif()
diff --git a/ports/charls/CONTROL b/ports/charls/CONTROL
new file mode 100644
index 000000000..8be1a5027
--- /dev/null
+++ b/ports/charls/CONTROL
@@ -0,0 +1,3 @@
+Source: charls
+Version: 2.0.0
+Description: CharLS, a C++ JPEG-LS library implementation. \ No newline at end of file
diff --git a/ports/charls/portfile.cmake b/ports/charls/portfile.cmake
new file mode 100644
index 000000000..69726f1c3
--- /dev/null
+++ b/ports/charls/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/charls-2.0.0)
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "https://github.com/team-charls/charls/archive/2.0.0.tar.gz"
+ FILENAME "charls-2.0.0.tar.gz"
+ SHA512 0a2862fad6d65b941c81f5f838db1fdc6a4625887281ddbf27e21be9084f607d27c8a27d246d6252e08358b2ed4aa0c2b7407048ca559fb40e94313ca72487dd
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/charls RENAME copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/curl/0001_cmake.patch b/ports/curl/0001_cmake.patch
new file mode 100644
index 000000000..db281e122
--- /dev/null
+++ b/ports/curl/0001_cmake.patch
@@ -0,0 +1,13 @@
+diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake
+index 12a7c61..9839c67 100644
+--- a/CMake/FindLibSSH2.cmake
++++ b/CMake/FindLibSSH2.cmake
+@@ -12,7 +12,7 @@ endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
+ FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h
+ )
+
+-FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2
++FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 libssh2
+ )
+
+ if(LIBSSH2_INCLUDE_DIR)
diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL
index bca23865d..e18ea2f67 100644
--- a/ports/curl/CONTROL
+++ b/ports/curl/CONTROL
@@ -1,4 +1,4 @@
Source: curl
-Version: 7.51.0-1
-Build-Depends: zlib, openssl
+Version: 7.51.0-2
+Build-Depends: zlib, openssl, libssh2
Description: A library for transferring data with URLs
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index e2359f73d..01c76718b 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -7,6 +7,12 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
+)
+
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
SET(CURL_STATICLIB OFF)
else()
diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL
new file mode 100644
index 000000000..c85457c89
--- /dev/null
+++ b/ports/dimcli/CONTROL
@@ -0,0 +1,4 @@
+Source: dimcli
+Version: 1.0.3
+Description: C++ command line parser toolkit
+
diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake
new file mode 100644
index 000000000..465e1699e
--- /dev/null
+++ b/ports/dimcli/portfile.cmake
@@ -0,0 +1,37 @@
+# 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}
+#
+
+set(ver 1.0.3)
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dimcli-${ver})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/gknowles/dimcli/archive/v${ver}.zip"
+ FILENAME "dimcli-${ver}.zip"
+ SHA512 5168aff22223cb85421fabd4ce82f3ec0bcab6551704484bc5b05be02ead23bd3d4a629c558a15f214e9d999eccc9c129649d066fdacfda3c839a40b48f8ec17
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+set(staticCrt OFF)
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(staticCrt ON)
+endif()
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt}
+)
+
+vcpkg_install_cmake()
+
+# Remove includes from ${CMAKE_INSTALL_PREFIX}/debug
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli"
+ RENAME copyright)
+
diff --git a/ports/fastlz/portfile.cmake b/ports/fastlz/portfile.cmake
index 5b28df291..16a727246 100644
--- a/ports/fastlz/portfile.cmake
+++ b/ports/fastlz/portfile.cmake
@@ -1,8 +1,9 @@
+set(FASTLZ_HASH f1217348a868bdb9ee0730244475aee05ab329c5)
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FastLZ-master)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FastLZ-${FASTLZ_HASH})
vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/ariya/FastLZ/archive/f1217348a868bdb9ee0730244475aee05ab329c5.zip"
- FILENAME "fastlz.zip"
+ URLS "https://github.com/ariya/FastLZ/archive/${FASTLZ_HASH}.zip"
+ FILENAME "fastlz-${FASTLZ_HASH}.zip"
SHA512 edfefbf4151e7ea6451a6fbb6d464a2a0f48ab50622f936634ec3ea4542ad3e1f075892a422e0fc5a23f2092be4ec890e6f91c4622bcd0d195fed84d4044d5df
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake
index 67c0b402b..929d8b9e4 100644
--- a/ports/freeglut/portfile.cmake
+++ b/ports/freeglut/portfile.cmake
@@ -1,4 +1,5 @@
include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0)
vcpkg_download_distfile(ARCHIVE
URLS "http://downloads.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz"
FILENAME "freeglut-3.0.0.tar.gz"
@@ -15,7 +16,7 @@ else()
endif()
vcpkg_configure_cmake(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0
+ SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DFREEGLUT_BUILD_STATIC_LIBS=${FREEGLUT_STATIC}
-DFREEGLUT_BUILD_SHARED_LIBS=${FREEGLUT_DYNAMIC}
@@ -28,7 +29,7 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeglut)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeglut)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freeglut/COPYING ${CURRENT_PACKAGES_DIR}/share/freeglut/copyright)
vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch b/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
new file mode 100644
index 000000000..e29cc5b8e
--- /dev/null
+++ b/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
@@ -0,0 +1,70 @@
+From 823171a129401d226ac4821fb997ce585045170c Mon Sep 17 00:00:00 2001
+From: Manuel Massing <m.massing@warped-space.de>
+Date: Wed, 23 Nov 2016 23:50:12 +0100
+Subject: [PATCH] Add support for MSVC1900 (backported from GDAL2)
+
+---
+ nmake.opt | 6 ++++++
+ port/cpl_config.h.vc | 8 +++++---
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/nmake.opt b/nmake.opt
+index 8900135..4d1c4fa 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -31,6 +31,7 @@
+ # Check version of Visual C++ compiler:
+ # nmake -f makefile.vc MSVC_VER=xxxx
+ # where xxxx is one of following:
++# 1900 = 14.0(2015)
+ # 1800 = 12.0(2013)
+ # 1700 = 11.0(2012)
+ # 1600 = 10.0(2010)
+@@ -627,8 +628,13 @@ GDALLIB = $(GDAL_ROOT)/gdal.lib
+ !ENDIF
+
+ !IFDEF ODBC_SUPPORTED
++!IF $(MSVC_VER) >= 1900
++# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries
++ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib
++!ELSE
+ ODBCLIB = odbc32.lib odbccp32.lib user32.lib
+ !ENDIF
++!ENDIF
+
+ !IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) || DEFINED(MRSID_LIDAR_DIR)
+ !IF "$(MRSID_PLUGIN)" != "YES"
+diff --git a/port/cpl_config.h.vc b/port/cpl_config.h.vc
+index bfff8f6..fe7b82a 100644
+--- a/port/cpl_config.h.vc
++++ b/port/cpl_config.h.vc
+@@ -1,5 +1,5 @@
+
+-/* We define this here in general so that a VC++ build will publically
++/* We define this here in general so that a VC++ build will publicly
+ declare STDCALL interfaces even if an application is built against it
+ using MinGW */
+
+@@ -17,7 +17,9 @@
+ #if defined(_MSC_VER) && (_MSC_VER < 1500)
+ # define vsnprintf _vsnprintf
+ #endif
+-#define snprintf _snprintf
++#if defined(_MSC_VER) && (_MSC_VER < 1900)
++# define snprintf _snprintf
++#endif
+
+ #define HAVE_GETCWD 1
+ /* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */
+@@ -86,7 +88,7 @@
+ /* Set the native cpu bit order */
+ #define HOST_FILLORDER FILLORDER_LSB2MSB
+
+-/* Define as 0 or 1 according to the floating point format suported by the
++/* Define as 0 or 1 according to the floating point format supported by the
+ machine */
+ #define HAVE_IEEEFP 1
+
+--
+2.10.1.windows.1
+
diff --git a/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
new file mode 100644
index 000000000..0ffcac5fb
--- /dev/null
+++ b/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
@@ -0,0 +1,50 @@
+From b25c3dc49ca1bcf9a789cf64c9fa8694e35127f0 Mon Sep 17 00:00:00 2001
+From: Manuel Massing <m.massing@warped-space.de>
+Date: Sun, 27 Nov 2016 09:57:04 +0100
+Subject: [PATCH 2/2] Add variable CXX_CRT_FLAGS to allow for selection of C
+ runtime linkage in nmake build.
+
+---
+ nmake.opt | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/nmake.opt b/nmake.opt
+index 4d1c4fa..47c2df8 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -125,18 +125,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
+ CXX_PDB_FLAGS=
+ !ENDIF
+
++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd)
++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well
++!IFNDEF CXX_CRT_FLAGS
++!IFNDEF DEBUG
++CXX_CRT_FLAGS=/MD
++!ELSE
++CXX_CRT_FLAGS=/MDd
++!ENDIF
++!ENDIF
++
+ !IFNDEF OPTFLAGS
+ !IF $(MSVC_VER) >= 1400
+ !IFNDEF DEBUG
+-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
+ !ELSE
+-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
+ !ENDIF
+ !ELSE
+ !IFNDEF DEBUG
+-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /DNDEBUG
++OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG
+ !ELSE
+-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /DDEBUG
++OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG
+ !ENDIF
+ !ENDIF #MSVC_VER
+ !ENDIF # OPTFLAGS
+--
+2.10.1.windows.1
+
diff --git a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
new file mode 100644
index 000000000..1065a2982
--- /dev/null
+++ b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
@@ -0,0 +1,26 @@
+From 9da0cb6eed442ebf3eea232cd85e26c155c963ef Mon Sep 17 00:00:00 2001
+From: Manuel Massing <m.massing@warped-space.de>
+Date: Tue, 29 Nov 2016 12:43:58 +0100
+Subject: [PATCH 3/4] - Ensures inclusion of PDB in release dll if so requested
+
+---
+ gdal/nmake.opt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/nmake.opt b/nmake.opt
+index 47c2df8..4844d22 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -174,6 +174,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305
+ # Linker debug options
+ !IFDEF DEBUG
+ LDEBUG= /debug
++!ELSEIFDEF WITH_PDB
++# Ensures that PDB is included in release DLL if so requested
++LDEBUG= /debug /opt:ref /opt:icf
+ !ENDIF
+
+ # Uncomment the following if you are building for 64-bit windows
+--
+2.10.1.windows.1
+
diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL
new file mode 100644
index 000000000..38eccc46d
--- /dev/null
+++ b/ports/gdal/CONTROL
@@ -0,0 +1,4 @@
+Source: gdal
+Version: 1.11.3
+Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
+Build-Depends: proj
diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake
new file mode 100644
index 000000000..f198f4f0c
--- /dev/null
+++ b/ports/gdal/portfile.cmake
@@ -0,0 +1,133 @@
+if (TRIPLET_SYSTEM_ARCH MATCHES "arm")
+ message(FATAL_ERROR " ARM is currently not supported.")
+endif()
+
+include(vcpkg_common_functions)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://download.osgeo.org/gdal/1.11.3/gdal1113.zip"
+ FILENAME "gdal1113.zip"
+ SHA512 42feb98a54019d3b6ac54f598f299a57e117db500c662d39faa9d5f5090f03c1b8d7680242e1abd8035738edc4fc3197ae118a0ce50733691a76a5cf377bcd46
+)
+
+# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not
+# support out of source builds.
+set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-1.11.3)
+set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-1.11.3)
+
+foreach(BUILD_TYPE debug release)
+ vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-1.11.3
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
+ )
+endforeach()
+
+find_program(NMAKE nmake REQUIRED)
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal" NATIVE_DATA_DIR)
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal/html" NATIVE_HTML_DIR)
+
+file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PROJ_INCLUDE_DIR)
+file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/proj.lib" PROJ_LIBRARY_REL)
+file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib" PROJ_LIBRARY_DBG)
+
+set(NMAKE_OPTIONS
+ GDAL_HOME=${NATIVE_PACKAGES_DIR}
+ DATADIR=${NATIVE_DATA_DIR}
+ HTMLDIR=${NATIVE_HTML_DIR}
+ PROJ_INCLUDE=-I${PROJ_INCLUDE_DIR}
+ MSVC_VER=1900
+)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ list(APPEND NMAKE_OPTIONS WIN64=YES)
+endif()
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ list(APPEND NMAKE_OPTIONS PROJ_FLAGS=-DPROJ_STATIC)
+else()
+ # Enables PDBs for release and debug builds
+ list(APPEND NMAKE_OPTIONS WITH_PDB=1)
+endif()
+
+if (VCPKG_CRT_LINKAGE STREQUAL static)
+ set(LINKAGE_FLAGS "/MT")
+else()
+ set(LINKAGE_FLAGS "/MD")
+endif()
+
+set(NMAKE_OPTIONS_REL
+ "${NMAKE_OPTIONS}"
+ CXX_CRT_FLAGS=${LINKAGE_FLAGS}
+ PROJ_LIBRARY=${PROJ_LIBRARY_REL}
+)
+
+set(NMAKE_OPTIONS_DBG
+ "${NMAKE_OPTIONS}"
+ CXX_CRT_FLAGS="${LINKAGE_FLAGS}d"
+ PROJ_LIBRARY=${PROJ_LIBRARY_DBG}
+ DEBUG=1
+)
+################
+# Release build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-rel")
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc
+ "${NMAKE_OPTIONS_REL}"
+ WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-release
+)
+message(STATUS "Building ${TARGET_TRIPLET}-rel done")
+
+################
+# Debug build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-dbg")
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} /G -f makefile.vc
+ "${NMAKE_OPTIONS_DBG}"
+ WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-debug
+)
+message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
+
+message(STATUS "Packaging ${TARGET_TRIPLET}")
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html)
+
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc
+ "${NMAKE_OPTIONS_REL}"
+ "install"
+ "devinstall"
+ WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
+ LOGNAME nmake-install-${TARGET_TRIPLET}
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib)
+ file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib)
+else()
+ file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+ file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
+ file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib)
+endif()
+
+# Copy over PDBs
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdal/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gdal/copyright)
+
+message(STATUS "Packaging ${TARGET_TRIPLET} done")
diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake
index 60d907acd..7cd50db58 100644
--- a/ports/geos/portfile.cmake
+++ b/ports/geos/portfile.cmake
@@ -7,6 +7,7 @@
#
include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5)
#downloading 3.5 from their SVN repo and not the release tarball
#because the 3.5 release did not build on windows, and fixes were backported
#without generating a new release tarball (I don't think very many GIS people use win)
@@ -17,12 +18,12 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
-#we need to do this because GOES deploy process is totally broken for cmake
+#we need to do this because GEOS deploy process is totally broken for cmake
#file(DOWNLOAD http://svn.osgeo.org/geos/tags/3.5.0/cmake/modules/GenerateSourceGroups.cmake
-# ${CURRENT_BUILDTREES_DIR}/src/geos-3.5.0/cmake/modules/GenerateSourceGroups.cmake)
-file(WRITE ${CURRENT_BUILDTREES_DIR}/src/3.5/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261")
+# ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake)
+file(WRITE ${SOURCE_PATH}/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261")
vcpkg_configure_cmake(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5
+ SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DGEOS_ENABLE_TESTS=False
-DBUILD_TESTING=False
)
@@ -31,7 +32,7 @@ vcpkg_build_cmake()
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/3.5/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/geos/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeos.lib)
diff --git a/ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch b/ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch
deleted file mode 100644
index d099ea616..000000000
--- a/ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 5af642bdfe023a7c857d1d26593af586516bf696 Mon Sep 17 00:00:00 2001
-From: Sergey Sharybin <sergey.vfx@gmail.com>
-Date: Thu, 31 Dec 2015 17:16:26 +0500
-Subject: [PATCH] Fix some compilation warnings with MSVC 2015
-
-MSVC 2015 already defines vsnprintf() and va_copy().
----
- src/windows_port.cc | 2 ++
- src/windows_port.h | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/src/windows_port.cc b/src/windows_port.cc
-index 1f40458..b5b7194 100644
---- a/src/windows_port.cc
-+++ b/src/windows_port.cc
-@@ -44,6 +44,7 @@
-
- // These call the windows _vsnprintf, but always NUL-terminate.
- #if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */
-+#if !(defined(_MSC_VER) && _MSC_VER >= 1900) /* msvc 2015 already defines */
-
- #ifdef _MSC_VER
- # pragma warning(push)
-@@ -68,4 +69,5 @@ int snprintf(char *str, size_t size, const char *format, ...) {
- return r;
- }
-
-+#endif /* if !(defined(_MSC_VER) && _MSC_VER >= 1900) */
- #endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */
-diff --git a/src/windows_port.h b/src/windows_port.h
-index c8ff24f..554b9c9 100644
---- a/src/windows_port.h
-+++ b/src/windows_port.h
-@@ -63,12 +63,14 @@
- * name vsnprintf, since windows defines that (but not snprintf (!)).
- */
- #if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */
-+#if !(defined(_MSC_VER) && _MSC_VER >= 1900) /* msvc 2015 already defines */
- extern GFLAGS_DLL_DECL int snprintf(char *str, size_t size,
- const char *format, ...);
- extern int GFLAGS_DLL_DECL safe_vsnprintf(char *str, size_t size,
- const char *format, va_list ap);
- #define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap)
- #define va_copy(dst, src) (dst) = (src)
-+#endif
- #endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */
-
- #ifdef _MSC_VER
---
-2.10.0.windows.1
-
diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL
index 03977243f..b84a3b67d 100644
--- a/ports/gflags/CONTROL
+++ b/ports/gflags/CONTROL
@@ -1,3 +1,3 @@
Source: gflags
-Version: 2.1.2
+Version: 2.2.0-2
Description: A C++ library that implements commandline flags processing
diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake
index b600d8832..37fea35c3 100644
--- a/ports/gflags/portfile.cmake
+++ b/ports/gflags/portfile.cmake
@@ -1,38 +1,21 @@
include(vcpkg_common_functions)
find_program(GIT git)
-set(GIT_URL "https://github.com/gflags/gflags.git")
-set(GIT_TAG "v2.1.2")
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/gflags/gflags/archive/v2.2.0.zip"
+ FILENAME "gflags-v2.2.0.zip"
+ SHA512 638d094cdcc759a35ebd0e57900216deec6113242d2dcc964beff7b88cf56e3dbab3dce6e10a055bfd94cb5daebb8632382219a5ef40a689e14c76b263d3eca5)
-if(NOT EXISTS "${DOWNLOADS}/gflags.git")
- message(STATUS "Cloning")
- vcpkg_execute_required_process(
- COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/gflags.git
- WORKING_DIRECTORY ${DOWNLOADS}
- LOGNAME clone
- )
-endif()
-message(STATUS "Cloning done")
+vcpkg_extract_source_archive(${ARCHIVE})
-if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
- message(STATUS "Adding worktree and patching")
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
- vcpkg_execute_required_process(
- COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_TAG}
- WORKING_DIRECTORY ${DOWNLOADS}/gflags.git
- LOGNAME worktree
- )
- message(STATUS "Patching")
- vcpkg_execute_required_process(
- COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch --ignore-whitespace --whitespace=fix
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
- LOGNAME patch
- )
-endif()
-message(STATUS "Adding worktree and patching done")
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gflags-2.2.0)
vcpkg_configure_cmake(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF
+ -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF
+ -DBUILD_gflags_nothreads_LIB:BOOL=OFF
)
vcpkg_install_cmake()
@@ -40,35 +23,36 @@ vcpkg_install_cmake()
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gflags.dll ${CURRENT_PACKAGES_DIR}/bin/gflags.dll)
- file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gflags_nothreads.dll ${CURRENT_PACKAGES_DIR}/bin/gflags_nothreads.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gflags.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gflags.dll)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gflags_nothreads.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gflags_nothreads.dll)
endif()
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/gflags)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/gflags-export-debug.cmake GFLAGS_DEBUG_MODULE)
+file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/gflags-targets-debug.cmake GFLAGS_DEBUG_MODULE)
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" GFLAGS_DEBUG_MODULE "${GFLAGS_DEBUG_MODULE}")
string(REPLACE "/Lib/gflags.dll" "/bin/gflags.dll" GFLAGS_DEBUG_MODULE "${GFLAGS_DEBUG_MODULE}")
string(REPLACE "/Lib/gflags_nothreads.dll" "/bin/gflags_nothreads.dll" GFLAGS_DEBUG_MODULE "${GFLAGS_DEBUG_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export-debug.cmake "${GFLAGS_DEBUG_MODULE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets-debug.cmake "${GFLAGS_DEBUG_MODULE}")
-file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export-release.cmake GFLAGS_RELEASE_MODULE)
+file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets-release.cmake GFLAGS_RELEASE_MODULE)
string(REPLACE "/Lib/gflags.dll" "/bin/gflags.dll" GFLAGS_RELEASE_MODULE "${GFLAGS_RELEASE_MODULE}")
string(REPLACE "/Lib/gflags_nothreads.dll" "/bin/gflags_nothreads.dll" GFLAGS_RELEASE_MODULE "${GFLAGS_RELEASE_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export-release.cmake "${GFLAGS_RELEASE_MODULE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets-release.cmake "${GFLAGS_RELEASE_MODULE}")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
-file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export.cmake GFLAGS_CONFIG_MODULE)
+file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake GFLAGS_CONFIG_MODULE)
string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
"get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
GFLAGS_CONFIG_MODULE "${GFLAGS_CONFIG_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export.cmake ${GFLAGS_CONFIG_MODULE})
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake "${GFLAGS_CONFIG_MODULE}")
-file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright)
+file(RENAME ${CURRENT_PACKAGES_DIR}/Include ${CURRENT_PACKAGES_DIR}/include)
+file(RENAME ${CURRENT_PACKAGES_DIR}/Lib ${CURRENT_PACKAGES_DIR}/lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/Lib ${CURRENT_PACKAGES_DIR}/debug/lib)
vcpkg_copy_pdbs()
diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake
index 6da7d4858..165c8d889 100644
--- a/ports/glbinding/portfile.cmake
+++ b/ports/glbinding/portfile.cmake
@@ -7,14 +7,14 @@
#
include(vcpkg_common_functions)
-
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/cginternals/glbinding/archive/v2.1.1.zip"
FILENAME "glbinding-2.1.1.zip"
SHA512 66b21853a4f4760b7b22cafd5211958769c513e83be999018fe79cf56a9271e0e28566caaa2286393f54ac2154d564a68d12159598d03c965adf6756f3753f11
)
vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1)
+vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH})
#vcpkg_build_cmake()
vcpkg_install_cmake()
@@ -54,7 +54,7 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/AUTHORS
)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/glbinding)
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/glbinding)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright)
vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake
index fd3c5ef9a..e7cf16cf2 100644
--- a/ports/glew/portfile.cmake
+++ b/ports/glew/portfile.cmake
@@ -1,7 +1,3 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported yet. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
-endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-2.0.0)
vcpkg_download_distfile(ARCHIVE_FILE
@@ -19,45 +15,77 @@ ELSE()
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
ENDIF()
-if(NOT EXISTS ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj)
- message(STATUS "Upgrading projects")
- file(READ ${SOURCE_PATH}/build/vc12/glew_shared.vcxproj PROJ)
- string(REPLACE
- "<PlatformToolset>v120</PlatformToolset>"
- "<PlatformToolset>v140</PlatformToolset>"
- PROJ ${PROJ})
- string(REPLACE
- "opengl32.lib%"
- "opengl32.lib\;%"
- PROJ ${PROJ})
- file(WRITE ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj ${PROJ})
-endif()
+# TODO: Maybe switch to glews' cmake build system in the future
+FOREACH(LINKAGE shared static)
+ if(NOT EXISTS ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}14.vcxproj)
+ message(STATUS "Upgrading " ${LINKAGE} " project")
+ file(READ ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}.vcxproj PROJ)
+ string(REPLACE
+ "<PlatformToolset>v120</PlatformToolset>"
+ "<PlatformToolset>v140</PlatformToolset>"
+ PROJ ${PROJ})
+ string(REPLACE
+ "opengl32.lib%"
+ "opengl32.lib\;%"
+ PROJ ${PROJ})
+
+ if (LINKAGE STREQUAL "static")
+ string(REPLACE
+ "MultiThreadedDebugDLL"
+ "MultiThreadedDebug"
+ PROJ ${PROJ}
+ )
+ endif()
+ file(WRITE ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}14.vcxproj ${PROJ})
+ endif()
+ENDFOREACH(LINKAGE)
message(STATUS "Upgrading projects done")
-vcpkg_build_msbuild(
- PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj
-)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_static14.vcxproj
+ )
+else()
+ vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj
+ )
+endif()
+
message(STATUS "Installing")
-file(INSTALL
- ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.dll
- ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
-)
-file(INSTALL
- ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.dll
- ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin
-)
-file(INSTALL
- ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32d.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
-)
-file(INSTALL
- ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib
-)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(INSTALL
+ ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.dll
+ ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+ file(INSTALL
+ ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.dll
+ ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+ )
+ file(INSTALL
+ ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32d.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+ )
+ file(INSTALL
+ ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+ )
+else()
+ file(INSTALL
+ ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32sd.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+ RENAME glew32d.lib
+ )
+ file(INSTALL
+ ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32s.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+ RENAME glew32.lib
+ )
+endif()
+
file(INSTALL
${SOURCE_PATH}/include/GL
DESTINATION ${CURRENT_PACKAGES_DIR}/include
diff --git a/ports/gli/CONTROL b/ports/gli/CONTROL
new file mode 100644
index 000000000..8d89bc2d1
--- /dev/null
+++ b/ports/gli/CONTROL
@@ -0,0 +1,3 @@
+Source: gli
+Version: 0.8.2
+Description: OpenGL Image (GLI) https://gli.g-truc.net
diff --git a/ports/gli/portfile.cmake b/ports/gli/portfile.cmake
new file mode 100644
index 000000000..c0854909f
--- /dev/null
+++ b/ports/gli/portfile.cmake
@@ -0,0 +1,20 @@
+#header-only library
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gli-0.8.2.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/g-truc/gli/archive/0.8.2.0.tar.gz"
+ FILENAME "0.8.2.0.tar.gz"
+ SHA512 c254a4e1497d0add985e4a882c552db99c512cc0e9cc72145d51a6e7deada817d624d9818099a47136a8a3ef1223a26a34e355e3c713166f0bb062e506059834
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+# Remove glm/CMakeLists.txt
+file(REMOVE ${SOURCE_PATH}/glm/CMakeLists.txt)
+
+# Put the license file where vcpkg expects it
+file(COPY ${SOURCE_PATH}/external/glm/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gli/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/gli/copying.txt ${CURRENT_PACKAGES_DIR}/share/gli/copyright)
+
+# Copy the glm header files
+file(GLOB HEADER_FILES ${SOURCE_PATH}/gli/*)
+file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gli)
diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake
index e46c34509..5ab880ad6 100644
--- a/ports/globjects/portfile.cmake
+++ b/ports/globjects/portfile.cmake
@@ -15,7 +15,7 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/globjects-1.0.0)
+vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH})
#vcpkg_build_cmake()
vcpkg_install_cmake()
@@ -55,7 +55,7 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/AUTHORS
)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/globjects-1.0.0/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/globjects)
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/globjects)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/globjects/LICENSE ${CURRENT_PACKAGES_DIR}/share/globjects/copyright)
vcpkg_copy_pdbs()
diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL
index 7bd0c7e40..3b81f5287 100644
--- a/ports/glslang/CONTROL
+++ b/ports/glslang/CONTROL
@@ -1,3 +1,3 @@
Source: glslang
-Version: 1c573fbcfba6b3d631008b1babc838501ca925d3
+Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-1
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake
index bdeece78a..9fd6ae468 100644
--- a/ports/glslang/portfile.cmake
+++ b/ports/glslang/portfile.cmake
@@ -30,14 +30,9 @@ if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
LOGNAME worktree
)
message(STATUS "Patching")
- vcpkg_execute_required_process(
- COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-export-symbol-for-Windows.patch --ignore-whitespace --whitespace=fix
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
- LOGNAME patch
- )
endif()
-
+set(VCPKG_LIBRARY_LINKAGE "static")
vcpkg_configure_cmake(
SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
@@ -45,7 +40,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public/ShaderLang.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
+file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
+file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
+file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent)
+file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
+file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
+file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe")
@@ -56,12 +56,12 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe")
file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*")
list(LENGTH BIN_DIR BIN_DIR_SIZE)
if(${BIN_DIR_SIZE} EQUAL 0)
- file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
endif()
file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*")
list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE)
if(${DEBUG_BIN_DIR_SIZE} EQUAL 0)
- file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# Handle copyright
diff --git a/ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch b/ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch
deleted file mode 100644
index 75b81c28f..000000000
--- a/ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From be3c446b1dd798b835052188813ee4e7cf135a81 Mon Sep 17 00:00:00 2001
-From: Vincent Lejeune <vljn.ovi@gmail.com>
-Date: Wed, 12 Oct 2016 00:27:35 +0200
-Subject: [PATCH] Add an extra path input for Freetype.
-
----
- win32/config-msvc.mak | 3 +++
- win32/detectenv-msvc.mak | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak
-index e0c6468..1ad0913 100644
---- a/win32/config-msvc.mak
-+++ b/win32/config-msvc.mak
-@@ -124,6 +124,9 @@ HB_DEFINES = $(HB_DEFINES) /DHAVE_CAIRO=1
-
- # Enable freetype if desired
- !if "$(FREETYPE)" == "1"
-+HB_CFLAGS = \
-+ $(HB_CFLAGS) \
-+ /I$(FREETYPE_DIR)
- HB_DEFINES = $(HB_DEFINES) /DHAVE_FREETYPE=1
- HB_SOURCES = $(HB_SOURCES) $(HB_FT_sources)
- HB_HEADERS = $(HB_HEADERS) $(HB_FT_headers)
-diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak
-index 83d8786..ad67493 100644
---- a/win32/detectenv-msvc.mak
-+++ b/win32/detectenv-msvc.mak
-@@ -129,7 +129,7 @@ LDFLAGS_ARCH = /machine:x86
- !if "$(VALID_CFGSET)" == "TRUE"
- CFLAGS = $(CFLAGS_ADD) /W3 /Zi /I.. /I..\src /I. /I$(PREFIX)\include
-
--LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG
-+LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /libpath:$(VCPKG_LIB_DIR) /DEBUG
-
- !if "$(CFG)" == "debug"
- LDFLAGS = $(LDFLAGS_BASE)
---
-2.10.0.windows.1
-
diff --git a/ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch b/ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch
deleted file mode 100644
index fce3ba562..000000000
--- a/ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 2be3a687a3079c3988d718293e4ee5d8fc9797b7 Mon Sep 17 00:00:00 2001
-From: vlj <vljn.ovi@gmail.com>
-Date: Sat, 8 Oct 2016 21:14:57 +0200
-Subject: [PATCH] Set d suffix for debug freetype lib.
-
----
- win32/config-msvc.mak | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak
-index 9cc6608..236aef7 100644
---- a/win32/config-msvc.mak
-+++ b/win32/config-msvc.mak
-@@ -12,7 +12,11 @@ HB_GLIB_LIBS = glib-2.0.lib
- HB_GOBJECT_DEP_LIBS = gobject-2.0.lib $(HB_GLIB_LIBS)
-
- # Freetype is needed for building FreeType support and hb-view
-+!if "$(CFG)" == "debug"
-+FREETYPE_LIB = freetyped.lib
-+!else
- FREETYPE_LIB = freetype.lib
-+!endif
-
- # Cairo is needed for building hb-view
- CAIRO_LIB = cairo.lib
---
-2.10.0.windows.1
-
diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL
index dd5207077..eab88ff11 100644
--- a/ports/harfbuzz/CONTROL
+++ b/ports/harfbuzz/CONTROL
@@ -1,4 +1,4 @@
Source: harfbuzz
-Version: 1.3.2
+Version: 1.3.4
Description: HarfBuzz OpenType text shaping engine
Build-Depends: freetype
diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake
index 2603fdf0a..911dea860 100644
--- a/ports/harfbuzz/portfile.cmake
+++ b/ports/harfbuzz/portfile.cmake
@@ -11,34 +11,28 @@ 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.2)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.4)
find_program(NMAKE nmake)
vcpkg_download_distfile(ARCHIVE
- URLS "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.3.2.tar.bz2"
- FILENAME "harfbuzz-1.3.2.tar.bz2"
- SHA512 19f846ee75d8a2d94da2a2b489fa8e54a5120599f998e451187f6695aa3931b28c491bbc0837892eaaebbd1da3441effe01f5f2470454f83cfa6a7c510ebcb32
+ URLS "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.3.4.tar.bz2"
+ FILENAME "harfbuzz-1.3.4.tar.bz2"
+ SHA512 72027ce64d735f1f7ecabcc78ba426d6155cebd564439feb77cefdfc28b00bfd9f6314e6735addaa90cee1d98cf6d2c0b61f77b446ba34e11f7eb7cdfdcd386a
)
vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Add-an-extra-path-input-for-Freetype.patch"
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Set-d-suffix-for-debug-freetype-lib.patch"
-)
-
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)
vcpkg_execute_required_process(
- COMMAND ${NMAKE} -f Makefile.vc CFG=debug FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} VCPKG_LIB_DIR=${FREETYPE_LIB_DIR_DBG}
+ COMMAND ${NMAKE} -f Makefile.vc CFG=debug FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} ADDITIONAL_LIB_DIR=${FREETYPE_LIB_DIR_DBG}
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} VCPKG_LIB_DIR=${FREETYPE_LIB_DIR_REL}
+ COMMAND ${NMAKE} -f Makefile.vc CFG=release FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} ADDITIONAL_LIB_DIR=${FREETYPE_LIB_DIR_REL}
WORKING_DIRECTORY ${SOURCE_PATH}/win32/
LOGNAME nmake-build-${TARGET_TRIPLET}-release
)
@@ -61,5 +55,5 @@ vcpkg_execute_required_process(
)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.2/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz)
+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)
diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt
new file mode 100644
index 000000000..6e9067a04
--- /dev/null
+++ b/ports/http-parser/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required (VERSION 3.4)
+project (http-parser)
+
+if (BUILD_SHARED_LIBS)
+ SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+add_library(http_parser http_parser.c http_parser.h)
+
+install(TARGETS http_parser
+ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
+)
+
+if (NOT SKIP_INSTALL_HEADERS)
+ install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
+endif() \ No newline at end of file
diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL
new file mode 100644
index 000000000..41d234d26
--- /dev/null
+++ b/ports/http-parser/CONTROL
@@ -0,0 +1,3 @@
+Source: http-parser
+Version: 2.7.1
+Description: HTTP Parser. \ No newline at end of file
diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake
new file mode 100644
index 000000000..728293eed
--- /dev/null
+++ b/ports/http-parser/portfile.cmake
@@ -0,0 +1,29 @@
+# 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(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/http-parser-2.7.1)
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "https://github.com/nodejs/http-parser/archive/v2.7.1.zip"
+ FILENAME "http-parser-2.7.1.zip"
+ SHA512 9fb8b855ba7edb47628c91ac062d7ffce9c4bb8d6b8237d861d7926af989fb3e354c113821bdab1b8ac910f5f1064ca1339947aa20d56f6806b919b0cd6b6eae
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DSKIP_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) \ No newline at end of file
diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL
index a0d0552d7..80a6eb9a6 100644
--- a/ports/icu/CONTROL
+++ b/ports/icu/CONTROL
@@ -1,3 +1,3 @@
Source: icu
-Version: 58.1
+Version: 58.2-1
Description: Mature and widely used Unicode and localization library.
diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake
index a8bdd1d80..f2bf7fb6e 100644
--- a/ports/icu/portfile.cmake
+++ b/ports/icu/portfile.cmake
@@ -10,9 +10,9 @@ endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/icu)
vcpkg_download_distfile(ARCHIVE
- URLS "http://download.icu-project.org/files/icu4c/58.1/icu4c-58_1-src.zip"
- FILENAME "icu4c-58_1-src.zip"
- SHA512 b13b1d8aa5e6a08a5cecaea85252354150064ef98ed7bb66b70d32eac5c80874c11f1fc9e3a667075b867fcc848c33ad90e6cada3a279f65b62cb9d46e25181d)
+ URLS "http://download.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.zip"
+ FILENAME "icu4c-58_2-src.zip"
+ SHA512 b985b553186d11d9e5157fc981af5483c435a7b4f3df9574d253d6229ecaf8af0f722488542c3f64f9726ad25e17978eae970d78300a55479df74495f6745d16)
vcpkg_extract_source_archive(${ARCHIVE})
if (TRIPLET_SYSTEM_ARCH MATCHES "x86")
@@ -25,6 +25,11 @@ vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/source/allinone/allinone.sln
PLATFORM ${BUILD_ARCH})
+# force rebuild of database as it sometimes gets overriden by dummy one
+vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/source/data/makedata.vcxproj
+ PLATFORM ${BUILD_ARCH})
+
set(ICU_VERSION 58)
if(TRIPLET_SYSTEM_ARCH MATCHES "x64")
set(ICU_BIN bin64)
diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL
index 089e34672..371dfcf0c 100644
--- a/ports/libbson/CONTROL
+++ b/ports/libbson/CONTROL
@@ -1,3 +1,3 @@
Source: libbson
-Version: 1.5.0-rc6
+Version: 1.5.1
Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. \ No newline at end of file
diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake
index 7642c3437..ce2ccea40 100644
--- a/ports/libbson/portfile.cmake
+++ b/ports/libbson/portfile.cmake
@@ -1,52 +1,52 @@
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.5.0-rc6)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/mongodb/libbson/archive/1.5.0-rc6.tar.gz"
- FILENAME "libbson-1.5.0-rc6.tar.gz"
- SHA512 15cf590b488f7de8d614ddcc2c1536b05b607311f3cd3353418469c7a62177124fb4fb1c53f51b0de4c7491b21051c1ec47fbc12856cc69e37baebb3d65897c5
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DENABLE_TESTS=OFF
- -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
-)
-
-vcpkg_install_cmake()
-
-file(RENAME
- ${CURRENT_PACKAGES_DIR}/include/libbson-1.0
- ${CURRENT_PACKAGES_DIR}/temp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
-file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib)
-
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib
- ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib)
-
- # drop the __declspec(dllimport) when building static
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/static.patch
- )
-else()
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib)
-endif()
-
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.5.1)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/mongodb/libbson/archive/1.5.1.tar.gz"
+ FILENAME "libbson-1.5.1.tar.gz"
+ SHA512 b641e23ca041e532fe566167ad0292d12934e0fae2c110f81bf6ca3b71b5d01b651a604a7ce6da0d1b54b98cd95674ef331ef4e23c2dedfc706f371eac4efaec
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DENABLE_TESTS=OFF
+ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
+)
+
+vcpkg_install_cmake()
+
+file(RENAME
+ ${CURRENT_PACKAGES_DIR}/include/libbson-1.0
+ ${CURRENT_PACKAGES_DIR}/temp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
+file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib)
+
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib
+ ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib)
+
+ # drop the __declspec(dllimport) when building static
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/static.patch
+ )
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib)
+endif()
+
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright) \ No newline at end of file
diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt
new file mode 100644
index 000000000..afe55f55e
--- /dev/null
+++ b/ports/libflac/CMakeLists.txt
@@ -0,0 +1,73 @@
+cmake_minimum_required(VERSION 2.6)
+cmake_policy(SET CMP0005 NEW) # do not escape preprocessor defines
+
+project(libflac)
+
+if(NOT DEFINED LIBFLAC_ARCHITECTURE)
+ message(FATAL_ERROR "Target architecture not specified")
+endif()
+
+file(GLOB LIBFLAC_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/libFLAC/*.c
+ ${PROJECT_SOURCE_DIR}/src/share/win_utf8_io/win_utf8_io.c)
+
+file(GLOB LIBFLACXX_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/libFLAC++/*.cpp)
+
+include_directories(${PROJECT_SOURCE_DIR}/include)
+include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include)
+
+if(NOT LIBFLAC_ARCHITECTURE MATCHES arm)
+ add_definitions(-DFLAC__SSE_OS)
+ add_definitions(-DFLAC__HAS_X86INTRIN)
+endif()
+
+if(LIBFLAC_ARCHITECTURE MATCHES x86)
+ add_definitions(-DFLAC__CPU_IA32)
+elseif(LIBFLAC_ARCHITECTURE MATCHES x64)
+ add_definitions(-DFLAC__CPU_X86_64)
+endif()
+
+if(CMAKE_BUILD_TYPE MATCHES Debug)
+ add_definitions(-DFLAC__OVERFLOW_DETECT)
+endif()
+
+add_definitions(-DVERSION="1.3.1")
+add_definitions(-DFLAC__HAS_OGG)
+add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
+
+add_library(libFLAC ${LIBFLAC_SOURCES})
+add_library(libFLACXX ${LIBFLACXX_SOURCES})
+
+set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac)
+set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++)
+
+find_library(OGG_LIBRARY ogg)
+find_path(OGG_INCLUDE_DIR ogg/ogg.h)
+
+include_directories(${OGG_INCLUDE_DIR})
+target_link_libraries(libFLAC ${OGG_LIBRARY})
+target_link_libraries(libFLACXX libFLAC)
+
+if(BUILD_SHARED_LIBS)
+ set_target_properties(libFLACXX PROPERTIES COMPILE_FLAGS -DFLACPP_API_EXPORTS)
+ set_target_properties(libFLAC PROPERTIES COMPILE_FLAGS -DFLAC_API_EXPORTS)
+else()
+ add_definitions(-DFLAC__NO_DLL)
+endif()
+
+install(TARGETS libFLAC libFLACXX
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+if(NOT DEFINED LIBFLAC_SKIP_HEADERS)
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC/
+ DESTINATION include/FLAC
+ FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC++/
+ DESTINATION include/FLAC++
+ FILES_MATCHING PATTERN "*.h")
+endif()
diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL
new file mode 100644
index 000000000..9b1a37531
--- /dev/null
+++ b/ports/libflac/CONTROL
@@ -0,0 +1,4 @@
+Source: libflac
+Version: 1.3.1-1
+Description: Library for manipulating FLAC files
+Build-Depends: libogg
diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake
new file mode 100644
index 000000000..4ed496fb8
--- /dev/null
+++ b/ports/libflac/portfile.cmake
@@ -0,0 +1,35 @@
+ # libFLAC uses winapi functions not available in WindowsStore
+if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+ message(FATAL_ERROR "Error: UWP builds are currently not supported.")
+endif()
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.1)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz"
+ FILENAME "flac-1.3.1.tar.xz"
+ SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DLIBFLAC_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}
+ OPTIONS_DEBUG
+ -DLIBFLAC_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC/export.h "#undef FLAC_API\n#define FLAC_API\n")
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h "#undef FLAC_API\n#define FLAC_API\n")
+endif()
+
+# This license (BSD) is relevant only for library - if someone would want to install
+# FLAC cmd line tools as well additional license (GPL) should be included
+file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libflac/COPYING.Xiph ${CURRENT_PACKAGES_DIR}/share/libflac/copyright)
diff --git a/ports/liblzma/CMakeLists.txt b/ports/liblzma/CMakeLists.txt
new file mode 100644
index 000000000..5bf723c2f
--- /dev/null
+++ b/ports/liblzma/CMakeLists.txt
@@ -0,0 +1,104 @@
+cmake_minimum_required(VERSION 3.0)
+project(liblzma)
+
+add_definitions(-DHAVE_CONFIG_H)
+if(BUILD_SHARED_LIBS)
+ add_definitions(-DLIBLZMADLL_EXPORTS)
+ add_definitions(-DDLL_EXPORT)
+endif()
+
+include_directories(windows)
+include_directories(src/liblzma/common)
+include_directories(src/common)
+include_directories(src/liblzma/api)
+include_directories(src/liblzma/check)
+include_directories(src/liblzma/delta)
+include_directories(src/liblzma/lz)
+include_directories(src/liblzma/lzma)
+include_directories(src/liblzma/rangecoder)
+include_directories(src/liblzma/simple)
+
+add_library(liblzma
+ src/common/tuklib_cpucores.c
+ src/common/tuklib_physmem.c
+ src/liblzma/check/check.c
+ src/liblzma/check/crc32_fast.c
+ src/liblzma/check/crc32_table.c
+ src/liblzma/check/crc64_fast.c
+ src/liblzma/check/crc64_table.c
+ src/liblzma/check/sha256.c
+ src/liblzma/common/alone_decoder.c
+ src/liblzma/common/alone_encoder.c
+ src/liblzma/common/auto_decoder.c
+ src/liblzma/common/block_buffer_decoder.c
+ src/liblzma/common/block_buffer_encoder.c
+ src/liblzma/common/block_decoder.c
+ src/liblzma/common/block_encoder.c
+ src/liblzma/common/block_header_decoder.c
+ src/liblzma/common/block_header_encoder.c
+ src/liblzma/common/block_util.c
+ src/liblzma/common/common.c
+ src/liblzma/common/easy_buffer_encoder.c
+ src/liblzma/common/easy_decoder_memusage.c
+ src/liblzma/common/easy_encoder.c
+ src/liblzma/common/easy_encoder_memusage.c
+ src/liblzma/common/easy_preset.c
+ src/liblzma/common/filter_buffer_decoder.c
+ src/liblzma/common/filter_buffer_encoder.c
+ src/liblzma/common/filter_common.c
+ src/liblzma/common/filter_decoder.c
+ src/liblzma/common/filter_encoder.c
+ src/liblzma/common/filter_flags_decoder.c
+ src/liblzma/common/filter_flags_encoder.c
+ src/liblzma/common/hardware_cputhreads.c
+ src/liblzma/common/hardware_physmem.c
+ src/liblzma/common/index.c
+ src/liblzma/common/index_decoder.c
+ src/liblzma/common/index_encoder.c
+ src/liblzma/common/index_hash.c
+ src/liblzma/common/outqueue.c
+ src/liblzma/common/stream_buffer_decoder.c
+ src/liblzma/common/stream_buffer_encoder.c
+ src/liblzma/common/stream_decoder.c
+ src/liblzma/common/stream_encoder.c
+ src/liblzma/common/stream_encoder_mt.c
+ src/liblzma/common/stream_flags_common.c
+ src/liblzma/common/stream_flags_decoder.c
+ src/liblzma/common/stream_flags_encoder.c
+ src/liblzma/common/vli_decoder.c
+ src/liblzma/common/vli_encoder.c
+ src/liblzma/common/vli_size.c
+ src/liblzma/delta/delta_common.c
+ src/liblzma/delta/delta_decoder.c
+ src/liblzma/delta/delta_encoder.c
+ src/liblzma/lzma/fastpos_table.c
+ src/liblzma/lzma/lzma2_decoder.c
+ src/liblzma/lzma/lzma2_encoder.c
+ src/liblzma/lzma/lzma_decoder.c
+ src/liblzma/lzma/lzma_encoder.c
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c
+ src/liblzma/lzma/lzma_encoder_presets.c
+ src/liblzma/lz/lz_decoder.c
+ src/liblzma/lz/lz_encoder.c
+ src/liblzma/lz/lz_encoder_mf.c
+ src/liblzma/rangecoder/price_table.c
+ src/liblzma/simple/arm.c
+ src/liblzma/simple/armthumb.c
+ src/liblzma/simple/ia64.c
+ src/liblzma/simple/powerpc.c
+ src/liblzma/simple/simple_coder.c
+ src/liblzma/simple/simple_decoder.c
+ src/liblzma/simple/simple_encoder.c
+ src/liblzma/simple/sparc.c
+ src/liblzma/simple/x86.c)
+
+install(TARGETS liblzma
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+if(NOT LIBLZMA_SKIP_HEADERS)
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma DESTINATION include)
+ install(FILES ${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma.h DESTINATION include)
+endif()
diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL
new file mode 100644
index 000000000..648316130
--- /dev/null
+++ b/ports/liblzma/CONTROL
@@ -0,0 +1,3 @@
+Source: liblzma
+Version: 5.2.2
+Description: Compression library with an API similar to that of zlib.
diff --git a/ports/liblzma/auto-define-lzma-api-static.patch b/ports/liblzma/auto-define-lzma-api-static.patch
new file mode 100644
index 000000000..b2643fe6a
--- /dev/null
+++ b/ports/liblzma/auto-define-lzma-api-static.patch
@@ -0,0 +1,14 @@
+diff --git a/lzma.h b/lzma.h
+index ce675a7..ac0fc98 100644
+--- a/lzma.h
++++ b/lzma.h
+@@ -187,6 +187,9 @@
+ * need to worry about LZMA_API_STATIC. Also the calling convention is
+ * omitted on Cygwin but not on MinGW.
+ */
++
++#define LZMA_API_STATIC
++
+ #ifndef LZMA_API_IMPORT
+ # if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
+ # define LZMA_API_IMPORT __declspec(dllimport)
diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake
new file mode 100644
index 000000000..bb2b6e083
--- /dev/null
+++ b/ports/liblzma/portfile.cmake
@@ -0,0 +1,29 @@
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xz-5.2.2)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://tukaani.org/xz/xz-5.2.2.tar.gz"
+ FILENAME "xz-5.2.2.tar.gz"
+ SHA512 8d6249f93c5c43e1c8eeb21f93b22330fd54575e20bbb4af3d06721192d9f0ca3351878964c9640238ac410b7dd9f16329793c7be7355c7ca0db92c6db6ab813)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DLIBLZMA_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/auto-define-lzma-api-static.patch)
+endif()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/liblzma/COPYING ${CURRENT_PACKAGES_DIR}/share/liblzma/copyright)
diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL
new file mode 100644
index 000000000..8aca622a4
--- /dev/null
+++ b/ports/libmodplug/CONTROL
@@ -0,0 +1,3 @@
+Source: libmodplug
+Version: 0.8.8.5-bb25b05
+Description: The ModPlug mod file playing library.
diff --git a/ports/libmodplug/automagically-define-modplug-static.patch b/ports/libmodplug/automagically-define-modplug-static.patch
new file mode 100644
index 000000000..b7982b2d3
--- /dev/null
+++ b/ports/libmodplug/automagically-define-modplug-static.patch
@@ -0,0 +1,13 @@
+diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h
+index 3ffbf9d..fd19ae5 100644
+--- a/libmodplug/modplug.h
++++ b/libmodplug/modplug.h
+@@ -11,6 +11,8 @@
+ extern "C" {
+ #endif
+
++#define MODPLUG_STATIC
++
+ #if defined(_WIN32) || defined(__CYGWIN__)
+ # if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */
+ # define MODPLUG_EXPORT __declspec(dllexport)
diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake
new file mode 100644
index 000000000..6d2070975
--- /dev/null
+++ b/ports/libmodplug/portfile.cmake
@@ -0,0 +1,30 @@
+
+set(MODPLUG_HASH bb25b059a963f62aa0a3fe4c580da7da47f2b9c0)
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmodplug-${MODPLUG_HASH})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/Konstanty/libmodplug/archive/${MODPLUG_HASH}.zip"
+ FILENAME "libmodplug-0.8.8.5-${MODPLUG_HASH}.zip"
+ SHA512 65840b7748284b400dfe99775e18f44dcc4846bc0ff522d18b9ded42c7032e10683e453110d530722d9e22547b7e5f4878ebfff92f232691cbd5b0638c48d88b)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH})
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/bin/modplug.dll)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/debug/bin/modplug.dll)
+ vcpkg_copy_pdbs()
+else()
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/automagically-define-modplug-static.patch)
+endif()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodplug)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmodplug/COPYING ${CURRENT_PACKAGES_DIR}/share/libmodplug/copyright)
diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL
new file mode 100644
index 000000000..d66030b71
--- /dev/null
+++ b/ports/libssh2/CONTROL
@@ -0,0 +1,4 @@
+Source: libssh2
+Version: 1.8.0
+Build-Depends: zlib, openssl
+Description: The SSH library \ No newline at end of file
diff --git a/ports/libssh2/LICENSE b/ports/libssh2/LICENSE
new file mode 100644
index 000000000..d629fbd3f
--- /dev/null
+++ b/ports/libssh2/LICENSE
@@ -0,0 +1,41 @@
+/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
+ * Copyright (c) 2005,2006 Mikhail Gusarov <dottedmag@dottedmag.net>
+ * Copyright (c) 2006-2007 The Written Word, Inc.
+ * Copyright (c) 2007 Eli Fant <elifantu@mail.ru>
+ * Copyright (c) 2009-2014 Daniel Stenberg
+ * Copyright (C) 2008, 2009 Simon Josefsson
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms,
+ * with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the
+ * following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the copyright holder nor the names
+ * of any other contributors may be used to endorse or
+ * promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ */ \ No newline at end of file
diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake
new file mode 100644
index 000000000..9b4cc77dd
--- /dev/null
+++ b/ports/libssh2/portfile.cmake
@@ -0,0 +1,32 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh2-1.8.0)
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "https://www.libssh2.org/download/libssh2-1.8.0.tar.gz"
+ FILENAME "libssh2-1.8.0.tar.gz"
+ SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_TESTING=OFF
+ -DENABLE_ZLIB_COMPRESSION=ON
+ OPTIONS_DEBUG
+ -DENABLE_DEBUG_LOGGING=OFF
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
+
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt
index 76ee6e15c..68de76788 100644
--- a/ports/lua/CMakeLists.txt
+++ b/ports/lua/CMakeLists.txt
@@ -25,22 +25,29 @@ src/ltable.c src/ltablib.c src/ltm.c src/lundump.c src/lutf8lib.c src/lvm.c src/
# append headers to sources to make them show up in MSVC GUI
LIST(APPEND SRC_LIBLUA ${HDR_LIBLUA})
-IF (BUILD_SHARED_LIBS)
- ADD_DEFINITIONS ( -DLUA_BUILD_AS_DLL )
-ENDIF ()
-
# remove warnings
ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS )
#DLL
ADD_LIBRARY ( lua ${SRC_LIBLUA} )
+IF (BUILD_SHARED_LIBS)
+ TARGET_COMPILE_DEFINITIONS (lua PRIVATE -DLUA_BUILD_AS_DLL )
+ENDIF ()
+
INSTALL ( TARGETS lua
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
)
+IF (NOT DEFINED SKIP_INSTALL_TOOLS)
+ ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler
+ ADD_EXECUTABLE ( luai src/lua.c ${SRC_LIBLUA} ) # interpreter
+ SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai )
+ INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools )
+ENDIF ()
+
IF (NOT DEFINED SKIP_INSTALL_HEADERS)
INSTALL(
FILES
@@ -51,4 +58,4 @@ IF (NOT DEFINED SKIP_INSTALL_HEADERS)
src/lauxlib.h
DESTINATION include
)
-ENDIF () \ No newline at end of file
+ENDIF ()
diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL
index ae661f3f6..b284bfa85 100644
--- a/ports/lua/CONTROL
+++ b/ports/lua/CONTROL
@@ -1,3 +1,3 @@
Source: lua
-Version: 5.3.3
+Version: 5.3.3-2
Description: a powerful, fast, lightweight, embeddable scripting language
diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake
index 598b15c94..0778a77f9 100644
--- a/ports/lua/portfile.cmake
+++ b/ports/lua/portfile.cmake
@@ -21,6 +21,7 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
+ -DSKIP_INSTALL_TOOLS=ON
)
vcpkg_install_cmake()
diff --git a/ports/lz4/CMakeLists.txt b/ports/lz4/CMakeLists.txt
new file mode 100644
index 000000000..a5366f5ab
--- /dev/null
+++ b/ports/lz4/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.0)
+project(lz4)
+
+if(BUILD_SHARED_LIBS)
+ add_definitions(-DLZ4_DLL_EXPORT)
+endif()
+add_definitions(-DXXH_NAMESPACE=LZ4_)
+
+add_library(lz4
+ lib/lz4.c
+ lib/lz4frame.c
+ lib/lz4hc.c
+ lib/xxhash.c)
+
+install(TARGETS lz4
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+if(NOT LZ4_SKIP_INCLUDES)
+ install(FILES
+ lib/lz4.h
+ lib/lz4frame.h
+ lib/lz4hc.h
+ DESTINATION include)
+endif()
diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL
new file mode 100644
index 000000000..90be24a5b
--- /dev/null
+++ b/ports/lz4/CONTROL
@@ -0,0 +1,3 @@
+Source: lz4
+Version: 1.7.4.2
+Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
diff --git a/ports/lz4/auto-define-import-macro.patch b/ports/lz4/auto-define-import-macro.patch
new file mode 100644
index 000000000..48b4585ea
--- /dev/null
+++ b/ports/lz4/auto-define-import-macro.patch
@@ -0,0 +1,28 @@
+diff --git a/lz4.h b/lz4.h
+index 7420ad8..c1c3e56 100644
+--- a/lz4.h
++++ b/lz4.h
+@@ -73,6 +73,9 @@ extern "C" {
+ * LZ4_DLL_EXPORT :
+ * Enable exporting of functions when building a Windows DLL
+ */
++
++#define LZ4_DLL_IMPORT 1
++
+ #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
+ # define LZ4LIB_API __declspec(dllexport)
+ #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
+diff --git a/lz4frame.h b/lz4frame.h
+index 3104d2e..4442461 100644
+--- a/lz4frame.h
++++ b/lz4frame.h
+@@ -55,6 +55,9 @@ extern "C" {
+ * LZ4_DLL_EXPORT :
+ * Enable exporting of functions when building a Windows DLL
+ */
++
++#define LZ4_DLL_IMPORT 1
++
+ #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
+ # define LZ4FLIB_API __declspec(dllexport)
+ #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake
new file mode 100644
index 000000000..9e2153e4b
--- /dev/null
+++ b/ports/lz4/portfile.cmake
@@ -0,0 +1,29 @@
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lz4-1.7.4.2)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/lz4/lz4/archive/v1.7.4.2.zip"
+ FILENAME "lz4-1.7.4.2.zip"
+ SHA512 c9a65031225ccda43ad4c7622e9f36762c18e58b4aaf43b1a33f219186fb55c43ca354f574a1591188db39f57631351b1b90f96e0c150e28de08dcb65c6759d0)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DLZ4_SKIP_INCLUDES=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/auto-define-import-macro.patch)
+endif()
+
+file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright)
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL
index 330ff27af..c77352848 100644
--- a/ports/mongo-c-driver/CONTROL
+++ b/ports/mongo-c-driver/CONTROL
@@ -1,4 +1,4 @@
Source: mongo-c-driver
-Version: 1.5.0-rc6
+Version: 1.5.1
Build-Depends: libbson
Description: Client library written in C for MongoDB. \ No newline at end of file
diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake
index f9a247499..833d7393c 100644
--- a/ports/mongo-c-driver/portfile.cmake
+++ b/ports/mongo-c-driver/portfile.cmake
@@ -1,47 +1,47 @@
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.5.0-rc6)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/mongodb/mongo-c-driver/archive/1.5.0-rc6.tar.gz"
- FILENAME "mongo-c-driver-1.5.0-rc6.tar.gz"
- SHA512 708caf4e963bad97b4802456c6f5809a0ba8c24fe5faaf0e91aa889a0690df4324005f8d324b3bfc80ffc76f1594612a8d391d7421dd914c58369c24cf8cc965
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR}
- -DENABLE_TESTS=OFF
- -DENABLE_EXAMPLES=OFF
- -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
-)
-
-vcpkg_install_cmake()
-
-file(RENAME
- ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0
- ${CURRENT_PACKAGES_DIR}/temp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
-file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
-
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib
- ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
-else()
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib)
-endif()
-
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.5.1)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/mongodb/mongo-c-driver/archive/1.5.1.tar.gz"
+ FILENAME "mongo-c-driver-1.5.1.tar.gz"
+ SHA512 2977e6e1fb3c45256161d2c9bd711fea69b9f8c9ff15362fa636068e0a347c42e10d72fed5649504b552c8212f21cb1ae74d2dc8ca3d1388f49e63b2baf6e16d
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR}
+ -DENABLE_TESTS=OFF
+ -DENABLE_EXAMPLES=OFF
+ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
+)
+
+vcpkg_install_cmake()
+
+file(RENAME
+ ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0
+ ${CURRENT_PACKAGES_DIR}/temp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
+file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
+
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib
+ ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib)
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib)
+endif()
+
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver RENAME copyright) \ No newline at end of file
diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake
index fa0549fd7..137088109 100644
--- a/ports/mongo-cxx-driver/portfile.cmake
+++ b/ports/mongo-cxx-driver/portfile.cmake
@@ -1,88 +1,89 @@
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.0.3)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.3.tar.gz"
- FILENAME "mongo-cxx-driver-r3.0.3.tar.gz"
- SHA512 29f7ae77dab160c4279eb2eba8e960b25afc7118bf82570d240f5c68e1e17b10dc99910c855888467c304d70399f2d02031463b0c168a95ad0b9323742ccfd35
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch
- ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch
-)
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR}
- -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR}
- -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
-)
-
-vcpkg_install_cmake()
-
-file(RENAME
- ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx
- ${CURRENT_PACKAGES_DIR}/temp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
-file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
-
-file(RENAME
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx
- ${CURRENT_PACKAGES_DIR}/temp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx)
-file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx)
-
-file(REMOVE_RECURSE
- ${CURRENT_PACKAGES_DIR}/lib/cmake
- ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
-
- ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake
- ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private
- ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private
- ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test
- ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party
-
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/test
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/private
- ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private
-
- ${CURRENT_PACKAGES_DIR}/debug/include)
-
-
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
-
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib
- ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
-
- # define MONGOCXX_STATIC in config/export.hpp
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/static.patch
- )
-else()
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib)
-endif()
-
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.1.0)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.1.0.tar.gz"
+ FILENAME "mongo-cxx-driver-r3.1.0.tar.gz"
+ SHA512 2c9323f5e28304057b6ed6fc8bf33aad14db1313e234eaa74a96fb4cf93e99d24fd8c7c3f20b4b29cda7b1fe5c58f08dcb5cddcffbf62259c08334312fda4fba
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch
+ ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR}
+ -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR}
+ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
+)
+
+vcpkg_install_cmake()
+
+file(RENAME
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx
+ ${CURRENT_PACKAGES_DIR}/temp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
+
+file(RENAME
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx
+ ${CURRENT_PACKAGES_DIR}/temp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
+
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party
+
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/test
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/private
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/options
+
+ ${CURRENT_PACKAGES_DIR}/debug/include)
+
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
+
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib
+ ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
+
+ # define MONGOCXX_STATIC in config/export.hpp
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/static.patch
+ )
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib)
+endif()
+
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright) \ No newline at end of file
diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL
new file mode 100644
index 000000000..e7692526f
--- /dev/null
+++ b/ports/nana/CONTROL
@@ -0,0 +1,4 @@
+Source: nana
+Version: 1.4.1
+Description: Cross-platform library for GUI programming in modern C++ style.
+Build-Depends: zlib, libpng, libjpeg-turbo
diff --git a/ports/nana/fix-linking.patch b/ports/nana/fix-linking.patch
new file mode 100644
index 000000000..a687e228b
--- /dev/null
+++ b/ports/nana/fix-linking.patch
@@ -0,0 +1,51 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5c9c9c9..ae35185 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,26 +149,20 @@ endif ()
+ # Find PNG
+ if(NANA_CMAKE_ENABLE_PNG)
+ add_definitions(-DNANA_ENABLE_PNG)
+- set(NANA_LINKS "${NANA_LINKS} -lpng")
+ if(NANA_CMAKE_LIBPNG_FROM_OS)
+- find_package(PNG)
+- if (PNG_FOUND)
+- include_directories( ${PNG_INCLUDE_DIRS})
+- add_definitions(-DUSE_LIBPNG_FROM_OS)
+- endif(PNG_FOUND)
++ find_package(PNG REQUIRED)
++ include_directories(${PNG_INCLUDE_DIRS})
++ add_definitions(-DUSE_LIBPNG_FROM_OS)
+ endif(NANA_CMAKE_LIBPNG_FROM_OS)
+ endif(NANA_CMAKE_ENABLE_PNG)
+
+ # Find JPEG
+ if(NANA_CMAKE_ENABLE_JPEG)
+ add_definitions(-DNANA_ENABLE_JPEG)
+- set(NANA_LINKS "${NANA_LINKS} -ljpeg")
+ if(NANA_CMAKE_LIBJPEG_FROM_OS)
+- find_package(JPEG)
+- if (JPEG_FOUND)
+- include_directories( ${JPEG_INCLUDE_DIRS})
+- add_definitions(-DUSE_LIBJPEG_FROM_OS)
+- endif(JPEG_FOUND)
++ find_package(JPEG REQUIRED)
++ include_directories(${JPEG_INCLUDE_DIRS})
++ add_definitions(-DUSE_LIBJPEG_FROM_OS)
+ endif(NANA_CMAKE_LIBJPEG_FROM_OS)
+ endif(NANA_CMAKE_ENABLE_JPEG)
+
+@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS})
+
+ include_directories(${NANA_INCLUDE_DIR})
+ add_library(${PROJECT_NAME} ${sources} )
+-target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
++if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS)
++ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES})
++endif()
++if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS)
++ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES})
++endif()
+
+ # Headers: use INCLUDE_DIRECTORIES
+ # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES)
diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake
new file mode 100644
index 000000000..66fca68fa
--- /dev/null
+++ b/ports/nana/portfile.cmake
@@ -0,0 +1,36 @@
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/nana)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://downloads.sourceforge.net/project/nanapro/Nana/Nana 1.x/nana 1.4.1.zip"
+ FILENAME "nana 1.4.1.zip"
+ SHA512 38a4fe4c9f932d0e69753c0c1e28d0c8f7cc1ab73c639b87dd5ba102ed25da1ee04c93ec5d6bb79945f7bc118cc131022604c75c1bb6eaced3a071eb137115cd)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-linking.patch")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
+ -DNANA_CMAKE_ENABLE_PNG=ON
+ -DNANA_CMAKE_ENABLE_JPEG=ON
+ OPTIONS_DEBUG
+ -DNANA_CMAKE_INSTALL_INCLUDES=OFF)
+
+vcpkg_install_cmake()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/nana.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/nana.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+endif()
+
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/nana/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/nana/copyright)
diff --git a/ports/ogre/0001-use-vcpkg-freeimage.patch b/ports/ogre/0001-use-vcpkg-freeimage.patch
new file mode 100644
index 000000000..0266e5e89
--- /dev/null
+++ b/ports/ogre/0001-use-vcpkg-freeimage.patch
@@ -0,0 +1,17 @@
+diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt
+index 6a43378..22f950e 100644
+--- a/OgreMain/CMakeLists.txt
++++ b/OgreMain/CMakeLists.txt
+@@ -220,7 +220,11 @@ endif ()
+ list(APPEND HEADER_FILES ${THREAD_HEADER_FILES})
+
+ # Add needed definitions and nedmalloc include dir
+-add_definitions(-DOGRE_NONCLIENT_BUILD -DFREEIMAGE_LIB -D_MT -D_USRDLL)
++# vcpkg specific patch: we removed -DFREEIMAGE_LIB
++# from the defines, because vcpkg's freeimage can
++# be both static or dynamic, and FREEIMAGE_LIB
++# remove all the symbol exporting declaration from FreeImage.h
++add_definitions(-DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/nedmalloc)
+
+ set(LIBRARIES ${PLATFORM_LIBS})
diff --git a/ports/ogre/0002-ogre-cmake-dir-as-option.patch b/ports/ogre/0002-ogre-cmake-dir-as-option.patch
new file mode 100644
index 000000000..c5d75e20c
--- /dev/null
+++ b/ports/ogre/0002-ogre-cmake-dir-as-option.patch
@@ -0,0 +1,19 @@
+diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt
+index 4c496b7..feb4017 100644
+--- a/CMake/CMakeLists.txt
++++ b/CMake/CMakeLists.txt
+@@ -14,10 +14,12 @@
+ #############################################################
+
+ if(WIN32 OR APPLE)
+- set(OGRE_CMAKE_DIR "CMake")
++ set(OGRE_DEFAULT_CMAKE_DIR "CMake")
+ else()
+- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
++ set(OGRE_DEFAULT_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+ endif()
++set(OGRE_CMAKE_DIR ${OGRE_DEFAULT_CMAKE_DIR} CACHE STRING "Install directory for CMake files.")
++mark_as_advanced(OGRE_DEFAULT_CMAKE_DIR)
+
+ set(INST_FILES
+ Packages/FindOIS.cmake
diff --git a/ports/ogre/0003-use-flat-installation.patch b/ports/ogre/0003-use-flat-installation.patch
new file mode 100644
index 000000000..c5a382c1f
--- /dev/null
+++ b/ports/ogre/0003-use-flat-installation.patch
@@ -0,0 +1,41 @@
+diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake
+index c6b3b40..2da7ebf 100644
+--- a/CMake/Utils/OgreConfigTargets.cmake
++++ b/CMake/Utils/OgreConfigTargets.cmake
+@@ -41,15 +41,28 @@ if (NOT OGRE_RUNTIME_OUTPUT)
+ set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin)
+ endif ()
+
++option(OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32 "Do not install in configuration-specific directories in Windows" FALSE)
++
+ if (WIN32)
+- set(OGRE_RELEASE_PATH "/Release")
+- set(OGRE_RELWDBG_PATH "/RelWithDebInfo")
+- set(OGRE_MINSIZE_PATH "/MinSizeRel")
+- set(OGRE_DEBUG_PATH "/Debug")
+- set(OGRE_LIB_RELEASE_PATH "/Release")
+- set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo")
+- set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel")
+- set(OGRE_LIB_DEBUG_PATH "/Debug")
++ if (OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32)
++ set(OGRE_RELEASE_PATH "")
++ set(OGRE_RELWDBG_PATH "")
++ set(OGRE_MINSIZE_PATH "")
++ set(OGRE_DEBUG_PATH "")
++ set(OGRE_LIB_RELEASE_PATH "")
++ set(OGRE_LIB_RELWDBG_PATH "")
++ set(OGRE_LIB_MINSIZE_PATH "")
++ set(OGRE_LIB_DEBUG_PATH "/")
++ else ()
++ set(OGRE_RELEASE_PATH "/Release")
++ set(OGRE_RELWDBG_PATH "/RelWithDebInfo")
++ set(OGRE_MINSIZE_PATH "/MinSizeRel")
++ set(OGRE_DEBUG_PATH "/Debug")
++ set(OGRE_LIB_RELEASE_PATH "/Release")
++ set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo")
++ set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel")
++ set(OGRE_LIB_DEBUG_PATH "/Debug")
++ endif ()
+ set(OGRE_PLUGIN_PATH "/opt")
+ set(OGRE_SAMPLE_PATH "/opt/samples")
+ elseif (UNIX)
diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL
new file mode 100644
index 000000000..40d9e2416
--- /dev/null
+++ b/ports/ogre/CONTROL
@@ -0,0 +1,4 @@
+Source: ogre
+Version: 1.9.0
+Build-Depends: freeimage, freetype, zlib, zziplib
+Description: 3D Object-Oriented Graphics Rendering Engine
diff --git a/ports/ogre/OGREConfig.cmake b/ports/ogre/OGREConfig.cmake
new file mode 100644
index 000000000..a20544431
--- /dev/null
+++ b/ports/ogre/OGREConfig.cmake
@@ -0,0 +1,37 @@
+#.rst:
+# OGREConfig
+# ------------
+#
+# Dummy OGREConfig to simplify use of OGRE-provided FindOGRE module.
+#
+# This file is provided as part of the vcpkg port of OGRE .
+# It is meant to be found automatically by find_package(OGRE),
+# but then offloads all the real work to the FindOGRE module by temporarly
+# adding its directory to CMAKE_MODULE_PATH
+#
+# See the FindOGRE module to see the defined variables::
+#
+
+# Temporarly add the directory in which OGREConfig.cmake is contained to
+# get access to the FindOGRE module
+get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+list(APPEND CMAKE_MODULE_PATH ${SELF_DIR})
+find_package(OGRE MODULE)
+
+# Leave CMAKE_MODULE_PATH as we found it
+set(CMAKE_MODULE_PATH ${ORIGINAL_CMAKE_MODULE_PATH})
+
+# Handle components
+# imported from https://github.com/Kitware/CMake/blob/v3.7.1/Modules/CMakePackageConfigHelpers.cmake#L300
+macro(check_required_components _NAME)
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
+ if(NOT ${_NAME}_${comp}_FOUND)
+ if(${_NAME}_FIND_REQUIRED_${comp})
+ set(${_NAME}_FOUND FALSE)
+ endif()
+ endif()
+ endforeach()
+endmacro()
+
+check_required_components(OGRE) \ No newline at end of file
diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake
new file mode 100644
index 000000000..a0989a4a2
--- /dev/null
+++ b/ports/ogre/portfile.cmake
@@ -0,0 +1,60 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sinbad-ogre-dd30349ea667)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://bitbucket.org/sinbad/ogre/get/v1-9-0.zip"
+ FILENAME "ogre-v1-9-0.zip"
+ SHA512 de7315a2450ecf0d9073e6a8f0c54737e041016f7ad820556d10701c7d23eefab9d3473476a8e95447c30ab21518b8e4cfb0271db72494ea67a3dea284c9a3d3
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-use-vcpkg-freeimage.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/0002-ogre-cmake-dir-as-option.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/0003-use-flat-installation.patch"
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(OGRE_STATIC ON)
+else()
+ set(OGRE_STATIC OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -DOGRE_USE_BOOST:BOOL=OFF
+ -DOGRE_BUILD_RENDERSYSTEM_D3D9:BOOL=OFF
+ -DOGRE_INSTALL_DEPENDENCIES:BOOL=OFF
+ -DOGRE_COPY_DEPENDENCIES:BOOL=OFF
+ -DOGRE_BUILD_TOOLS:BOOL=OFF
+ -DOGRE_CMAKE_DIR:STRING=share/ogre
+ -DOGRE_STATIC:BOOL=${OGRE_STATIC}
+ -DOGRE_INSTALL_SAMPLES:BOOL=OFF
+ -DOGRE_INSTALL_TOOLS:BOOL=OFF
+ # We disable this option because it is broken and we rely on vcpkg_copy_pdbs
+ -DOGRE_INSTALL_PDB:BOOL=OFF
+ -DOGRE_BUILD_DOCS:BOOL=OFF
+ -DOGRE_INSTALL_DOCS:BOOL=OFF
+ -DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF
+ -DOGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32:BOOL=ON
+)
+
+vcpkg_install_cmake()
+
+# Add a OGREConfig.cmake to simplify the process of finding vcpkg OGRE
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/OGREConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre)
+
+# Remove debug includes
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Remove debug CMake files
+# Note that at the moment OGRE do not export imported targets,
+# so we do not need to copy the debug imported targets in the
+# release CMake path
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/ogre/COPYING ${CURRENT_PACKAGES_DIR}/share/ogre/copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL
index d0cd893f5..cb7bc7493 100644
--- a/ports/openssl/CONTROL
+++ b/ports/openssl/CONTROL
@@ -1,3 +1,3 @@
Source: openssl
-Version: 1.0.2j
+Version: 1.0.2j-1
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. \ No newline at end of file
diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake
index 34861c122..f4a0a716b 100644
--- a/ports/openssl/portfile-uwp.cmake
+++ b/ports/openssl/portfile-uwp.cmake
@@ -26,16 +26,16 @@ endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2_WinRT-stable)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2j_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_2_WinRT-stable.zip"
- FILENAME "openssl-microsoft-1.0.2.zip"
- SHA512 f265b7dbeca6b86815dbc14af9f2b6688407efd921eb335b1acf5a642dddb6b6334a794fe0939666d9db66976db11a67ad78a3ed74484708d3bf2040aae598d2
+ URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2j_WinRT.zip"
+ FILENAME "openssl-microsoft-1.0.2j_WinRT.zip"
+ SHA512 0860d1f5fca7b1345870e866d7bb78f14672c5bb63c56bb04360ee891be542b4b56625ab971ef9b304b792b6cf36c9508bfd812c4a133f6ba8bafdde5e2f8fcf
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch
new file mode 100644
index 000000000..9db22af1d
--- /dev/null
+++ b/ports/qca/0001-fix-path-for-vcpkg.patch
@@ -0,0 +1,63 @@
+From a3a8d50f3bdcb4df630f7126718c21f23efd7832 Mon Sep 17 00:00:00 2001
+From: Alexander Kaspar <alexander.kaspar@gmail.com>
+Date: Wed, 30 Nov 2016 15:45:12 +0100
+Subject: [PATCH] fix path for vcpkg
+
+---
+ CMakeLists.txt | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 605621b..3b5a9be 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -277,7 +277,7 @@ if(DEVELOPER_MODE)
+ # To prefer plugins from build tree when run qca from build tree
+ file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf
+ "[Paths]
+-Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}
++Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME}
+ ")
+ endif()
+
+@@ -320,7 +320,7 @@ else (qca_CERTSTORE)
+ set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem")
+ # note that INSTALL_FILES targets are relative to the current installation prefix...
+ if(NOT DEVELOPER_MODE)
+- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs")
++ install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/qca/certs")
+ endif()
+ endif (qca_CERTSTORE)
+ message(STATUS "certstore path: " ${qca_CERTSTORE})
+@@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND)
+ include(CMakePackageConfigHelpers)
+ configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in"
+- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake"
+- INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE}
++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake"
++ INSTALL_DESTINATION ${CMAKE_BINARY_DIR}/share/qca/cmake
+ )
+-write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion)
++write_basic_config_version_file("${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion)
+
+ if(NOT DEVELOPER_MODE)
+
+@@ -472,10 +472,10 @@ if(NOT DEVELOPER_MODE)
+ endif()
+ endif()
+
+- install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake)
++ install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake)
+ install(FILES
+- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake"
+- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake"
+- DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE}
++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake"
++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake"
++ DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake
+ )
+ endif()
+--
+2.8.1.windows.1
+
diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL
new file mode 100644
index 000000000..cbe923bb4
--- /dev/null
+++ b/ports/qca/CONTROL
@@ -0,0 +1,4 @@
+Source: qca
+Version: 2.2.0
+Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/
+Build-Depends: qt5
diff --git a/ports/qca/mk-ca-bundle.pl b/ports/qca/mk-ca-bundle.pl
new file mode 100644
index 000000000..9574f1dbf
--- /dev/null
+++ b/ports/qca/mk-ca-bundle.pl
@@ -0,0 +1,554 @@
+#!/usr/bin/perl -w
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# *
+# * This software is licensed as described in the file COPYING, which
+# * you should have received as part of this distribution. The terms
+# * are also available at https://curl.haxx.se/docs/copyright.html.
+# *
+# * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# * copies of the Software, and permit persons to whom the Software is
+# * furnished to do so, under the terms of the COPYING file.
+# *
+# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# * KIND, either express or implied.
+# *
+# ***************************************************************************
+# This Perl script creates a fresh ca-bundle.crt file for use with libcurl.
+# It downloads certdata.txt from Mozilla's source tree (see URL below),
+# then parses certdata.txt and extracts CA Root Certificates into PEM format.
+# These are then processed with the OpenSSL commandline tool to produce the
+# final ca-bundle.crt file.
+# The script is based on the parse-certs script written by Roland Krikava.
+# This Perl script works on almost any platform since its only external
+# dependency is the OpenSSL commandline tool for optional text listing.
+# Hacked by Guenter Knauf.
+#
+use Encode;
+use Getopt::Std;
+use MIME::Base64;
+use strict;
+use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w);
+use List::Util;
+use Text::Wrap;
+my $MOD_SHA = "Digest::SHA";
+eval "require $MOD_SHA";
+if ($@) {
+ $MOD_SHA = "Digest::SHA::PurePerl";
+ eval "require $MOD_SHA";
+}
+eval "require LWP::UserAgent";
+
+my %urls = (
+ 'nss' =>
+ 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt',
+ 'central' =>
+ 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'aurora' =>
+ 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'beta' =>
+ 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+ 'release' =>
+ 'https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt',
+);
+
+$opt_d = 'release';
+
+# If the OpenSSL commandline is not in search path you can configure it here!
+my $openssl = 'openssl';
+
+my $version = '1.27';
+
+$opt_w = 76; # default base64 encoded lines length
+
+# default cert types to include in the output (default is to include CAs which may issue SSL server certs)
+my $default_mozilla_trust_purposes = "SERVER_AUTH";
+my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR";
+$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels;
+
+my @valid_mozilla_trust_purposes = (
+ "DIGITAL_SIGNATURE",
+ "NON_REPUDIATION",
+ "KEY_ENCIPHERMENT",
+ "DATA_ENCIPHERMENT",
+ "KEY_AGREEMENT",
+ "KEY_CERT_SIGN",
+ "CRL_SIGN",
+ "SERVER_AUTH",
+ "CLIENT_AUTH",
+ "CODE_SIGNING",
+ "EMAIL_PROTECTION",
+ "IPSEC_END_SYSTEM",
+ "IPSEC_TUNNEL",
+ "IPSEC_USER",
+ "TIME_STAMPING",
+ "STEP_UP_APPROVED"
+);
+
+my @valid_mozilla_trust_levels = (
+ "TRUSTED_DELEGATOR", # CAs
+ "NOT_TRUSTED", # Don't trust these certs.
+ "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA.
+ "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA).
+);
+
+my $default_signature_algorithms = $opt_s = "MD5";
+
+my @valid_signature_algorithms = (
+ "MD5",
+ "SHA1",
+ "SHA256",
+ "SHA384",
+ "SHA512"
+);
+
+$0 =~ s@.*(/|\\)@@;
+$Getopt::Std::STANDARD_HELP_VERSION = 1;
+getopts('bd:fhiklmnp:qs:tuvw:');
+
+if(!defined($opt_d)) {
+ # to make plain "-d" use not cause warnings, and actually still work
+ $opt_d = 'release';
+}
+
+# Use predefined URL or else custom URL specified on command line.
+my $url;
+if(defined($urls{$opt_d})) {
+ $url = $urls{$opt_d};
+ if(!$opt_k && $url !~ /^https:\/\//i) {
+ die "The URL for '$opt_d' is not HTTPS. Use -k to override (insecure).\n";
+ }
+}
+else {
+ $url = $opt_d;
+}
+
+my $curl = `curl -V`;
+
+if ($opt_i) {
+ print ("=" x 78 . "\n");
+ print "Script Version : $version\n";
+ print "Perl Version : $]\n";
+ print "Operating System Name : $^O\n";
+ print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n";
+ print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n";
+ print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n" if($LWP::UserAgent::VERSION);
+ print "LWP.pm Version : ${LWP::VERSION}\n" if($LWP::VERSION);
+ print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION);
+ print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION);
+ print ("=" x 78 . "\n");
+}
+
+sub warning_message() {
+ if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit
+ print "Warning: Use of this script may pose some risk:\n";
+ print "\n";
+ print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n";
+ print " 2) Default to 'release', but more recent updates may be found in other trees\n";
+ print " 3) certdata.txt file format may change, lag time to update this script\n";
+ print " 4) Generally unwise to blindly trust CAs without manual review & verification\n";
+ print " 5) Mozilla apps use additional security checks aren't represented in certdata\n";
+ print " 6) Use of this script will make a security engineer grind his teeth and\n";
+ print " swear at you. ;)\n";
+ exit;
+ } else { # Short Form Warning
+ print "Warning: Use of this script may pose some risk, -d risk for more details.\n";
+ }
+}
+
+sub HELP_MESSAGE() {
+ print "Usage:\t${0} [-b] [-d<certdata>] [-f] [-i] [-k] [-l] [-n] [-p<purposes:levels>] [-q] [-s<algorithms>] [-t] [-u] [-v] [-w<l>] [<outputfile>]\n";
+ print "\t-b\tbackup an existing version of ca-bundle.crt\n";
+ print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n";
+ print "\t\t Valid names are:\n";
+ print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n";
+ print "\t-f\tforce rebuild even if certdata.txt is current\n";
+ print "\t-i\tprint version info about used modules\n";
+ print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n";
+ print "\t-l\tprint license info about certdata.txt\n";
+ print "\t-m\tinclude meta data in output\n";
+ print "\t-n\tno download of certdata.txt (to use existing)\n";
+ print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n";
+ print "\t\t Valid purposes are:\n";
+ print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n";
+ print "\t\t Valid levels are:\n";
+ print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n";
+ print "\t-q\tbe really quiet (no progress output at all)\n";
+ print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n");
+ print "\t\t Valid signature algorithms are:\n";
+ print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n";
+ print "\t-t\tinclude plain text listing of certificates\n";
+ print "\t-u\tunlink (remove) certdata.txt after processing\n";
+ print "\t-v\tbe verbose and print out processed CAs\n";
+ print "\t-w <l>\twrap base64 output lines after <l> chars (default: ${opt_w})\n";
+ exit;
+}
+
+sub VERSION_MESSAGE() {
+ print "${0} version ${version} running Perl ${]} on ${^O}\n";
+}
+
+warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i );
+HELP_MESSAGE() if ($opt_h);
+
+sub report($@) {
+ my $output = shift;
+
+ print STDERR $output . "\n" unless $opt_q;
+}
+
+sub is_in_list($@) {
+ my $target = shift;
+
+ return defined(List::Util::first { $target eq $_ } @_);
+}
+
+# Parses $param_string as a case insensitive comma separated list with optional whitespace
+# validates that only allowed parameters are supplied
+sub parse_csv_param($$@) {
+ my $description = shift;
+ my $param_string = shift;
+ my @valid_values = @_;
+
+ my @values = map {
+ s/^\s+//; # strip leading spaces
+ s/\s+$//; # strip trailing spaces
+ uc $_ # return the modified string as upper case
+ } split( ',', $param_string );
+
+ # Find all values which are not in the list of valid values or "ALL"
+ my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values;
+
+ if ( scalar(@invalid) > 0 ) {
+ # Tell the user which parameters were invalid and print the standard help message which will exit
+ print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n";
+ HELP_MESSAGE();
+ }
+
+ @values = @valid_values if ( is_in_list("ALL",@values) );
+
+ return @values;
+}
+
+sub sha256 {
+ my $result;
+ if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) {
+ open(FILE, $_[0]) or die "Can't open '$_[0]': $!";
+ binmode(FILE);
+ $result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest;
+ close(FILE);
+ } else {
+ # Use OpenSSL command if Perl Digest::SHA modules not available
+ $result = `"$openssl" dgst -r -sha256 "$_[0]"`;
+ $result =~ s/^([0-9a-f]{64}) .+/$1/is;
+ }
+ return $result;
+}
+
+
+sub oldhash {
+ my $hash = "";
+ open(C, "<$_[0]") || return 0;
+ while(<C>) {
+ chomp;
+ if($_ =~ /^\#\# SHA256: (.*)/) {
+ $hash = $1;
+ last;
+ }
+ }
+ close(C);
+ return $hash;
+}
+
+if ( $opt_p !~ m/:/ ) {
+ print "Error: Mozilla trust identifier list must include both purposes and levels\n";
+ HELP_MESSAGE();
+}
+
+(my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p );
+my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes );
+my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels );
+
+my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms );
+
+sub should_output_cert(%) {
+ my %trust_purposes_by_level = @_;
+
+ foreach my $level (@included_mozilla_trust_levels) {
+ # for each level we want to output, see if any of our desired purposes are included
+ return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) );
+ }
+
+ return 0;
+}
+
+my $crt = $ARGV[0] || 'ca-bundle.crt';
+(my $txt = $url) =~ s@(.*/|\?.*)@@g;
+
+my $stdout = $crt eq '-';
+my $resp;
+my $fetched;
+
+my $oldhash = oldhash($crt);
+
+report "SHA256 of old file: $oldhash";
+
+if(!$opt_n) {
+ report "Downloading $txt ...";
+
+ # If we have an HTTPS URL then use curl
+ if($url =~ /^https:\/\//i) {
+ if($curl) {
+ if($curl =~ /^Protocols:.* https( |$)/m) {
+ report "Get certdata with curl!";
+ my $proto = !$opt_k ? "--proto =https" : "";
+ my $quiet = $opt_q ? "-s" : "";
+ my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`;
+ if(@out && $out[0] == 200) {
+ $fetched = 1;
+ report "Downloaded $txt";
+ }
+ else {
+ report "Failed downloading via HTTPS with curl";
+ if(-e $txt && !unlink($txt)) {
+ report "Failed to remove '$txt': $!";
+ }
+ }
+ }
+ else {
+ report "curl lacks https support";
+ }
+ }
+ else {
+ report "curl not found";
+ }
+ }
+
+ # If nothing was fetched then use LWP
+ if(!$fetched) {
+ if($url =~ /^https:\/\//i) {
+ report "Falling back to HTTP";
+ $url =~ s/^https:\/\//http:\/\//i;
+ }
+ if(!$opt_k) {
+ report "URLs other than HTTPS are disabled by default, to enable use -k";
+ exit 1;
+ }
+ report "Get certdata with LWP!";
+ if(!defined(${LWP::UserAgent::VERSION})) {
+ report "LWP is not available (LWP::UserAgent not found)";
+ exit 1;
+ }
+ my $ua = new LWP::UserAgent(agent => "$0/$version");
+ $ua->env_proxy();
+ $resp = $ua->mirror($url, $txt);
+ if($resp && $resp->code eq '304') {
+ report "Not modified";
+ exit 0 if -e $crt && !$opt_f;
+ }
+ else {
+ $fetched = 1;
+ report "Downloaded $txt";
+ }
+ if(!$resp || $resp->code !~ /^(?:200|304)$/) {
+ report "Unable to download latest data: "
+ . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed");
+ exit 1 if -e $crt || ! -r $txt;
+ }
+ }
+}
+
+my $filedate = $resp ? $resp->last_modified : (stat($txt))[9];
+my $datesrc = "as of";
+if(!$filedate) {
+ # mxr.mozilla.org gave us a time, hg.mozilla.org does not!
+ $filedate = time();
+ $datesrc="downloaded on";
+}
+
+# get the hash from the download file
+my $newhash= sha256($txt);
+
+if(!$opt_f && $oldhash eq $newhash) {
+ report "Downloaded file identical to previous run\'s source file. Exiting";
+ exit;
+}
+
+report "SHA256 of new file: $newhash";
+
+my $currentdate = scalar gmtime($filedate);
+
+my $format = $opt_t ? "plain text and " : "";
+if( $stdout ) {
+ open(CRT, '> -') or die "Couldn't open STDOUT: $!\n";
+} else {
+ open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n";
+}
+print CRT <<EOT;
+##
+## Bundle of CA Root Certificates
+##
+## Certificate data from Mozilla ${datesrc}: ${currentdate} GMT
+##
+## This is a bundle of X.509 certificates of public Certificate Authorities
+## (CA). These were automatically extracted from Mozilla's root certificates
+## file (certdata.txt). This file can be found in the mozilla source tree:
+## ${url}
+##
+## It contains the certificates in ${format}PEM format and therefore
+## can be directly used with curl / libcurl / php_curl, or with
+## an Apache+mod_ssl webserver for SSL client authentication.
+## Just configure this file as the SSLCACertificateFile.
+##
+## Conversion done with mk-ca-bundle.pl version $version.
+## SHA256: $newhash
+##
+
+EOT
+
+report "Processing '$txt' ...";
+my $caname;
+my $certnum = 0;
+my $skipnum = 0;
+my $start_of_cert = 0;
+my @precert;
+
+open(TXT,"$txt") or die "Couldn't open $txt: $!\n";
+while (<TXT>) {
+ if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
+ print CRT;
+ print if ($opt_l);
+ while (<TXT>) {
+ print CRT;
+ print if ($opt_l);
+ last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
+ }
+ }
+ elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) {
+ push @precert, $_;
+ next;
+ }
+ elsif(/^#|^\s*$/) {
+ undef @precert;
+ next;
+ }
+ chomp;
+
+ # this is a match for the start of a certificate
+ if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) {
+ $start_of_cert = 1
+ }
+ if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) {
+ $caname = $1;
+ }
+ my %trust_purposes_by_level;
+ if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) {
+ my $data;
+ while (<TXT>) {
+ last if (/^END/);
+ chomp;
+ my @octets = split(/\\/);
+ shift @octets;
+ for (@octets) {
+ $data .= chr(oct);
+ }
+ }
+ # scan forwards until the trust part
+ while (<TXT>) {
+ last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/);
+ chomp;
+ }
+ # now scan the trust part to determine how we should trust this cert
+ while (<TXT>) {
+ last if (/^#/);
+ if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) {
+ if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) {
+ report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2";
+ } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) {
+ report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2";
+ } else {
+ push @{$trust_purposes_by_level{$2}}, $1;
+ }
+ }
+ }
+
+ if ( !should_output_cert(%trust_purposes_by_level) ) {
+ $skipnum ++;
+ } else {
+ my $encoded = MIME::Base64::encode_base64($data, '');
+ $encoded =~ s/(.{1,${opt_w}})/$1\n/g;
+ my $pem = "-----BEGIN CERTIFICATE-----\n"
+ . $encoded
+ . "-----END CERTIFICATE-----\n";
+ print CRT "\n$caname\n";
+ print CRT @precert if($opt_m);
+ my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK));
+ if ($opt_t) {
+ foreach my $key (keys %trust_purposes_by_level) {
+ my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}});
+ $maxStringLength = List::Util::max( length($string), $maxStringLength );
+ print CRT $string . "\n";
+ }
+ }
+ print CRT ("=" x $maxStringLength . "\n");
+ if (!$opt_t) {
+ print CRT $pem;
+ } else {
+ my $pipe = "";
+ foreach my $hash (@included_signature_algorithms) {
+ $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM";
+ if (!$stdout) {
+ $pipe .= " >> $crt.~";
+ close(CRT) or die "Couldn't close $crt.~: $!";
+ }
+ open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
+ print TMP $pem;
+ close(TMP) or die "Couldn't close openssl pipe: $!";
+ if (!$stdout) {
+ open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
+ }
+ }
+ $pipe = "|$openssl x509 -text -inform PEM";
+ if (!$stdout) {
+ $pipe .= " >> $crt.~";
+ close(CRT) or die "Couldn't close $crt.~: $!";
+ }
+ open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
+ print TMP $pem;
+ close(TMP) or die "Couldn't close openssl pipe: $!";
+ if (!$stdout) {
+ open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
+ }
+ }
+ report "Parsing: $caname" if ($opt_v);
+ $certnum ++;
+ $start_of_cert = 0;
+ }
+ undef @precert;
+ }
+
+}
+close(TXT) or die "Couldn't close $txt: $!\n";
+close(CRT) or die "Couldn't close $crt.~: $!\n";
+unless( $stdout ) {
+ if ($opt_b && -e $crt) {
+ my $bk = 1;
+ while (-e "$crt.~${bk}~") {
+ $bk++;
+ }
+ rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n";
+ } elsif( -e $crt ) {
+ unlink( $crt ) or die "Failed to remove $crt: $!\n";
+ }
+ rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n";
+}
+if($opt_u && -e $txt && !unlink($txt)) {
+ report "Failed to remove $txt: $!\n";
+}
+report "Done ($certnum CA certs processed, $skipnum skipped).";
diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake
new file mode 100644
index 000000000..072c4b7cb
--- /dev/null
+++ b/ports/qca/portfile.cmake
@@ -0,0 +1,123 @@
+# This portfile adds the Qt Cryptographic Arcitecture
+# Changes to the original build:
+# No -qt5 suffix, which is recommended just for Linux
+# Output directories according to vcpkg
+# Updated certstore. See certstore.pem in the output dirs
+#
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(STATUS "Warning: Static building not supported yet. Building dynamic.")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+
+include(vcpkg_common_functions)
+
+find_program(GIT git)
+vcpkg_find_acquire_program(PERL)
+get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
+set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
+
+# Set git variables to qca version 2.2.0 commit
+set(GIT_URL "git://anongit.kde.org/qca.git")
+set(GIT_REF "19ec49f89a0a560590ec733c549b92e199792837") # Commit
+
+# Prepare source dir
+if(NOT EXISTS "${DOWNLOADS}/qca.git")
+ message(STATUS "Cloning")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/qca.git
+ WORKING_DIRECTORY ${DOWNLOADS}
+ LOGNAME clone
+ )
+endif()
+message(STATUS "Cloning done")
+
+if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
+ message(STATUS "Adding worktree")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF}
+ WORKING_DIRECTORY ${DOWNLOADS}/qca.git
+ LOGNAME worktree
+ )
+endif()
+message(STATUS "Adding worktree done")
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/)
+
+# Apply the patch to install to the expected folders
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-fix-path-for-vcpkg.patch
+)
+
+# According to:
+# https://www.openssl.org/docs/faq.html#USER16
+# it is up to developers or admins to maintain CAs.
+# So we do it here:
+message(STATUS "Importing certstore")
+file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem)
+# Using file(DOWNLOAD) to use https
+file(DOWNLOAD https://raw.githubusercontent.com/mozilla/gecko-dev/master/security/nss/lib/ckfw/builtins/certdata.txt
+ ${CMAKE_CURRENT_LIST_DIR}/certdata.txt
+ TLS_VERIFY ON
+)
+vcpkg_execute_required_process(
+ COMMAND ${PERL} ${CMAKE_CURRENT_LIST_DIR}/mk-ca-bundle.pl -n ${SOURCE_PATH}/certs/rootcerts.pem
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
+ LOGNAME ca-bundle
+)
+message(STATUS "Importing certstore done")
+
+# Configure and build
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ CURRENT_PACKAGES_DIR ${CURRENT_PACKAGES_DIR}
+ OPTIONS
+ -DBUILD_SHARED_LIBS=ON
+ -DUSE_RELATIVE_PATHS=ON
+ -DQT4_BUILD=OFF
+ -DBUILD_TESTS=OFF
+ -DBUILD_TOOLS=OFF
+ -DQCA_SUFFIX=OFF
+ -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features
+ OPTIONS_DEBUG
+ -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca
+ OPTIONS_RELEASE
+ -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca
+)
+
+vcpkg_install_cmake()
+
+# Patch and copy cmake files
+message(STATUS "Patching files")
+file(READ
+ ${CURRENT_PACKAGES_DIR}/debug/share/qca/cmake/QcaTargets-debug.cmake
+ QCA_DEBUG_CONFIG
+)
+string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" QCA_DEBUG_CONFIG "${QCA_DEBUG_CONFIG}")
+file(WRITE
+ ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets-debug.cmake
+ "${QCA_DEBUG_CONFIG}"
+)
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake
+ QCA_TARGET_CONFIG
+)
+string(REPLACE "packages/qca_" "installed/" QCA_TARGET_CONFIG "${QCA_TARGET_CONFIG}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake
+ "${QCA_TARGET_CONFIG}"
+)
+
+# Remove unneeded dirs
+file(REMOVE_RECURSE
+ ${CURRENT_BUILDTREES_DIR}/share/man
+ ${CURRENT_PACKAGES_DIR}/share/man
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/share
+)
+message(STATUS "Patching files done")
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/qca/COPYING ${CURRENT_PACKAGES_DIR}/share/qca/copyright)
diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL
index e38a2c835..40bde5f2a 100644
--- a/ports/qt5/CONTROL
+++ b/ports/qt5/CONTROL
@@ -1,4 +1,4 @@
Source: qt5
-Version: 5.7-1
+Version: 5.7.1-2
Description: Qt5 application framework main components. Webengine, examples and tests not included.
-Build-Depends: sqlite3, libpq \ No newline at end of file
+Build-Depends: sqlite3, libpq
diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake
index 3cc3a17bb..adcec1c8b 100644
--- a/ports/qt5/portfile.cmake
+++ b/ports/qt5/portfile.cmake
@@ -1,6 +1,6 @@
include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.0)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.1)
set(OUTPUT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
set(ENV{QTDIR} ${OUTPUT_PATH}/qtbase)
set(ENV{PATH} "${OUTPUT_PATH}/qtbase/bin;$ENV{PATH}")
@@ -16,13 +16,13 @@ set(ENV{PATH} "${JOM_EXE_PATH};${PYTHON3_EXE_PATH};${PERL_EXE_PATH};$ENV{PATH}")
set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}")
set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}")
vcpkg_download_distfile(ARCHIVE_FILE
- URLS "http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.7z"
- FILENAME "qt-5.7.0.7z"
- SHA512 96f0b6bd221be0ed819bc9b52eefcee1774945e25b89169fa927148c1c4a2d85faf63b1d09ef5067573bda9bbf1270fce5f181d086bfe585ddbad4cd77f7f418
+ URLS "http://download.qt.io/official_releases/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.7z"
+ FILENAME "qt-5.7.1.7z"
+ SHA512 3ffcf490a1c0107a05113aebbf70015c50d05fbb35439273c243133ddb146d51aacae15ecd6411d563cc8cfe103df896394c365a69bc48fc86c3bce6a1af3107
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.0)
- file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.0 ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.0)
+if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.1)
+ file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.1 ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.1)
endif()
file(MAKE_DIRECTORY ${OUTPUT_PATH})
@@ -47,6 +47,10 @@ vcpkg_execute_required_process(
-debug-and-release -force-debug-info ${QT_RUNTIME_LINKAGE}
-qt-zlib
-qt-libjpeg
+ -no-libpng
+ -no-freetype
+ -qt-pcre
+ -no-harfbuzz
-system-sqlite
-nomake examples -nomake tests -skip webengine
-qt-sql-sqlite -qt-sql-psql
@@ -117,7 +121,9 @@ file(REMOVE ${DEBUG_LIB_FILES})
file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.prl")
file(REMOVE ${DEBUG_LIB_FILES})
file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.pdb")
-file(REMOVE ${DEBUG_LIB_FILES})
+if(DEBUG_LIB_FILES)
+ file(REMOVE ${DEBUG_LIB_FILES})
+endif()
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.lib ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.prl ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.prl)
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
diff --git a/ports/ragel/portfile.cmake b/ports/ragel/portfile.cmake
index 8568f6bac..c240fdefd 100644
--- a/ports/ragel/portfile.cmake
+++ b/ports/ragel/portfile.cmake
@@ -36,5 +36,5 @@ vcpkg_install_cmake()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/ragel.txt)
# Handle copyright
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/ragel-6.9/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ragel/COPYING ${CURRENT_PACKAGES_DIR}/share/ragel/copyright)
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index 7f10c1954..c0d747691 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,3 +1,3 @@
Source: sdl2
-Version: 2.0.5
-Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. \ No newline at end of file
+Version: 2.0.5-2
+Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
diff --git a/ports/sdl2/dont-ignore-default-libs.patch b/ports/sdl2/dont-ignore-default-libs.patch
new file mode 100644
index 000000000..c9f4c6079
--- /dev/null
+++ b/ports/sdl2/dont-ignore-default-libs.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 54a23f0..91c5736 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1549,7 +1549,7 @@ if(SDL_SHARED)
+ SOVERSION ${LT_REVISION}
+ OUTPUT_NAME "SDL2")
+ endif()
+- if(MSVC)
++ if(MSVC AND NOT LIBC)
+ # Don't try to link with the default set of libraries.
+ set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
+ set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
+@@ -1564,7 +1564,7 @@ if(SDL_STATIC)
+ add_library(SDL2-static STATIC ${SOURCE_FILES})
+ set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
+ set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC})
+- if(MSVC)
++ if(MSVC AND NOT LIBC)
+ set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
+ set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
+ set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 6fcb94c8b..185e39665 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -1,7 +1,3 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported yet. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
-endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.5)
vcpkg_download_distfile(ARCHIVE_FILE
@@ -11,7 +7,13 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch
+)
+
+if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj
)
@@ -32,10 +34,26 @@ if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(RENAME ${CURRENT_PACKAGES_DIR}/include/include ${CURRENT_PACKAGES_DIR}/include/SDL2)
else()
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(SDL_STATIC_LIB ON)
+ set(SDL_SHARED_LIB OFF)
+ else()
+ set(SDL_STATIC_LIB OFF)
+ set(SDL_SHARED_LIB ON)
+ endif()
+ if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(SDL_STATIC_CRT ON)
+ else()
+ set(SDL_STATIC_CRT OFF)
+ endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
- -DSDL_STATIC=OFF
+ -DSDL_STATIC=${SDL_STATIC_LIB}
+ -DSDL_SHARED=${SDL_SHARED_LIB}
+ -DFORCE_STATIC_VCRT=${SDL_STATIC_CRT}
+ -DLIBC=ON
)
vcpkg_install_cmake()
@@ -43,5 +61,10 @@ else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
endif()
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib)
+
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
vcpkg_copy_pdbs()
diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt
new file mode 100644
index 000000000..e8e16edec
--- /dev/null
+++ b/ports/sfml/CMakeLists.txt
@@ -0,0 +1,122 @@
+cmake_minimum_required(VERSION 2.6)
+project(SFML)
+
+include_directories(${PROJECT_SOURCE_DIR}/include)
+include_directories(${PROJECT_SOURCE_DIR}/src)
+
+if(NOT BUILD_SHARED_LIBS)
+ add_definitions(-DSFML_STATIC)
+endif()
+add_definitions(-DUNICODE -D_UNICODE)
+add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
+
+# import SFML's 'sfml_add_library' macro and find_package utils
+
+set(VERSION_MAJOR 2)
+set(SFML_OS_WINDOWS ON)
+set(SFML_GENERATE_PDB ON)
+include(cmake/macros.cmake)
+set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/)
+
+# system module
+
+file(GLOB SFML_SYSTEM_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/SFML/System/*.cpp
+ ${PROJECT_SOURCE_DIR}/src/SFML/System/Win32/*cpp)
+
+sfml_add_library(sfml-system
+ SOURCES ${SFML_SYSTEM_SOURCES}
+ EXTERNAL_LIBS winmm)
+
+# window module
+
+file(GLOB SFML_WINDOW_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/SFML/Window/*.cpp
+ ${PROJECT_SOURCE_DIR}/src/SFML/Window/Win32/*cpp)
+
+list(REMOVE_ITEM SFML_WINDOW_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/SFML/Window/EGLCheck.cpp
+ ${PROJECT_SOURCE_DIR}/src/SFML/Window/EglContext.cpp)
+
+sfml_add_library(sfml-window
+ SOURCES ${SFML_WINDOW_SOURCES}
+ DEPENDS sfml-system
+ EXTERNAL_LIBS winmm gdi32 opengl32)
+
+# network module
+
+file(GLOB SFML_NETWORK_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/SFML/Network/*.cpp
+ ${PROJECT_SOURCE_DIR}/src/SFML/Network/Win32/*cpp)
+
+sfml_add_library(sfml-network
+ SOURCES ${SFML_NETWORK_SOURCES}
+ DEPENDS sfml-system
+ EXTERNAL_LIBS ws2_32)
+
+# audio module
+
+file(GLOB SFML_AUDIO_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/SFML/Audio/*.cpp)
+
+find_package(OpenAL REQUIRED)
+find_package(Vorbis REQUIRED)
+find_package(FLAC REQUIRED)
+
+sfml_add_library(sfml-audio
+ SOURCES ${SFML_AUDIO_SOURCES}
+ DEPENDS sfml-system
+ EXTERNAL_LIBS ${OPENAL_LIBRARY} ${VORBIS_LIBRARIES} ${FLAC_LIBRARY})
+
+target_include_directories(sfml-audio SYSTEM PRIVATE ${OPENAL_INCLUDE_DIR})
+target_include_directories(sfml-audio SYSTEM PRIVATE ${VORBIS_INCLUDE_DIRS})
+target_include_directories(sfml-audio SYSTEM PRIVATE ${FLAC_INCLUDE_DIR})
+
+# graphics module
+
+file(GLOB SFML_GRAPHICS_SOURCES
+ ${PROJECT_SOURCE_DIR}/src/SFML/Graphics/*.cpp)
+
+find_package(JPEG REQUIRED)
+find_package(Freetype REQUIRED) # fails to find debug lib
+if(CMAKE_BUILD_TYPE MATCHES Debug)
+ find_library(FREETYPE_DEBUG_LIBRARY freetyped)
+ set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_DEBUG_LIBRARY})
+else()
+ set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_LIBRARY})
+endif()
+find_path(STB_HEADERS stb_image.h)
+
+sfml_add_library(sfml-graphics
+ SOURCES ${SFML_GRAPHICS_SOURCES}
+ DEPENDS sfml-system sfml-window
+ EXTERNAL_LIBS ${FREETYPE_ACTUAL_LIBRARY} ${JPEG_LIBRARY} opengl32)
+
+target_include_directories(sfml-graphics SYSTEM PRIVATE ${STB_HEADERS})
+target_include_directories(sfml-graphics SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS})
+target_include_directories(sfml-graphics SYSTEM PRIVATE ${JPEG_INCLUDE_DIR})
+set_target_properties(sfml-graphics PROPERTIES COMPILE_FLAGS -DSTBI_FAILURE_USERMSG)
+
+# main module
+
+add_library(sfml-main STATIC ${PROJECT_SOURCE_DIR}/src/SFML/Main/MainWin32.cpp)
+set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d)
+install(TARGETS sfml-main ARCHIVE DESTINATION lib)
+
+# headers
+
+if(NOT DEFINED SFML_SKIP_HEADERS)
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include)
+endif()
+
+# log linked libraries
+
+message(STATUS "Link-time dependencies:")
+message(STATUS " " ${VORBIS_LIBRARY})
+message(STATUS " " ${VORBISFILE_LIBRARY})
+message(STATUS " " ${VORBISENC_LIBRARY})
+message(STATUS " " ${OGG_LIBRARY})
+message(STATUS " " ${OPENAL_LIBRARY})
+message(STATUS " " ${FLAC_LIBRARY})
+message(STATUS " " ${FREETYPE_ACTUAL_LIBRARY})
+message(STATUS " " ${JPEG_LIBRARY})
diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL
new file mode 100644
index 000000000..175aaa0ab
--- /dev/null
+++ b/ports/sfml/CONTROL
@@ -0,0 +1,4 @@
+Source: sfml
+Version: 2.4.1
+Description: Simple and fast multimedia library
+Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb
diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake
new file mode 100644
index 000000000..916b033ef
--- /dev/null
+++ b/ports/sfml/portfile.cmake
@@ -0,0 +1,34 @@
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SFML-2.4.1)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.sfml-dev.org/files/SFML-2.4.1-sources.zip"
+ FILENAME "SFML-2.4.1-sources.zip"
+ SHA512 e2a49927e1db6ab94fa52b88460782fa2b28ccd4a8c75793e10c7669b24736f63aab723c2e1d8befc96f6f5cf4ed185f13da2550da721d206780003f158e5507)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DSFML_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+# don't force users to define SFML_STATIC while using static library
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(APPEND ${CURRENT_PACKAGES_DIR}/include/SFML/Config.hpp "#undef SFML_API_IMPORT\n#define SFML_API_IMPORT\n")
+endif()
+
+# move sfml-main to manual link dir
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib)
+
+file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/sfml/license.txt ${CURRENT_PACKAGES_DIR}/share/sfml/copyright)
diff --git a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch
new file mode 100644
index 000000000..41cc81220
--- /dev/null
+++ b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch
@@ -0,0 +1,30 @@
+From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001
+From: vlj <vljn.ovi@gmail.com>
+Date: Fri, 2 Dec 2016 16:36:25 +0100
+Subject: [PATCH] Do not generate build-version.inc
+
+---
+ CMakeLists.txt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4c2fac..5544a2d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,8 +53,8 @@ add_subdirectory(libshaderc)
+ add_subdirectory(glslc)
+ add_subdirectory(examples)
+
+-add_custom_target(build-version
+- ${PYTHON_EXE}
+- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
+- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
+- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
++#add_custom_target(build-version
++# ${PYTHON_EXE}
++# ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
++# ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
++# COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
+--
+2.10.2.windows.1
+
diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt
new file mode 100644
index 000000000..3dc7be973
--- /dev/null
+++ b/ports/shaderc/CMakeLists.txt
@@ -0,0 +1,29 @@
+option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
+if(NOT ${SUFFIX_D})
+ find_library(GLSLANG glslang)
+ find_library(OSDEPENDENT OSDependent)
+ find_library(OGLCOMPILER OGLCompiler)
+ find_library(HLSLLIB HLSL)
+ find_library(SPIRVLIB SPIRV)
+ELSE()
+ find_library(GLSLANG glslangd)
+ find_library(OSDEPENDENT OSDependentd)
+ find_library(OGLCOMPILER OGLCompilerd)
+ find_library(HLSLLIB HLSLd)
+ find_library(SPIRVLIB SPIRVd)
+ENDIF()
+
+add_library(glslang STATIC IMPORTED GLOBAL)
+set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}")
+
+add_library(OSDependent STATIC IMPORTED GLOBAL)
+set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}")
+
+add_library(OGLCompiler STATIC IMPORTED GLOBAL)
+set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}")
+
+add_library(HLSL STATIC IMPORTED GLOBAL)
+set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}")
+
+add_library(SPIRV STATIC IMPORTED GLOBAL)
+set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}")
diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/CMakeLists_spirv.txt
new file mode 100644
index 000000000..6aa738b1f
--- /dev/null
+++ b/ports/shaderc/CMakeLists_spirv.txt
@@ -0,0 +1,14 @@
+option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
+if(NOT ${SUFFIX_D})
+ find_library(SPIRVTOOLSOPT spirv-tools-opt)
+ find_library(SPIRVTOOLS spirv-tools)
+ELSE()
+ find_library(SPIRVTOOLSOPT spirv-tools-opt)
+ find_library(SPIRVTOOLS spirv-tools)
+ENDIF()
+
+add_library(SPIRV-Tools-opt STATIC IMPORTED GLOBAL)
+set_property(TARGET SPIRV-Tools-opt PROPERTY IMPORTED_LOCATION "${SPIRVTOOLSOPT}")
+
+add_library(SPIRV-Tools STATIC IMPORTED GLOBAL)
+set_property(TARGET SPIRV-Tools PROPERTY IMPORTED_LOCATION "${SPIRVTOOLS}") \ No newline at end of file
diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL
new file mode 100644
index 000000000..6cab280a6
--- /dev/null
+++ b/ports/shaderc/CONTROL
@@ -0,0 +1,4 @@
+Source: shaderc
+Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958
+Description: A collection of tools, libraries and tests for shader compilation.
+Build-Depends: glslang, spirv-tools
diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc
new file mode 100644
index 000000000..853e89916
--- /dev/null
+++ b/ports/shaderc/build-version.inc
@@ -0,0 +1,3 @@
+"shaderc v2016.2-dev unknown hash, 2016-12-02\n"
+"spirv-tools v2016.6-dev unknown hash, 2016-12-02\n"
+"glslang unknown hash, 2016-12-02\n"
diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake
new file mode 100644
index 000000000..eb17aa827
--- /dev/null
+++ b/ports/shaderc/portfile.cmake
@@ -0,0 +1,79 @@
+# 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(vcpkg_common_functions)
+find_program(GIT git)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
+
+set(SHADERC_GIT_URL "https://github.com/google/shaderc.git")
+set(SHADERC_GIT_REF "2df47b51d83ad83cbc2e7f8ff2b56776293e8958")
+if(NOT EXISTS "${DOWNLOADS}/shaderc.git")
+ message(STATUS "Cloning")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} clone --bare ${SHADERC_GIT_URL} ${DOWNLOADS}/shaderc.git
+ WORKING_DIRECTORY ${DOWNLOADS}
+ LOGNAME clone
+ )
+endif()
+if(NOT EXISTS "${SOURCE_PATH}/.git")
+ message(STATUS "Adding worktree and patching")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${SHADERC_GIT_REF}
+ WORKING_DIRECTORY ${DOWNLOADS}/shaderc.git
+ LOGNAME worktree
+ )
+ message(STATUS "Patching")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.patch --ignore-whitespace --whitespace=fix
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME patch
+ )
+endif()
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools)
+file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src)
+
+#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work
+set(VCPKG_LIBRARY_LINKAGE "static")
+set(OPTIONS)
+if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
+ list(APPEND OPTIONS -DSHADERC_ENABLE_SHARED_CRT=ON)
+endif()
+
+# shaderc uses python to manipulate copyright information
+vcpkg_find_acquire_program(PYTHON3)
+get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
+set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS}
+ OPTIONS_DEBUG -DSUFFIX_D=true
+ OPTIONS_RELEASE -DSUFFIX_D=false
+)
+
+vcpkg_install_cmake()
+
+file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+
+#Safe to remove as libs are static
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+
+
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/shaderc.txt)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/shaderc/LICENSE ${CURRENT_PACKAGES_DIR}/share/shaderc/copyright)
diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt
new file mode 100644
index 000000000..9f061cfb8
--- /dev/null
+++ b/ports/smpeg2/CMakeLists.txt
@@ -0,0 +1,57 @@
+cmake_minimum_required(VERSION 2.6)
+project(SMPEG2)
+
+find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
+find_library(SDL_LIBRARY SDL2)
+
+include_directories(${SDL_INCLUDE_DIR})
+include_directories(${SDL_INCLUDE_DIR}/SDL2)
+include_directories(${CMAKE_SOURCE_DIR})
+
+add_definitions(-DNOCONTROLS -DTHREADED_AUDIO)
+
+# some c++ code just assumes memset is available
+file(WRITE ${CMAKE_SOURCE_DIR}/declare_memset.h "#include <string.h>\n")
+add_definitions(-FIdeclare_memset.h)
+
+add_library(smpeg2
+ audio/bitwindow.cpp
+ audio/filter.cpp
+ audio/filter_2.cpp
+ audio/hufftable.cpp
+ audio/mpeglayer1.cpp
+ audio/mpeglayer2.cpp
+ audio/mpeglayer3.cpp
+ audio/mpegtable.cpp
+ audio/mpegtoraw.cpp
+ audio/MPEGaudio.cpp
+ video/decoders.cpp
+ video/floatdct.cpp
+ video/gdith.cpp
+ video/jrevdct.cpp
+ video/motionvec.cpp
+ video/parseblock.cpp
+ video/readfile.cpp
+ video/util.cpp
+ video/video.cpp
+ video/MPEGvideo.cpp
+ MPEG.cpp
+ MPEGlist.cpp
+ MPEGring.cpp
+ MPEGstream.cpp
+ MPEGsystem.cpp
+ smpeg.cpp)
+
+target_link_libraries(smpeg2 ${SDL_LIBRARY})
+
+install(TARGETS smpeg2
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+if(NOT DEFINED SMPEG_SKIP_HEADERS)
+ install(FILES smpeg.h MPEGframe.h DESTINATION include)
+endif()
+
+message(STATUS "Link-time dependencies:")
+message(STATUS " " ${SDL_LIBRARY})
diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL
new file mode 100644
index 000000000..8465a6446
--- /dev/null
+++ b/ports/smpeg2/CONTROL
@@ -0,0 +1,4 @@
+Source: smpeg2
+Version: 2.0.0
+Description: SDL MPEG Player Library
+Build-Depends: sdl2
diff --git a/ports/smpeg2/correct-sdl-headers-dir.patch b/ports/smpeg2/correct-sdl-headers-dir.patch
new file mode 100644
index 000000000..601b6c8a8
--- /dev/null
+++ b/ports/smpeg2/correct-sdl-headers-dir.patch
@@ -0,0 +1,17 @@
+diff --git a/smpeg.h b/smpeg.h
+index 6bc2dbd..d12c8f8 100644
+--- a/smpeg.h
++++ b/smpeg.h
+@@ -22,9 +22,9 @@
+ #ifndef _SMPEG_H_
+ #define _SMPEG_H_
+
+-#include "SDL.h"
+-#include "SDL_mutex.h"
+-#include "SDL_audio.h"
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_mutex.h"
++#include "SDL2/SDL_audio.h"
+ #include "MPEGframe.h"
+
+ #ifdef __cplusplus
diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake
new file mode 100644
index 000000000..43e6e623e
--- /dev/null
+++ b/ports/smpeg2/portfile.cmake
@@ -0,0 +1,27 @@
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/smpeg2-2.0.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz"
+ FILENAME "smpeg2-2.0.0.tar.gz"
+ SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/correct-sdl-headers-dir.patch)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DSMPEG_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/smpeg2)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/smpeg2/COPYING ${CURRENT_PACKAGES_DIR}/share/smpeg2/copyright)
diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL
new file mode 100644
index 000000000..0e1a82706
--- /dev/null
+++ b/ports/spirv-tools/CONTROL
@@ -0,0 +1,3 @@
+Source: spirv-tools
+Version:
+Description:
diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake
new file mode 100644
index 000000000..c9bb5f85f
--- /dev/null
+++ b/ports/spirv-tools/portfile.cmake
@@ -0,0 +1,78 @@
+# 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(vcpkg_common_functions)
+find_program(GIT git)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
+
+set(GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git")
+set(GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40")
+
+if(NOT EXISTS "${DOWNLOADS}/spirv-tools.git")
+ message(STATUS "Cloning")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/spirv-tools.git
+ WORKING_DIRECTORY ${DOWNLOADS}
+ LOGNAME clone
+ )
+endif()
+
+if(NOT EXISTS "${SOURCE_PATH}/.git")
+ message(STATUS "Adding worktree and patching")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF}
+ WORKING_DIRECTORY ${DOWNLOADS}/spirv-tools.git
+ LOGNAME worktree
+ )
+ message(STATUS "Patching")
+endif()
+
+set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git")
+set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c")
+
+if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git")
+ message(STATUS "Cloning")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git
+ WORKING_DIRECTORY ${DOWNLOADS}
+ LOGNAME clone
+ )
+endif()
+
+if(NOT EXISTS "${SOURCE_PATH}/external/spirv-headers/.git")
+ message(STATUS "Adding worktree and patching")
+ file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/external/spirv-headers ${SPIRVHEADERS_GIT_REF}
+ WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git
+ LOGNAME worktree
+ )
+endif()
+
+set(VCPKG_LIBRARY_LINKAGE "static")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+file(REMOVE ${EXES})
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-tools)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-tools/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-tools/copyright)
diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt
index 760684493..dbe636b79 100644
--- a/ports/sqlite3/CMakeLists.txt
+++ b/ports/sqlite3/CMakeLists.txt
@@ -17,7 +17,8 @@ target_compile_definitions(sqlite3 PRIVATE
-DSQLITE_ENABLE_UNLOCK_NOTIFY
)
target_include_directories(sqlite3 INTERFACE $<INSTALL_INTERFACE:include>)
-if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
+
+if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1)
endif()
diff --git a/ports/uwebsockets/0001_cmake.patch b/ports/uwebsockets/0001_cmake.patch
new file mode 100644
index 000000000..f4004a5bb
--- /dev/null
+++ b/ports/uwebsockets/0001_cmake.patch
@@ -0,0 +1,40 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1fadf72..6ee984d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,7 +18,11 @@ if(NOT LIBUV_INCLUDE_DIR)
+ find_path(LIBUV_INCLUDE_DIR uv.h)
+ endif()
+ if(NOT LIBUV_LIBRARY)
+- find_library(LIBUV_LIBRARY NAMES uv uv1)
++ if(WIN32)
++ find_library(LIBUV_LIBRARY NAMES libuv)
++ else()
++ find_library(LIBUV_LIBRARY NAMES uv uv1)
++ endif()
+ endif()
+
+ add_library(uWS src/Extensions.cpp src/Group.cpp src/WebSocketImpl.cpp src/Networking.cpp src/Hub.cpp src/Node.cpp src/WebSocket.cpp src/HTTPSocket.cpp src/Socket.cpp)
+@@ -38,4 +42,20 @@ install (TARGETS uWS DESTINATION /usr/lib64)
+ install (FILES src/Extensions.h src/WebSocketProtocol.h src/Networking.h src/WebSocket.h src/Hub.h src/Group.h src/Node.h src/Socket.h src/HTTPSocket.h src/uWS.h DESTINATION /usr/include/uWS)
+ endif (UNIX)
+
+-add_subdirectory(examples)
++#add_subdirectory(examples)
++
++if(WIN32)
++ target_link_libraries (uWS PUBLIC psapi.lib iphlpapi.lib userenv.lib)
++ install (FILES src/Extensions.h src/WebSocketProtocol.h src/Networking.h src/WebSocket.h src/Hub.h src/Group.h src/Node.h src/Socket.h src/HTTPSocket.h src/uWS.h DESTINATION include/uWS)
++
++ if(BUILD_SHARED_LIBS)
++ target_link_libraries (uWS PUBLIC ws2_32.lib)
++ endif()
++endif()
++
++install(
++ TARGETS uWS
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++)
+\ No newline at end of file \ No newline at end of file
diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL
new file mode 100644
index 000000000..840990004
--- /dev/null
+++ b/ports/uwebsockets/CONTROL
@@ -0,0 +1,4 @@
+Source: uwebsockets
+Version: 0.12.0
+Build-Depends: libuv, openssl, zlib
+Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js \ No newline at end of file
diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake
new file mode 100644
index 000000000..881f35086
--- /dev/null
+++ b/ports/uwebsockets/portfile.cmake
@@ -0,0 +1,26 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uwebsockets-0.12.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/uWebSockets/uWebSockets/archive/v0.12.0.zip"
+ FILENAME "uwebsockets-v0.12.0.zip"
+ SHA512 ea10682608d5f6c8b246f186dfc2f14f496858cc7e468880b96b111f10058daf529f1aa9662a851e21494dde9a4faadf2b9904483dac5350d0ca8736500cdda8
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uwebsockets)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/uwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/uwebsockets/copyright)
+vcpkg_copy_pdbs()
diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets
index 7782551c2..0c748c1d6 100644
--- a/scripts/buildsystems/msbuild/vcpkg.targets
+++ b/scripts/buildsystems/msbuild/vcpkg.targets
@@ -41,17 +41,17 @@
</ClCompile>
</ItemDefinitionGroup>
- <Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup" Condition="'$(VcpkgEnabled)' == 'true' and '$(OutputType)' == 'exe'">
+ <Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup;RegisterOutput" Condition="'$(VcpkgEnabled)' == 'true'">
<WriteLinesToFile
File="$(TLogLocation)$(ProjectName).write.1u.tlog"
Lines="^$(OutputPath)$(TargetName).$(OutputType);" Encoding="Unicode"/>
<Exec Condition="'$(VcpkgConfiguration)' == 'Debug'"
- Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(OutputPath)$(TargetName).$(OutputType)%22 %22$(VcpkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
+ Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" />
</Exec>
<Exec Condition="'$(VcpkgConfiguration)' == 'Release'"
- Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(OutputPath)$(TargetName).$(OutputType)%22 %22$(VcpkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
+ Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" />
</Exec>
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index 901e57368..179703172 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -4,11 +4,11 @@ function(vcpkg_configure_cmake)
if(_csc_GENERATOR)
set(GENERATOR ${_csc_GENERATOR})
- elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x86")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86")
set(GENERATOR "Visual Studio 14 2015")
- elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x64")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64")
set(GENERATOR "Visual Studio 14 2015 Win64")
- elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "arm")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm")
set(GENERATOR "Visual Studio 14 2015 ARM")
# elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND")
# set(GENERATOR "Ninja")
@@ -38,6 +38,9 @@ function(vcpkg_configure_cmake)
list(APPEND _csc_OPTIONS
"-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc"
"-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8"
+ "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
+ "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
+ "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON"
)
if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
list(APPEND _csc_OPTIONS_DEBUG
diff --git a/scripts/ports.cmake b/scripts/ports.cmake
index 762997491..4e28cbb67 100644
--- a/scripts/ports.cmake
+++ b/scripts/ports.cmake
@@ -33,7 +33,6 @@ endif()
if(CMD MATCHES "^BUILD$")
string(REGEX REPLACE "([^-]*)-([^-]*)" "\\1" TRIPLET_SYSTEM_ARCH ${TARGET_TRIPLET})
- string(REGEX REPLACE "([^-]*)-([^-]*)" "\\2" TRIPLET_SYSTEM_NAME ${TARGET_TRIPLET})
set(CMAKE_TRIPLET_FILE ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake)
if(NOT EXISTS ${CMAKE_TRIPLET_FILE})
diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt
index 7d83b8c7b..1c65f15d9 100644
--- a/toolsrc/VERSION.txt
+++ b/toolsrc/VERSION.txt
@@ -1 +1 @@
-"0.0.61" \ No newline at end of file
+"0.0.65" \ No newline at end of file
diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h
index 9f872385e..49811d521 100644
--- a/toolsrc/include/BuildInfo.h
+++ b/toolsrc/include/BuildInfo.h
@@ -104,7 +104,7 @@ namespace vcpkg { namespace PostBuildLint
OutdatedDynamicCrt() = delete;
- const std::regex crt_regex() const;
+ std::regex crt_regex() const;
const std::string& toString() const;
private:
diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/coff_file_reader.h
index 1a9a071ef..edf6910a5 100644
--- a/toolsrc/include/coff_file_reader.h
+++ b/toolsrc/include/coff_file_reader.h
@@ -15,7 +15,7 @@ namespace vcpkg {namespace COFFFileReader
std::vector<MachineType> machine_types;
};
- dll_info read_dll(const fs::path path);
+ dll_info read_dll(const fs::path& path);
- lib_info read_lib(const fs::path path);
+ lib_info read_lib(const fs::path& path);
}}
diff --git a/toolsrc/include/metrics.h b/toolsrc/include/metrics.h
index 52662cd97..a0f4fc61d 100644
--- a/toolsrc/include/metrics.h
+++ b/toolsrc/include/metrics.h
@@ -13,6 +13,7 @@ namespace vcpkg
void TrackProperty(const std::string& name, const std::string& value);
void TrackProperty(const std::string& name, const std::wstring& value);
bool GetCompiledMetricsEnabled();
+ std::wstring GetSQMUser();
void Upload(const std::string& payload);
void Flush();
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 8272929a7..fd427fd40 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -8,8 +8,8 @@ namespace vcpkg
extern const char*const INTEGRATE_COMMAND_HELPSTRING;
void print_usage();
- void print_example(const char* command_and_arguments);
- std::string create_example_string(const char* command_and_arguments);
+ void print_example(const std::string& command_and_arguments);
+ std::string create_example_string(const std::string& command_and_arguments);
void update_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths);
void build_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet);
diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h
index 8b320303d..6c9d0d365 100644
--- a/toolsrc/include/vcpkg_Files.h
+++ b/toolsrc/include/vcpkg_Files.h
@@ -10,9 +10,13 @@ namespace vcpkg {namespace Files
void check_is_directory(const fs::path& dirpath);
- bool has_invalid_chars_for_filesystem(const std::string s);
+ bool has_invalid_chars_for_filesystem(const std::string& s);
- expected<std::string> get_contents(const fs::path& file_path) noexcept;
+ expected<std::string> read_contents(const fs::path& file_path) noexcept;
+
+ expected<std::vector<std::string>> read_all_lines(const fs::path& file_path);
+
+ void write_all_lines(const fs::path& file_path, const std::vector<std::string>& lines);
fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename);
diff --git a/toolsrc/include/vcpkg_Input.h b/toolsrc/include/vcpkg_Input.h
index bbf3adfbf..5ce90e3b9 100644
--- a/toolsrc/include/vcpkg_Input.h
+++ b/toolsrc/include/vcpkg_Input.h
@@ -5,9 +5,9 @@
namespace vcpkg {namespace Input
{
- package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const char* example_text);
+ package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const std::string& example_text);
- std::vector<package_spec> check_and_get_package_specs(const std::vector<std::string>& package_specs_as_strings, const triplet& default_target_triplet, const char* example_text);
+ std::vector<package_spec> check_and_get_package_specs(const std::vector<std::string>& package_specs_as_strings, const triplet& default_target_triplet, const std::string& example_text);
void check_triplet(const triplet& t, const vcpkg_paths& paths);
diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h
index 859da5658..a117a1a81 100644
--- a/toolsrc/include/vcpkg_Strings.h
+++ b/toolsrc/include/vcpkg_Strings.h
@@ -69,4 +69,10 @@ namespace vcpkg {namespace Strings
std::string ascii_to_lowercase(const std::string& input);
std::string join(const std::vector<std::string>& v, const std::string& delimiter);
+
+ void trim(std::string* s);
+
+ std::string trimmed(const std::string& s);
+
+ void trim_all_and_remove_whitespace_strings(std::vector<std::string>* strings);
}}
diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h
index e059bde0a..1101c9b27 100644
--- a/toolsrc/include/vcpkg_System.h
+++ b/toolsrc/include/vcpkg_System.h
@@ -36,8 +36,28 @@ namespace vcpkg {namespace System
void print(const char* message);
void println(const char* message);
- void print(color c, const char* message);
- void println(color c, const char* message);
+ void print(const color c, const char* message);
+ void println(const color c, const char* message);
+
+ inline void print(const std::string& message)
+ {
+ return print(message.c_str());
+ }
+
+ inline void println(const std::string& message)
+ {
+ return println(message.c_str());
+ }
+
+ inline void print(const color c, const std::string& message)
+ {
+ return print(c, message.c_str());
+ }
+
+ inline void println(const color c, const std::string& message)
+ {
+ return println(c, message.c_str());
+ }
template <class...Args>
void print(const char* messageTemplate, const Args&... messageArgs)
@@ -46,7 +66,7 @@ namespace vcpkg {namespace System
}
template <class...Args>
- void print(color c, const char* messageTemplate, const Args&... messageArgs)
+ void print(const color c, const char* messageTemplate, const Args&... messageArgs)
{
return print(c, Strings::format(messageTemplate, messageArgs...).c_str());
}
@@ -58,7 +78,7 @@ namespace vcpkg {namespace System
}
template <class...Args>
- void println(color c, const char* messageTemplate, const Args&... messageArgs)
+ void println(const color c, const char* messageTemplate, const Args&... messageArgs)
{
return println(c, Strings::format(messageTemplate, messageArgs...).c_str());
}
diff --git a/toolsrc/include/vcpkg_cmd_arguments.h b/toolsrc/include/vcpkg_cmd_arguments.h
index 95feb4814..2194e6d2c 100644
--- a/toolsrc/include/vcpkg_cmd_arguments.h
+++ b/toolsrc/include/vcpkg_cmd_arguments.h
@@ -24,11 +24,11 @@ namespace vcpkg
std::unordered_set<std::string> check_and_get_optional_command_arguments(const std::vector<std::string>& valid_options) const;
void check_max_arg_count(const size_t expected_arg_count) const;
- void check_max_arg_count(const size_t expected_arg_count, const char* example_text) const;
+ void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const;
void check_min_arg_count(const size_t expected_arg_count) const;
- void check_min_arg_count(const size_t expected_arg_count, const char* example_text) const;
+ void check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const;
void check_exact_arg_count(const size_t expected_arg_count) const;
- void check_exact_arg_count(const size_t expected_arg_count, const char* example_text) const;
+ void check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const;
private:
std::unordered_set<std::string> optional_command_arguments;
diff --git a/toolsrc/src/BuildInfo.cpp b/toolsrc/src/BuildInfo.cpp
index ddd44a1e6..f151a3ea5 100644
--- a/toolsrc/src/BuildInfo.cpp
+++ b/toolsrc/src/BuildInfo.cpp
@@ -151,7 +151,7 @@ namespace vcpkg { namespace PostBuildLint
const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT20_DLL = OutdatedDynamicCrt("msvcrt20.dll", R"(msvcrt20\.dll)");;
const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT40_DLL = OutdatedDynamicCrt("msvcrt40.dll", R"(msvcrt40\.dll)");;
- const std::regex OutdatedDynamicCrt::crt_regex() const
+ std::regex OutdatedDynamicCrt::crt_regex() const
{
const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
return r;
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp
index 5efa9a7b3..823b4a85e 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/Paragraphs.cpp
@@ -153,7 +153,7 @@ namespace vcpkg { namespace Paragraphs
std::vector<std::unordered_map<std::string, std::string>> get_paragraphs(const fs::path& control_path)
{
- return parse_paragraphs(Files::get_contents(control_path).get_or_throw());
+ return parse_paragraphs(Files::read_contents(control_path).get_or_throw());
}
std::vector<std::unordered_map<std::string, std::string>> parse_paragraphs(const std::string& str)
diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp
index 3bf7922f5..1f30ea70b 100644
--- a/toolsrc/src/coff_file_reader.cpp
+++ b/toolsrc/src/coff_file_reader.cpp
@@ -223,7 +223,7 @@ namespace vcpkg { namespace COFFFileReader
verify_equal_strings(FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START");
}
- dll_info read_dll(const fs::path path)
+ dll_info read_dll(const fs::path& path)
{
std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate);
Checks::check_exit(fs.is_open(), "Could not open file %s for reading", path.generic_string());
@@ -260,7 +260,7 @@ namespace vcpkg { namespace COFFFileReader
fpos_t m_absolute_position = 0;
};
- lib_info read_lib(const fs::path path)
+ lib_info read_lib(const fs::path& path)
{
std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate);
Checks::check_exit(fs.is_open(), "Could not open file %s for reading", path.generic_string());
diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp
index 19c762caf..1a10b93cf 100644
--- a/toolsrc/src/commands_cache.cpp
+++ b/toolsrc/src/commands_cache.cpp
@@ -15,7 +15,7 @@ namespace vcpkg
try
{
- auto file_contents = Files::get_contents(path / "CONTROL");
+ auto file_contents = Files::read_contents(path / "CONTROL");
if (auto text = file_contents.get())
{
auto pghs = Paragraphs::parse_paragraphs(*text);
@@ -38,7 +38,7 @@ namespace vcpkg
{
static const std::string example = Strings::format(
"The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", create_example_string("cache png"));
- args.check_max_arg_count(1, example.c_str());
+ args.check_max_arg_count(1, example);
const std::vector<BinaryParagraph> binary_paragraphs = read_all_binary_paragraphs(paths);
if (binary_paragraphs.empty())
@@ -52,7 +52,7 @@ namespace vcpkg
for (const BinaryParagraph& binary_paragraph : binary_paragraphs)
{
const std::string displayname = binary_paragraph.displayname();
- System::println(displayname.c_str());
+ System::println(displayname);
}
}
else
@@ -66,7 +66,7 @@ namespace vcpkg
continue;
}
- System::println(displayname.c_str());
+ System::println(displayname);
}
}
diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp
index d1611eb5c..ad00cd676 100644
--- a/toolsrc/src/commands_create.cpp
+++ b/toolsrc/src/commands_create.cpp
@@ -9,8 +9,8 @@ namespace vcpkg
void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
static const std::string example = create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###");
- args.check_max_arg_count(3, example.c_str());
- args.check_min_arg_count(2, example.c_str());
+ args.check_max_arg_count(3, example);
+ args.check_min_arg_count(2, example);
const std::string port_name = args.command_arguments.at(0);
Environment::ensure_utilities_on_path(paths);
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp
index f07a15875..fbf4eab62 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/commands_edit.cpp
@@ -7,7 +7,7 @@ namespace vcpkg
void edit_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
static const std::string example = create_example_string("edit zlib");
- args.check_exact_arg_count(1, example.c_str());
+ args.check_exact_arg_count(1, example);
const std::string port_name = args.command_arguments.at(0);
const fs::path portpath = paths.ports / port_name;
diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp
index 17c191b78..0e3e8a77c 100644
--- a/toolsrc/src/commands_hash.cpp
+++ b/toolsrc/src/commands_hash.cpp
@@ -20,15 +20,15 @@ namespace vcpkg
auto hash = output.substr(start, end - start);
hash.erase(std::remove_if(hash.begin(), hash.end(), isspace), hash.end());
- System::println(hash.c_str());
+ System::println(hash);
}
void hash_command(const vcpkg_cmd_arguments& args)
{
static const std::string example = Strings::format(
"The argument should be a file path\n%s", create_example_string("hash boost_1_62_0.tar.bz2"));
- args.check_min_arg_count(1, example.c_str());
- args.check_max_arg_count(2, example.c_str());
+ args.check_min_arg_count(1, example);
+ args.check_max_arg_count(2, example);
if (args.command_arguments.size() == 1)
{
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp
index e5e731799..3832f0e7b 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/commands_import.cpp
@@ -78,7 +78,7 @@ namespace vcpkg
void import_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
static const std::string example = create_example_string(R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)");
- args.check_exact_arg_count(3, example.c_str());
+ args.check_exact_arg_count(3, example);
const fs::path control_file_path(args.command_arguments[0]);
const fs::path include_directory(args.command_arguments[1]);
diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp
index 1abd16796..8d940bc9d 100644
--- a/toolsrc/src/commands_installation.cpp
+++ b/toolsrc/src/commands_installation.cpp
@@ -69,16 +69,16 @@ namespace vcpkg
static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryParagraph& bpgh)
{
- std::fstream listfile(paths.listfile_path(bpgh), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
+ std::vector<std::string> output;
- auto package_prefix_path = paths.package_dir(bpgh.spec);
- auto prefix_length = package_prefix_path.native().size();
+ const fs::path package_prefix_path = paths.package_dir(bpgh.spec);
+ const size_t prefix_length = package_prefix_path.native().size();
const triplet& target_triplet = bpgh.spec.target_triplet();
const std::string& target_triplet_as_string = target_triplet.canonical_name();
std::error_code ec;
fs::create_directory(paths.installed / target_triplet_as_string, ec);
- listfile << target_triplet << "\n";
+ output.push_back(Strings::format(R"(%s)", target_triplet_as_string));
for (auto it = fs::recursive_directory_iterator(package_prefix_path); it != fs::recursive_directory_iterator(); ++it)
{
@@ -89,8 +89,8 @@ namespace vcpkg
continue;
}
- auto suffix = it->path().generic_u8string().substr(prefix_length + 1);
- auto target = paths.installed / target_triplet_as_string / suffix;
+ const std::string suffix = it->path().generic_u8string().substr(prefix_length + 1);
+ const fs::path target = paths.installed / target_triplet_as_string / suffix;
auto status = it->status(ec);
if (ec)
@@ -98,6 +98,7 @@ namespace vcpkg
System::println(System::color::error, "failed: %s: %s", it->path().u8string(), ec.message());
continue;
}
+
if (fs::is_directory(status))
{
fs::create_directory(target, ec);
@@ -106,26 +107,36 @@ namespace vcpkg
System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message());
}
- listfile << target_triplet << "/" << suffix << "\n";
+ // Trailing backslash for directories
+ output.push_back(Strings::format(R"(%s/%s)", target_triplet_as_string, suffix));
+ continue;
}
- else if (fs::is_regular_file(status))
+
+ if (fs::is_regular_file(status))
{
- fs::copy_file(*it, target, ec);
+ if (fs::exists(target))
+ {
+ System::println(System::color::warning, "File %s was already present and will be overwritten", target.u8string(), ec.message());
+ }
+ fs::copy_file(*it, target, fs::copy_options::overwrite_existing, ec);
if (ec)
{
System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message());
}
- listfile << target_triplet << "/" << suffix << "\n";
+ output.push_back(Strings::format(R"(%s/%s)", target_triplet_as_string, suffix));
+ continue;
}
- else if (!fs::status_known(status))
+
+ if (!fs::status_known(status))
{
System::println(System::color::error, "failed: %s: unknown status", it->path().u8string());
+ continue;
}
- else
- System::println(System::color::error, "failed: %s: cannot handle file type", it->path().u8string());
+
+ System::println(System::color::error, "failed: %s: cannot handle file type", it->path().u8string());
}
- listfile.close();
+ Files::write_all_lines(paths.listfile_path(bpgh), output);
}
static void remove_first_n_chars(std::vector<std::string>* strings, const size_t n)
@@ -161,7 +172,9 @@ namespace vcpkg
const size_t package_remove_char_count = package_dir.generic_string().size() + 1; // +1 for the slash
std::transform(package_file_paths.cbegin(), package_file_paths.cend(), std::back_inserter(package_files), [package_remove_char_count](const fs::path& path)
{
- return path.generic_string().erase(0, package_remove_char_count);
+ std::string as_string = path.generic_string();
+ as_string.erase(0, package_remove_char_count);
+ return std::move(as_string);
});
std::sort(package_files.begin(), package_files.end());
@@ -216,10 +229,10 @@ namespace vcpkg
void install_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
{
static const std::string example = create_example_string("install zlib zlib:x64-windows curl boost");
- args.check_min_arg_count(1, example.c_str());
+ args.check_min_arg_count(1, example);
StatusParagraphs status_db = database_load_check(paths);
- std::vector<package_spec> specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example.c_str());
+ std::vector<package_spec> specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example);
Input::check_triplets(specs, paths);
std::vector<package_spec_with_install_plan> install_plan = Dependencies::create_install_plan(paths, specs, status_db);
Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty");
@@ -276,11 +289,11 @@ namespace vcpkg
// Installing multiple packages leads to unintuitive behavior if one of them depends on another.
// Allowing only 1 package for now.
- args.check_exact_arg_count(1, example.c_str());
+ args.check_exact_arg_count(1, example);
StatusParagraphs status_db = database_load_check(paths);
- const package_spec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_target_triplet, example.c_str());
+ const package_spec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_target_triplet, example);
Input::check_triplet(spec.target_triplet(), paths);
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY});
@@ -332,7 +345,7 @@ namespace vcpkg
void build_external_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
{
static const std::string example = create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)");
- args.check_exact_arg_count(2, example.c_str());
+ args.check_exact_arg_count(2, example);
expected<package_spec> maybe_current_spec = package_spec::from_string(args.command_arguments[0], default_target_triplet);
if (auto spec = maybe_current_spec.get())
@@ -349,7 +362,7 @@ namespace vcpkg
}
System::println(System::color::error, "Error: %s: %s", maybe_current_spec.error_code().message(), args.command_arguments[0]);
- print_example(Strings::format("%s zlib:x64-windows", args.command).c_str());
+ print_example(Strings::format("%s zlib:x64-windows", args.command));
exit(EXIT_FAILURE);
}
}
diff --git a/toolsrc/src/commands_integration.cpp b/toolsrc/src/commands_integration.cpp
index cd303c649..e7e5b2d8d 100644
--- a/toolsrc/src/commands_integration.cpp
+++ b/toolsrc/src/commands_integration.cpp
@@ -173,7 +173,7 @@ namespace vcpkg
bool should_install_system = true;
if (fs::exists(system_wide_targets_file))
{
- auto system_wide_file_contents = Files::get_contents(system_wide_targets_file);
+ auto system_wide_file_contents = Files::read_contents(system_wide_targets_file);
if (auto contents_data = system_wide_file_contents.get())
{
std::regex re(R"###(<!-- version (\d+) -->)###");
@@ -297,7 +297,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
{
static const std::string example = Strings::format("Commands:\n"
"%s", INTEGRATE_COMMAND_HELPSTRING);
- args.check_exact_arg_count(1, example.c_str());
+ args.check_exact_arg_count(1, example);
if (args.command_arguments[0] == "install")
{
diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp
index 2d6b42008..cc51232e9 100644
--- a/toolsrc/src/commands_list.cpp
+++ b/toolsrc/src/commands_list.cpp
@@ -17,7 +17,7 @@ namespace vcpkg
{
static const std::string example = Strings::format(
"The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", create_example_string("list png"));
- args.check_max_arg_count(1, example.c_str());
+ args.check_max_arg_count(1, example);
const StatusParagraphs status_paragraphs = database_load_check(paths);
std::vector<StatusParagraph> installed_packages;
diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp
index 5f4128bb1..6df325100 100644
--- a/toolsrc/src/commands_other.cpp
+++ b/toolsrc/src/commands_other.cpp
@@ -41,16 +41,16 @@ namespace vcpkg
, INTEGRATE_COMMAND_HELPSTRING);
}
- std::string create_example_string(const char* command_and_arguments)
+ std::string create_example_string(const std::string& command_and_arguments)
{
std::string cs = Strings::format("Example:\n"
" vcpkg %s", command_and_arguments);
return cs;
}
- void print_example(const char* command_and_arguments)
+ void print_example(const std::string& command_and_arguments)
{
- System::println(create_example_string(command_and_arguments).c_str());
+ System::println(create_example_string(command_and_arguments));
}
void internal_test_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& /*paths*/)
@@ -74,6 +74,7 @@ namespace vcpkg
const std::vector<package_name_and_function<command_type_b>>& get_available_commands_type_b()
{
static std::vector<package_name_and_function<command_type_b>> t = {
+ {"/?", help_command},
{"help", help_command},
{"search", search_command},
{"list", list_command},
diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/commands_owns.cpp
index 45f073304..62dac57eb 100644
--- a/toolsrc/src/commands_owns.cpp
+++ b/toolsrc/src/commands_owns.cpp
@@ -24,7 +24,7 @@ namespace vcpkg
void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
static const std::string example = Strings::format("The argument should be a pattern to search for. %s", create_example_string("owns zlib.dll"));
- args.check_exact_arg_count(1, example.c_str());
+ args.check_exact_arg_count(1, example);
StatusParagraphs status_db = database_load_check(paths);
search_file(paths, args.command_arguments[0], status_db);
diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp
index b6b604e54..46c6c90c7 100644
--- a/toolsrc/src/commands_portsdiff.cpp
+++ b/toolsrc/src/commands_portsdiff.cpp
@@ -100,8 +100,8 @@ namespace vcpkg
void portsdiff_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
static const std::string example = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", create_example_string("portsdiff mybranchname"));
- args.check_min_arg_count(1, example.c_str());
- args.check_max_arg_count(2, example.c_str());
+ args.check_min_arg_count(1, example);
+ args.check_max_arg_count(2, example);
Environment::ensure_git_on_path(paths);
const std::wstring git_commit_id_for_previous_snapshot = Strings::utf8_to_utf16(args.command_arguments.at(0));
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp
index 31331fc2f..445213fc2 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/commands_remove.cpp
@@ -169,12 +169,12 @@ namespace vcpkg
void remove_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
{
static const std::string example = create_example_string("remove zlib zlib:x64-windows curl boost");
- args.check_min_arg_count(1, example.c_str());
+ args.check_min_arg_count(1, example);
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_PURGE});
auto status_db = database_load_check(paths);
- std::vector<package_spec> specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example.c_str());
+ std::vector<package_spec> specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example);
Input::check_triplets(specs, paths);
bool alsoRemoveFolderFromPackages = options.find(OPTION_PURGE) != options.end();
diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp
index a604c5383..a4714477e 100644
--- a/toolsrc/src/commands_search.cpp
+++ b/toolsrc/src/commands_search.cpp
@@ -43,7 +43,7 @@ namespace vcpkg
void search_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
static const std::string example = Strings::format("The argument should be a substring to search for, or no argument to display all libraries.\n%s", create_example_string("search png"));
- args.check_max_arg_count(1, example.c_str());
+ args.check_max_arg_count(1, example);
const std::vector<SourceParagraph> source_paragraphs = read_all_source_paragraphs(paths);
diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp
index 82e3b7e52..a4ab7c6e7 100644
--- a/toolsrc/src/commands_update.cpp
+++ b/toolsrc/src/commands_update.cpp
@@ -71,7 +71,7 @@ namespace vcpkg
System::println("\nTo update these packages, run\n vcpkg remove --purge <pkgs>...\n vcpkg install <pkgs>...");
}
- auto version_file = Files::get_contents(paths.root / "toolsrc" / "VERSION.txt");
+ auto version_file = Files::read_contents(paths.root / "toolsrc" / "VERSION.txt");
if (auto version_contents = version_file.get())
{
int maj1, min1, rev1;
diff --git a/toolsrc/src/main.cpp b/toolsrc/src/main.cpp
index f937be7f1..7703c541f 100644
--- a/toolsrc/src/main.cpp
+++ b/toolsrc/src/main.cpp
@@ -113,7 +113,7 @@ static void loadConfig()
try
{
- std::string config_contents = Files::get_contents(localappdata / "vcpkg" / "config").get_or_throw();
+ std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw();
std::unordered_map<std::string, std::string> keys;
auto pghs = Paragraphs::parse_paragraphs(config_contents);
@@ -197,6 +197,7 @@ int wmain(const int argc, const wchar_t* const* const argv)
const std::string trimmed_command_line = trim_path_from_command_line(Strings::utf16_to_utf8(GetCommandLineW()));
TrackProperty("cmdline", trimmed_command_line);
loadConfig();
+ TrackProperty("sqmuser", GetSQMUser());
const vcpkg_cmd_arguments args = vcpkg_cmd_arguments::create_from_command_line(argc, argv);
diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp
index 23962bcfe..51c7179c8 100644
--- a/toolsrc/src/metrics.cpp
+++ b/toolsrc/src/metrics.cpp
@@ -235,6 +235,40 @@ true
return DISABLE_METRICS == 0;
}
+ std::wstring GetSQMUser()
+ {
+ LONG err = NULL;
+
+ struct RAII_HKEY {
+ HKEY hkey = NULL;
+ ~RAII_HKEY()
+ {
+ if (hkey != NULL)
+ RegCloseKey(hkey);
+ }
+ } HKCU_SQMClient;
+
+ err = RegOpenKeyExW(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", NULL, KEY_READ, &HKCU_SQMClient.hkey);
+ if (err != ERROR_SUCCESS)
+ {
+ return L"{}";
+ }
+
+ std::array<wchar_t,128> buffer;
+ DWORD lType = 0;
+ DWORD dwBufferSize = static_cast<DWORD>(buffer.size() * sizeof(wchar_t));
+ err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", NULL, &lType, reinterpret_cast<LPBYTE>(buffer.data()), &dwBufferSize);
+ if (err == ERROR_SUCCESS && lType == REG_SZ && dwBufferSize >= sizeof(wchar_t))
+ {
+ size_t sz = dwBufferSize / sizeof(wchar_t);
+ if (buffer[sz - 1] == '\0')
+ --sz;
+ return std::wstring(buffer.begin(), buffer.begin() + sz);
+ }
+
+ return L"{}";
+ }
+
void SetUserInformation(const std::string& user_id, const std::string& first_use_time)
{
g_metricmessage.user_id = user_id;
diff --git a/toolsrc/src/post_build_lint.cpp b/toolsrc/src/post_build_lint.cpp
index 3043bd4fa..4f0adf677 100644
--- a/toolsrc/src/post_build_lint.cpp
+++ b/toolsrc/src/post_build_lint.cpp
@@ -507,7 +507,7 @@ namespace vcpkg { namespace PostBuildLint
static lint_status check_outdated_crt_linkage_of_dlls(const std::vector<fs::path>& dlls)
{
- const std::vector<OutdatedDynamicCrt> outdated_crts = OutdatedDynamicCrt::values();
+ const std::vector<OutdatedDynamicCrt>& outdated_crts = OutdatedDynamicCrt::values();
std::vector<OutdatedDynamicCrt_and_file> dlls_with_outdated_crt;
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index 88b05b0a9..4748aeb54 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -10,6 +10,7 @@
#include "vcpkg_Files.h"
#include "Paragraphs.h"
#include <regex>
+#include "metrics.h"
using namespace vcpkg;
@@ -26,7 +27,7 @@ static StatusParagraphs load_current_database(const fs::path& vcpkg_dir_status_f
fs::rename(vcpkg_dir_status_file_old, vcpkg_dir_status_file);
}
- auto text = Files::get_contents(vcpkg_dir_status_file).get_or_throw();
+ auto text = Files::read_contents(vcpkg_dir_status_file).get_or_throw();
auto pghs = Paragraphs::parse_paragraphs(text);
std::vector<std::unique_ptr<StatusParagraph>> status_pghs;
@@ -69,7 +70,7 @@ StatusParagraphs vcpkg::database_load_check(const vcpkg_paths& paths)
if (b->path().filename() == "incomplete")
continue;
- auto text = Files::get_contents(b->path()).get_or_throw();
+ auto text = Files::read_contents(b->path()).get_or_throw();
auto pghs = Paragraphs::parse_paragraphs(text);
for (auto&& p : pghs)
{
@@ -109,60 +110,102 @@ void vcpkg::write_update(const vcpkg_paths& paths, const StatusParagraph& p)
fs::rename(tmp_update_filename, update_filename);
}
-std::vector<StatusParagraph_and_associated_files> vcpkg::get_installed_files(const vcpkg_paths& paths, const StatusParagraphs& status_db)
+static void upgrade_to_slash_terminated_sorted_format(std::vector<std::string>* lines, const fs::path& listfile_path)
{
- static const std::string MARK_FOR_REMOVAL = "";
+ static bool was_tracked = false;
- std::vector<StatusParagraph_and_associated_files> installed_files;
+ if (lines->empty())
+ {
+ return;
+ }
- std::string line;
+ if (lines->at(0).back() == '/')
+ {
+ return; // File already in the new format
+ }
- for (const std::unique_ptr<StatusParagraph>& pgh : status_db)
+ if (!was_tracked)
{
- if (pgh->state != install_state_t::installed)
- {
- continue;
- }
+ was_tracked = true;
+ TrackProperty("listfile", "update to new format");
+ }
- std::fstream listfile(paths.listfile_path(pgh->package));
+ // The files are sorted such that directories are placed just before the files they contain
+ // (They are not necessarily sorted alphabetically, e.g. libflac)
+ // Therefore we can detect the entries that represent directories by comparing every element with the next one
+ // and checking if the next has a slash immediately after the current one's length
+ for (size_t i = 0; i < lines->size() - 1; i++)
+ {
+ std::string& current_string = lines->at(i);
+ const std::string& next_string = lines->at(i + 1);
- std::vector<std::string> installed_files_of_current_pgh;
- while (std::getline(listfile, line))
+ const size_t potential_slash_char_index = current_string.length();
+ // Make sure the index exists first
+ if (next_string.size() > potential_slash_char_index && next_string.at(potential_slash_char_index) == '/')
{
- if (line.empty())
- {
- continue;
- }
-
- installed_files_of_current_pgh.push_back(line);
+ current_string += '/'; // Mark as a directory
}
+ }
+
+ // After suffixing the directories with a slash, we can now sort.
+ // We cannot sort before adding the suffixes because the following (actual example):
+ /*
+ x86-windows/include/FLAC <<<<<< This would be separated from its group due to sorting
+ x86-windows/include/FLAC/all.h
+ x86-windows/include/FLAC/assert.h
+ x86-windows/include/FLAC/callback.h
+ x86-windows/include/FLAC++
+ x86-windows/include/FLAC++/all.h
+ x86-windows/include/FLAC++/decoder.h
+ x86-windows/include/FLAC++/encoder.h
+ *
+ x86-windows/include/FLAC/ <<<<<< This will now be kept with its group when sorting
+ x86-windows/include/FLAC/all.h
+ x86-windows/include/FLAC/assert.h
+ x86-windows/include/FLAC/callback.h
+ x86-windows/include/FLAC++/
+ x86-windows/include/FLAC++/all.h
+ x86-windows/include/FLAC++/decoder.h
+ x86-windows/include/FLAC++/encoder.h
+ */
+ // Note that after sorting, the FLAC++/ group will be placed before the FLAC/ group
+ // The new format is lexicographically sorted
+ std::sort(lines->begin(), lines->end());
+
+#if 0
+ // Replace the listfile on disk
+ const fs::path updated_listfile_path = listfile_path.generic_string() + "_updated";
+ Files::write_all_lines(updated_listfile_path, *lines);
+ fs::rename(updated_listfile_path, listfile_path);
+#endif
+}
- // Should already be sorted
- std::sort(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end());
+std::vector<StatusParagraph_and_associated_files> vcpkg::get_installed_files(const vcpkg_paths& paths, const StatusParagraphs& status_db)
+{
+ std::vector<StatusParagraph_and_associated_files> installed_files;
- // Since the files are sorted, we can detect the entries that represent directories
- // by comparing every element with the next one and checking if the next has a slash immediately after the current one's length
- for (int i = 1; i < installed_files_of_current_pgh.size(); i++)
+ for (const std::unique_ptr<StatusParagraph>& pgh : status_db)
+ {
+ if (pgh->state != install_state_t::installed)
{
- std::string& current_string = installed_files_of_current_pgh.at(i - 1);
- const std::string& next_string = installed_files_of_current_pgh.at(i);
-
- const size_t potential_slash_char_index = current_string.length();
- // Make sure the index exists first
- if (next_string.size() > potential_slash_char_index && next_string.at(potential_slash_char_index) == '/')
- {
- current_string = MARK_FOR_REMOVAL;
- }
+ continue;
}
- installed_files_of_current_pgh.erase(std::remove_if(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end(), [](const std::string& file)
- {
- return file == MARK_FOR_REMOVAL;
- }),
- installed_files_of_current_pgh.end());
-
- const StatusParagraph_and_associated_files pgh_and_files = {*pgh, std::move(installed_files_of_current_pgh)};
- installed_files.push_back(pgh_and_files);
+ const fs::path listfile_path = paths.listfile_path(pgh->package);
+ std::vector<std::string> installed_files_of_current_pgh = Files::read_all_lines(listfile_path).get_or_throw();
+ Strings::trim_all_and_remove_whitespace_strings(&installed_files_of_current_pgh);
+ upgrade_to_slash_terminated_sorted_format(&installed_files_of_current_pgh, listfile_path);
+
+ // Remove the directories
+ installed_files_of_current_pgh.erase(
+ std::remove_if(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end(), [](const std::string& file) -> bool
+ {
+ return file.back() == '/';
+ }
+ ), installed_files_of_current_pgh.end());
+
+ StatusParagraph_and_associated_files pgh_and_files = {*pgh, std::move(installed_files_of_current_pgh)};
+ installed_files.push_back(std::move(pgh_and_files));
}
return installed_files;
@@ -187,7 +230,7 @@ expected<BinaryParagraph> vcpkg::try_load_cached_package(const vcpkg_paths& path
{
const fs::path path = paths.package_dir(spec) / "CONTROL";
- auto control_contents_maybe = Files::get_contents(path);
+ auto control_contents_maybe = Files::read_contents(path);
if (auto control_contents = control_contents_maybe.get())
{
std::vector<std::unordered_map<std::string, std::string>> pghs;
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index 41172ba0f..ae7f697fa 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -58,7 +58,7 @@ namespace vcpkg { namespace Dependencies
expected<SourceParagraph> maybe_spgh = try_load_port(paths, spec.name());
SourceParagraph* spgh = maybe_spgh.get();
- Checks::check_exit(spgh != nullptr, "Cannot find package");
+ Checks::check_exit(spgh != nullptr, "Cannot find package %s", spec.name());
process_dependencies(filter_dependencies(spgh->depends, spec.target_triplet()));
was_examined.emplace(spec, install_plan_action{install_plan_type::BUILD_AND_INSTALL, nullptr, std::make_unique<SourceParagraph>(std::move(*spgh))});
}
diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp
index 698579736..48283e43f 100644
--- a/toolsrc/src/vcpkg_Files.cpp
+++ b/toolsrc/src/vcpkg_Files.cpp
@@ -9,15 +9,15 @@ namespace vcpkg {namespace Files
void check_is_directory(const fs::path& dirpath)
{
- Checks::check_throw(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
+ Checks::check_exit(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
}
- bool has_invalid_chars_for_filesystem(const std::string s)
+ bool has_invalid_chars_for_filesystem(const std::string& s)
{
return std::regex_search(s, FILESYSTEM_INVALID_CHARACTERS_REGEX);
}
- expected<std::string> get_contents(const fs::path& file_path) noexcept
+ expected<std::string> read_contents(const fs::path& file_path) noexcept
{
std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary);
if (file_stream.fail())
@@ -42,6 +42,35 @@ namespace vcpkg {namespace Files
return std::move(output);
}
+ expected<std::vector<std::string>> read_all_lines(const fs::path& file_path)
+ {
+ std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary);
+ if (file_stream.fail())
+ {
+ return std::errc::no_such_file_or_directory;
+ }
+
+ std::vector<std::string> output;
+ std::string line;
+ while (std::getline(file_stream, line))
+ {
+ output.push_back(line);
+ }
+ file_stream.close();
+
+ return std::move(output);
+ }
+
+ void write_all_lines(const fs::path& file_path, const std::vector<std::string>& lines)
+ {
+ std::fstream output(file_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
+ for (const std::string& line : lines)
+ {
+ output << line << "\n";
+ }
+ output.close();
+ }
+
fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename)
{
fs::path current_dir = starting_dir;
diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp
index f7aae1929..29d487fdb 100644
--- a/toolsrc/src/vcpkg_Input.cpp
+++ b/toolsrc/src/vcpkg_Input.cpp
@@ -5,7 +5,7 @@
namespace vcpkg {namespace Input
{
- package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const char* example_text)
+ package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const std::string& example_text)
{
const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string);
expected<package_spec> expected_spec = package_spec::from_string(as_lowercase, default_target_triplet);
@@ -20,7 +20,7 @@ namespace vcpkg {namespace Input
exit(EXIT_FAILURE);
}
- std::vector<package_spec> check_and_get_package_specs(const std::vector<std::string>& package_specs_as_strings, const triplet& default_target_triplet, const char* example_text)
+ std::vector<package_spec> check_and_get_package_specs(const std::vector<std::string>& package_specs_as_strings, const triplet& default_target_triplet, const std::string& example_text)
{
std::vector<package_spec> specs;
for (const std::string& spec : package_specs_as_strings)
diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp
index 19ba8595f..46a4b1855 100644
--- a/toolsrc/src/vcpkg_Strings.cpp
+++ b/toolsrc/src/vcpkg_Strings.cpp
@@ -4,9 +4,17 @@
#include <algorithm>
#include <codecvt>
#include <iterator>
+#include <functional>
+#include <cctype>
namespace vcpkg {namespace Strings {namespace details
{
+ // To disambiguate between two overloads
+ static const auto isspace = [](const char c)
+ {
+ return std::isspace(c);
+ };
+
std::string format_internal(const char* fmtstr, ...)
{
va_list lst;
@@ -85,4 +93,30 @@ namespace vcpkg {namespace Strings
return output;
}
+
+ void trim(std::string* s)
+ {
+ s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end());
+ s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace));
+ }
+
+ std::string trimmed(const std::string& s)
+ {
+ auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base();
+ auto whitespace_front = std::find_if_not(s.begin(), whitespace_back, details::isspace);
+ return std::string(whitespace_front, whitespace_back);
+ }
+
+ void trim_all_and_remove_whitespace_strings(std::vector<std::string>* strings)
+ {
+ for (std::string& s : *strings)
+ {
+ trim(&s);
+ }
+
+ strings->erase(std::remove_if(strings->begin(), strings->end(), [](const std::string& s)-> bool
+ {
+ return s == "";
+ }), strings->end());
+ }
}}
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp
index cb3eb6584..43eae3412 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg_System.cpp
@@ -56,7 +56,7 @@ namespace vcpkg {namespace System
std::cout << "\n";
}
- void print(color c, const char* message)
+ void print(const color c, const char* message)
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -69,7 +69,7 @@ namespace vcpkg {namespace System
SetConsoleTextAttribute(hConsole, original_color);
}
- void println(color c, const char* message)
+ void println(const color c, const char* message)
{
print(c, message);
std::cout << "\n";
diff --git a/toolsrc/src/vcpkg_cmd_arguments.cpp b/toolsrc/src/vcpkg_cmd_arguments.cpp
index d61e420ab..a3648668f 100644
--- a/toolsrc/src/vcpkg_cmd_arguments.cpp
+++ b/toolsrc/src/vcpkg_cmd_arguments.cpp
@@ -156,7 +156,7 @@ namespace vcpkg
System::println(System::color::error, "Unknown option(s) for command '%s':", this->command);
for (const std::string& option : options_copy)
{
- System::println(option.c_str());
+ System::println(option);
}
exit(EXIT_FAILURE);
}
@@ -179,7 +179,7 @@ namespace vcpkg
return check_exact_arg_count(expected_arg_count, "");
}
- void vcpkg_cmd_arguments::check_max_arg_count(const size_t expected_arg_count, const char* example_text) const
+ void vcpkg_cmd_arguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const
{
const size_t actual_arg_count = command_arguments.size();
if (actual_arg_count > expected_arg_count)
@@ -190,7 +190,7 @@ namespace vcpkg
}
}
- void vcpkg_cmd_arguments::check_min_arg_count(const size_t expected_arg_count, const char* example_text) const
+ void vcpkg_cmd_arguments::check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const
{
const size_t actual_arg_count = command_arguments.size();
if (actual_arg_count < expected_arg_count)
@@ -201,7 +201,7 @@ namespace vcpkg
}
}
- void vcpkg_cmd_arguments::check_exact_arg_count(const size_t expected_arg_count, const char* example_text) const
+ void vcpkg_cmd_arguments::check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const
{
const size_t actual_arg_count = command_arguments.size();
if (actual_arg_count != expected_arg_count)
diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp
index 63668d1d7..14fc9ae48 100644
--- a/toolsrc/src/vcpkg_metrics_uploader.cpp
+++ b/toolsrc/src/vcpkg_metrics_uploader.cpp
@@ -19,5 +19,5 @@ WinMain(
szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
Checks::check_exit(argCount == 2, "Requires exactly one argument, the path to the payload file");
- Upload(Files::get_contents(szArgList[1]).get_or_throw());
+ Upload(Files::read_contents(szArgList[1]).get_or_throw());
}