aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fussell <thomas.fussell@gmail.com>2017-03-17 00:33:06 -0400
committerThomas Fussell <thomas.fussell@gmail.com>2017-03-17 00:33:06 -0400
commitd821b0a28a7223d0b49745c53a3ff032fcb001c8 (patch)
tree12e13d5ff298a4e4b4f946ceb90b49cbfbe2d2c9
parent4921636f6bc92e041a410870ce564615c85a6cfb (diff)
parent01b1e39c6a006adba7b9cf2af758be679d0b7eb9 (diff)
downloadvcpkg-d821b0a28a7223d0b49745c53a3ff032fcb001c8.tar.gz
vcpkg-d821b0a28a7223d0b49745c53a3ff032fcb001c8.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg
-rw-r--r--ports/beast/CONTROL4
-rw-r--r--ports/beast/portfile.cmake12
-rw-r--r--ports/botan/0001-fix-crt-linking.patch56
-rw-r--r--ports/botan/CONTROL3
-rw-r--r--ports/botan/portfile.cmake112
-rw-r--r--ports/cairomm/0001-fix-build.patch25
-rw-r--r--ports/cairomm/CMakeLists.txt111
-rw-r--r--ports/cairomm/CONTROL4
-rw-r--r--ports/cairomm/cmake/FindCairo.cmake131
-rw-r--r--ports/cairomm/cmake/FindSigC++.cmake111
-rw-r--r--ports/cairomm/cmake/cairomm.rc.cmake71
-rw-r--r--ports/cairomm/cmake/cairommconfig.h.cmake13
-rw-r--r--ports/cairomm/portfile.cmake32
-rw-r--r--ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch13
-rw-r--r--ports/cpprestsdk/portfile.cmake12
-rw-r--r--ports/dlib/CONTROL3
-rw-r--r--ports/dlib/portfile.cmake35
-rw-r--r--ports/flatbuffers/portfile.cmake2
-rw-r--r--ports/glib/CMakeLists.txt3
-rw-r--r--ports/glib/CONTROL2
-rw-r--r--ports/glib/portfile.cmake12
-rw-r--r--ports/gtk/CMakeLists.txt2
-rw-r--r--ports/gtk/CONTROL2
-rw-r--r--ports/gtk/portfile.cmake11
-rw-r--r--ports/libepoxy/CONTROL2
-rw-r--r--ports/libepoxy/portfile.cmake8
-rw-r--r--ports/libjpeg-turbo/portfile.cmake8
-rw-r--r--ports/libpopt/CONTROL3
-rw-r--r--ports/libpopt/cmake/CMakeLists.txt57
-rw-r--r--ports/libpopt/cmake/config.h.cmake61
-rw-r--r--ports/libpopt/cmake/popt.def50
-rw-r--r--ports/libpopt/patches/0004-vcpkg-fixmsvc.patch62
-rw-r--r--ports/libpopt/portfile.cmake35
-rw-r--r--ports/libvpx/CONTROL3
-rw-r--r--ports/libvpx/portfile.cmake109
-rw-r--r--ports/libwebm/0001-fix-cmake.patch65
-rw-r--r--ports/libwebm/CONTROL3
-rw-r--r--ports/libwebm/portfile.cmake36
-rw-r--r--ports/mpg123/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch244
-rw-r--r--ports/mpg123/0001-fix-crt-linking.patch88
-rw-r--r--ports/mpg123/CONTROL2
-rw-r--r--ports/mpg123/portfile.cmake83
-rw-r--r--ports/mpir/CONTROL2
-rw-r--r--ports/mpir/portfile.cmake10
-rw-r--r--ports/nlohmann-json/CONTROL3
-rw-r--r--ports/nlohmann-json/portfile.cmake22
-rw-r--r--ports/pango/CMakeLists.txt2
-rw-r--r--ports/pango/CONTROL2
-rw-r--r--ports/pango/portfile.cmake10
-rw-r--r--ports/pcre2/CONTROL3
-rw-r--r--ports/pcre2/portfile.cmake45
-rw-r--r--ports/tinyexr/CONTROL3
-rw-r--r--ports/tinyexr/copyright5
-rw-r--r--ports/tinyexr/portfile.cmake14
-rw-r--r--ports/uwebsockets/CONTROL2
-rw-r--r--ports/uwebsockets/portfile.cmake3
-rw-r--r--scripts/cmake/vcpkg_build_msbuild.cmake50
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake8
-rw-r--r--scripts/cmake/vcpkg_get_windows_sdk.cmake3
-rw-r--r--scripts/templates/portfile.in.cmake14
-rw-r--r--toolsrc/include/LineInfo.h17
-rw-r--r--toolsrc/include/expected.h12
-rw-r--r--toolsrc/include/lazy.h2
-rw-r--r--toolsrc/include/vcpkg_Checks.h29
-rw-r--r--toolsrc/include/vcpkg_Enums.h5
-rw-r--r--toolsrc/include/vcpkg_Files.h2
-rw-r--r--toolsrc/include/vcpkglib.h2
-rw-r--r--toolsrc/src/BinaryParagraph.cpp6
-rw-r--r--toolsrc/src/LineInfo.cpp11
-rw-r--r--toolsrc/src/MachineType.cpp2
-rw-r--r--toolsrc/src/Paragraphs.cpp10
-rw-r--r--toolsrc/src/PostBuildLint.cpp22
-rw-r--r--toolsrc/src/PostBuildLint_BuildInfo.cpp8
-rw-r--r--toolsrc/src/PostBuildLint_BuildPolicies.cpp7
-rw-r--r--toolsrc/src/PostBuildLint_BuildType.cpp8
-rw-r--r--toolsrc/src/PostBuildLint_ConfigurationType.cpp3
-rw-r--r--toolsrc/src/PostBuildLint_LinkageType.cpp3
-rw-r--r--toolsrc/src/StatusParagraphs.cpp2
-rw-r--r--toolsrc/src/coff_file_reader.cpp22
-rw-r--r--toolsrc/src/commands_build.cpp12
-rw-r--r--toolsrc/src/commands_ci.cpp8
-rw-r--r--toolsrc/src/commands_create.cpp6
-rw-r--r--toolsrc/src/commands_edit.cpp10
-rw-r--r--toolsrc/src/commands_hash.cpp6
-rw-r--r--toolsrc/src/commands_import.cpp10
-rw-r--r--toolsrc/src/commands_install.cpp8
-rw-r--r--toolsrc/src/commands_integrate.cpp8
-rw-r--r--toolsrc/src/commands_portsdiff.cpp4
-rw-r--r--toolsrc/src/commands_remove.cpp8
-rw-r--r--toolsrc/src/commands_search.cpp2
-rw-r--r--toolsrc/src/opt_bool.cpp2
-rw-r--r--toolsrc/src/package_spec_parse_result.cpp2
-rw-r--r--toolsrc/src/triplet.cpp2
-rw-r--r--toolsrc/src/vcpkg.cpp18
-rw-r--r--toolsrc/src/vcpkg_Checks.cpp30
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp4
-rw-r--r--toolsrc/src/vcpkg_Enums.cpp9
-rw-r--r--toolsrc/src/vcpkg_Environment.cpp4
-rw-r--r--toolsrc/src/vcpkg_Files.cpp4
-rw-r--r--toolsrc/src/vcpkg_System.cpp8
-rw-r--r--toolsrc/src/vcpkg_metrics_uploader.cpp4
-rw-r--r--toolsrc/src/vcpkg_paths.cpp8
-rw-r--r--toolsrc/src/vcpkglib.cpp8
-rw-r--r--toolsrc/src/vcpkglib_helpers.cpp4
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj2
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj.filters6
-rw-r--r--triplets/arm-uwp.cmake1
-rw-r--r--triplets/x64-uwp.cmake1
-rw-r--r--triplets/x86-uwp.cmake1
109 files changed, 1760 insertions, 515 deletions
diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL
new file mode 100644
index 000000000..467ee98ba
--- /dev/null
+++ b/ports/beast/CONTROL
@@ -0,0 +1,4 @@
+Source: beast
+Version: 1.0.0-b30
+Build-Depends: boost
+Description: Boost.Asio based header only HTTP and WebSocket on C++11
diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake
new file mode 100644
index 000000000..824d2f670
--- /dev/null
+++ b/ports/beast/portfile.cmake
@@ -0,0 +1,12 @@
+# header only
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/beast-1.0.0-b30)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/vinniefalco/Beast/archive/v1.0.0-b30.zip"
+ FILENAME "beast-1.0.0-b30.zip"
+ SHA512 af801748efabafef1b7ae817be9da9480dcf881b3037f92e5997e42255399bd7b22772bb2a5c9aab7d01c31c7995c4d23a41f4b7f6ccdef18d9a8a15906fd43f
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/beast RENAME copyright) \ No newline at end of file
diff --git a/ports/botan/0001-fix-crt-linking.patch b/ports/botan/0001-fix-crt-linking.patch
new file mode 100644
index 000000000..d1fdc2d70
--- /dev/null
+++ b/ports/botan/0001-fix-crt-linking.patch
@@ -0,0 +1,56 @@
+From b41cc93b63c99525e71291424466cdd45d92f770 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 12 Mar 2017 04:34:10 +0300
+Subject: [PATCH] fix CRT linking for static library for MSVC
+
+---
+ configure.py | 15 +++++++++++++++
+ src/build-data/cc/msvc.txt | 8 ++++++--
+ 2 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index faf5120c5..9c545cf5f 100755
+--- a/configure.py
++++ b/configure.py
+@@ -976,6 +976,21 @@ class CompilerInfo(object):
+ if flag != None and flag != '' and flag not in abi_link:
+ abi_link.append(flag)
+
++ if options.build_shared_lib:
++ if options.with_debug_info:
++ if 'dynamic-debug' in self.mach_abi_linking:
++ abi_link.append(self.mach_abi_linking['dynamic-debug'])
++ else:
++ if 'dynamic' in self.mach_abi_linking:
++ abi_link.append(self.mach_abi_linking['dynamic'])
++ else:
++ if options.with_debug_info:
++ if 'static-debug' in self.mach_abi_linking:
++ abi_link.append(self.mach_abi_linking['static-debug'])
++ else:
++ if 'static' in self.mach_abi_linking:
++ abi_link.append(self.mach_abi_linking['static'])
++
+ if options.with_coverage_info:
+ if self.coverage_flags == '':
+ raise ConfigureError('No coverage handling for %s' % (self.basename))
+diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
+index c1b820b91..e6182b0fa 100644
+--- a/src/build-data/cc/msvc.txt
++++ b/src/build-data/cc/msvc.txt
+@@ -53,6 +53,10 @@ default-debug -> "$(LINKER) /DEBUG"
+ </binary_link_commands>
+
+ <mach_abi_linking>
+-all -> "/MD /bigobj"
+-all-debug -> "/MDd /bigobj"
++all -> "/bigobj"
++all-debug -> "/bigobj"
++static -> "/MT"
++static-debug -> "/MTd"
++dynamic -> "/MD"
++dynamic-debug -> "/MDd"
+ </mach_abi_linking>
+--
+2.11.0.windows.1
+
diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL
new file mode 100644
index 000000000..1ff010118
--- /dev/null
+++ b/ports/botan/CONTROL
@@ -0,0 +1,3 @@
+Source: botan
+Version: 2.0.1
+Description: A cryptography library written in C++11 \ No newline at end of file
diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake
new file mode 100644
index 000000000..a9a9ca547
--- /dev/null
+++ b/ports/botan/portfile.cmake
@@ -0,0 +1,112 @@
+include(vcpkg_common_functions)
+
+set(BOTAN_VERSION 2.0.1)
+set(BOTAN_HASH c5062ce92a6e6e333b4e6af095ed54d0c4ffacefc6ac87ec651dd1e0937793c9956b7c9c0d3acf49f059505526584168364e01c55ab72c953ad255e8396aed35)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Botan-${BOTAN_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://botan.randombit.net/releases/Botan-${BOTAN_VERSION}.tgz"
+ FILENAME "Botan-${BOTAN_VERSION}.tgz"
+ SHA512 ${BOTAN_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-crt-linking.patch")
+
+vcpkg_find_acquire_program(JOM)
+vcpkg_find_acquire_program(PYTHON3)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(BOTAN_FLAG_SHARED --disable-shared)
+endif()
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(BOTAN_FLAG_CPU x86)
+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(BOTAN_FLAG_CPU x86_64)
+else()
+ message(FATAL_ERROR "Unsupported architecture")
+endif()
+
+function(BOTAN_BUILD BOTAN_BUILD_TYPE)
+
+ if(BOTAN_BUILD_TYPE STREQUAL "dbg")
+ set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}/debug)
+ set(BOTAN_FLAG_DEBUGMODE --debug-mode)
+ set(BOTAN_DEBUG_PREFIX d)
+ else()
+ set(BOTAN_FLAG_DEBUGMODE)
+ set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR})
+ endif()
+
+ message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
+
+ if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
+ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
+ endif()
+ make_directory(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
+
+ vcpkg_execute_required_process(
+ COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py"
+ --cc=msvc
+ --cpu=${BOTAN_FLAG_CPU}
+ ${BOTAN_FLAG_SHARED}
+ ${BOTAN_FLAG_DEBUGMODE}
+ "--distribution-info=vcpkg ${TARGET_TRIPLET}"
+ --makefile-style=nmake
+ --with-pkcs11
+ --prefix=${BOTAN_FLAG_PREFIX}
+ --link-method=copy
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
+ LOGNAME configure-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
+ message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
+
+ message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
+ vcpkg_execute_required_process(
+ COMMAND ${JOM}
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
+ LOGNAME jom-build-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
+ message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
+
+ message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}")
+ vcpkg_execute_required_process(
+ COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py"
+ --destdir=${BOTAN_FLAG_PREFIX}
+ --docdir=share
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}"
+ LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE})
+
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(RENAME ${BOTAN_FLAG_PREFIX}/lib/botan${BOTAN_DEBUG_PREFIX}.dll ${BOTAN_FLAG_PREFIX}/bin/botan${BOTAN_DEBUG_PREFIX}.dll)
+ endif()
+
+ message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done")
+endfunction()
+
+BOTAN_BUILD(rel)
+BOTAN_BUILD(dbg)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/botan)
+file(RENAME ${CURRENT_PACKAGES_DIR}/bin/botan-cli.exe ${CURRENT_PACKAGES_DIR}/tools/botan/botan-cli.exe)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/botan-cli.exe)
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/include/botan-2/botan ${CURRENT_PACKAGES_DIR}/include/botan)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/share
+ ${CURRENT_PACKAGES_DIR}/include/botan-2
+ ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/manual)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/bin
+ ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+vcpkg_copy_pdbs()
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/botan)
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/ ${CURRENT_PACKAGES_DIR}/share/botan/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan/license.txt ${CURRENT_PACKAGES_DIR}/share/botan/copyright)
diff --git a/ports/cairomm/0001-fix-build.patch b/ports/cairomm/0001-fix-build.patch
new file mode 100644
index 000000000..59e281d79
--- /dev/null
+++ b/ports/cairomm/0001-fix-build.patch
@@ -0,0 +1,25 @@
+From b769f250a39df110db2615c0e0d85b52f2ab6e77 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 12 Mar 2017 17:57:03 +0300
+Subject: [PATCH] Fix build
+
+---
+ cairomm/win32_surface.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cairomm/win32_surface.h b/cairomm/win32_surface.h
+index 2e35b9a..c4454c4 100644
+--- a/cairomm/win32_surface.h
++++ b/cairomm/win32_surface.h
+@@ -84,6 +84,8 @@ public:
+ */
+ static RefPtr<Win32Surface> create(HDC hdc);
+
++ static RefPtr<Win32Surface> create(Format format, int width, int height);
++
+ /** Creates a device-independent-bitmap surface not associated with any
+ * particular existing surface or device context. The created bitmap will be
+ * unititialized.
+--
+2.11.0.windows.1
+
diff --git a/ports/cairomm/CMakeLists.txt b/ports/cairomm/CMakeLists.txt
new file mode 100644
index 000000000..db077217d
--- /dev/null
+++ b/ports/cairomm/CMakeLists.txt
@@ -0,0 +1,111 @@
+project(cairomm)
+cmake_minimum_required(VERSION 3.4)
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake")
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+#get cairomm version
+file (STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[cairomm\\], \\[.*\\].*" )
+string(REGEX REPLACE "AC_INIT\\(\\[.*\\], \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT})
+string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CAIROMM_MAJOR_VERSION ${VERSION})
+string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" CAIROMM_MINOR_VERSION ${VERSION})
+string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CAIROMM_MICRO_VERSION ${VERSION})
+message(STATUS "Ciaromm version: ${CAIROMM_MAJOR_VERSION}.${CAIROMM_MINOR_VERSION}.${CAIROMM_MICRO_VERSION}")
+
+find_package(Cairo REQUIRED)
+find_package(SigC++ REQUIRED)
+
+#configure
+option(BUILD_SHARED_LIBS "Build the shared library" ON)
+
+option(CAIROMM_ENABLE_API_EXCEPTIONS "enable API exceptions" ON)
+if(CAIROMM_ENABLE_API_EXCEPTIONS)
+ set(CAIROMM_EXCEPTIONS_ENABLED ON)
+else()
+ set(CAIROMM_EXCEPTIONS_ENABLED OFF)
+endif()
+
+configure_file("build/cmake/cairommconfig.h.cmake" "cairommconfig.h")
+configure_file("build/cmake/cairomm.rc.cmake" "cairomm.rc" @ONLY)
+
+#build
+set(cairomm_cc
+ cairomm/context.cc
+ cairomm/context_surface_quartz.cc
+ cairomm/context_surface_win32.cc
+ cairomm/context_surface_xlib.cc
+ cairomm/device.cc
+ cairomm/exception.cc
+ cairomm/fontface.cc
+ cairomm/fontoptions.cc
+ cairomm/matrix.cc
+ cairomm/path.cc
+ cairomm/pattern.cc
+ cairomm/private.cc
+ cairomm/quartz_font.cc
+ cairomm/quartz_surface.cc
+ cairomm/region.cc
+ cairomm/scaledfont.cc
+ cairomm/script.cc
+ cairomm/script_surface.cc
+ cairomm/surface.cc
+ cairomm/win32_font.cc
+ cairomm/win32_surface.cc
+ cairomm/xlib_surface.cc)
+
+set(cairomm_public_h
+ cairomm/cairomm.h
+ cairomm/context.h
+ cairomm/device.h
+ cairomm/enums.h
+ cairomm/exception.h
+ cairomm/fontface.h
+ cairomm/fontoptions.h
+ cairomm/matrix.h
+ cairomm/path.h
+ cairomm/pattern.h
+ cairomm/quartz_font.h
+ cairomm/quartz_surface.h
+ cairomm/refptr.h
+ cairomm/region.h
+ cairomm/scaledfont.h
+ cairomm/script.h
+ cairomm/script_surface.h
+ cairomm/surface.h
+ cairomm/types.h
+ cairomm/win32_font.h
+ cairomm/win32_surface.h
+ cairomm/xlib_surface.h)
+
+set(cairomm_private_h
+ cairomm/context_private.h
+ cairomm/private.h)
+
+set(cairomm_rc
+ ${CMAKE_BINARY_DIR}/cairomm.rc)
+
+add_library(cairomm-1.0 ${cairomm_cc} ${cairomm_rc})
+target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} )
+target_include_directories(cairomm-1.0 PRIVATE
+ ${CAIRO_INCLUDE_DIR}
+ ${SIGC++_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR})
+
+install(
+ TARGETS cairomm-1.0
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+install(
+ FILES ${cairomm_public_h}
+ DESTINATION include/cairomm)
+
+install(
+ FILES ${CMAKE_BINARY_DIR}/cairommconfig.h
+ DESTINATION include)
diff --git a/ports/cairomm/CONTROL b/ports/cairomm/CONTROL
new file mode 100644
index 000000000..d8eda4a53
--- /dev/null
+++ b/ports/cairomm/CONTROL
@@ -0,0 +1,4 @@
+Source: cairomm
+Version: 1.15.3-1
+Description: A C++ wrapper for the cairo graphics library
+Build-Depends: cairo, libsigcpp \ No newline at end of file
diff --git a/ports/cairomm/cmake/FindCairo.cmake b/ports/cairomm/cmake/FindCairo.cmake
new file mode 100644
index 000000000..0a87fadf8
--- /dev/null
+++ b/ports/cairomm/cmake/FindCairo.cmake
@@ -0,0 +1,131 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+#
+# revision: 2
+# See https://github.com/CMakePorts/CMakeFindPackages for updates
+#
+#.rst:
+# FindCairo
+# ---------
+#
+# Locate Cairo library
+#
+# This module defines
+#
+# ::
+# CAIRO_FOUND - system has the CAIRO library
+# CAIRO_INCLUDE_DIR - the CAIRO include directory
+# CAIRO_LIBRARIES - The libraries needed to use CAIRO
+# CAIRO_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8)
+# CAIRO_VERSION_STRING - This is set to $major.$minor.$revision (eg. 0.9.8)
+#
+# Authors:
+# Copyright (c) Eric Wing
+# Copyright (c) Alexander Neundorf
+# Copyright (c) 2008 Joshua L. Blocher <verbalshadow at gmail dot com>
+# Copyright (c) 2012 Dmitry Baryshnikov <polimax at mail dot ru>
+# Copyright (c) 2013-2017 Mikhail Paulyshka <me at mixaill dot tk>
+#
+
+
+if (NOT WIN32)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_CAIRO cairo)
+
+ SET(CAIRO_VERSION ${_CAIRO_VERSION})
+ STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\1" num "${CAIRO_VERSION}")
+ MATH (EXPR CAIRO_VERSION_MAJOR "${num}")
+ STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\2" num "${CAIRO_VERSION}")
+ MATH (EXPR CAIRO_VERSION_MINOR "${num}")
+ STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\3" num "${CAIRO_VERSION}")
+ MATH (EXPR CAIRO_VERSION_MICRO "${num}")
+ endif (PKG_CONFIG_FOUND)
+endif (NOT WIN32)
+
+set(_CAIRO_ROOT_HINTS_AND_PATHS
+ HINTS
+ $ENV{CAIRO}
+ $ENV{CAIRO_DIR}
+ ${CMAKE_FIND_ROOT_PATH}
+ ${CAIRO_ROOT_DIR}
+ PATHS
+ ${CMAKE_FIND_ROOT_PATH}
+ $ENV{CAIRO}/src
+ /usr
+ /usr/local
+)
+
+find_path(CAIRO_INCLUDE_DIR
+ NAMES
+ cairo.h
+ HINTS
+ ${_CAIRO_INCLUDEDIR}
+ ${_CAIRO_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ include
+ "include/cairo"
+)
+
+if(NOT CAIRO_LIBRARY)
+ FIND_LIBRARY(CAIRO_LIBRARY_RELEASE
+ NAMES
+ cairo
+ cairo-static
+ HINTS
+ ${_CAIRO_LIBDIR}
+ ${_CAIRO_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib"
+ "local/lib"
+ )
+
+ FIND_LIBRARY(CAIRO_LIBRARY_DEBUG
+ NAMES
+ cairod
+ cairo-staticd
+ HINTS
+ ${_CAIRO_LIBDIR}
+ ${_CAIRO_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib"
+ "local/lib"
+ )
+
+ include(SelectLibraryConfigurations)
+ select_library_configurations(CAIRO)
+endif()
+set(CAIRO_LIBRARIES ${CAIRO_LIBRARY})
+
+if (NOT CAIRO_VERSION)
+ if (EXISTS "${CAIRO_INCLUDE_DIR}/cairo-version.h")
+ file(READ "${CAIRO_INCLUDE_DIR}/cairo-version.h" CAIRO_VERSION_CONTENT)
+
+ string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+ set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")
+
+ string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+ set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")
+
+ string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+ set(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}")
+
+ set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}")
+ set(CAIRO_VERSION_STRING CAIRO_VERSION)
+ endif ()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+ CAIRO
+ REQUIRED_VARS
+ CAIRO_LIBRARIES
+ CAIRO_INCLUDE_DIR
+ VERSION_VAR
+ CAIRO_VERSION_STRING
+)
+
+MARK_AS_ADVANCED(
+ CAIRO_INCLUDE_DIR
+ CAIRO_LIBRARY
+ CAIRO_LIBRARIES)
diff --git a/ports/cairomm/cmake/FindSigC++.cmake b/ports/cairomm/cmake/FindSigC++.cmake
new file mode 100644
index 000000000..ed16ef93f
--- /dev/null
+++ b/ports/cairomm/cmake/FindSigC++.cmake
@@ -0,0 +1,111 @@
+# - Try to find SIGC++
+# Once done this will define
+#
+# SIGC++_ROOT_DIR - Set this variable to the root installation of SIGC++
+# SIGC++_FOUND - system has SIGC++
+# SIGC++_INCLUDE_DIRS - the SIGC++ include directory
+# SIGC++_LIBRARIES - Link these to use SIGC++
+#
+# Copyright (c) 2008 Joshua L. Blocher <verbalshadow at gmail dot com>
+# Copyright (c) 2012 Dmitry Baryshnikov <polimax at mail dot ru>
+# Copyright (c) 2013-2017 Mikhail Paulyshka <me at mixaill dot tk>
+#
+# Distributed under the OSI-approved BSD License
+#
+
+if (NOT WIN32)
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(_SIGC++ sigc++-2.0)
+ SET(SIGC++_VERSION ${_SIGC++_VERSION})
+ endif (PKG_CONFIG_FOUND)
+endif (NOT WIN32)
+
+SET(_SIGC++_ROOT_HINTS
+ $ENV{SIGC++}
+ ${CMAKE_FIND_ROOT_PATH}
+ ${SIGC++_ROOT_DIR}
+)
+
+SET(_SIGC++_ROOT_PATHS
+ $ENV{SIGC++}/src
+ /usr
+ /usr/local
+)
+
+SET(_SIGC++_ROOT_HINTS_AND_PATHS
+ HINTS ${_SIGC++_ROOT_HINTS}
+ PATHS ${_SIGC++_ROOT_PATHS}
+)
+
+FIND_PATH(SIGC++_INCLUDE_DIR
+ NAMES
+ "sigc++/sigc++.h"
+ HINTS
+ ${_SIGC++_INCLUDEDIR}
+ ${_SIGC++_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ include
+ "include/sigc++-2.0"
+)
+
+find_path(SIGC++_CONFIG_INCLUDE_DIR
+ NAMES
+ sigc++config.h
+ HINTS
+ ${_SIGC++_LIBDIR}
+ ${_SIGC++_INCLUDEDIR}
+ ${_SIGC++_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ include
+ lib
+ "sigc++-2.0/include"
+ "lib/sigc++-2.0"
+ "lib/sigc++-2.0/include"
+)
+
+FIND_LIBRARY(SIGC++_LIBRARY
+ NAMES
+ sigc-2.0
+ HINTS
+ ${_SIGC++_LIBDIR}
+ ${_SIGC++_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib"
+ "local/lib"
+)
+
+SET(SIGC++_LIBRARIES
+ ${SIGC++_LIBRARY}
+)
+
+SET(SIGC++_INCLUDE_DIRS
+ ${SIGC++_INCLUDE_DIR}
+ ${SIGC++_CONFIG_INCLUDE_DIR}
+)
+
+if (NOT SIGC++_VERSION)
+ if (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h")
+ file(READ "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h" SIGC++_VERSION_CONTENT)
+
+ string(REGEX MATCH "#define +SIGCXX_MAJOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}")
+ set(SIGC++_VERSION_MAJOR "${CMAKE_MATCH_1}")
+
+ string(REGEX MATCH "#define +SIGCXX_MINOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}")
+ set(SIGC++_VERSION_MINOR "${CMAKE_MATCH_1}")
+
+ string(REGEX MATCH "#define +SIGCXX_MICRO_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}")
+ set(SIGC++_VERSION_MICRO "${CMAKE_MATCH_1}")
+
+ set(SIGC++_VERSION "${SIGC++_VERSION_MAJOR}.${SIGC++_VERSION_MINOR}.${SIGC++_VERSION_MICRO}")
+ endif (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h")
+endif(NOT SIGC++_VERSION)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SIGC++
+ REQUIRED_VARS SIGC++_LIBRARIES SIGC++_INCLUDE_DIRS
+ VERSION_VAR SIGC++_VERSION
+ FAIL_MESSAGE "Could NOT find SIGC++, try to set the path to SIGC++ root folder in the system variable SIGC++"
+)
+
+MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES) \ No newline at end of file
diff --git a/ports/cairomm/cmake/cairomm.rc.cmake b/ports/cairomm/cmake/cairomm.rc.cmake
new file mode 100644
index 000000000..4aa7a0a05
--- /dev/null
+++ b/ports/cairomm/cmake/cairomm.rc.cmake
@@ -0,0 +1,71 @@
+
+#define APSTUDIO_READONLY_SYMBOLS
+
+#include <windows.h>
+
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1
+ PRODUCTVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "The cairomm development team (see AUTHORS)"
+ VALUE "FileDescription", "The official C++ wrapper for cairo"
+ VALUE "FileVersion", "@VERSION@"
+ VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)"
+ VALUE "OriginalFilename", "cairomm-1.0"
+ VALUE "ProductName", "cairomm"
+ VALUE "ProductVersion", "@VERSION@"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+
+#ifndef APSTUDIO_INVOKED
+
+#endif // not APSTUDIO_INVOKED
diff --git a/ports/cairomm/cmake/cairommconfig.h.cmake b/ports/cairomm/cmake/cairommconfig.h.cmake
new file mode 100644
index 000000000..526a70c4c
--- /dev/null
+++ b/ports/cairomm/cmake/cairommconfig.h.cmake
@@ -0,0 +1,13 @@
+/* This file is part of cairomm. */
+
+/* Defined when the --enable-api-exceptions configure argument was given */
+#cmakedefine CAIROMM_EXCEPTIONS_ENABLED 1
+
+/* Major version number of cairomm. */
+#cmakedefine CAIROMM_MAJOR_VERSION @CAIROMM_MAJOR_VERSION@
+
+/* Minor version number of cairomm. */
+#cmakedefine CAIROMM_MINOR_VERSION @CAIROMM_MINOR_VERSION@
+
+/* Micro version number of cairomm. */
+#cmakedefine CAIROMM_MICRO_VERSION @CAIROMM_MICRO_VERSION@
diff --git a/ports/cairomm/portfile.cmake b/ports/cairomm/portfile.cmake
new file mode 100644
index 000000000..0f9ec03c7
--- /dev/null
+++ b/ports/cairomm/portfile.cmake
@@ -0,0 +1,32 @@
+include(vcpkg_common_functions)
+
+set(CAIROMM_VERSION 1.15.3)
+set(CAIROMM_HASH a2c28786dbd167179561d8f580eeb11d10634a36dfdb1adeefc0279acf83ee906f01f264cb924845fc4ab98da1afac71e1ead742f283c1a32368ca9af28e464a)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairomm-${CAIROMM_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.cairographics.org/releases/cairomm-${CAIROMM_VERSION}.tar.gz"
+ FILENAME "cairomm-${CAIROMM_VERSION}.tar.gz"
+ SHA512 ${CAIROMM_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}/build)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-build.patch")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairomm)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairomm/COPYING ${CURRENT_PACKAGES_DIR}/share/cairomm/copyright)
diff --git a/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch b/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch
new file mode 100644
index 000000000..ab54baf01
--- /dev/null
+++ b/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch
@@ -0,0 +1,13 @@
+diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt
+index fe245e6..94a5c57 100644
+--- a/release/CMakeLists.txt
++++ b/release/CMakeLists.txt
+@@ -177,7 +177,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
+
+ # These settings can be used by the test targets
+ set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
+-if (NOT CPPREST_EXCLUDE_WEBSOCKETS)
++if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)
+ find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake
+ HINTS /usr/lib/cmake/websocketpp)
+ find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake
diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake
index f92c5147a..2d23bf632 100644
--- a/ports/cpprestsdk/portfile.cmake
+++ b/ports/cpprestsdk/portfile.cmake
@@ -13,15 +13,21 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch
)
-SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp")
+set(OPTIONS)
+if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp")
+ list(APPEND OPTIONS
+ -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH}
+ -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH})
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/Release
OPTIONS
- -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH}
- -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}
+ ${OPTIONS}
-DBUILD_TESTS=OFF
-DBUILD_SAMPLES=OFF
-DCPPREST_EXCLUDE_WEBSOCKETS=OFF
diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL
index 91ce3eb57..edb4b4e85 100644
--- a/ports/dlib/CONTROL
+++ b/ports/dlib/CONTROL
@@ -1,3 +1,4 @@
Source: dlib
-Version: 19.2
+Version: 19.4-1
+Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++
diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake
index 3ef3f840e..4763c5613 100644
--- a/ports/dlib/portfile.cmake
+++ b/ports/dlib/portfile.cmake
@@ -4,23 +4,29 @@
# 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/dlib-19.2)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.4)
vcpkg_download_distfile(ARCHIVE
- URLS "http://dlib.net/files/dlib-19.2.tar.bz2"
- FILENAME "dlib-19.2.tar.bz2"
- SHA512 dcef5c8be52fe2650c1eccac6c7ac4050075dc07ee504a8bf3df6c9a597da5fdc09506e631abfa979d71c74940ce39ec5267be4c3a676a01ac66fcb14cbfe854
+ URLS "http://dlib.net/files/dlib-19.4.tar.bz2"
+ FILENAME "dlib-19.4.tar.bz2"
+ SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b
)
vcpkg_extract_source_archive(${ARCHIVE})
+file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg)
+file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng)
+file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib)
vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA # Disable this option if project cannot be built with Ninja
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DDLIB_LINK_WITH_SQLITE3=ON
+ -DDLIB_USE_FFTW=ON
+ #-DDLIB_USE_CUDA=ON
+ OPTIONS_DEBUG
+ -DDLIB_ENABLE_ASSERTS=ON
+ #-DDLIB_ENABLE_STACK_TRACE=ON
)
vcpkg_install_cmake()
@@ -28,18 +34,17 @@ vcpkg_install_cmake()
# There is no way to suppress installation of the headers and resource files in debug build.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
# Remove other files not required in package
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm)
# Handle copyright
-#file(COPY ${SOURCE_PATH}/docs/license.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib)
file(COPY ${CURRENT_PACKAGES_DIR}/share/doc/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) \ No newline at end of file
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake
index 03e0e9c28..e2c05d2c0 100644
--- a/ports/flatbuffers/portfile.cmake
+++ b/ports/flatbuffers/portfile.cmake
@@ -37,12 +37,14 @@ vcpkg_configure_cmake(
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
+vcpkg_build_cmake()
vcpkg_install_cmake()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/flatc.exe)
+ make_directory(${CURRENT_PACKAGES_DIR}/tools)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/flatc.exe ${CURRENT_PACKAGES_DIR}/tools/flatc.exe)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()
diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt
index 341ab1a62..67f0ba10f 100644
--- a/ports/glib/CMakeLists.txt
+++ b/ports/glib/CMakeLists.txt
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.0)
-project(glib)
+project(glib C)
-set(GLIB_VERSION 2.50.2)
set(GLIB_DLL_SUFFIX 2)
set(GLIB_LIB_SUFFIX 2.0)
diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL
index 984d7576a..f34cb6c6b 100644
--- a/ports/glib/CONTROL
+++ b/ports/glib/CONTROL
@@ -1,4 +1,4 @@
Source: glib
-Version: 2.50.2
+Version: 2.50.3
Description: Portable, general-purpose utility library.
Build-Depends: zlib, pcre, libffi, gettext, libiconv
diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake
index 71f1f366c..a3de1f33f 100644
--- a/ports/glib/portfile.cmake
+++ b/ports/glib/portfile.cmake
@@ -10,11 +10,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-2.50.2)
+set(GLIB_VERSION 2.50.3)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-${GLIB_VERSION})
vcpkg_download_distfile(ARCHIVE
- URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.50/glib-2.50.2.tar.xz"
- FILENAME "glib-2.50.2.tar.xz"
- SHA512 63d7b5ece8d7d15b10e06ef10a8e0a4446f30a8d9c97daa3352ec00dfef622728bd42ed24cbf67e553166a0f9e29a3e3d024d1d085b9804fd67608db438b6771)
+ URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.50/glib-${GLIB_VERSION}.tar.xz"
+ FILENAME "glib-${GLIB_VERSION}.tar.xz"
+ SHA512 ef35806c15170b6608445f255136c0bebd2d433adf903c2af2865f6a57b4f2fcfc1e4a7cea1a0dac48ff5fe26248fbf7886dba4a8d209506f0a94160df8fb7af)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
@@ -29,6 +30,9 @@ file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DGLIB_VERSION=${GLIB_VERSION}
OPTIONS_DEBUG
-DGLIB_SKIP_HEADERS=ON
-DGLIB_SKIP_TOOLS=ON)
diff --git a/ports/gtk/CMakeLists.txt b/ports/gtk/CMakeLists.txt
index 94bf37abb..a8be6b45a 100644
--- a/ports/gtk/CMakeLists.txt
+++ b/ports/gtk/CMakeLists.txt
@@ -4,8 +4,6 @@ project(gtk+ C)
configure_file(config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY)
configure_file(gdk/gdkconfig.h.win32_broadway ${CMAKE_CURRENT_SOURCE_DIR}/gdk/gdkconfig.h COPYONLY)
-set(GTK_VERSION 3.22.8)
-
set(GLIB_LIB_SUFFIX 2.0)
set(PANGO_LIB_SUFFIX 1.0)
set(ATK_LIB_SUFFIX 1.0)
diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL
index 01eee28cf..93dc929fe 100644
--- a/ports/gtk/CONTROL
+++ b/ports/gtk/CONTROL
@@ -1,4 +1,4 @@
Source: gtk
-Version: 3.22.8
+Version: 3.22.9
Description: Portable library for creating graphical user interfaces.
Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext
diff --git a/ports/gtk/portfile.cmake b/ports/gtk/portfile.cmake
index cd36690e5..81626b494 100644
--- a/ports/gtk/portfile.cmake
+++ b/ports/gtk/portfile.cmake
@@ -1,10 +1,11 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-3.22.8)
+set(GTK_VERSION 3.22.9)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-${GTK_VERSION})
vcpkg_download_distfile(ARCHIVE
- URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-3.22.8.tar.xz"
- FILENAME "gtk+-3.22.8.tar.xz"
- SHA512 e8c887d73a29982e8db1be6b101367326b4691905bd28e244f05435f34dfaddb054badb0b0b01a47a4c939c7f87985b7203db5d0cd499a0868c25eba44ed002c)
+ URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz"
+ FILENAME "gtk+-${GTK_VERSION}.tar.xz"
+ SHA512 cfed67a6263172cdef5a8d5f1548017f2e241667779d810ed84aa14ecdd18b917b213b3e71ac97f8d7099ba97a6829b45322ab15c8540ff406247d1519a08550)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@@ -24,6 +25,8 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
+ OPTIONS
+ -DGTK_VERSION=${GTK_VERSION}
OPTIONS_DEBUG
-DGTK_SKIP_HEADERS=ON)
diff --git a/ports/libepoxy/CONTROL b/ports/libepoxy/CONTROL
index 963a3e17a..8306c27be 100644
--- a/ports/libepoxy/CONTROL
+++ b/ports/libepoxy/CONTROL
@@ -1,3 +1,3 @@
Source: libepoxy
-Version: 1.4.0-2432daf-1
+Version: 1.4.1-7d58fd3
Description: Epoxy is a library for handling OpenGL function pointer management for you
diff --git a/ports/libepoxy/portfile.cmake b/ports/libepoxy/portfile.cmake
index ef1880d16..7dc76a50d 100644
--- a/ports/libepoxy/portfile.cmake
+++ b/ports/libepoxy/portfile.cmake
@@ -4,11 +4,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libepoxy-2432daf4cf58b5ff11e008ca34811588285c43b3)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libepoxy-7d58fd3d47d2d69f2b1b9f08325302e4eeff9ebe)
vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/anholt/libepoxy/archive/2432daf4cf58b5ff11e008ca34811588285c43b3.zip"
- FILENAME "libepoxy-2432daf4cf58b5ff11e008ca34811588285c43b3.zip"
- SHA512 70b59b6c5722eb87522927fdedab44f74ffd2d71d2ae42509de07b0c3e13f71320b25da0d4c75dca75c4208ea7a525483267d6ccb8acd5274728c015c7ac4006)
+ URLS "https://github.com/anholt/libepoxy/archive/7d58fd3d47d2d69f2b1b9f08325302e4eeff9ebe.zip"
+ FILENAME "libepoxy-7d58fd3d47d2d69f2b1b9f08325302e4eeff9ebe.zip"
+ SHA512 7e97a7832ea136565be92d6f6f0afead2fff9ac7b2999ef9e7865ac18dfbeab354e5a652b1a86e982a323dca9a1446df07821c26d315b7da4ca72b5be7345695)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake
index 6c30c0a08..995e8e0ee 100644
--- a/ports/libjpeg-turbo/portfile.cmake
+++ b/ports/libjpeg-turbo/portfile.cmake
@@ -28,18 +28,24 @@ else()
set(NOT_BUILD_STATIC OFF)
endif()
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS
-DENABLE_STATIC=${BUILD_STATIC}
-DENABLE_SHARED=${NOT_BUILD_STATIC}
-DWITH_CRT_DLL=ON
-DENABLE_EXECUTABLES=OFF
-DINSTALL_DOCS=OFF
- # OPTIONS_RELEASE -DOPTIMIZE=1
+ ${LIBJPEGTURBO_SIMD}
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
)
+vcpkg_build_cmake()
vcpkg_install_cmake()
# Rename libraries for static builds
diff --git a/ports/libpopt/CONTROL b/ports/libpopt/CONTROL
new file mode 100644
index 000000000..0065bf323
--- /dev/null
+++ b/ports/libpopt/CONTROL
@@ -0,0 +1,3 @@
+Source: libpopt
+Version: 1.16-10~vcpkg1
+Description: Library for parsing command line parameters
diff --git a/ports/libpopt/cmake/CMakeLists.txt b/ports/libpopt/cmake/CMakeLists.txt
new file mode 100644
index 000000000..84afc160d
--- /dev/null
+++ b/ports/libpopt/cmake/CMakeLists.txt
@@ -0,0 +1,57 @@
+cmake_minimum_required(VERSION 3.0)
+project(popt VERSION 1.16 LANGUAGES C)
+
+set(PACKAGE "popt")
+set(POPT_SYSCONFDIR "C:\\\\")
+set(CMAKE_DEBUG_POSTFIX "d")
+
+file(GLOB SOURCES "popt.c"
+ "poptconfig.c"
+ "popthelp.c"
+ "poptint.c"
+ "poptparse.c"
+ "popt.def"
+)
+
+option(POPT_USE_CONFIG "Use configuration file" OFF)
+
+if(POPT_USE_CONFIG)
+ include(CheckIncludeFile)
+ include(CheckFunctionExists)
+
+ check_include_file(float.h HAVE_FLOAT_H)
+ check_include_file(fnmatch.h HAVE_FNMATCH_H)
+ check_include_file(glob.h HAVE_GLOB_H)
+ check_include_file(langinfo.h HAVE_LANGINFO_H)
+ check_include_file(libintl.h HAVE_LIBINTL_H)
+ check_include_file(mcheck.h HAVE_MCHECK_H)
+ check_include_file(unistd.h HAVE_UNISTD_H)
+
+
+ check_function_exists(gettext HAVE_GETTEXT)
+ check_function_exists(iconv HAVE_ICONV)
+ check_function_exists(mtrace HAVE_MTRACE)
+ check_function_exists(srandom HAVE_SRANDOM)
+ check_function_exists(stpcpy HAVE_STPCPY)
+ check_function_exists(strerror HAVE_STRERROR)
+ check_function_exists(vasprintf HAVE_VASPRINTF)
+ check_function_exists(__secure_getenv HAVE___SECURE_GETENV)
+
+ configure_file(config.h.cmake config.h @ONLY)
+ add_definitions(-DHAVE_CONFIG_H)
+endif()
+
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
+include_directories(${CMAKE_BINARY_DIR})
+
+add_library(popt ${SOURCES})
+set_target_properties(popt PROPERTIES COMPILE_FLAGS "/wd4996")
+
+install(TARGETS popt
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(FILES "popt.h" DESTINATION "include") \ No newline at end of file
diff --git a/ports/libpopt/cmake/config.h.cmake b/ports/libpopt/cmake/config.h.cmake
new file mode 100644
index 000000000..f641fc73c
--- /dev/null
+++ b/ports/libpopt/cmake/config.h.cmake
@@ -0,0 +1,61 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* Define to 1 if translation of program messages to the user's native language is requested. */
+#cmakedefine ENABLE_NLS 1
+
+/* Define if the GNU dcgettext() function is already present or preinstalled. */
+#cmakedefine HAVE_DCGETTEXT 1
+
+/* Define to 1 if you have the <float.h> header file. */
+#cmakedefine HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#cmakedefine HAVE_FNMATCH_H 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#cmakedefine HAVE_GETTEXT 1
+
+/* Define to 1 if you have the <glob.h> header file. */
+#cmakedefine HAVE_GLOB_H 1
+
+/* Define if you have the iconv() function and it works. */
+#cmakedefine HAVE_ICONV 1
+
+/* Define to 1 if you have the <langinfo.h> header file. */
+#cmakedefine HAVE_LANGINFO_H 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#cmakedefine HAVE_LIBINTL_H 1
+
+/* Define to 1 if you have the <mcheck.h> header file. */
+#cmakedefine HAVE_MCHECK_H 1
+
+/* Define to 1 if you have the `mtrace' function. */
+#cmakedefine HAVE_MTRACE 1
+
+/* Define to 1 if you have the `srandom' function. */
+#cmakedefine HAVE_SRANDOM 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#cmakedefine HAVE_STPCPY 1
+
+/* Define to 1 if you have the `strerror' function. */
+#cmakedefine HAVE_STRERROR 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `vasprintf' function. */
+#cmakedefine HAVE_VASPRINTF 1
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#cmakedefine HAVE___SECURE_GETENV 1
+
+/* Name of package */
+#cmakedefine PACKAGE "@PACKAGE@"
+
+/* Full path to default POPT configuration directory */
+#cmakedefine POPT_SYSCONFDIR "@POPT_SYSCONFDIR@"
+
+#endif \ No newline at end of file
diff --git a/ports/libpopt/cmake/popt.def b/ports/libpopt/cmake/popt.def
new file mode 100644
index 000000000..20bb70a18
--- /dev/null
+++ b/ports/libpopt/cmake/popt.def
@@ -0,0 +1,50 @@
+EXPORTS
+ _poptArgMask
+ _poptBitsK
+ _poptBitsM
+ _poptBitsN
+ _poptGroupMask
+ poptAddAlias
+ poptAddItem
+ poptAliasOptions
+ poptBadOption
+ poptBitsAdd
+ poptBitsArgs
+ poptBitsChk
+ poptBitsClr
+ poptBitsDel
+ poptBitsIntersect
+ poptBitsUnion
+ poptConfigFileToString
+ poptDupArgv
+ poptFini
+ poptFreeContext
+ poptGetArg
+ poptGetArgs
+ poptGetContext
+ poptGetInvocationName
+ poptGetNextOpt
+ poptGetOptArg
+ poptHelpOptions
+ poptInit
+ poptParseArgvString
+ poptPeekArg
+ poptPrintHelp
+ poptPrintUsage
+ poptReadConfigFile
+ poptReadConfigFiles
+ poptReadDefaultConfig
+ poptReadFile
+ poptResetContext
+ poptSaneFile
+ poptSaveBits
+ poptSaveInt
+ poptSaveLong
+ poptSaveLongLong
+ poptSaveShort
+ poptSaveString
+ poptSetExecPath
+ poptSetOtherOptionHelp
+ poptStrerror
+ poptStrippedArgv
+ poptStuffArgs \ No newline at end of file
diff --git a/ports/libpopt/patches/0004-vcpkg-fixmsvc.patch b/ports/libpopt/patches/0004-vcpkg-fixmsvc.patch
new file mode 100644
index 000000000..d9bc082f3
--- /dev/null
+++ b/ports/libpopt/patches/0004-vcpkg-fixmsvc.patch
@@ -0,0 +1,62 @@
+diff -Naur a/poptconfig.c b/poptconfig.c
+--- a/poptconfig.c 2009-05-20 16:18:07.000000000 +0300
++++ b/poptconfig.c 2017-01-21 03:10:17.116120500 +0300
+@@ -141,17 +141,23 @@
+ int poptSaneFile(const char * fn)
+ {
+ struct stat sb;
+- uid_t uid = getuid();
++#ifndef _MSC_VER
++ uid_t uid = getuid();
++#endif // ! _MSC_VER
+
+ if (stat(fn, &sb) == -1)
+ return 1;
++#ifndef _MSC_VER
+ if ((uid_t)sb.st_uid != uid)
+ return 0;
++#endif // ! _MSC_VER
+ if (!S_ISREG(sb.st_mode))
+ return 0;
+ /*@-bitwisesigned@*/
+- if (sb.st_mode & (S_IWGRP|S_IWOTH))
+- return 0;
++#ifndef _MSC_VER
++ if (sb.st_mode & (S_IWGRP | S_IWOTH))
++ return 0;
++#endif // ! _MSC_VER
+ /*@=bitwisesigned@*/
+ return 1;
+ }
+diff -Naur a/popthelp.c b/popthelp.c
+--- a/popthelp.c 2009-08-28 03:06:33.000000000 +0300
++++ b/popthelp.c 2017-01-21 02:59:26.665695800 +0300
+@@ -10,7 +10,10 @@
+
+ #include "system.h"
+
+-#define POPT_USE_TIOCGWINSZ
++#ifndef _MSC_VER
++#define POPT_USE_TIOCGWINSZ
++#endif
++
+ #ifdef POPT_USE_TIOCGWINSZ
+ #include <sys/ioctl.h>
+ #endif
+diff -Naur a/system.h b/system.h
+--- a/system.h 2008-12-18 19:09:49.000000000 +0200
++++ b/system.h 2017-01-21 03:10:59.195367500 +0300
+@@ -100,4 +100,13 @@
+ #endif
+ #define UNUSED(x) x __attribute__((__unused__))
+
++#if defined(_MSC_VER)
++#define X_OK 0
++
++#include <BaseTsd.h>
++typedef SSIZE_T ssize_t;
++
++#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
++#endif
++
+ #include "popt.h"
diff --git a/ports/libpopt/portfile.cmake b/ports/libpopt/portfile.cmake
new file mode 100644
index 000000000..404a93499
--- /dev/null
+++ b/ports/libpopt/portfile.cmake
@@ -0,0 +1,35 @@
+include(vcpkg_common_functions)
+
+set(LIBPOPT_VERSION 1.16)
+set(LIBPOPT_HASH bae2dd4e5d682ef023fdc77ae60c4aad01a3a576d45af9d78d22490c11e410e60edda37ede171920746d4ae0d5de3c060d15cecfd41ba75b727a811be828d694)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/popt-${LIBPOPT_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://rpm5.org/files/popt/popt-${LIBPOPT_VERSION}.tar.gz"
+ FILENAME "popt-${LIBPOPT_VERSION}.tar.gz"
+ SHA512 ${LIBPOPT_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/patches/0004-vcpkg-fixmsvc.patch"
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.cmake DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/popt.def DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DPOPT_USE_CONFIG=1
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpopt)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpopt/COPYING ${CURRENT_PACKAGES_DIR}/share/libpopt/copyright)
diff --git a/ports/libvpx/CONTROL b/ports/libvpx/CONTROL
new file mode 100644
index 000000000..b4cfa55f4
--- /dev/null
+++ b/ports/libvpx/CONTROL
@@ -0,0 +1,3 @@
+Source: libvpx
+Version: 1.6.1-1
+Description: The reference software implementation for the video coding formats VP8 and VP9.
diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake
new file mode 100644
index 000000000..87f6cfdfc
--- /dev/null
+++ b/ports/libvpx/portfile.cmake
@@ -0,0 +1,109 @@
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported by libvpx yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+include(vcpkg_common_functions)
+
+set(LIBVPX_VERSION 1.6.1)
+set(LIBVPX_HASH 13b7eb515d026b302b8c484d6f06df067feb5aed4ceac953d85fe84fd684dab07e89ddbf80b4f395c6d9127709422156287e5754f49246050b2e18930adb3970)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libvpx-${LIBVPX_VERSION})
+
+string(REGEX REPLACE "\\\\" "/" SOURCE_PATH_UNIX ${SOURCE_PATH})
+string(REGEX REPLACE "\\\\" "/" CURRENT_PACKAGES_DIR_UNIX ${CURRENT_PACKAGES_DIR})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/webmproject/libvpx/archive/v${LIBVPX_VERSION}.tar.gz"
+ FILENAME "libvpx-${LIBVPX_VERSION}.tar.gz"
+ SHA512 ${LIBVPX_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_find_acquire_program(YASM)
+vcpkg_find_acquire_program(PERL)
+vcpkg_acquire_msys(MSYS_ROOT)
+get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
+get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
+set(ENV{PATH} "${PERL_EXE_PATH};${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH}")
+set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
+
+message(STATUS "Installing MSYS Packages")
+vcpkg_execute_required_process(
+ COMMAND
+ ${BASH} --noprofile --norc -c
+ "pacman -Sy --noconfirm --needed make"
+ WORKING_DIRECTORY ${MSYS_ROOT}
+ LOGNAME pacman-${TARGET_TRIPLET})
+
+file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt)
+ set(LIBVPX_CRT_SUFFIX mt)
+else()
+ set(LIBVPX_CRT_SUFFIX md)
+endif()
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
+ set(LIBVPX_TARGET_ARCH "x86-win32")
+ set(LIBVPX_ARCH_DIR "Win32")
+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
+ set(LIBVPX_TARGET_ARCH "x86_64-win64")
+ set(LIBVPX_ARCH_DIR "x64")
+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
+ set(LIBVPX_TARGET_ARCH "armv7-win32")
+ set(LIBVPX_ARCH_DIR "ARM")
+endif()
+
+set(LIBVPX_TARGET_VS "vs14")
+
+message(STATUS "Generating makefile")
+file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+vcpkg_execute_required_process(
+ COMMAND
+ ${BASH} --noprofile --norc
+ "${SOURCE_PATH_UNIX}/configure"
+ --target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS}
+ ${LIBVPX_CRT_LINKAGE}
+ --disable-examples
+ --disable-tools
+ --disable-docs
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
+ LOGNAME configure-${TARGET_TRIPLET})
+
+message(STATUS "Generating MSBuild projects")
+vcpkg_execute_required_process(
+ COMMAND
+ ${BASH} --noprofile --norc -c "make dist"
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
+ LOGNAME generate-${TARGET_TRIPLET})
+
+vcpkg_build_msbuild(
+ PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj"
+)
+
+if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
+ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmdd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
+else()
+ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmt.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
+ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmtd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
+endif()
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
+ set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
+else()
+ set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
+endif()
+file(
+ INSTALL
+ ${LIBVPX_INCLUDE_DIR}
+ DESTINATION
+ "${CURRENT_PACKAGES_DIR}/include"
+ RENAME
+ "vpx")
+
+
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvpx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvpx/LICENSE ${CURRENT_PACKAGES_DIR}/share/libvpx/copyright)
diff --git a/ports/libwebm/0001-fix-cmake.patch b/ports/libwebm/0001-fix-cmake.patch
new file mode 100644
index 000000000..6cbbe1cc1
--- /dev/null
+++ b/ports/libwebm/0001-fix-cmake.patch
@@ -0,0 +1,65 @@
+From 5bd18b68658c2ba66e358341c159b17d9ba18791 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Wed, 15 Mar 2017 00:01:24 +0300
+Subject: [PATCH] fix cmake
+
+- enable shared lib
+- add install target
+- set _CRT_SECURE_NO_WARNINGS
+---
+ CMakeLists.txt | 29 +++++++++++++++++++++++++++--
+ 1 file changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bf99829..a7bf021 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,14 +5,21 @@
+ ## tree. An additional intellectual property rights grant can be found
+ ## in the file PATENTS. All contributing project authors may
+ ## be found in the AUTHORS file in the root of the source tree.
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 3.4)
+ project(LIBWEBM)
++
++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
++
+ include("${CMAKE_CURRENT_SOURCE_DIR}/build/msvc_runtime.cmake")
+
+ set(LIBWEBM_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+
++if(MSVC)
++ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
++endif()
++
+ # Libwebm section.
+-add_library(webm STATIC
++add_library(webm
+ "${LIBWEBM_SRC_DIR}/mkvmuxer.cpp"
+ "${LIBWEBM_SRC_DIR}/mkvmuxer.hpp"
+ "${LIBWEBM_SRC_DIR}/mkvmuxertypes.hpp"
+@@ -62,3 +69,21 @@ add_executable(webm2pes
+ "${LIBWEBM_SRC_DIR}/webm2pes.cc"
+ "${LIBWEBM_SRC_DIR}/webm2pes.h")
+ target_link_libraries(webm2pes LINK_PUBLIC webm)
++
++install(
++ TARGETS webm
++ RUNTIME DESTINATION bin
++ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib)
++
++install(
++ FILES
++ "mkvmuxer.hpp"
++ "mkvmuxertypes.hpp"
++ "mkvmuxerutil.hpp"
++ "mkvparser.hpp"
++ "mkvreader.hpp"
++ "mkvwriter.hpp"
++ "webmids.hpp"
++ DESTINATION
++ "include/libwebm")
+--
+2.11.0.windows.1
+
diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL
new file mode 100644
index 000000000..ca76af460
--- /dev/null
+++ b/ports/libwebm/CONTROL
@@ -0,0 +1,3 @@
+Source: libwebm
+Version: 1.0.0.27-1
+Description: WebM File Parser
diff --git a/ports/libwebm/portfile.cmake b/ports/libwebm/portfile.cmake
new file mode 100644
index 000000000..6ccd7e3c5
--- /dev/null
+++ b/ports/libwebm/portfile.cmake
@@ -0,0 +1,36 @@
+include(vcpkg_common_functions)
+
+set(LIBWEBM_VERSION 1.0.0.27)
+set(LIBWEBM_HASH 15650b8b121b226654a5abed45a3586ddaf785dee8dac7c72df3f3f9aef76af4e561b75a2ef05328af8dfcfde21948b2edb59cd884dad08b8919cab4ee5a8596)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebm-libwebm-${LIBWEBM_VERSION})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/webmproject/libwebm/archive/libwebm-${LIBWEBM_VERSION}.tar.gz"
+ FILENAME "libwebm-${LIBWEBM_VERSION}.tar.gz"
+ SHA512 ${LIBWEBM_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-cmake.patch")
+
+if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=dll)
+else()
+ set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=static)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS ${LIBWEBM_CRT_LINKAGE})
+
+vcpkg_build_cmake()
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebm)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/libwebm/copyright)
diff --git a/ports/mpg123/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch b/ports/mpg123/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch
deleted file mode 100644
index 7c68789e7..000000000
--- a/ports/mpg123/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From aa43d3193302cd545ae2a45079b12af62bf13b38 Mon Sep 17 00:00:00 2001
-From: Robert Schumacher <roschuma@microsoft.com>
-Date: Sat, 7 May 2016 00:47:10 -0700
-Subject: [PATCH] Modify 2010/libmpg123.vcxproj to use VS 2015, along with
- reverting #undef MPG123_EXPORT
-
----
- ports/MSVC++/2010/libmpg123/libmpg123.vcxproj | 54 +++++++++++++++++++--------
- src/libmpg123/mpg123.h.in | 2 -
- 2 files changed, 38 insertions(+), 18 deletions(-)
-
-diff --git a/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
-index afa7de2..84c8d25 100644
---- a/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
-+++ b/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
-@@ -47,6 +47,10 @@
- <RootNamespace>libmpg123</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-+ <PropertyGroup>
-+ <UseOfMfc>false</UseOfMfc>
-+ <PlatformToolset>v140</PlatformToolset>
-+ </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_x86_Dll_Minimal|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
-@@ -154,7 +158,7 @@
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Generic|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <ExceptionHandling>
-@@ -178,7 +182,7 @@
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
-@@ -200,7 +204,7 @@
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Generic_Dll|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;BUILD_MPG123_DLL;ACCURATE_ROUNDING;IEEE_FLOAT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <ExceptionHandling>
-@@ -231,7 +235,7 @@
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;BUILD_MPG123_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
-@@ -258,7 +262,7 @@
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <ExceptionHandling>
-@@ -278,6 +282,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
-
-+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
-+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
-+
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
-
-@@ -337,7 +344,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- </Command>
- </PreLinkEvent>
- <Lib>
-- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(ProjectDir)Debug\$(ProjectName).lib</OutputFile>
- <AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Lib>
-@@ -349,7 +356,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
-@@ -371,6 +378,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
-
-+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
-+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
-+
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
-
-@@ -430,7 +440,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- </Command>
- </PreLinkEvent>
- <Lib>
-- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(ProjectDir)Release\$(ProjectName).lib</OutputFile>
- <AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Lib>
-@@ -438,7 +448,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86_Dll|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <ExceptionHandling>
-@@ -460,6 +470,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
-
-+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
-+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
-+
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
-
-@@ -519,7 +532,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- </Command>
- </PreLinkEvent>
- <Link>
-- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(ProjectDir)Debug\$(ProjectName).dll</OutputFile>
- <AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
-@@ -540,7 +553,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
-@@ -563,6 +576,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
-
-+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
-+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
-+
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
-
-@@ -622,7 +638,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- </Command>
- </PreLinkEvent>
- <Link>
-- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(ProjectDir)Release\$(ProjectName).dll</OutputFile>
- <AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
-@@ -638,7 +654,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_x86_Dll_Minimal|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <ExceptionHandling>
-@@ -660,6 +676,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Debug\dct36_3dnowext.asm"
-
-+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
-+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct36_sse.o" "$(ProjectDir)..\libmpg123\Debug\dct36_sse.asm"
-+
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Debug\dct64_3dnow.asm"
-
-@@ -719,7 +738,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- </Command>
- </PreLinkEvent>
- <Link>
-- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(ProjectDir)Debug\$(ProjectName).dll</OutputFile>
- <AdditionalLibraryDirectories>$(ProjectDir)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
-@@ -740,7 +759,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
-- <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>../..;../../../../src/libmpg123;../../../../src;../../../../src/compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;NO_STRING;NO_ID3V2;NO_ICY;NO_DOWNSAMPLE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
-@@ -763,6 +782,9 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_3dnowext.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.o" "$(ProjectDir)..\libmpg123\Release\dct36_3dnowext.asm"
-
-+cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct36_sse.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
-+yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct36_sse.o" "$(ProjectDir)..\libmpg123\Release\dct36_sse.asm"
-+
- cl /I "..\.." /EP /TC "$(ProjectDir)..\..\..\..\src\libmpg123\dct64_3dnow.S" /nologo &gt; "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
- yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.o" "$(ProjectDir)..\libmpg123\Release\dct64_3dnow.asm"
-
-@@ -822,7 +844,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(ProjectDir)..\libmpg123\
- </Command>
- </PreLinkEvent>
- <Link>
-- <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(ProjectDir)Release\$(ProjectName).dll</OutputFile>
- <AdditionalLibraryDirectories>$(ProjectDir)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
-diff --git a/src/libmpg123/mpg123.h.in b/src/libmpg123/mpg123.h.in
-index a25d4d1..d95e41d 100644
---- a/src/libmpg123/mpg123.h.in
-+++ b/src/libmpg123/mpg123.h.in
-@@ -1404,6 +1404,4 @@ MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh
- }
- #endif
-
--#undef MPG123_EXPORT
--
- #endif
---
-2.8.1.windows.1
-
diff --git a/ports/mpg123/0001-fix-crt-linking.patch b/ports/mpg123/0001-fix-crt-linking.patch
new file mode 100644
index 000000000..c0a74c366
--- /dev/null
+++ b/ports/mpg123/0001-fix-crt-linking.patch
@@ -0,0 +1,88 @@
+From fcf5f82c9abeb6068be26dc43f613a253cac3436 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Mon, 13 Mar 2017 02:59:35 +0300
+Subject: [PATCH] ports/msvc/libmpg123: fix static library linking
+
+---
+ ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
+index 0a69525..ecf3a66 100644
+--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
++++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
+@@ -265,7 +265,7 @@
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -285,7 +285,7 @@
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -312,7 +312,7 @@
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+@@ -336,7 +336,7 @@
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+@@ -474,7 +474,7 @@
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -562,7 +562,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+@@ -623,7 +623,7 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+@@ -716,7 +716,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WarningLevel>Level3</WarningLevel>
+--
+2.11.0.windows.1
+
diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL
index 0c4a746a0..e4652e52d 100644
--- a/ports/mpg123/CONTROL
+++ b/ports/mpg123/CONTROL
@@ -1,3 +1,3 @@
Source: mpg123
-Version: 1.23.3
+Version: 1.24.0-1
Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file
diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake
index 76b69c48b..1ff9b658b 100644
--- a/ports/mpg123/portfile.cmake
+++ b/ports/mpg123/portfile.cmake
@@ -1,13 +1,27 @@
-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/mpg123-1.23.3)
+
+set(MPG123_VERSION 1.24.0)
+set(MPG123_HASH e7c0d7a103daf496e75a6aa6aca861cfc0ad391f242335990c2360305e567039d24ca3b37a35f79b75749055e255f4692b8b43d2fec332b119223b00e12b0cb7)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-${MPG123_VERSION})
+
+#architecture detection
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(MPG123_ARCH Win32)
+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(MPG123_ARCH x64)
+else()
+ message(FATAL_ERROR "unsupported architecture")
+endif()
+
+#linking
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(MPG123_CONFIGURATION_SUFFIX _Dll)
+endif()
+
vcpkg_download_distfile(ARCHIVE
- URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/1.23.3/mpg123-1.23.3.tar.bz2"
- FILENAME "mpg123-1.23.3.tar.bz2"
- SHA512 a5ebfb36223a3966386bc8e5769b8543861872d20f9de037d07857e857000f20e198e0b1db04bdc56b18b19d5b4027d8261a104af0216d6ea45274b21a18dda4
+ URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/${MPG123_VERSION}/mpg123-${MPG123_VERSION}.tar.bz2"
+ FILENAME "mpg123-${MPG123_VERSION}.tar.bz2"
+ SHA512 ${MPG123_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})
@@ -16,44 +30,51 @@ get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch
-)
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch")
vcpkg_build_msbuild(
- PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
- RELEASE_CONFIGURATION Release_x86_Dll
- DEBUG_CONFIGURATION Debug_x86_Dll
+ PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
+ RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX}
+ DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX}
)
message(STATUS "Installing")
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file(INSTALL
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+ file(INSTALL
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+ )
+else()
+ file(INSTALL
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+ )
+ file(INSTALL
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+ )
+endif()
+
file(INSTALL
- ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.dll
- ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
-)
-file(INSTALL
- ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.dll
- ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin
-)
-file(INSTALL
- ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.lib
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
- ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.lib
+ ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/mpg123.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
-file(INSTALL
- ${SOURCE_PATH}/src/libmpg123/mpg123.h.in
- DESTINATION ${CURRENT_PACKAGES_DIR}/include
-)
+
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright)
-vcpkg_copy_pdbs()
message(STATUS "Installing done")
diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL
index 2b67c7c98..fc15d9b41 100644
--- a/ports/mpir/CONTROL
+++ b/ports/mpir/CONTROL
@@ -1,3 +1,3 @@
Source: mpir
-Version: 3.0.0-1
+Version: 3.0.0-2
Description: Multiple Precision Integers and Rationals. \ No newline at end of file
diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake
index 96bfa9454..1595a6533 100644
--- a/ports/mpir/portfile.cmake
+++ b/ports/mpir/portfile.cmake
@@ -11,7 +11,7 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-if(VCPKG_PLATFORM_TOOLSET MATCHES "v141*")
+if(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(MSVC_VERSION 15)
else()
set(MSVC_VERSION 14)
@@ -27,10 +27,10 @@ else()
)
endif()
-IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
+IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
SET(BUILD_ARCH "Win32")
ELSE()
- SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
+ SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE})
ENDIF()
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@@ -43,12 +43,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
)
file(INSTALL
${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll
- ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(INSTALL
${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll
- ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
file(INSTALL
@@ -77,7 +75,7 @@ else()
${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
- file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright)
+ file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright)
endif()
message(STATUS "Installing done")
diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL
new file mode 100644
index 000000000..4e65a9d93
--- /dev/null
+++ b/ports/nlohmann-json/CONTROL
@@ -0,0 +1,3 @@
+Source: nlohmann-json
+Version: 2.1.1
+Description: JSON for Modern C++
diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake
new file mode 100644
index 000000000..8a8f5dc30
--- /dev/null
+++ b/ports/nlohmann-json/portfile.cmake
@@ -0,0 +1,22 @@
+include(vcpkg_common_functions)
+set(SOURCE_VERSION 2.1.1)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json-${SOURCE_VERSION})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/nlohmann/json/archive/v${SOURCE_VERSION}.zip"
+ FILENAME "nlohmann-json-v${SOURCE_VERSION}.zip"
+ SHA512 7f7155c4bcc4f704f329ba6976c31888a45d17bc2fa08ee9e64dc1b0b1f39439819b895cda9d77f3f60446ad6f5802e9c6ae79fbaf6d1b6f7e49ca050b86cd7c
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+
+file(COPY ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/LICENSE.MIT ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/copyright)
diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt
index d290d1332..4cbf6822e 100644
--- a/ports/pango/CMakeLists.txt
+++ b/ports/pango/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0)
-project(pango)
+project(pango C)
set(PANGO_LIB_SUFFIX 1.0)
set(PANGO_DLL_SUFFIX 1)
diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL
index b763f25e8..fbc404752 100644
--- a/ports/pango/CONTROL
+++ b/ports/pango/CONTROL
@@ -1,4 +1,4 @@
Source: pango
-Version: 1.40.3
+Version: 1.40.4
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz
diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake
index 07dfc6929..c3eec9728 100644
--- a/ports/pango/portfile.cmake
+++ b/ports/pango/portfile.cmake
@@ -5,17 +5,19 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-1.40.3)
+set(PANGO_VERSION 1.40.4)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION})
vcpkg_download_distfile(ARCHIVE
- URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-1.40.3.tar.xz"
- FILENAME "pango-1.40.3.tar.xz"
- SHA512 ff82395e8487624dffe212975b72b3383dcebb197a8675c8b409665e3e2e30fc23d9a6c25c3129a115adb7182b2a71a49550dbe881eb7ee9bbc572de6ba18d27)
+ URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz"
+ FILENAME "pango-${PANGO_VERSION}.tar.xz"
+ SHA512 8c7413f6712eaf9fd4bd92a9260a85e7e4bd5e1a03c4c89db139e1704e8681e9834f8b98394b9f4b87babd45155a15b6cffd583ad8f89a48a4849305d43aa613)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS_DEBUG
-DPANGO_SKIP_HEADERS=ON)
diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL
new file mode 100644
index 000000000..8a118b3e7
--- /dev/null
+++ b/ports/pcre2/CONTROL
@@ -0,0 +1,3 @@
+Source: pcre2
+Version: 10.23
+Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library
diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake
new file mode 100644
index 000000000..fa7bbcf4b
--- /dev/null
+++ b/ports/pcre2/portfile.cmake
@@ -0,0 +1,45 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-10.23)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/pcre/files/pcre2/10.23/pcre2-10.23.zip/download"
+ FILENAME "pcre2-10.23.zip"
+ SHA512 0f0638ce28ce17e18425d499cc516a30dabbfa868180ea320361ffeaa26d4f6f6975f12bc20024f7457fe3c6eed686976a9e5c66c2785d1ea63bee38131ea0d2)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DPCRE2_BUILD_PCRE2_8=ON
+ -DPCRE2_BUILD_PCRE2_16=ON
+ -DPCRE2_BUILD_PCRE2_32=ON
+ -DPCRE2_SUPPORT_JIT=ON
+ -DPCRE2_SUPPORT_UNICODE=ON
+ -DPCRE2_BUILD_TESTS=OFF
+ -DPCRE2_BUILD_PCRE2GREP=OFF)
+
+vcpkg_install_cmake()
+
+file(READ ${CURRENT_PACKAGES_DIR}/include/pcre2.h PCRE2_H)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ string(REPLACE "defined(PCRE2_STATIC)" "1" PCRE2_H "${PCRE2_H}")
+else()
+ string(REPLACE "defined(PCRE2_STATIC)" "0" PCRE2_H "${PCRE2_H}")
+endif()
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/pcre2.h "${PCRE2_H}")
+
+# don't install POSIX wrapper
+file(REMOVE ${CURRENT_PACKAGES_DIR}/include/pcre2posix.h)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pcre2-posix.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pcre2-posixd.lib)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcre2-posix.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-posixd.dll)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/man)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcre2)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcre2/COPYING ${CURRENT_PACKAGES_DIR}/share/pcre2/copyright)
diff --git a/ports/tinyexr/CONTROL b/ports/tinyexr/CONTROL
new file mode 100644
index 000000000..8ac085f68
--- /dev/null
+++ b/ports/tinyexr/CONTROL
@@ -0,0 +1,3 @@
+Source: tinyexr
+Version: v0.9.5-d16ea6
+Description: Library to load and save OpenEXR(.exr) images
diff --git a/ports/tinyexr/copyright b/ports/tinyexr/copyright
new file mode 100644
index 000000000..975a80794
--- /dev/null
+++ b/ports/tinyexr/copyright
@@ -0,0 +1,5 @@
+3-clause BSD
+
+tinyexr uses miniz, which is developed by Rich Geldreich richgel99@gmail.com, and licensed under public domain.
+
+tinyexr tools uses stb, which is licensed under public domain: https://github.com/nothings/stb tinyexr uses some code from OpenEXR, which is licensed under 3-clause BSD license. \ No newline at end of file
diff --git a/ports/tinyexr/portfile.cmake b/ports/tinyexr/portfile.cmake
new file mode 100644
index 000000000..bf725cddd
--- /dev/null
+++ b/ports/tinyexr/portfile.cmake
@@ -0,0 +1,14 @@
+# header-only
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyexr-d16ea6347ae78bcee984fb57cab1f023aeda4fb0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/syoyo/tinyexr/archive/d16ea6347ae78bcee984fb57cab1f023aeda4fb0.tar.gz"
+ FILENAME "tinyexr-v0.9.5-d16ea6.tar.gz"
+ SHA512 189ab04f6c5fb50c20ac0515a83ee16cba4b0f1bca004db2926281077868d1384e0c54f81768a54b76286a17c1b0c45a0b82acaf22b7ee843dc87c654b09e950
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${SOURCE_PATH}/tinyexr.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+# Handle copyright
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexr)
diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL
index 840990004..4709e155f 100644
--- a/ports/uwebsockets/CONTROL
+++ b/ports/uwebsockets/CONTROL
@@ -1,4 +1,4 @@
Source: uwebsockets
-Version: 0.12.0
+Version: 0.13.0-1
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
index 1049e761d..47ee00624 100644
--- a/ports/uwebsockets/portfile.cmake
+++ b/ports/uwebsockets/portfile.cmake
@@ -20,6 +20,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
+file(GLOB HEADERS ${SOURCE_PATH}/src/*.h)
+file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/uWS)
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uwebsockets)
diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake
index f4a809e7f..6fe3f5aa0 100644
--- a/scripts/cmake/vcpkg_build_msbuild.cmake
+++ b/scripts/cmake/vcpkg_build_msbuild.cmake
@@ -7,7 +7,9 @@
# vcpkg_build_msbuild(PROJECT_PATH <sln_project_path>
# [RELEASE_CONFIGURATION <release_configuration>] # (default = "Release")
# [DEBUG_CONFIGURATION <debug_configuration>] @ (default = "Debug")
+# [TARGET_PLATFORM_VERSION <windows_target_platform_version>]
# [PLATFORM <platform>] # (default = "${TRIPLET_SYSTEM_ARCH}")
+# [PLATFORM_TOOLSET <platform_toolset>] # (default = "${VCPKG_PLATFORM_TOOLSET}")
# [OPTIONS arg1 [arg2 ...]]
# [OPTIONS_RELEASE arg1 [arg2 ...]]
# [OPTIONS_DEBUG arg1 [arg2 ...]]
@@ -21,12 +23,16 @@
# ``DEBUG_CONFIGURATION``
# The configuration (``/p:Configuration`` msbuild parameter)
# used for Debug builds.
-# ``DEBUG_CONFIGURATION``
-# The configuration (``/p:Configuration`` msbuild parameter)
-# used for Debug builds.
+# ``TARGET_PLATFORM_VERSION``
+# The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter)
+# ``TARGET``
+# The MSBuild target to build. (``/t:<TARGET>``)
# ``PLATFORM``
# The platform (``/p:Platform`` msbuild parameter)
# used for the build.
+# ``PLATFORM_TOOLSET``
+# The platform toolset (``/p:PlatformToolset`` msbuild parameter)
+# used for the build.
# ``OPTIONS``
# The options passed to msbuild for all builds.
# ``OPTIONS_RELEASE``
@@ -35,8 +41,9 @@
# The options passed to msbuild for Debug builds.
#
+
function(vcpkg_build_msbuild)
- cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
+ cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
if(NOT DEFINED _csc_RELEASE_CONFIGURATION)
set(_csc_RELEASE_CONFIGURATION Release)
@@ -47,16 +54,33 @@ function(vcpkg_build_msbuild)
if(NOT DEFINED _csc_PLATFORM)
set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
+ if(NOT DEFINED _csc_PLATFORM_TOOLSET)
+ set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET})
+ endif()
+ if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION)
+ vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION)
+ endif()
+ if(NOT DEFINED _csc_TARGET)
+ set(_csc_TARGET Rebuild)
+ endif()
+
+ list(APPEND _csc_OPTIONS
+ /t:${_csc_TARGET}
+ /p:Platform=${_csc_PLATFORM}
+ /p:PlatformToolset=${_csc_PLATFORM_TOOLSET}
+ /p:VCPkgLocalAppDataDisabled=true
+ /p:UseIntelMKL=No
+ /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION}
+ /m
+ )
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
vcpkg_execute_required_process(
- COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
+ COMMAND msbuild ${_csc_PROJECT_PATH}
/p:Configuration=${_csc_RELEASE_CONFIGURATION}
- /p:Platform=${_csc_PLATFORM}
- /p:VCPkgLocalAppDataDisabled=true
- /p:UseIntelMKL=No
- /m
+ ${_csc_OPTIONS}
+ ${_csc_OPTIONS_RELEASE}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME build-${TARGET_TRIPLET}-rel
)
@@ -64,12 +88,10 @@ function(vcpkg_build_msbuild)
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
vcpkg_execute_required_process(
- COMMAND msbuild ${_csc_PROJECT_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
+ COMMAND msbuild ${_csc_PROJECT_PATH}
/p:Configuration=${_csc_DEBUG_CONFIGURATION}
- /p:Platform=${_csc_PLATFORM}
- /p:VCPkgLocalAppDataDisabled=true
- /p:UseIntelMKL=No
- /m
+ ${_csc_OPTIONS}
+ ${_csc_OPTIONS_DEBUG}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME build-${TARGET_TRIPLET}-dbg
)
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index daf9dfd6f..e3ca3adca 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -19,8 +19,8 @@ function(vcpkg_configure_cmake)
set(GENERATOR "Visual Studio 14 2015")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 Win64")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm")
- set(GENERATOR "Visual Studio 14 2015 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ set(GENERATOR "Visual Studio 14 2015 ARM")
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017")
@@ -32,8 +32,8 @@ function(vcpkg_configure_cmake)
set(GENERATOR "Visual Studio 15 2017")
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 Win64")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm")
- set(GENERATOR "Visual Studio 15 2017 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ set(GENERATOR "Visual Studio 15 2017 ARM")
endif()
# If we use Ninja, make sure it's on PATH
diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake
index 7a8014eb2..cefe8cfd8 100644
--- a/scripts/cmake/vcpkg_get_windows_sdk.cmake
+++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake
@@ -1,6 +1,6 @@
function(vcpkg_get_windows_sdk ret)
execute_process(
- COMMAND powershell.exe -ExecutionPolicy Bypass ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1
+ COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1
OUTPUT_VARIABLE WINDOWS_SDK
RESULT_VARIABLE error_code)
@@ -10,6 +10,5 @@ function(vcpkg_get_windows_sdk ret)
# Remove trailing newline
string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}")
-
set(${ret} ${WINDOWS_SDK} PARENT_SCOPE)
endfunction() \ No newline at end of file
diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake
index ef72431ff..2ea430453 100644
--- a/scripts/templates/portfile.in.cmake
+++ b/scripts/templates/portfile.in.cmake
@@ -1,9 +1,13 @@
# 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}
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
include(vcpkg_common_functions)
diff --git a/toolsrc/include/LineInfo.h b/toolsrc/include/LineInfo.h
new file mode 100644
index 000000000..a3de4fc29
--- /dev/null
+++ b/toolsrc/include/LineInfo.h
@@ -0,0 +1,17 @@
+#pragma once
+
+namespace vcpkg
+{
+ struct LineInfo
+ {
+ int line_number;
+ const char* file_name;
+
+ constexpr LineInfo() : line_number(0), file_name(nullptr) {}
+ constexpr LineInfo(const int line_number, const char* file_name) : line_number(line_number), file_name(file_name) {}
+
+ std::string toString() const;
+ };
+}
+
+#define VCPKG_LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__)
diff --git a/toolsrc/include/expected.h b/toolsrc/include/expected.h
index cbb513b22..377168645 100644
--- a/toolsrc/include/expected.h
+++ b/toolsrc/include/expected.h
@@ -40,15 +40,15 @@ namespace vcpkg
return this->m_error_code;
}
- T&& get_or_throw() &&
+ T&& get_or_throw(const LineInfo& line_info) &&
{
- throw_if_error();
+ throw_if_error(line_info);
return std::move(this->m_t);
}
- const T& get_or_throw() const &
+ const T& get_or_throw(const LineInfo& line_info) const &
{
- throw_if_error();
+ throw_if_error(line_info);
return this->m_t;
}
@@ -71,9 +71,9 @@ namespace vcpkg
}
private:
- void throw_if_error() const
+ void throw_if_error(const LineInfo& line_info) const
{
- Checks::check_throw(!this->m_error_code, this->m_error_code.message().c_str());
+ Checks::check_throw(line_info, !this->m_error_code, this->m_error_code.message().c_str());
}
std::error_code m_error_code;
diff --git a/toolsrc/include/lazy.h b/toolsrc/include/lazy.h
index f9dbd8dc7..0fa50dc4d 100644
--- a/toolsrc/include/lazy.h
+++ b/toolsrc/include/lazy.h
@@ -9,7 +9,7 @@ namespace vcpkg
lazy() : value(T()), initialized(false) {}
template <class F>
- T const& get_lazy(F& f) const
+ T const& get_lazy(const F& f) const
{
if (!initialized)
{
diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h
index 23869f35f..47662637f 100644
--- a/toolsrc/include/vcpkg_Checks.h
+++ b/toolsrc/include/vcpkg_Checks.h
@@ -1,51 +1,52 @@
#pragma once
#include "vcpkg_Strings.h"
+#include "LineInfo.h"
namespace vcpkg::Checks
{
- __declspec(noreturn) void unreachable();
+ __declspec(noreturn) void unreachable(const LineInfo& line_info);
// Part of the reason these exist is to not include extra headers in this one to avoid circular #includes.
- _declspec(noreturn) void exit_with_message(const char* errorMessage);
+ _declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessage);
template <class...Args>
- _declspec(noreturn) void exit_with_message(const char* errorMessageTemplate, const Args&... errorMessageArgs)
+ _declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
- exit_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
+ exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
- _declspec(noreturn) void throw_with_message(const char* errorMessage);
+ _declspec(noreturn) void throw_with_message(const LineInfo& line_info, const char* errorMessage);
template <class...Args>
- _declspec(noreturn) void throw_with_message(const char* errorMessageTemplate, const Args&... errorMessageArgs)
+ _declspec(noreturn) void throw_with_message(const LineInfo& line_info, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
- throw_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
+ throw_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
- void check_throw(bool expression, const char* errorMessage);
+ void check_throw(const LineInfo& line_info, bool expression, const char* errorMessage);
template <class...Args>
- void check_throw(bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
+ void check_throw(const LineInfo& line_info, bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
if (!expression)
{
// Only create the string if the expression is false
- throw_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
+ throw_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
}
- void check_exit(bool expression);
+ void check_exit(const LineInfo& line_info, bool expression);
- void check_exit(bool expression, const char* errorMessage);
+ void check_exit(const LineInfo& line_info, bool expression, const char* errorMessage);
template <class...Args>
- void check_exit(bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
+ void check_exit(const LineInfo& line_info, bool expression, const char* errorMessageTemplate, const Args&... errorMessageArgs)
{
if (!expression)
{
// Only create the string if the expression is false
- exit_with_message(Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
+ exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArgs...).c_str());
}
}
}
diff --git a/toolsrc/include/vcpkg_Enums.h b/toolsrc/include/vcpkg_Enums.h
index 5c4dc8b06..ef41155d9 100644
--- a/toolsrc/include/vcpkg_Enums.h
+++ b/toolsrc/include/vcpkg_Enums.h
@@ -1,11 +1,10 @@
#pragma once
#include <string>
+#include "LineInfo.h"
namespace vcpkg::Enums
{
std::string nullvalue_toString(const std::string& enum_name);
- __declspec(noreturn) void nullvalue_used(const std::string& enum_name);
-
- __declspec(noreturn) void unreachable(const std::string& enum_name);
+ __declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name);
}
diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h
index 3f9570946..0b0373231 100644
--- a/toolsrc/include/vcpkg_Files.h
+++ b/toolsrc/include/vcpkg_Files.h
@@ -8,7 +8,7 @@ namespace vcpkg::Files
{
static const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)";
- void check_is_directory(const fs::path& dirpath);
+ void check_is_directory(const LineInfo& line_info, const fs::path& dirpath);
bool has_invalid_chars_for_filesystem(const std::string& s);
diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkglib.h
index 353bfb0a0..710b21cd5 100644
--- a/toolsrc/include/vcpkglib.h
+++ b/toolsrc/include/vcpkglib.h
@@ -6,6 +6,8 @@
namespace vcpkg
{
+ extern bool g_debugging;
+
StatusParagraphs database_load_check(const vcpkg_paths& paths);
void write_update(const vcpkg_paths& paths, const StatusParagraph& p);
diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp
index 8605cd276..be3931ba9 100644
--- a/toolsrc/src/BinaryParagraph.cpp
+++ b/toolsrc/src/BinaryParagraph.cpp
@@ -31,14 +31,14 @@ namespace vcpkg
const std::string architecture = details::remove_required_field(&fields, BinaryParagraphRequiredField::ARCHITECTURE);
const triplet target_triplet = triplet::from_canonical_name(architecture);
- this->spec = package_spec::from_name_and_triplet(name, target_triplet).get_or_throw();
+ this->spec = package_spec::from_name_and_triplet(name, target_triplet).get_or_throw(VCPKG_LINE_INFO);
this->version = details::remove_required_field(&fields, BinaryParagraphRequiredField::VERSION);
this->description = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DESCRIPTION);
this->maintainer = details::remove_optional_field(&fields, BinaryParagraphOptionalField::MAINTAINER);
std::string multi_arch = details::remove_required_field(&fields, BinaryParagraphRequiredField::MULTI_ARCH);
- Checks::check_exit(multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch);
+ Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch);
std::string deps = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DEPENDS);
this->depends = parse_depends(deps);
@@ -46,7 +46,7 @@ namespace vcpkg
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const triplet& target_triplet)
{
- this->spec = package_spec::from_name_and_triplet(spgh.name, target_triplet).get_or_throw();
+ this->spec = package_spec::from_name_and_triplet(spgh.name, target_triplet).get_or_throw(VCPKG_LINE_INFO);
this->version = spgh.version;
this->description = spgh.description;
this->maintainer = spgh.maintainer;
diff --git a/toolsrc/src/LineInfo.cpp b/toolsrc/src/LineInfo.cpp
new file mode 100644
index 000000000..fa26355e4
--- /dev/null
+++ b/toolsrc/src/LineInfo.cpp
@@ -0,0 +1,11 @@
+#include "pch.h"
+#include "LineInfo.h"
+#include "vcpkg_Strings.h"
+
+namespace vcpkg
+{
+ std::string LineInfo::toString() const
+ {
+ return Strings::format("%s(%d)", this->file_name, this->line_number);
+ }
+}
diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/MachineType.cpp
index 81012234d..97d0a0280 100644
--- a/toolsrc/src/MachineType.cpp
+++ b/toolsrc/src/MachineType.cpp
@@ -36,7 +36,7 @@ namespace vcpkg
case MachineType::WCEMIPSV2:
return t;
default:
- Checks::exit_with_message("Unknown machine type code 0x%x", value);
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown machine type code 0x%x", value);
}
}
}
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp
index cb90ed1ec..f1505698c 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/Paragraphs.cpp
@@ -99,7 +99,7 @@ namespace vcpkg::Paragraphs
auto begin_fieldname = cur;
while (is_alphanum(ch) || ch == '-')
next(ch);
- Checks::check_exit(ch == ':', "Expected ':'");
+ Checks::check_exit(VCPKG_LINE_INFO, ch == ':', "Expected ':'");
fieldname = std::string(begin_fieldname, cur);
// skip ': '
@@ -117,7 +117,7 @@ namespace vcpkg::Paragraphs
get_fieldname(ch, fieldname);
auto it = fields.find(fieldname);
- Checks::check_exit(it == fields.end(), "Duplicate field");
+ Checks::check_exit(VCPKG_LINE_INFO, it == fields.end(), "Duplicate field");
get_fieldvalue(ch, fieldvalue);
@@ -158,7 +158,7 @@ namespace vcpkg::Paragraphs
return parse_paragraphs(*spgh);
}
- Checks::exit_with_message("Error while reading %s: %s", control_path.generic_string(), contents.error_code().message());
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Error while reading %s: %s", control_path.generic_string(), contents.error_code().message());
}
std::vector<std::unordered_map<std::string, std::string>> parse_paragraphs(const std::string& str)
@@ -171,7 +171,7 @@ namespace vcpkg::Paragraphs
try
{
auto pghs = get_paragraphs(path / "CONTROL");
- Checks::check_exit(pghs.size() == 1, "Invalid control file at %s\\CONTROL", path.string());
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file at %s\\CONTROL", path.string());
return SourceParagraph(pghs[0]);
}
catch (std::runtime_error const&) {}
@@ -192,7 +192,7 @@ namespace vcpkg::Paragraphs
pghs = parse_paragraphs(*control_contents);
}
catch (std::runtime_error) {}
- Checks::check_exit(pghs.size() == 1, "Invalid control file at %s", path.string());
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file at %s", path.string());
return BinaryParagraph(pghs[0]);
}
return control_contents_maybe.error_code();
diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp
index 8abf71bb3..00a6eabe6 100644
--- a/toolsrc/src/PostBuildLint.cpp
+++ b/toolsrc/src/PostBuildLint.cpp
@@ -98,12 +98,12 @@ namespace vcpkg::PostBuildLint
return lint_status::SUCCESS;
}
- static lint_status check_folder_lib_cmake(const fs::path& package_dir)
+ static lint_status check_folder_lib_cmake(const fs::path& package_dir, const package_spec& spec)
{
const fs::path lib_cmake = package_dir / "lib" / "cmake";
if (fs::exists(lib_cmake))
{
- System::println(System::color::warning, "The /lib/cmake folder should be moved to just /cmake");
+ System::println(System::color::warning, "The /lib/cmake folder should be moved to /share/%s/cmake.", spec.name());
return lint_status::ERROR_DETECTED;
}
@@ -227,7 +227,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
if (ec_data.output.find("ordinal hint RVA name") == std::string::npos)
{
@@ -258,7 +258,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
if (ec_data.output.find("App Container") == std::string::npos)
{
@@ -318,7 +318,7 @@ namespace vcpkg::PostBuildLint
for (const fs::path& file : files)
{
- Checks::check_exit(file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string());
+ Checks::check_exit(VCPKG_LINE_INFO, file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string());
COFFFileReader::dll_info info = COFFFileReader::read_dll(file);
const std::string actual_architecture = get_actual_architecture(info.machine_type);
@@ -343,9 +343,9 @@ namespace vcpkg::PostBuildLint
for (const fs::path& file : files)
{
- Checks::check_exit(file.extension() == ".lib", "The file extension was not .lib: %s", file.generic_string());
+ Checks::check_exit(VCPKG_LINE_INFO, file.extension() == ".lib", "The file extension was not .lib: %s", file.generic_string());
COFFFileReader::lib_info info = COFFFileReader::read_lib(file);
- Checks::check_exit(info.machine_types.size() == 1, "Found more than 1 architecture in file %s", file.generic_string());
+ Checks::check_exit(VCPKG_LINE_INFO, info.machine_types.size() == 1, "Found more than 1 architecture in file %s", file.generic_string());
const std::string actual_architecture = get_actual_architecture(info.machine_types.at(0));
if (expected_architecture != actual_architecture)
@@ -496,7 +496,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
for (const BuildType::type& bad_build_type : bad_build_types)
{
@@ -543,7 +543,7 @@ namespace vcpkg::PostBuildLint
{
const std::wstring cmd_line = Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native());
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
for (const OutdatedDynamicCrt& outdated_crt : outdated_crts)
{
@@ -630,7 +630,7 @@ namespace vcpkg::PostBuildLint
error_count += check_for_files_in_include_directory(package_dir);
error_count += check_for_files_in_debug_include_directory(package_dir);
error_count += check_for_files_in_debug_share_directory(package_dir);
- error_count += check_folder_lib_cmake(package_dir);
+ error_count += check_folder_lib_cmake(package_dir, spec);
error_count += check_for_misplaced_cmake_files(package_dir, spec);
error_count += check_folder_debug_lib_cmake(package_dir);
error_count += check_for_dlls_in_lib_dirs(package_dir);
@@ -693,7 +693,7 @@ namespace vcpkg::PostBuildLint
}
case LinkageType::backing_enum_t::NULLVALUE:
default:
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
error_count += check_no_empty_folders(package_dir);
diff --git a/toolsrc/src/PostBuildLint_BuildInfo.cpp b/toolsrc/src/PostBuildLint_BuildInfo.cpp
index 0d1d480b8..5b475322a 100644
--- a/toolsrc/src/PostBuildLint_BuildInfo.cpp
+++ b/toolsrc/src/PostBuildLint_BuildInfo.cpp
@@ -19,17 +19,17 @@ namespace vcpkg::PostBuildLint
BuildInfo build_info;
const std::string crt_linkage_as_string = details::remove_required_field(&pgh, BuildInfoRequiredField::CRT_LINKAGE);
build_info.crt_linkage = LinkageType::value_of(crt_linkage_as_string);
- Checks::check_exit(build_info.crt_linkage != LinkageType::NULLVALUE, "Invalid crt linkage type: [%s]", crt_linkage_as_string);
+ Checks::check_exit(VCPKG_LINE_INFO, build_info.crt_linkage != LinkageType::NULLVALUE, "Invalid crt linkage type: [%s]", crt_linkage_as_string);
const std::string library_linkage_as_string = details::remove_required_field(&pgh, BuildInfoRequiredField::LIBRARY_LINKAGE);
build_info.library_linkage = LinkageType::value_of(library_linkage_as_string);
- Checks::check_exit(build_info.library_linkage != LinkageType::NULLVALUE, "Invalid library linkage type: [%s]", library_linkage_as_string);
+ Checks::check_exit(VCPKG_LINE_INFO, build_info.library_linkage != LinkageType::NULLVALUE, "Invalid library linkage type: [%s]", library_linkage_as_string);
// The remaining entries are policies
for (const std::unordered_map<std::string, std::string>::value_type& p : pgh)
{
const BuildPolicies::type policy = BuildPolicies::parse(p.first);
- Checks::check_exit(policy != BuildPolicies::NULLVALUE, "Unknown policy found: %s", p.first);
+ Checks::check_exit(VCPKG_LINE_INFO, policy != BuildPolicies::NULLVALUE, "Unknown policy found: %s", p.first);
const opt_bool_t status = opt_bool::parse(p.second);
build_info.policies.emplace(policy, status);
}
@@ -40,7 +40,7 @@ namespace vcpkg::PostBuildLint
BuildInfo read_build_info(const fs::path& filepath)
{
const std::vector<std::unordered_map<std::string, std::string>> pghs = Paragraphs::get_paragraphs(filepath);
- Checks::check_exit(pghs.size() == 1, "Invalid BUILD_INFO file for package");
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid BUILD_INFO file for package");
return BuildInfo::create(pghs[0]);
}
diff --git a/toolsrc/src/PostBuildLint_BuildPolicies.cpp b/toolsrc/src/PostBuildLint_BuildPolicies.cpp
index f070a2a42..b7ebf5380 100644
--- a/toolsrc/src/PostBuildLint_BuildPolicies.cpp
+++ b/toolsrc/src/PostBuildLint_BuildPolicies.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "PostBuildLint_BuildPolicies.h"
#include "vcpkg_Enums.h"
+#include "vcpkg_Checks.h"
namespace vcpkg::PostBuildLint::BuildPolicies
{
@@ -23,7 +24,7 @@ namespace vcpkg::PostBuildLint::BuildPolicies
case NULLVALUE:
return NULLVALUE_STRING;
default:
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
@@ -42,9 +43,9 @@ namespace vcpkg::PostBuildLint::BuildPolicies
case ONLY_RELEASE_CRT:
return CMAKE_VARIABLE_ONLY_RELEASE_CRT;
case NULLVALUE:
- Enums::nullvalue_used(ENUM_NAME);
+ Enums::nullvalue_used(VCPKG_LINE_INFO, ENUM_NAME);
default:
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/PostBuildLint_BuildType.cpp b/toolsrc/src/PostBuildLint_BuildType.cpp
index f2fb292d7..593d976f2 100644
--- a/toolsrc/src/PostBuildLint_BuildType.cpp
+++ b/toolsrc/src/PostBuildLint_BuildType.cpp
@@ -1,6 +1,6 @@
#include "pch.h"
#include "PostBuildLint_BuildType.h"
-#include "vcpkg_Enums.h"
+#include "vcpkg_Checks.h"
namespace vcpkg::PostBuildLint::BuildType
{
@@ -26,7 +26,7 @@ namespace vcpkg::PostBuildLint::BuildType
return RELEASE_DYNAMIC;
}
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
const ConfigurationType::type& type::config() const
@@ -57,7 +57,7 @@ namespace vcpkg::PostBuildLint::BuildType
case BuildType::RELEASE_DYNAMIC:
return REGEX_RELEASE_DYNAMIC;
default:
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
@@ -79,7 +79,7 @@ namespace vcpkg::PostBuildLint::BuildType
case BuildType::RELEASE_DYNAMIC:
return NAME_RELEASE_DYNAMIC;
default:
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
}
diff --git a/toolsrc/src/PostBuildLint_ConfigurationType.cpp b/toolsrc/src/PostBuildLint_ConfigurationType.cpp
index 990b10a37..cca6eb63a 100644
--- a/toolsrc/src/PostBuildLint_ConfigurationType.cpp
+++ b/toolsrc/src/PostBuildLint_ConfigurationType.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "PostBuildLint_ConfigurationType.h"
#include "vcpkg_Enums.h"
+#include "package_spec.h"
namespace vcpkg::PostBuildLint::ConfigurationType
{
@@ -20,7 +21,7 @@ namespace vcpkg::PostBuildLint::ConfigurationType
case ConfigurationType::NULLVALUE:
return NULLVALUE_STRING;
default:
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
}
diff --git a/toolsrc/src/PostBuildLint_LinkageType.cpp b/toolsrc/src/PostBuildLint_LinkageType.cpp
index 6d2c2c935..c6cb9ed58 100644
--- a/toolsrc/src/PostBuildLint_LinkageType.cpp
+++ b/toolsrc/src/PostBuildLint_LinkageType.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "PostBuildLint_LinkageType.h"
#include "vcpkg_Enums.h"
+#include "vcpkg_Checks.h"
namespace vcpkg::PostBuildLint::LinkageType
{
@@ -20,7 +21,7 @@ namespace vcpkg::PostBuildLint::LinkageType
case LinkageType::NULLVALUE:
return NULLVALUE_STRING;
default:
- Enums::unreachable(ENUM_NAME);
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/StatusParagraphs.cpp b/toolsrc/src/StatusParagraphs.cpp
index 9a440fbb8..cd932fd72 100644
--- a/toolsrc/src/StatusParagraphs.cpp
+++ b/toolsrc/src/StatusParagraphs.cpp
@@ -42,7 +42,7 @@ namespace vcpkg
StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr<StatusParagraph> pgh)
{
- Checks::check_exit(pgh != nullptr, "Inserted null paragraph");
+ Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph");
const package_spec& spec = pgh->package.spec;
auto ptr = find(spec.name(), spec.target_triplet());
if (ptr == end())
diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp
index f48f912c1..922d8c420 100644
--- a/toolsrc/src/coff_file_reader.cpp
+++ b/toolsrc/src/coff_file_reader.cpp
@@ -30,9 +30,9 @@ namespace vcpkg::COFFFileReader
return data;
}
- static void verify_equal_strings(const char* expected, const char* actual, int size, const char* label)
+ static void verify_equal_strings(const LineInfo& line_info, const char* expected, const char* actual, int size, const char* label)
{
- Checks::check_exit(memcmp(expected, actual, size) == 0, "Incorrect string (%s) found. Expected: (%s) but found (%s)", label, expected, actual);
+ Checks::check_exit(line_info, memcmp(expected, actual, size) == 0, "Incorrect string (%s) found. Expected: (%s) but found (%s)", label, expected, actual);
}
static void read_and_verify_PE_signature(fstream& fs)
@@ -48,7 +48,7 @@ namespace vcpkg::COFFFileReader
fs.seekg(offset_to_PE_signature);
char signature[PE_SIGNATURE_SIZE];
fs.read(signature, PE_SIGNATURE_SIZE);
- verify_equal_strings(PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE");
+ verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE");
fs.seekg(offset_to_PE_signature + PE_SIGNATURE_SIZE, ios_base::beg);
}
@@ -104,7 +104,7 @@ namespace vcpkg::COFFFileReader
if (ret.data[0] != '\0') // Due to freeglut. github issue #223
{
const std::string header_end = ret.data.substr(HEADER_END_OFFSET, HEADER_END_SIZE);
- verify_equal_strings(HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END");
+ verify_equal_strings(VCPKG_LINE_INFO, HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END");
}
return ret;
@@ -186,11 +186,11 @@ namespace vcpkg::COFFFileReader
const std::string sig1_as_string = ret.data.substr(SIG1_OFFSET, SIG1_SIZE);
const uint16_t sig1 = reinterpret_bytes<uint16_t>(sig1_as_string.c_str());
- Checks::check_exit(sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1);
+ Checks::check_exit(VCPKG_LINE_INFO, sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1);
const std::string sig2_as_string = ret.data.substr(SIG2_OFFSET, SIG2_SIZE);
const uint16_t sig2 = reinterpret_bytes<uint16_t>(sig2_as_string.c_str());
- Checks::check_exit(sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2);
+ Checks::check_exit(VCPKG_LINE_INFO, sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2);
return ret;
}
@@ -218,13 +218,13 @@ namespace vcpkg::COFFFileReader
char file_start[FILE_START_SIZE];
fs.read(file_start, FILE_START_SIZE);
- verify_equal_strings(FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START");
+ verify_equal_strings(VCPKG_LINE_INFO, FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START");
}
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());
+ Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string());
read_and_verify_PE_signature(fs);
coff_file_header header = coff_file_header::read(fs);
@@ -261,7 +261,7 @@ namespace vcpkg::COFFFileReader
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());
+ Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string());
read_and_verify_archive_file_signature(fs);
@@ -270,12 +270,12 @@ namespace vcpkg::COFFFileReader
// First Linker Member
const archive_member_header first_linker_member_header = archive_member_header::read(fs);
- Checks::check_exit(first_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper first linker member");
+ Checks::check_exit(VCPKG_LINE_INFO, first_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper first linker member");
marker.advance_by(archive_member_header::HEADER_SIZE + first_linker_member_header.member_size());
marker.seek_to_marker(fs);
const archive_member_header second_linker_member_header = archive_member_header::read(fs);
- Checks::check_exit(second_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper second linker member");
+ Checks::check_exit(VCPKG_LINE_INFO, second_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper second linker member");
// The first 4 bytes contains the number of archive members
const uint32_t archive_member_count = read_value_from_stream<uint32_t>(fs);
const offsets_array offsets = offsets_array::read(fs, archive_member_count);
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp
index a47083cbd..5ad39ae63 100644
--- a/toolsrc/src/commands_build.cpp
+++ b/toolsrc/src/commands_build.cpp
@@ -28,12 +28,12 @@ namespace vcpkg::Commands::Build
BuildResult build_package(const SourceParagraph& source_paragraph, const package_spec& spec, const vcpkg_paths& paths, const fs::path& port_dir, const StatusParagraphs& status_db)
{
- Checks::check_exit(spec.name() == source_paragraph.name, "inconsistent arguments to build_package()");
+ Checks::check_exit(VCPKG_LINE_INFO, spec.name() == source_paragraph.name, "inconsistent arguments to build_package()");
const triplet& target_triplet = spec.target_triplet();
- for (auto&& dep : source_paragraph.depends)
+ for (auto&& dep : filter_dependencies(source_paragraph.depends, target_triplet))
{
- if (status_db.find_installed(dep.name, target_triplet) == status_db.end())
+ if (status_db.find_installed(dep, target_triplet) == status_db.end())
{
return BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES;
}
@@ -101,7 +101,7 @@ namespace vcpkg::Commands::Build
case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING;
case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING;
case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING;
- default: Checks::unreachable();
+ default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
@@ -134,7 +134,7 @@ namespace vcpkg::Commands::Build
}
const expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(port_dir);
- Checks::check_exit(!maybe_spgh.error_code(), "Could not find package named %s: %s", spec, maybe_spgh.error_code().message());
+ Checks::check_exit(VCPKG_LINE_INFO, !maybe_spgh.error_code(), "Could not find package named %s: %s", spec, maybe_spgh.error_code().message());
const SourceParagraph& spgh = *maybe_spgh.get();
StatusParagraphs status_db = database_load_check(paths);
@@ -149,7 +149,7 @@ namespace vcpkg::Commands::Build
}),
unmet_dependencies.end());
- Checks::check_exit(!unmet_dependencies.empty());
+ Checks::check_exit(VCPKG_LINE_INFO, !unmet_dependencies.empty());
System::println(System::color::error, "The build command requires all dependencies to be already installed.");
System::println("The following dependencies are missing:");
System::println("");
diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp
index 315308a62..45ef2db28 100644
--- a/toolsrc/src/commands_ci.cpp
+++ b/toolsrc/src/commands_ci.cpp
@@ -20,7 +20,7 @@ namespace vcpkg::Commands::CI
std::vector<package_spec> specs;
for (const SourceParagraph& p : ports)
{
- specs.push_back(package_spec::from_name_and_triplet(p.name, target_triplet).get_or_throw());
+ specs.push_back(package_spec::from_name_and_triplet(p.name, target_triplet).get_or_throw(VCPKG_LINE_INFO));
}
return specs;
@@ -37,7 +37,7 @@ namespace vcpkg::Commands::CI
StatusParagraphs status_db = database_load_check(paths);
const 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");
+ Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty");
std::vector<BuildResult> results;
std::vector<std::chrono::milliseconds::rep> timing;
@@ -70,7 +70,7 @@ namespace vcpkg::Commands::CI
System::println(System::color::error, Build::create_error_message(result, action.spec));
continue;
}
- const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw();
+ const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw(VCPKG_LINE_INFO);
Install::install_package(paths, bpgh, &status_db);
System::println(System::color::success, "Package %s is installed", action.spec);
}
@@ -81,7 +81,7 @@ namespace vcpkg::Commands::CI
System::println(System::color::success, "Package %s is installed from cache", action.spec);
}
else
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
catch (const std::exception& e)
{
diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp
index b74693ed5..2c3e02877 100644
--- a/toolsrc/src/commands_create.cpp
+++ b/toolsrc/src/commands_create.cpp
@@ -29,9 +29,9 @@ namespace vcpkg::Commands::Create
if (args.command_arguments.size() >= 3)
{
const std::string& zip_file_name = args.command_arguments.at(2);
- Checks::check_exit(!Files::has_invalid_chars_for_filesystem(zip_file_name),
- R"(Filename cannot contain invalid chars %s, but was %s)",
- Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name);
+ Checks::check_exit(VCPKG_LINE_INFO, !Files::has_invalid_chars_for_filesystem(zip_file_name),
+ R"(Filename cannot contain invalid chars %s, but was %s)",
+ Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name);
cmake_args.push_back({ L"FILENAME", zip_file_name });
}
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp
index ce0557e09..1252790af 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/commands_edit.cpp
@@ -14,7 +14,7 @@ namespace vcpkg::Commands::Edit
const std::string port_name = args.command_arguments.at(0);
const fs::path portpath = paths.ports / port_name;
- Checks::check_exit(fs::is_directory(portpath), R"(Could not find port named "%s")", port_name);
+ Checks::check_exit(VCPKG_LINE_INFO, fs::is_directory(portpath), R"(Could not find port named "%s")", port_name);
// Find the user's selected editor
std::wstring env_EDITOR;
@@ -56,13 +56,19 @@ namespace vcpkg::Commands::Edit
env_EDITOR = p.native();
break;
}
+ auto p_insiders = fs::path(*code_installpath) / "Code - Insiders.exe";
+ if (fs::exists(p_insiders))
+ {
+ env_EDITOR = p_insiders.native();
+ break;
+ }
}
}
}
if (env_EDITOR.empty())
{
- Checks::exit_with_message("Visual Studio Code was not found and the environment variable EDITOR is not set");
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set");
}
std::wstring cmdLine = Strings::wformat(LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native());
diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp
index 805da4153..2e55a4bb6 100644
--- a/toolsrc/src/commands_hash.cpp
+++ b/toolsrc/src/commands_hash.cpp
@@ -9,15 +9,15 @@ namespace vcpkg::Commands::Hash
auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)",
path.c_str(), hashType.c_str());
auto ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::utf16_to_utf8(cmd_line));
std::string const& output = ec_data.output;
auto start = output.find_first_of("\r\n");
- Checks::check_exit(start != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
auto end = output.find_first_of("\r\n", start + 1);
- Checks::check_exit(end != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", Strings::utf16_to_utf8(cmd_line));
auto hash = output.substr(start, end - start);
hash.erase(std::remove_if(hash.begin(), hash.end(), isspace), hash.end());
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp
index 11924b4b2..a74b9e662 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/commands_import.cpp
@@ -14,7 +14,7 @@ namespace vcpkg::Commands::Import
static Binaries find_binaries_in_dir(const fs::path& path)
{
- Files::check_is_directory(path);
+ Files::check_is_directory(VCPKG_LINE_INFO, path);
Binaries binaries;
binaries.dlls = Files::recursive_find_files_with_extension_in_dir(path, ".dll");
@@ -35,9 +35,9 @@ namespace vcpkg::Commands::Import
static void place_library_files_in(const fs::path& include_directory, const fs::path& project_directory, const fs::path& destination_path)
{
- Files::check_is_directory(include_directory);
- Files::check_is_directory(project_directory);
- Files::check_is_directory(destination_path);
+ Files::check_is_directory(VCPKG_LINE_INFO, include_directory);
+ Files::check_is_directory(VCPKG_LINE_INFO, project_directory);
+ Files::check_is_directory(VCPKG_LINE_INFO, destination_path);
Binaries debug_binaries = find_binaries_in_dir(project_directory / "Debug");
Binaries release_binaries = find_binaries_in_dir(project_directory / "Release");
@@ -73,7 +73,7 @@ namespace vcpkg::Commands::Import
const fs::path project_directory(args.command_arguments[2]);
auto pghs = Paragraphs::get_paragraphs(control_file_path);
- Checks::check_exit(pghs.size() == 1, "Invalid control file %s for package", control_file_path.generic_string());
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file %s for package", control_file_path.generic_string());
StatusParagraph spgh;
spgh.package = BinaryParagraph(pghs[0]);
diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp
index bb3df943c..b7a8eafac 100644
--- a/toolsrc/src/commands_install.cpp
+++ b/toolsrc/src/commands_install.cpp
@@ -170,7 +170,7 @@ namespace vcpkg::Commands::Install
{
if (status_db->find_installed(dep, spgh.package.spec.target_triplet()) == status_db->end())
{
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
write_update(paths, spgh);
@@ -193,7 +193,7 @@ namespace vcpkg::Commands::Install
StatusParagraphs status_db = database_load_check(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");
+ Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty");
std::string specs_string = install_plan[0].spec.toString();
for (size_t i = 1; i < install_plan.size(); ++i)
@@ -223,7 +223,7 @@ namespace vcpkg::Commands::Install
System::println(Build::create_user_troubleshooting_message(action.spec));
exit(EXIT_FAILURE);
}
- const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw();
+ const BinaryParagraph bpgh = Paragraphs::try_load_cached_package(paths, action.spec).get_or_throw(VCPKG_LINE_INFO);
install_package(paths, bpgh, &status_db);
System::println(System::color::success, "Package %s is installed", action.spec);
}
@@ -233,7 +233,7 @@ namespace vcpkg::Commands::Install
System::println(System::color::success, "Package %s is installed", action.spec);
}
else
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
catch (const std::exception& e)
{
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp
index f98b9f77c..7011f8d1d 100644
--- a/toolsrc/src/commands_integrate.cpp
+++ b/toolsrc/src/commands_integrate.cpp
@@ -156,7 +156,7 @@ namespace vcpkg::Commands::Integrate
System::println(System::color::warning, "Warning: Previous integration file was not removed");
exit(EXIT_FAILURE);
default:
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
}
@@ -195,10 +195,10 @@ namespace vcpkg::Commands::Integrate
System::println(System::color::warning, "Warning: integration was not applied");
exit(EXIT_FAILURE);
default:
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
- Checks::check_exit(fs::exists(system_wide_targets_file), "Error: failed to copy targets file to %s", system_wide_targets_file.string());
+ Checks::check_exit(VCPKG_LINE_INFO, fs::exists(system_wide_targets_file), "Error: failed to copy targets file to %s", system_wide_targets_file.string());
}
const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets";
@@ -272,7 +272,7 @@ namespace vcpkg::Commands::Integrate
const int exit_code = System::cmd_execute_clean(cmd_line);
const fs::path nuget_package = buildsystems_dir / Strings::format("%s.%s.nupkg", nuget_id, nupkg_version);
- Checks::check_exit(exit_code == 0 && fs::exists(nuget_package), "Error: NuGet package creation failed");
+ Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0 && fs::exists(nuget_package), "Error: NuGet package creation failed");
System::println(System::color::success, "Created nupkg: %s", nuget_package.string());
System::println(R"(
diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp
index 4d5a589f6..b1a166ed1 100644
--- a/toolsrc/src/commands_portsdiff.cpp
+++ b/toolsrc/src/commands_portsdiff.cpp
@@ -57,9 +57,9 @@ namespace vcpkg::Commands::PortsDiff
{
static const std::string VALID_COMMIT_OUTPUT = "commit\n";
- const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s 2>NUL)", git_exe.native(), git_commit_id);
+ const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id);
const System::exit_code_and_output output = System::cmd_execute_and_capture_output(cmd);
- Checks::check_exit(output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", Strings::utf16_to_utf8(git_commit_id));
+ Checks::check_exit(VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", Strings::utf16_to_utf8(git_commit_id));
}
void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp
index 1b7b7923a..7e4228496 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/commands_remove.cpp
@@ -129,7 +129,7 @@ namespace vcpkg::Commands::Remove
continue;
}
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
if (!not_installed.empty())
@@ -158,7 +158,7 @@ namespace vcpkg::Commands::Remove
return " " + p->spec.toString();
}
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}));
}
}
@@ -175,7 +175,7 @@ namespace vcpkg::Commands::Remove
auto status_db = database_load_check(paths);
const std::vector<package_spec_with_remove_plan> remove_plan = Dependencies::create_remove_plan(specs, status_db);
- Checks::check_exit(!remove_plan.empty(), "Remove plan cannot be empty");
+ Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty");
print_plan(remove_plan);
@@ -208,7 +208,7 @@ namespace vcpkg::Commands::Remove
break;
case remove_plan_type::UNKNOWN:
default:
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
if (alsoRemoveFolderFromPackages)
diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp
index 8bac858f1..463257fc9 100644
--- a/toolsrc/src/commands_search.cpp
+++ b/toolsrc/src/commands_search.cpp
@@ -88,7 +88,7 @@ namespace vcpkg::Commands::Search
}
}
- System::println("\nIf your library is not listed, please open an issue at:\n"
+ System::println("\nIf your library is not listed, please open an issue at and/or consider making a pull request:\n"
" https://github.com/Microsoft/vcpkg/issues");
exit(EXIT_SUCCESS);
diff --git a/toolsrc/src/opt_bool.cpp b/toolsrc/src/opt_bool.cpp
index 324936fb4..b4642f273 100644
--- a/toolsrc/src/opt_bool.cpp
+++ b/toolsrc/src/opt_bool.cpp
@@ -24,6 +24,6 @@ namespace vcpkg::opt_bool
return opt_bool_t::DISABLED;
}
- Checks::exit_with_message("Could not convert string [%s] to opt_bool", s);
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Could not convert string [%s] to opt_bool", s);
}
}
diff --git a/toolsrc/src/package_spec_parse_result.cpp b/toolsrc/src/package_spec_parse_result.cpp
index 892232c2e..fc92cf2ff 100644
--- a/toolsrc/src/package_spec_parse_result.cpp
+++ b/toolsrc/src/package_spec_parse_result.cpp
@@ -20,7 +20,7 @@ namespace vcpkg
case package_spec_parse_result::INVALID_CHARACTERS:
return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are allowed";
default:
- Checks::unreachable();
+ Checks::unreachable(VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/triplet.cpp
index d91e0e68f..173656f7b 100644
--- a/toolsrc/src/triplet.cpp
+++ b/toolsrc/src/triplet.cpp
@@ -40,7 +40,7 @@ namespace vcpkg
{
const std::string s(Strings::ascii_to_lowercase(triplet_as_string));
auto it = std::find(s.cbegin(), s.cend(), '-');
- Checks::check_exit(it != s.cend(), "Invalid triplet: %s", triplet_as_string);
+ Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string);
triplet t;
t.m_canonical_name = s;
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index e94d2538b..6c81d54f9 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -1,7 +1,6 @@
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
-#include <iostream>
#include <fstream>
#include <memory>
#include <cassert>
@@ -14,11 +13,10 @@
#include "Paragraphs.h"
#include "vcpkg_Strings.h"
#include "vcpkg_Chrono.h"
+#include "vcpkglib.h"
using namespace vcpkg;
-bool g_debugging = false;
-
void invalid_command(const std::string& cmd)
{
System::println(System::color::error, "invalid command: %s", cmd);
@@ -58,13 +56,13 @@ static void inner(const vcpkg_cmd_arguments& args)
}
}
- Checks::check_exit(!vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root.");
+ Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root.");
const expected<vcpkg_paths> expected_paths = vcpkg_paths::create(vcpkg_root_dir);
- Checks::check_exit(!expected_paths.error_code(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error_code().message());
- const vcpkg_paths paths = expected_paths.get_or_throw();
+ Checks::check_exit(VCPKG_LINE_INFO, !expected_paths.error_code(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error_code().message());
+ const vcpkg_paths paths = expected_paths.get_or_throw(VCPKG_LINE_INFO);
int exit_code = _wchdir(paths.root.c_str());
- Checks::check_exit(exit_code == 0, "Changing the working dir failed");
+ Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");
if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
{
@@ -113,7 +111,7 @@ static void loadConfig()
try
{
- std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw();
+ std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw(VCPKG_LINE_INFO);
std::unordered_map<std::string, std::string> keys;
auto pghs = Paragraphs::parse_paragraphs(config_contents);
@@ -128,7 +126,7 @@ static void loadConfig()
auto user_id = keys["User-Id"];
auto user_time = keys["User-Since"];
- Checks::check_throw(!user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
+ Checks::check_throw(VCPKG_LINE_INFO, !user_id.empty() && !user_time.empty(), ""); // Use as goto to the catch statement
SetUserInformation(user_id, user_time);
return;
@@ -156,7 +154,7 @@ static void loadConfig()
static std::string trim_path_from_command_line(const std::string& full_command_line)
{
- Checks::check_exit(full_command_line.size() > 0, "Internal failure - cannot have empty command line");
+ Checks::check_exit(VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line");
if (full_command_line[0] == '"')
{
diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp
index 02d3480a2..81e7d3825 100644
--- a/toolsrc/src/vcpkg_Checks.cpp
+++ b/toolsrc/src/vcpkg_Checks.cpp
@@ -1,12 +1,22 @@
#include "pch.h"
#include "vcpkg_Checks.h"
#include "vcpkg_System.h"
+#include "vcpkglib.h"
namespace vcpkg::Checks
{
- __declspec(noreturn) void unreachable()
+ static void print_line_info_if_debug(const LineInfo& line_info)
+ {
+ if (g_debugging)
+ {
+ System::println(System::color::error, line_info.toString());
+ }
+ }
+
+ __declspec(noreturn) void unreachable(const LineInfo& line_info)
{
System::println(System::color::error, "Error: Unreachable code was reached");
+ System::println(System::color::error, line_info.toString()); // Always print line_info here
#ifndef NDEBUG
std::abort();
#else
@@ -14,38 +24,40 @@ namespace vcpkg::Checks
#endif
}
- __declspec(noreturn) void exit_with_message(const char* errorMessage)
+ __declspec(noreturn) void exit_with_message(const LineInfo& line_info, const char* errorMessage)
{
System::println(System::color::error, errorMessage);
+ print_line_info_if_debug(line_info);
exit(EXIT_FAILURE);
}
- __declspec(noreturn) void throw_with_message(const char* errorMessage)
+ __declspec(noreturn) void throw_with_message(const LineInfo& line_info, const char* errorMessage)
{
+ print_line_info_if_debug(line_info);
throw std::runtime_error(errorMessage);
}
- void check_throw(bool expression, const char* errorMessage)
+ void check_throw(const LineInfo& line_info, bool expression, const char* errorMessage)
{
if (!expression)
{
- throw_with_message(errorMessage);
+ throw_with_message(line_info, errorMessage);
}
}
- void check_exit(bool expression)
+ void check_exit(const LineInfo& line_info, bool expression)
{
if (!expression)
{
- exit(EXIT_FAILURE);
+ exit_with_message(line_info, "");
}
}
- void check_exit(bool expression, const char* errorMessage)
+ void check_exit(const LineInfo& line_info, bool expression, const char* errorMessage)
{
if (!expression)
{
- exit_with_message(errorMessage);
+ exit_with_message(line_info, errorMessage);
}
}
}
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index e8bf10617..b96cf282c 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -56,7 +56,7 @@ namespace vcpkg::Dependencies
{
for (const std::string& dep_as_string : dependencies_as_string)
{
- const package_spec current_dep = package_spec::from_name_and_triplet(dep_as_string, spec.target_triplet()).get_or_throw();
+ const package_spec current_dep = package_spec::from_name_and_triplet(dep_as_string, spec.target_triplet()).get_or_throw(VCPKG_LINE_INFO);
graph.add_edge(spec, current_dep);
if (was_examined.find(current_dep) == was_examined.end())
{
@@ -82,7 +82,7 @@ namespace vcpkg::Dependencies
expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(paths.port_dir(spec));
SourceParagraph* spgh = maybe_spgh.get();
- Checks::check_exit(spgh != nullptr, "Cannot find package %s", spec.name());
+ Checks::check_exit(VCPKG_LINE_INFO, 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_Enums.cpp b/toolsrc/src/vcpkg_Enums.cpp
index 5e698659d..b5a487a37 100644
--- a/toolsrc/src/vcpkg_Enums.cpp
+++ b/toolsrc/src/vcpkg_Enums.cpp
@@ -9,13 +9,8 @@ namespace vcpkg::Enums
return Strings::format("%s_NULLVALUE", enum_name);
}
- void nullvalue_used(const std::string& enum_name)
+ __declspec(noreturn) void nullvalue_used(const LineInfo& line_info, const std::string& enum_name)
{
- Checks::exit_with_message("NULLVALUE of enum %s was used", enum_name);
- }
-
- void unreachable(const std::string& enum_name)
- {
- Checks::exit_with_message("Unreachable code for enum, %s", enum_name);
+ Checks::exit_with_message(VCPKG_LINE_INFO, "NULLVALUE of enum %s was used", enum_name);
}
}
diff --git a/toolsrc/src/vcpkg_Environment.cpp b/toolsrc/src/vcpkg_Environment.cpp
index 8aaaba8a8..f0c157b6e 100644
--- a/toolsrc/src/vcpkg_Environment.cpp
+++ b/toolsrc/src/vcpkg_Environment.cpp
@@ -12,7 +12,7 @@ namespace vcpkg::Environment
const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1";
const std::wstring cmd = System::create_powershell_script_cmd(script);
System::exit_code_and_output ec_data = System::cmd_execute_and_capture_output(cmd);
- Checks::check_exit(ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances");
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances");
return Strings::split(ec_data.output, "\n");
}
@@ -141,7 +141,7 @@ namespace vcpkg::Environment
static fs::path find_ProgramFiles()
{
const optional<std::wstring> program_files = System::get_environmental_variable(L"PROGRAMFILES");
- Checks::check_exit(program_files.get() != nullptr, "Could not detect the PROGRAMFILES environmental variable");
+ Checks::check_exit(VCPKG_LINE_INFO, program_files.get() != nullptr, "Could not detect the PROGRAMFILES environmental variable");
return *program_files;
}
diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp
index 57d4c665c..95b99691c 100644
--- a/toolsrc/src/vcpkg_Files.cpp
+++ b/toolsrc/src/vcpkg_Files.cpp
@@ -6,9 +6,9 @@ namespace vcpkg::Files
{
static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])");
- void check_is_directory(const fs::path& dirpath)
+ void check_is_directory(const LineInfo& line_info, const fs::path& dirpath)
{
- Checks::check_exit(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
+ Checks::check_exit(VCPKG_LINE_INFO, fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
}
bool has_invalid_chars_for_filesystem(const std::string& s)
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp
index 472f8450f..a4e78d90a 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg_System.cpp
@@ -103,7 +103,7 @@ namespace vcpkg::System
// Flush stdout before launching external process
fflush(stdout);
- const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line);
+ const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line);
std::string output;
char buf[1024];
@@ -132,7 +132,7 @@ namespace vcpkg::System
std::wstring create_powershell_script_cmd(const fs::path& script_path, const std::wstring& args)
{
// TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned
- return Strings::wformat(LR"(powershell -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
+ return Strings::wformat(LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
}
void print(const char* message)
@@ -172,9 +172,9 @@ namespace vcpkg::System
return nullptr;
auto ret = std::make_unique<std::wstring>(sz, L'\0');
- Checks::check_exit(MAXDWORD >= ret->size());
+ Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret->size());
auto sz2 = GetEnvironmentVariableW(varname, ret->data(), static_cast<DWORD>(ret->size()));
- Checks::check_exit(sz2 + 1 == sz);
+ Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz);
ret->pop_back();
return ret;
}
diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp
index 82dcd4b03..9f040286b 100644
--- a/toolsrc/src/vcpkg_metrics_uploader.cpp
+++ b/toolsrc/src/vcpkg_metrics_uploader.cpp
@@ -12,6 +12,6 @@ int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int)
szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
- Checks::check_exit(argCount == 2, "Requires exactly one argument, the path to the payload file");
- Upload(Files::read_contents(szArgList[1]).get_or_throw());
+ Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file");
+ Upload(Files::read_contents(szArgList[1]).get_or_throw(VCPKG_LINE_INFO));
}
diff --git a/toolsrc/src/vcpkg_paths.cpp b/toolsrc/src/vcpkg_paths.cpp
index fa6fca370..f339be47a 100644
--- a/toolsrc/src/vcpkg_paths.cpp
+++ b/toolsrc/src/vcpkg_paths.cpp
@@ -12,7 +12,7 @@ namespace vcpkg
{
static const std::regex re(R"###((\d+)\.(\d+)\.(\d+))###");
- auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s 2>&1)", version_cmd));
+ auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd));
if (rc.exit_code != 0)
{
return false;
@@ -81,9 +81,9 @@ namespace vcpkg
exit(rc.exit_code);
}
- const fs::path actual_downloaded_path = rc.output;
- Checks::check_exit(expected_downloaded_path == actual_downloaded_path, "Expected dependency downloaded path to be %s, but was %s",
- expected_downloaded_path.generic_string(), actual_downloaded_path.generic_string());
+ const fs::path actual_downloaded_path = Strings::trimmed(rc.output);
+ Checks::check_exit(VCPKG_LINE_INFO, expected_downloaded_path == actual_downloaded_path, "Expected dependency downloaded path to be %s, but was %s",
+ expected_downloaded_path.generic_string(), actual_downloaded_path.generic_string());
return actual_downloaded_path;
}
diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp
index 7ea33da0a..932502d2d 100644
--- a/toolsrc/src/vcpkglib.cpp
+++ b/toolsrc/src/vcpkglib.cpp
@@ -7,6 +7,8 @@
namespace vcpkg
{
+ bool g_debugging = false;
+
static StatusParagraphs load_current_database(const fs::path& vcpkg_dir_status_file, const fs::path& vcpkg_dir_status_file_old)
{
if (!fs::exists(vcpkg_dir_status_file))
@@ -20,7 +22,7 @@ namespace vcpkg
fs::rename(vcpkg_dir_status_file_old, vcpkg_dir_status_file);
}
- auto text = Files::read_contents(vcpkg_dir_status_file).get_or_throw();
+ auto text = Files::read_contents(vcpkg_dir_status_file).get_or_throw(VCPKG_LINE_INFO);
auto pghs = Paragraphs::parse_paragraphs(text);
std::vector<std::unique_ptr<StatusParagraph>> status_pghs;
@@ -63,7 +65,7 @@ namespace vcpkg
if (b->path().filename() == "incomplete")
continue;
- auto text = Files::read_contents(b->path()).get_or_throw();
+ auto text = Files::read_contents(b->path()).get_or_throw(VCPKG_LINE_INFO);
auto pghs = Paragraphs::parse_paragraphs(text);
for (auto&& p : pghs)
{
@@ -183,7 +185,7 @@ namespace vcpkg
}
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();
+ std::vector<std::string> installed_files_of_current_pgh = Files::read_all_lines(listfile_path).get_or_throw(VCPKG_LINE_INFO);
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);
diff --git a/toolsrc/src/vcpkglib_helpers.cpp b/toolsrc/src/vcpkglib_helpers.cpp
index 6b96c25cb..1730be374 100644
--- a/toolsrc/src/vcpkglib_helpers.cpp
+++ b/toolsrc/src/vcpkglib_helpers.cpp
@@ -31,14 +31,14 @@ namespace vcpkg::details
std::string required_field(const std::unordered_map<std::string, std::string>& fields, const std::string& fieldname)
{
auto it = fields.find(fieldname);
- Checks::check_exit(it != fields.end(), "Required field not present: %s", fieldname);
+ Checks::check_exit(VCPKG_LINE_INFO, it != fields.end(), "Required field not present: %s", fieldname);
return it->second;
}
std::string remove_required_field(std::unordered_map<std::string, std::string>* fields, const std::string& fieldname)
{
auto it = fields->find(fieldname);
- Checks::check_exit(it != fields->end(), "Required field not present: %s", fieldname);
+ Checks::check_exit(VCPKG_LINE_INFO, it != fields->end(), "Required field not present: %s", fieldname);
const std::string value = std::move(it->second);
fields->erase(it);
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj
index dd5dd124a..237af6543 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj
@@ -138,6 +138,7 @@
<ItemGroup>
<ClInclude Include="..\include\BinaryParagraph.h" />
<ClInclude Include="..\include\lazy.h" />
+ <ClInclude Include="..\include\LineInfo.h" />
<ClInclude Include="..\include\PostBuildLint_BuildInfo.h" />
<ClInclude Include="..\include\PostBuildLint_BuildPolicies.h" />
<ClInclude Include="..\include\coff_file_reader.h" />
@@ -181,6 +182,7 @@
<ItemGroup>
<ClCompile Include="..\src\BinaryParagraph.cpp" />
<ClCompile Include="..\src\commands_ci.cpp" />
+ <ClCompile Include="..\src\LineInfo.cpp" />
<ClCompile Include="..\src\PostBuildLint_BuildInfo.cpp" />
<ClCompile Include="..\src\PostBuildLint_BuildPolicies.cpp" />
<ClCompile Include="..\src\coff_file_reader.cpp" />
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
index d701321be..60eaa167a 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
@@ -171,6 +171,9 @@
<ClCompile Include="..\src\vcpkg_Chrono.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\LineInfo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\package_spec.h">
@@ -296,5 +299,8 @@
<ClInclude Include="..\include\lazy.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\include\LineInfo.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/triplets/arm-uwp.cmake b/triplets/arm-uwp.cmake
index 678643eb1..f16f96a4a 100644
--- a/triplets/arm-uwp.cmake
+++ b/triplets/arm-uwp.cmake
@@ -4,4 +4,3 @@ set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore)
set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)
-set(VCPKG_REQUIRE_GENERATOR "Visual Studio 14 2015 Win64")
diff --git a/triplets/x64-uwp.cmake b/triplets/x64-uwp.cmake
index ca6455fc8..944acdd83 100644
--- a/triplets/x64-uwp.cmake
+++ b/triplets/x64-uwp.cmake
@@ -4,4 +4,3 @@ set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore)
set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)
-set(VCPKG_REQUIRE_GENERATOR "Visual Studio 14 2015 Win64")
diff --git a/triplets/x86-uwp.cmake b/triplets/x86-uwp.cmake
index 7e2d4d2c0..13b9d77c2 100644
--- a/triplets/x86-uwp.cmake
+++ b/triplets/x86-uwp.cmake
@@ -4,4 +4,3 @@ set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore)
set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)
-set(VCPKG_REQUIRE_GENERATOR "Visual Studio 14 2015 Win64")