From 8e911397c5a7e9796714431e9f87787dfd234fcc Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Mon, 21 Nov 2016 11:43:23 +0100 Subject: [boost] Build boost with zlib support --- ports/boost/CONTROL | 1 + ports/boost/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 57dfe58e3..8f5fcbb39 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,3 +1,4 @@ Source: boost Version: 1.62-6 Description: Peer-reviewed portable C++ source libraries +Build-Depends: zlib diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 7cc0d60b0..5b488c697 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -31,6 +31,10 @@ endif() message(STATUS "Bootstrapping done") set(B2_OPTIONS + -sZLIB_BINARY=zlib + -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + -sNO_BZIP2=1 -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration --hash -- cgit v1.2.3 From 877b237f6f22fdc098051f550c7b9dcf26afe3ec Mon Sep 17 00:00:00 2001 From: devel71 Date: Fri, 25 Nov 2016 11:40:29 +0100 Subject: initial commit to qca branch --- ports/qca/0001-fix-path-for-vcpkg.patch | 54 ++++++++++++++++++ ports/qca/CONTROL | 3 + ports/qca/portfile.cmake | 97 +++++++++++++++++++++++++++++++++ ports/qca/qca_load_qtenv.cmake | 40 ++++++++++++++ 4 files changed, 194 insertions(+) create mode 100644 ports/qca/0001-fix-path-for-vcpkg.patch create mode 100644 ports/qca/CONTROL create mode 100644 ports/qca/portfile.cmake create mode 100644 ports/qca/qca_load_qtenv.cmake diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch new file mode 100644 index 000000000..b48fee18f --- /dev/null +++ b/ports/qca/0001-fix-path-for-vcpkg.patch @@ -0,0 +1,54 @@ +From bab44a6614d4a540af56860432bcc0d6bdf420c9 Mon Sep 17 00:00:00 2001 +From: devel +Date: Wed, 23 Nov 2016 16:54:44 +0100 +Subject: [PATCH] fix path for vcpkg + +--- + CMakeLists.txt | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 605621b..a8c3774 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -277,7 +277,7 @@ if(DEVELOPER_MODE) + # To prefer plugins from build tree when run qca from build tree + file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf + "[Paths] +-Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} ++Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} + ") + endif() + +@@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND) + include(CMakePackageConfigHelpers) + configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" +- INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_CURRENT_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ INSTALL_DESTINATION ${CMAKE_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE} + ) +-write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) ++write_basic_config_version_file("${CMAKE_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) + + if(NOT DEVELOPER_MODE) + +@@ -472,10 +472,10 @@ if(NOT DEVELOPER_MODE) + endif() + endif() + +- install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) ++ install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) + install(FILES +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" +- DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_CURRENT_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" ++ DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE} + ) + endif() +-- +2.9.2.windows.1 + diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL new file mode 100644 index 000000000..84465481a --- /dev/null +++ b/ports/qca/CONTROL @@ -0,0 +1,3 @@ +Source: qca +Version: 2.2.0 +Description: Qt Cryptographic Api (QCA) diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake new file mode 100644 index 000000000..cc391b517 --- /dev/null +++ b/ports/qca/portfile.cmake @@ -0,0 +1,97 @@ +# For now only x[64|86]-windows triplet and dynamic linking is supported +# + +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) +include(${CMAKE_CURRENT_LIST_DIR}/qca_load_qtenv.cmake) + +find_program(GIT git) + +# Set git variables to qca version 2.2.0 commit +set(GIT_URL "git://anongit.kde.org/qca.git") +set(GIT_REF "19ec49f89a0a560590ec733c549b92e199792837") # Commit + +# Prepare source dir +if(NOT EXISTS "${DOWNLOADS}/qca.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/qca.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() +message(STATUS "Cloning done") + +if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + message(STATUS "Adding worktree") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/qca.git + LOGNAME worktree + ) +endif() +message(STATUS "Adding worktree done") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/) + +# Apply the patch to install 'crypto' and 'cmake targets' folder +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-fix-path-for-vcpkg.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + CURRENT_PACKAGES_DIR ${CURRENT_PACKAGES_DIR} + OPTIONS + #-DSOURCE=${SOURCE_PATH} + -DBUILD_SHARED_LIBS=ON + -DUSE_RELATIVE_PATHS=ON + -DQT4_BUILD=OFF + -DBUILD_TESTS=OFF + -DBUILD_TOOLS=OFF + -DQCA_SUFFIX=qt5 + OPTIONS_DEBUG + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca-qt5 + OPTIONS_RELEASE + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca-qt5 +) + +vcpkg_install_cmake() + +message(STATUS "Patching files") + +file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/share/cmake/Qca-qt5/Qca-qt5Targets-debug.cmake + ${CURRENT_PACKAGES_DIR}/share/cmake/Qca-qt5/Qca-qt5Targets-debug.cmake +) + +set(T_DEBUG ${CURRENT_PACKAGES_DIR}/share/cmake/Qca-qt5/Qca-qt5Targets-debug.cmake) +set(T_TARGETS ${CURRENT_PACKAGES_DIR}/share/cmake/Qca-qt5/Qca-qt5Targets.cmake) + +file(READ ${T_DEBUG} QCA_DEBUG_CONFIG) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" QCA_DEBUG_CONFIG "${QCA_DEBUG_CONFIG}") +file(WRITE ${T_DEBUG} "${QCA_DEBUG_CONFIG}") + +file(READ ${T_TARGETS} QCA_TARGET_CONFIG) +string(REPLACE "packages/qca_" "installed/" QCA_TARGET_CONFIG "${QCA_TARGET_CONFIG}") +file(WRITE ${T_TARGETS} "${QCA_TARGET_CONFIG}") + +# Remove unneeded dirs +file(REMOVE_RECURSE + ${CURRENT_BUILDTREES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +message(STATUS "Patching files done") + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/qca/COPYING ${CURRENT_PACKAGES_DIR}/share/qca/copyright) diff --git a/ports/qca/qca_load_qtenv.cmake b/ports/qca/qca_load_qtenv.cmake new file mode 100644 index 000000000..ee2eb9696 --- /dev/null +++ b/ports/qca/qca_load_qtenv.cmake @@ -0,0 +1,40 @@ +# TODO: Better way to find Qt5 dir +# + +set(_QT5_FOUND FALSE) + +# Already available? +find_package(Qt5Core QUIET) +if(Qt5Core_FOUND) + message(STATUS "Qt5 found by CMake. Version: " ${Qt5Core_VERSION}) + set(_QT5_FOUND TRUE) + return() + +elseif(NOT Qt5Core_FOUND) + # Try to find Qt in the Windows Registry (just msvc2015 and msvc2015_64 for now) + if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86") + set(_QTKEY "HKEY_CURRENT_USER\\SOFTWARE\\Digia\\Versions\\msvc2015") + elseif(${TRIPLET_SYSTEM_ARCH} STREQUAL "x64") + set(_QTKEY "HKEY_CURRENT_USER\\SOFTWARE\\Digia\\Versions\\msvc2015_64") + endif() + get_filename_component(_QTPATH "[${_QTKEY};InstallDir]" ABSOLUTE) + if(NOT ${_QTPATH} STREQUAL "/registry") # Path should be ok + message(STATUS "Qt found in the registry: ${_QTPATH}") + set(QT5 ${_QTPATH}) + set(_QT5_FOUND TRUE) + endif() +endif(Qt5Core_FOUND) + +if((NOT _QT5_FOUND) AND (NOT DEFINED $ENV{QT5})) + message(STATUS " ") + message(STATUS "QT5 not found.") + message(STATUS "Please set the path to the Qt5 ${TRIPLET_SYSTEM_ARCH} toolchain dir for this session with f. e.:") + message(STATUS " \$env:QT5 = \"path\\to\\Qt\\msvc[_64]\"") + message(FATAL_ERROR "") +elseif(_QT5_FOUND AND (${TARGET_TRIPLET} STREQUAL "x64-windows" OR ${TARGET_TRIPLET} STREQUAL "x86-windows")) + #message(STATUS "Using Qt5: ${QT5}") + #set(ENV{QTDIR} ${QT5}) + set(ENV{PATH} "${QT5}/bin;$ENV{PATH}") +else() + message(FATAL_ERROR "Target triplet: ${TARGET_TRIPLET} not supported yet.") +endif() -- cgit v1.2.3 From 447995519319c80cefd0c612c49aa005ab2586d3 Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Fri, 25 Nov 2016 15:58:57 +0100 Subject: [boost] Link against correct version of zlib when building debug variant. --- ports/boost/portfile.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 5b488c697..050418afc 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -65,6 +65,15 @@ if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore") set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR}) endif() +# Add build type specific options +set(B2_OPTIONS_DBG + ${B2_OPTIONS} + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" +) +set(B2_OPTIONS_REL + ${B2_OPTIONS} + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" +) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) @@ -74,7 +83,7 @@ vcpkg_execute_required_process_repeat( COMMAND "${SOURCE_PATH}/b2.exe" --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - ${B2_OPTIONS} + ${B2_OPTIONS_REL} variant=release debug-symbols=on WORKING_DIRECTORY ${SOURCE_PATH} @@ -87,7 +96,7 @@ vcpkg_execute_required_process_repeat( COMMAND "${SOURCE_PATH}/b2.exe" --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${B2_OPTIONS} + ${B2_OPTIONS_DBG} variant=debug WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME build-${TARGET_TRIPLET}-dbg -- cgit v1.2.3 From 89314e013280b5dceec13ec034b38324cbed3e08 Mon Sep 17 00:00:00 2001 From: ab Date: Fri, 25 Nov 2016 16:33:16 +0100 Subject: Adding http-parser library --- ports/http-parser/CMakeLists.txt | 22 ++++++++++++++++++++++ ports/http-parser/CONTROL | 3 +++ ports/http-parser/portfile.cmake | 29 +++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 ports/http-parser/CMakeLists.txt create mode 100644 ports/http-parser/CONTROL create mode 100644 ports/http-parser/portfile.cmake diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt new file mode 100644 index 000000000..021b1842f --- /dev/null +++ b/ports/http-parser/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required (VERSION 2.6) +project (http-parser) + +set(PUBLIC_HDRS + http_parser.h +) +set(PRIVATE_HDRS +) +set(SRCS + http_parser.c +) + +add_library(http_parser STATIC ${SRCS} ${PUBLIC_HDRS} ${PRIAVTE_HDRS}) + +if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + install(TARGETS http_parser + ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" ) +endif() + +if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) + install(FILES ${PUBLIC_HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include") +endif() \ No newline at end of file diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL new file mode 100644 index 000000000..41d234d26 --- /dev/null +++ b/ports/http-parser/CONTROL @@ -0,0 +1,3 @@ +Source: http-parser +Version: 2.7.1 +Description: HTTP Parser. \ No newline at end of file diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake new file mode 100644 index 000000000..728293eed --- /dev/null +++ b/ports/http-parser/portfile.cmake @@ -0,0 +1,29 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/http-parser-2.7.1) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://github.com/nodejs/http-parser/archive/v2.7.1.zip" + FILENAME "http-parser-2.7.1.zip" + SHA512 9fb8b855ba7edb47628c91ac062d7ffce9c4bb8d6b8237d861d7926af989fb3e354c113821bdab1b8ac910f5f1064ca1339947aa20d56f6806b919b0cd6b6eae +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) \ No newline at end of file -- cgit v1.2.3 From 84ce8ae5cb3bc1998f87b6e2aeb1d57514428845 Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Wed, 23 Nov 2016 18:30:36 +0100 Subject: [glew] Implement static build --- ports/glew/portfile.cmake | 104 +++++++++++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 38 deletions(-) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index fd3c5ef9a..e7cf16cf2 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -1,7 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-2.0.0) vcpkg_download_distfile(ARCHIVE_FILE @@ -19,45 +15,77 @@ ELSE() SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) ENDIF() -if(NOT EXISTS ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj) - message(STATUS "Upgrading projects") - file(READ ${SOURCE_PATH}/build/vc12/glew_shared.vcxproj PROJ) - string(REPLACE - "v120" - "v140" - PROJ ${PROJ}) - string(REPLACE - "opengl32.lib%" - "opengl32.lib\;%" - PROJ ${PROJ}) - file(WRITE ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj ${PROJ}) -endif() +# TODO: Maybe switch to glews' cmake build system in the future +FOREACH(LINKAGE shared static) + if(NOT EXISTS ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}14.vcxproj) + message(STATUS "Upgrading " ${LINKAGE} " project") + file(READ ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}.vcxproj PROJ) + string(REPLACE + "v120" + "v140" + PROJ ${PROJ}) + string(REPLACE + "opengl32.lib%" + "opengl32.lib\;%" + PROJ ${PROJ}) + + if (LINKAGE STREQUAL "static") + string(REPLACE + "MultiThreadedDebugDLL" + "MultiThreadedDebug" + PROJ ${PROJ} + ) + endif() + file(WRITE ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}14.vcxproj ${PROJ}) + endif() +ENDFOREACH(LINKAGE) message(STATUS "Upgrading projects done") -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj -) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_static14.vcxproj + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj + ) +endif() + message(STATUS "Installing") -file(INSTALL - ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.dll - ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file(INSTALL - ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.dll - ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file(INSTALL - ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32d.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL + ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.dll + ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.dll + ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32d.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +else() + file(INSTALL + ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32sd.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME glew32d.lib + ) + file(INSTALL + ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32s.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME glew32.lib + ) +endif() + file(INSTALL ${SOURCE_PATH}/include/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include -- cgit v1.2.3 From cb778ecfbd78f03e8a9361ff9376df108f6bb906 Mon Sep 17 00:00:00 2001 From: devel71 Date: Sat, 26 Nov 2016 13:51:09 +0100 Subject: [qca] fix cmake file location Added qt5 Build-Depends to CONTROL file. --- ports/qca/0001-fix-path-for-vcpkg.patch | 14 ++++++------ ports/qca/CONTROL | 1 + ports/qca/portfile.cmake | 36 +++++++++++++++-------------- ports/qca/qca_load_qtenv.cmake | 40 --------------------------------- 4 files changed, 27 insertions(+), 64 deletions(-) delete mode 100644 ports/qca/qca_load_qtenv.cmake diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch index b48fee18f..d7764c01d 100644 --- a/ports/qca/0001-fix-path-for-vcpkg.patch +++ b/ports/qca/0001-fix-path-for-vcpkg.patch @@ -26,11 +26,11 @@ index 605621b..a8c3774 100644 "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" - INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} -+ "${CMAKE_CURRENT_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" -+ INSTALL_DESTINATION ${CMAKE_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ INSTALL_DESTINATION ${CMAKE_BINARY_DIR}/share/qca/cmake ) -write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) -+write_basic_config_version_file("${CMAKE_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) ++write_basic_config_version_file("${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) if(NOT DEVELOPER_MODE) @@ -39,14 +39,14 @@ index 605621b..a8c3774 100644 endif() - install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) -+ install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) ++ install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" - DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} -+ "${CMAKE_CURRENT_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" -+ DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" ++ DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake ) endif() -- diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index 84465481a..30716ca6e 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,3 +1,4 @@ Source: qca Version: 2.2.0 Description: Qt Cryptographic Api (QCA) +Build-Depends: qt5 \ No newline at end of file diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index cc391b517..fa38970d3 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -7,7 +7,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() include(vcpkg_common_functions) -include(${CMAKE_CURRENT_LIST_DIR}/qca_load_qtenv.cmake) find_program(GIT git) @@ -39,48 +38,51 @@ message(STATUS "Adding worktree done") set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/) -# Apply the patch to install 'crypto' and 'cmake targets' folder +# Apply the patch to install to the expected folders vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-fix-path-for-vcpkg.patch ) +# Configure and build vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} CURRENT_PACKAGES_DIR ${CURRENT_PACKAGES_DIR} OPTIONS - #-DSOURCE=${SOURCE_PATH} -DBUILD_SHARED_LIBS=ON -DUSE_RELATIVE_PATHS=ON -DQT4_BUILD=OFF -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF - -DQCA_SUFFIX=qt5 + -DQCA_SUFFIX=OFF # OPTIONS_DEBUG - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca-qt5 + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca # OPTIONS_RELEASE - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca-qt5 + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca # ) vcpkg_install_cmake() +# Patch and copy cmake files message(STATUS "Patching files") -file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/share/cmake/Qca-qt5/Qca-qt5Targets-debug.cmake - ${CURRENT_PACKAGES_DIR}/share/cmake/Qca-qt5/Qca-qt5Targets-debug.cmake +file(READ + ${CURRENT_PACKAGES_DIR}/debug/share/qca/cmake/QcaTargets-debug.cmake + QCA_DEBUG_CONFIG ) - -set(T_DEBUG ${CURRENT_PACKAGES_DIR}/share/cmake/Qca-qt5/Qca-qt5Targets-debug.cmake) -set(T_TARGETS ${CURRENT_PACKAGES_DIR}/share/cmake/Qca-qt5/Qca-qt5Targets.cmake) - -file(READ ${T_DEBUG} QCA_DEBUG_CONFIG) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" QCA_DEBUG_CONFIG "${QCA_DEBUG_CONFIG}") -file(WRITE ${T_DEBUG} "${QCA_DEBUG_CONFIG}") +file(WRITE + ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets-debug.cmake + "${QCA_DEBUG_CONFIG}" +) -file(READ ${T_TARGETS} QCA_TARGET_CONFIG) +file(READ ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake + QCA_TARGET_CONFIG +) string(REPLACE "packages/qca_" "installed/" QCA_TARGET_CONFIG "${QCA_TARGET_CONFIG}") -file(WRITE ${T_TARGETS} "${QCA_TARGET_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake + "${QCA_TARGET_CONFIG}" +) # Remove unneeded dirs file(REMOVE_RECURSE diff --git a/ports/qca/qca_load_qtenv.cmake b/ports/qca/qca_load_qtenv.cmake deleted file mode 100644 index ee2eb9696..000000000 --- a/ports/qca/qca_load_qtenv.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# TODO: Better way to find Qt5 dir -# - -set(_QT5_FOUND FALSE) - -# Already available? -find_package(Qt5Core QUIET) -if(Qt5Core_FOUND) - message(STATUS "Qt5 found by CMake. Version: " ${Qt5Core_VERSION}) - set(_QT5_FOUND TRUE) - return() - -elseif(NOT Qt5Core_FOUND) - # Try to find Qt in the Windows Registry (just msvc2015 and msvc2015_64 for now) - if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86") - set(_QTKEY "HKEY_CURRENT_USER\\SOFTWARE\\Digia\\Versions\\msvc2015") - elseif(${TRIPLET_SYSTEM_ARCH} STREQUAL "x64") - set(_QTKEY "HKEY_CURRENT_USER\\SOFTWARE\\Digia\\Versions\\msvc2015_64") - endif() - get_filename_component(_QTPATH "[${_QTKEY};InstallDir]" ABSOLUTE) - if(NOT ${_QTPATH} STREQUAL "/registry") # Path should be ok - message(STATUS "Qt found in the registry: ${_QTPATH}") - set(QT5 ${_QTPATH}) - set(_QT5_FOUND TRUE) - endif() -endif(Qt5Core_FOUND) - -if((NOT _QT5_FOUND) AND (NOT DEFINED $ENV{QT5})) - message(STATUS " ") - message(STATUS "QT5 not found.") - message(STATUS "Please set the path to the Qt5 ${TRIPLET_SYSTEM_ARCH} toolchain dir for this session with f. e.:") - message(STATUS " \$env:QT5 = \"path\\to\\Qt\\msvc[_64]\"") - message(FATAL_ERROR "") -elseif(_QT5_FOUND AND (${TARGET_TRIPLET} STREQUAL "x64-windows" OR ${TARGET_TRIPLET} STREQUAL "x86-windows")) - #message(STATUS "Using Qt5: ${QT5}") - #set(ENV{QTDIR} ${QT5}) - set(ENV{PATH} "${QT5}/bin;$ENV{PATH}") -else() - message(FATAL_ERROR "Target triplet: ${TARGET_TRIPLET} not supported yet.") -endif() -- cgit v1.2.3 From 282d979c7eb8a2ebaf7a815f688245450e844b29 Mon Sep 17 00:00:00 2001 From: devel71 Date: Sat, 26 Nov 2016 13:56:01 +0100 Subject: [qca] fix cmake files dir Added qt5 as Build-Depends to CONTROL file. --- ports/qca/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index 30716ca6e..d3dd43ab5 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca Version: 2.2.0 Description: Qt Cryptographic Api (QCA) -Build-Depends: qt5 \ No newline at end of file +Build-Depends: qt5 -- cgit v1.2.3 From e2e1c7d778c5063f8967bd26c35f9aeca4fbf757 Mon Sep 17 00:00:00 2001 From: sdcb Date: Mon, 28 Nov 2016 19:15:42 +0800 Subject: Add aws-sdk-cpp Note: 1. I add a patch to not using git, because git will emit a wrong version number in initialize_project_version.cmake file. 2. building aws-sdk-cpp will emit some very long file(longer than 258 in my machine), to make it work, you must moving vcpkg into some shorter path like: C:\vcpkg --- ports/aws-sdk-cpp/CONTROL | 3 +++ ports/aws-sdk-cpp/drop_git.patch | 13 +++++++++++++ ports/aws-sdk-cpp/portfile.cmake | 23 +++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 ports/aws-sdk-cpp/CONTROL create mode 100644 ports/aws-sdk-cpp/drop_git.patch create mode 100644 ports/aws-sdk-cpp/portfile.cmake diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL new file mode 100644 index 000000000..bfeed7a0b --- /dev/null +++ b/ports/aws-sdk-cpp/CONTROL @@ -0,0 +1,3 @@ +Source: aws-sdk-cpp +Version: 1.0.34 +Description: AWS SDK for C++ diff --git a/ports/aws-sdk-cpp/drop_git.patch b/ports/aws-sdk-cpp/drop_git.patch new file mode 100644 index 000000000..491831bd7 --- /dev/null +++ b/ports/aws-sdk-cpp/drop_git.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d2a98a..ce58b68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,7 +22,7 @@ if(CMAKE_MAJOR_VERSION LESS 3) + endif() + + # git is required for Android builds and optional for all other platforms +-find_package(Git) ++#find_package(Git) + + # Cmake invocation variables: + # CUSTOM_MEMORY_MANAGEMENT - if set to 1, generates the sdk project files with custom memory management enabled, otherwise disables it diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake new file mode 100644 index 000000000..8af7d0e94 --- /dev/null +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.34) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.34.tar.gz" + FILENAME "1.0.34.tar.gz" + SHA512 21ca03eb323eecb55c29866b73c07956a36aad7c9c051eb7ca201cfd356c3f9732c89898cf0c89660d6c1279dc52438bb389b37d613bf741bae81bb3e773a3c5 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/drop_git.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 94776cec0e831234a6d07bc535615c13f5344a8d Mon Sep 17 00:00:00 2001 From: flysha Date: Mon, 28 Nov 2016 23:03:26 +0800 Subject: [aws-sdk-cpp] correct the lib file --- ports/aws-sdk-cpp/portfile.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 8af7d0e94..6a72cda14 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -19,5 +19,20 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/nuget + ${CURRENT_PACKAGES_DIR}/debug/nuget) + +file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) +file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) +file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) + # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 84c99801c4142e937ed76b5c8b77747f6865d862 Mon Sep 17 00:00:00 2001 From: flysha Date: Mon, 28 Nov 2016 23:06:04 +0800 Subject: [aws-sdk-cpp] specify dynamic only --- ports/aws-sdk-cpp/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 6a72cda14..7912f8b11 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,3 +1,8 @@ +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/aws-sdk-cpp-1.0.34) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 167f82b804052239244bcbb7122253c13c4dca7e Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Wed, 23 Nov 2016 18:30:50 +0100 Subject: [ports] Initial commit of GDAL 1.11.3 port --- ...upport-for-MSVC1900-backported-from-GDAL2.patch | 70 ++++++++++++ ...e-CXX_CRT_FLAGS-to-allow-for-selection-of.patch | 50 ++++++++ ports/gdal/CONTROL | 4 + ports/gdal/portfile.cmake | 126 +++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch create mode 100644 ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch create mode 100644 ports/gdal/CONTROL create mode 100644 ports/gdal/portfile.cmake diff --git a/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch b/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch new file mode 100644 index 000000000..e29cc5b8e --- /dev/null +++ b/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch @@ -0,0 +1,70 @@ +From 823171a129401d226ac4821fb997ce585045170c Mon Sep 17 00:00:00 2001 +From: Manuel Massing +Date: Wed, 23 Nov 2016 23:50:12 +0100 +Subject: [PATCH] Add support for MSVC1900 (backported from GDAL2) + +--- + nmake.opt | 6 ++++++ + port/cpl_config.h.vc | 8 +++++--- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/nmake.opt b/nmake.opt +index 8900135..4d1c4fa 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -31,6 +31,7 @@ + # Check version of Visual C++ compiler: + # nmake -f makefile.vc MSVC_VER=xxxx + # where xxxx is one of following: ++# 1900 = 14.0(2015) + # 1800 = 12.0(2013) + # 1700 = 11.0(2012) + # 1600 = 10.0(2010) +@@ -627,8 +628,13 @@ GDALLIB = $(GDAL_ROOT)/gdal.lib + !ENDIF + + !IFDEF ODBC_SUPPORTED ++!IF $(MSVC_VER) >= 1900 ++# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries ++ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib ++!ELSE + ODBCLIB = odbc32.lib odbccp32.lib user32.lib + !ENDIF ++!ENDIF + + !IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) || DEFINED(MRSID_LIDAR_DIR) + !IF "$(MRSID_PLUGIN)" != "YES" +diff --git a/port/cpl_config.h.vc b/port/cpl_config.h.vc +index bfff8f6..fe7b82a 100644 +--- a/port/cpl_config.h.vc ++++ b/port/cpl_config.h.vc +@@ -1,5 +1,5 @@ + +-/* We define this here in general so that a VC++ build will publically ++/* We define this here in general so that a VC++ build will publicly + declare STDCALL interfaces even if an application is built against it + using MinGW */ + +@@ -17,7 +17,9 @@ + #if defined(_MSC_VER) && (_MSC_VER < 1500) + # define vsnprintf _vsnprintf + #endif +-#define snprintf _snprintf ++#if defined(_MSC_VER) && (_MSC_VER < 1900) ++# define snprintf _snprintf ++#endif + + #define HAVE_GETCWD 1 + /* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */ +@@ -86,7 +88,7 @@ + /* Set the native cpu bit order */ + #define HOST_FILLORDER FILLORDER_LSB2MSB + +-/* Define as 0 or 1 according to the floating point format suported by the ++/* Define as 0 or 1 according to the floating point format supported by the + machine */ + #define HAVE_IEEEFP 1 + +-- +2.10.1.windows.1 + diff --git a/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch new file mode 100644 index 000000000..0ffcac5fb --- /dev/null +++ b/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch @@ -0,0 +1,50 @@ +From b25c3dc49ca1bcf9a789cf64c9fa8694e35127f0 Mon Sep 17 00:00:00 2001 +From: Manuel Massing +Date: Sun, 27 Nov 2016 09:57:04 +0100 +Subject: [PATCH 2/2] Add variable CXX_CRT_FLAGS to allow for selection of C + runtime linkage in nmake build. + +--- + nmake.opt | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/nmake.opt b/nmake.opt +index 4d1c4fa..47c2df8 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -125,18 +125,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb + CXX_PDB_FLAGS= + !ENDIF + ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well ++!IFNDEF CXX_CRT_FLAGS ++!IFNDEF DEBUG ++CXX_CRT_FLAGS=/MD ++!ELSE ++CXX_CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ + !IFNDEF OPTFLAGS + !IF $(MSVC_VER) >= 1400 + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG + !ENDIF + !ELSE + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /DNDEBUG ++OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /DDEBUG ++OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG + !ENDIF + !ENDIF #MSVC_VER + !ENDIF # OPTFLAGS +-- +2.10.1.windows.1 + diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL new file mode 100644 index 000000000..38eccc46d --- /dev/null +++ b/ports/gdal/CONTROL @@ -0,0 +1,4 @@ +Source: gdal +Version: 1.11.3 +Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. +Build-Depends: proj diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake new file mode 100644 index 000000000..ca548ae83 --- /dev/null +++ b/ports/gdal/portfile.cmake @@ -0,0 +1,126 @@ +if (TRIPLET_SYSTEM_ARCH MATCHES "arm") + message(FATAL_ERROR " ARM is currently not supported.") +endif() + +include(vcpkg_common_functions) + +# Remove part pertaining to linkage +string(REPLACE "-static" "" ARCH ${TARGET_TRIPLET}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/gdal/1.11.3/gdal1113.zip" + FILENAME "gdal1113.zip" + SHA512 42feb98a54019d3b6ac54f598f299a57e117db500c662d39faa9d5f5090f03c1b8d7680242e1abd8035738edc4fc3197ae118a0ce50733691a76a5cf377bcd46 +) + +# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not +# support out of source builds. +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-debug/gdal-1.11.3) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-release/gdal-1.11.3) + +foreach(BUILD_TYPE debug release) + vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-${BUILD_TYPE}) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-${BUILD_TYPE}/gdal-1.11.3 + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch + ) +endforeach() + +find_program(NMAKE nmake REQUIRED) + +file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) +file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal" NATIVE_DATA_DIR) +file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal/html" NATIVE_HTML_DIR) + +file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" PROJ_INCLUDE_DIR) +file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/proj.lib" PROJ_LIBRARY_REL) +file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib/projd.lib" PROJ_LIBRARY_DBG) + +set(NMAKE_OPTIONS + GDAL_HOME=${NATIVE_PACKAGES_DIR} + DATADIR=${NATIVE_DATA_DIR} + HTMLDIR=${NATIVE_HTML_DIR} + PROJ_INCLUDE=-I${PROJ_INCLUDE_DIR} + MSVC_VER=1900 +) + +if(TARGET_TRIPLET MATCHES "x64") + list(APPEND NMAKE_OPTIONS WIN64=YES) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND NMAKE_OPTIONS + PROJ_FLAGS=-DPROJ_STATIC + ) +endif() + +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(LINKAGE_FLAGS "/MT") +else() + set(LINKAGE_FLAGS "/MD") +endif() + +set(NMAKE_OPTIONS_REL + "${NMAKE_OPTIONS}" + CXX_CRT_FLAGS=${LINKAGE_FLAGS} + PROJ_LIBRARY=${PROJ_LIBRARY_REL} +) +set(NMAKE_OPTIONS_DBG + "${NMAKE_OPTIONS}" + CXX_CRT_FLAGS="${LINKAGE_FLAGS}d" + PROJ_LIBRARY=${PROJ_LIBRARY_DBG} + DEBUG=1 +) +################ +# Release build +################ +message(STATUS "Building ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc + "${NMAKE_OPTIONS_REL}" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME nmake-build-${TARGET_TRIPLET}-release +) +message(STATUS "Building ${TARGET_TRIPLET}-rel done") + +################ +# Debug build +################ +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${NMAKE} /G -f makefile.vc + "${NMAKE_OPTIONS_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +message(STATUS "Packaging ${TARGET_TRIPLET}") +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html) + +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc + "${NMAKE_OPTIONS_REL}" + "install" + "devinstall" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME nmake-install-${TARGET_TRIPLET} +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib) + file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +else() + file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) +endif() +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdal/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gdal/copyright) + +message(STATUS "Packaging ${TARGET_TRIPLET} done") -- cgit v1.2.3 From a4b593ac627ef9a47a95277a05ed22083ddca955 Mon Sep 17 00:00:00 2001 From: sdcb Date: Tue, 29 Nov 2016 10:32:38 +0800 Subject: [aws-sdk] drop static block because aws-sdk actually works in static builds. --- ports/aws-sdk-cpp/portfile.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 7912f8b11..6a72cda14 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,8 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.34) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 865faa40172be0d61166bac87eadc43517463f0b Mon Sep 17 00:00:00 2001 From: sdcb Date: Tue, 29 Nov 2016 11:04:32 +0800 Subject: [aws-sdk] issues occurs in static build, revert code. --- ports/aws-sdk-cpp/portfile.cmake | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 6a72cda14..16ba1916c 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,3 +1,8 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported yet. Building dynamic.") #Blocked by CRT MD link issue. + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.34) vcpkg_download_distfile(ARCHIVE @@ -28,11 +33,13 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/nuget ${CURRENT_PACKAGES_DIR}/debug/nuget) -file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) -file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) -file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL dynamic) + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) + file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) + file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) +endif() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 069fb0f9711873d30db4752138a1908e950e413a Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Wed, 30 Nov 2016 10:10:01 +0100 Subject: formatting portfile --- ports/qca/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index fa38970d3..0ff913025 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -54,11 +54,11 @@ vcpkg_configure_cmake( -DQT4_BUILD=OFF -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF - -DQCA_SUFFIX=OFF # + -DQCA_SUFFIX=OFF OPTIONS_DEBUG - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca # + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca OPTIONS_RELEASE - -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca # + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca ) vcpkg_install_cmake() -- cgit v1.2.3 From e7f0cf8694badd1ee0b9c55d2d956c4d291fec0f Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Wed, 30 Nov 2016 10:24:10 +0100 Subject: [gdal] Separate build directories for dynamic and static build --- ports/gdal/portfile.cmake | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index ca548ae83..698c96a5c 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -4,9 +4,6 @@ endif() include(vcpkg_common_functions) -# Remove part pertaining to linkage -string(REPLACE "-static" "" ARCH ${TARGET_TRIPLET}) - vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/gdal/1.11.3/gdal1113.zip" FILENAME "gdal1113.zip" @@ -15,13 +12,13 @@ vcpkg_download_distfile(ARCHIVE # Extract source into archictecture specific directory, because GDALs' nmake based build currently does not # support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-debug/gdal-1.11.3) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-release/gdal-1.11.3) +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-1.11.3) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-1.11.3) foreach(BUILD_TYPE debug release) - vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-${BUILD_TYPE}) + vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${ARCH}-${BUILD_TYPE}/gdal-1.11.3 + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-1.11.3 PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch -- cgit v1.2.3 From e3001c78b91531b5170181935fd7b0293fdb82a8 Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Wed, 30 Nov 2016 10:26:18 +0100 Subject: [gdal] Enable building of PDBs in release builds as well, copy PDBs over --- ...lusion-of-PDB-in-release-dll-if-so-reques.patch | 26 ++++++++++++++++++++++ ports/gdal/portfile.cmake | 14 ++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch diff --git a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch new file mode 100644 index 000000000..1065a2982 --- /dev/null +++ b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch @@ -0,0 +1,26 @@ +From 9da0cb6eed442ebf3eea232cd85e26c155c963ef Mon Sep 17 00:00:00 2001 +From: Manuel Massing +Date: Tue, 29 Nov 2016 12:43:58 +0100 +Subject: [PATCH 3/4] - Ensures inclusion of PDB in release dll if so requested + +--- + gdal/nmake.opt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/nmake.opt b/nmake.opt +index 47c2df8..4844d22 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -174,6 +174,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 + # Linker debug options + !IFDEF DEBUG + LDEBUG= /debug ++!ELSEIFDEF WITH_PDB ++# Ensures that PDB is included in release DLL if so requested ++LDEBUG= /debug /opt:ref /opt:icf + !ENDIF + + # Uncomment the following if you are building for 64-bit windows +-- +2.10.1.windows.1 + diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 698c96a5c..ee003d622 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -22,7 +22,8 @@ foreach(BUILD_TYPE debug release) PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch - ) + ${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch + ) endforeach() find_program(NMAKE nmake REQUIRED) @@ -48,9 +49,10 @@ if(TARGET_TRIPLET MATCHES "x64") endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - list(APPEND NMAKE_OPTIONS - PROJ_FLAGS=-DPROJ_STATIC - ) + list(APPEND NMAKE_OPTIONS PROJ_FLAGS=-DPROJ_STATIC) +else() + # Enables PDBs for release and debug builds + list(APPEND NMAKE_OPTIONS WITH_PDB=1) endif() if (VCPKG_CRT_LINKAGE STREQUAL static) @@ -117,6 +119,10 @@ else() file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) endif() + +# Copy over PDBs +vcpkg_copy_pdbs() + # Handle copyright file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdal/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gdal/copyright) -- cgit v1.2.3 From 05f9b3a164085d3069be3e95d6bb469fc9b0438f Mon Sep 17 00:00:00 2001 From: Manuel Massing Date: Wed, 30 Nov 2016 10:26:18 +0100 Subject: [gdal] Rename dynamic gdal libraries to match static library naming, add "d" suffix for debug libraries --- ports/gdal/portfile.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index ee003d622..e5f148922 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -66,6 +66,7 @@ set(NMAKE_OPTIONS_REL CXX_CRT_FLAGS=${LINKAGE_FLAGS} PROJ_LIBRARY=${PROJ_LIBRARY_REL} ) + set(NMAKE_OPTIONS_DBG "${NMAKE_OPTIONS}" CXX_CRT_FLAGS="${LINKAGE_FLAGS}d" @@ -113,11 +114,14 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib) file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) else() - file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) endif() # Copy over PDBs -- cgit v1.2.3 From 5b2d836e1436c8557909797285131e46eac81d88 Mon Sep 17 00:00:00 2001 From: flysha Date: Wed, 30 Nov 2016 23:03:49 +0800 Subject: [aws-sdk-cpp] enable static and disable test --- ports/aws-sdk-cpp/portfile.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 16ba1916c..321ec5f8c 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,8 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") #Blocked by CRT MD link issue. - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.34) vcpkg_download_distfile(ARCHIVE @@ -18,8 +13,15 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/drop_git.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(FORCE_SHARED_CRT ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENABLE_TESTING=OFF + -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT} ) vcpkg_install_cmake() -- cgit v1.2.3 From 915d99ecb751c3607adac689e7353f59d30f13f6 Mon Sep 17 00:00:00 2001 From: flysha Date: Wed, 30 Nov 2016 23:06:00 +0800 Subject: [aws-sdk-cpp] correct FORCE_SHARED_CRT --- ports/aws-sdk-cpp/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 321ec5f8c..f012719a8 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_apply_patches( ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(FORCE_SHARED_CRT ON) + set(FORCE_SHARED_CRT OFF) endif() vcpkg_configure_cmake( -- cgit v1.2.3 From 5a04753a4a99a6210990b25e8773b86ccbffec0b Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Wed, 30 Nov 2016 17:16:59 +0100 Subject: [qca] added PS script to extract local certs from store --- ports/qca/0001-fix-path-for-vcpkg.patch | 23 +++++++++++++++------- ports/qca/import-local-certificates.ps1 | 35 +++++++++++++++++++++++++++++++++ ports/qca/portfile.cmake | 17 +++++++++++++++- 3 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 ports/qca/import-local-certificates.ps1 diff --git a/ports/qca/0001-fix-path-for-vcpkg.patch b/ports/qca/0001-fix-path-for-vcpkg.patch index d7764c01d..9db22af1d 100644 --- a/ports/qca/0001-fix-path-for-vcpkg.patch +++ b/ports/qca/0001-fix-path-for-vcpkg.patch @@ -1,14 +1,14 @@ -From bab44a6614d4a540af56860432bcc0d6bdf420c9 Mon Sep 17 00:00:00 2001 -From: devel -Date: Wed, 23 Nov 2016 16:54:44 +0100 +From a3a8d50f3bdcb4df630f7126718c21f23efd7832 Mon Sep 17 00:00:00 2001 +From: Alexander Kaspar +Date: Wed, 30 Nov 2016 15:45:12 +0100 Subject: [PATCH] fix path for vcpkg --- - CMakeLists.txt | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) + CMakeLists.txt | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 605621b..a8c3774 100644 +index 605621b..3b5a9be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,7 +277,7 @@ if(DEVELOPER_MODE) @@ -20,6 +20,15 @@ index 605621b..a8c3774 100644 ") endif() +@@ -320,7 +320,7 @@ else (qca_CERTSTORE) + set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem") + # note that INSTALL_FILES targets are relative to the current installation prefix... + if(NOT DEVELOPER_MODE) +- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs") ++ install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/qca/certs") + endif() + endif (qca_CERTSTORE) + message(STATUS "certstore path: " ${qca_CERTSTORE}) @@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND) include(CMakePackageConfigHelpers) configure_package_config_file( @@ -50,5 +59,5 @@ index 605621b..a8c3774 100644 ) endif() -- -2.9.2.windows.1 +2.8.1.windows.1 diff --git a/ports/qca/import-local-certificates.ps1 b/ports/qca/import-local-certificates.ps1 new file mode 100644 index 000000000..94e68e766 --- /dev/null +++ b/ports/qca/import-local-certificates.ps1 @@ -0,0 +1,35 @@ +# According to: +# https://www.openssl.org/docs/faq.html#USER16 +# it is up to developers or admins to maintain CAs. +# +# This script imports LocalMachine certificates into rootcerts.pem +# needed by qca. +# +# PS> .\import-local-certificates.ps1 -certstore Root -outpath C:\src\git\vcpkg\ports\qca +# + +param ( + # one of Root, My, CA, ... + [string]$certstore = "Root", + # the path where it should be in qca buildtree (without trailing '\') + [Parameter(Mandatory=$true)][string]$outpath +) + +$certs = (Get-ChildItem -Path 'Cert:\LocalMachine\Root') +$outfile = $outpath + "\rootcerts.pem" + +Write-Host "Importing: " $certs.Count " certificates ..." + +foreach ($cert in $certs) +{ + $certs.GetIssuerName() + $out = New-Object String[] -ArgumentList 3 + $out[0] = "-----BEGIN CERTIFICATE-----" + $out[1] = [System.Convert]::ToBase64String($cert.PublicKey.EncodedKeyValue.RawData, "InsertLineBreaks") + $out[2] = "-----END CERTIFICATE-----" + + [System.IO.File]::AppendAllLines($outfile, $out) +} + +Write-Host "Written to: " $outfile +Write-Host "Importing certificates done." diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index 0ff913025..b92596ef9 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -53,8 +53,9 @@ vcpkg_configure_cmake( -DUSE_RELATIVE_PATHS=ON -DQT4_BUILD=OFF -DBUILD_TESTS=OFF - -DBUILD_TOOLS=OFF + -DBUILD_TOOLS=ON -DQCA_SUFFIX=OFF + -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features OPTIONS_DEBUG -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca OPTIONS_RELEASE @@ -84,6 +85,20 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake "${QCA_TARGET_CONFIG}" ) +# Move tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/mozcerts.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca/tools +) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/qcatool.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca/tools +) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mozcerts.exe + ${CURRENT_PACKAGES_DIR}/bin/qcatool.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/mozcerts.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/mozcerts.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/qcatool.exe +) + # Remove unneeded dirs file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/share/man -- cgit v1.2.3 From 03cdf1dc97f05b7fc290c6c6eac1306aae1605ba Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Wed, 30 Nov 2016 21:34:35 +0100 Subject: [qca] import local certs --- ports/qca/import-local-certificates.ps1 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ports/qca/import-local-certificates.ps1 b/ports/qca/import-local-certificates.ps1 index 94e68e766..d0e644a50 100644 --- a/ports/qca/import-local-certificates.ps1 +++ b/ports/qca/import-local-certificates.ps1 @@ -22,13 +22,8 @@ Write-Host "Importing: " $certs.Count " certificates ..." foreach ($cert in $certs) { - $certs.GetIssuerName() - $out = New-Object String[] -ArgumentList 3 - $out[0] = "-----BEGIN CERTIFICATE-----" - $out[1] = [System.Convert]::ToBase64String($cert.PublicKey.EncodedKeyValue.RawData, "InsertLineBreaks") - $out[2] = "-----END CERTIFICATE-----" - - [System.IO.File]::AppendAllLines($outfile, $out) + $outfile = $outpath + "/" + $cert.Thumbprint + ".cer" + Export-Certificate -Cert $cert -FilePath $outfile } Write-Host "Written to: " $outfile -- cgit v1.2.3 From 76f99eecfce01ef1ab4262f179819eb250b8d56e Mon Sep 17 00:00:00 2001 From: sdcb Date: Thu, 1 Dec 2016 10:23:35 +0800 Subject: [aws-sdk-cpp] add patch to define USE_IMPORT_EXPORT to fix dynamic build link issue --- ports/aws-sdk-cpp/portfile.cmake | 6 ++++++ ports/aws-sdk-cpp/shared_define.patch | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 ports/aws-sdk-cpp/shared_define.patch diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index f012719a8..5ff1ba6b7 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -41,6 +41,12 @@ if(${VCPKG_LIBRARY_LINKAGE} STREQUAL dynamic) file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) + + vcpkg_apply_patches( #define USE_IMPORT_EXPORT in SDKConfig.h + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CURRENT_PACKAGES_DIR}/include/shared_define.patch + ) endif() # Handle copyright diff --git a/ports/aws-sdk-cpp/shared_define.patch b/ports/aws-sdk-cpp/shared_define.patch new file mode 100644 index 000000000..96657b33e --- /dev/null +++ b/ports/aws-sdk-cpp/shared_define.patch @@ -0,0 +1,10 @@ +diff --git a/aws/core/SDKConfig.h b/aws/core/SDKConfig.h +index 130c9dd..66b2630 100644 +--- a/aws/core/SDKConfig.h ++++ b/aws/core/SDKConfig.h +@@ -17,3 +17,4 @@ + + #define JSON_USE_EXCEPTION 0 + ++#define USE_IMPORT_EXPORT +\ No newline at end of file -- cgit v1.2.3 From e6a26aaa314a1267f5a1176d067fe7a2e1063ab2 Mon Sep 17 00:00:00 2001 From: sdcb Date: Thu, 1 Dec 2016 10:27:27 +0800 Subject: [aws-sdk-cpp] set FORCE_SHARED_CRT ON when building dynamic. --- ports/aws-sdk-cpp/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 5ff1ba6b7..888a492d9 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -15,6 +15,8 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(FORCE_SHARED_CRT OFF) +else() + set(FORCE_SHARED_CRT ON) endif() vcpkg_configure_cmake( -- cgit v1.2.3 From 007de30723ade2ef68047b9c1f705a72b4f28f96 Mon Sep 17 00:00:00 2001 From: sdcb Date: Thu, 1 Dec 2016 10:56:43 +0800 Subject: [aws-sdk-cpp] correct patch path --- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 888a492d9..a1f1a40b9 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -45,9 +45,9 @@ if(${VCPKG_LIBRARY_LINKAGE} STREQUAL dynamic) file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) vcpkg_apply_patches( #define USE_IMPORT_EXPORT in SDKConfig.h - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include PATCHES - ${CURRENT_PACKAGES_DIR}/include/shared_define.patch + ${CMAKE_CURRENT_LIST_DIR}/shared_define.patch ) endif() -- cgit v1.2.3 From 0f797c7a0127e2575e3ac0ad56d829383ec5b5ae Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Thu, 1 Dec 2016 13:43:36 +0100 Subject: [qca] working on certstore --- ports/qca/CONTROL | 2 +- ports/qca/import-local-certificates.ps1 | 17 ++++++++++++----- ports/qca/portfile.cmake | 34 ++++++++++++++++----------------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index d3dd43ab5..cbe923bb4 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca Version: 2.2.0 -Description: Qt Cryptographic Api (QCA) +Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/ Build-Depends: qt5 diff --git a/ports/qca/import-local-certificates.ps1 b/ports/qca/import-local-certificates.ps1 index d0e644a50..df39cbb01 100644 --- a/ports/qca/import-local-certificates.ps1 +++ b/ports/qca/import-local-certificates.ps1 @@ -5,7 +5,7 @@ # This script imports LocalMachine certificates into rootcerts.pem # needed by qca. # -# PS> .\import-local-certificates.ps1 -certstore Root -outpath C:\src\git\vcpkg\ports\qca +# PS> .\import-local-certificates.ps1 [-certstore Root] -outpath C:\src\git\vcpkg\ports\qca # param ( @@ -15,15 +15,22 @@ param ( [Parameter(Mandatory=$true)][string]$outpath ) -$certs = (Get-ChildItem -Path 'Cert:\LocalMachine\Root') -$outfile = $outpath + "\rootcerts.pem" +$certs = (Get-ChildItem -Path 'Cert:\LocalMachine\Root' -EKU "Server Authentication") +$outfile = $outpath + "rootcerts.pem" Write-Host "Importing: " $certs.Count " certificates ..." foreach ($cert in $certs) { - $outfile = $outpath + "/" + $cert.Thumbprint + ".cer" - Export-Certificate -Cert $cert -FilePath $outfile + $out = New-Object String[] -ArgumentList 5 + + $out[0] = " " + $out[1] = "# " + $cert.Issuer + $out[2] = "-----BEGIN CERTIFICATE-----" + $out[3] = $([Convert]::ToBase64String($cert.Export('Cert'), [System.Base64FormattingOptions]::InsertLineBreaks)) + $out[4] = "-----END CERTIFICATE-----" + + [System.IO.File]::AppendAllLines($outfile,$out) } Write-Host "Written to: " $outfile diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index b92596ef9..bdb5ac153 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -1,4 +1,8 @@ -# For now only x[64|86]-windows triplet and dynamic linking is supported +# This portfile adds the Qt Cryptographic Arcitecture +# Changes to the original sources by this file: +# No -qt5 suffix, which is recommended just for Linux +# Output directories according to vcpkg +# Updated certstore. See certstore.pem in the output dirs # if (VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -44,6 +48,16 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-fix-path-for-vcpkg.patch ) +# Importing local certificates +message(STATUS "Importing certstore") +file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem) +vcpkg_execute_required_process( + COMMAND "& ${CMAKE_CURRENT_LIST_DIR}/import-local-certificates.ps1 -outpath ${SOURCE_PATH}/certs/" + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + LOGNAME certimport +) +message(STATUS "Importing certstore done") + # Configure and build vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -53,7 +67,7 @@ vcpkg_configure_cmake( -DUSE_RELATIVE_PATHS=ON -DQT4_BUILD=OFF -DBUILD_TESTS=OFF - -DBUILD_TOOLS=ON + -DBUILD_TOOLS=OFF -DQCA_SUFFIX=OFF -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features OPTIONS_DEBUG @@ -66,7 +80,6 @@ vcpkg_install_cmake() # Patch and copy cmake files message(STATUS "Patching files") - file(READ ${CURRENT_PACKAGES_DIR}/debug/share/qca/cmake/QcaTargets-debug.cmake QCA_DEBUG_CONFIG @@ -85,20 +98,6 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake "${QCA_TARGET_CONFIG}" ) -# Move tools -file(COPY ${CURRENT_PACKAGES_DIR}/bin/mozcerts.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca/tools -) -file(COPY ${CURRENT_PACKAGES_DIR}/bin/qcatool.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca/tools -) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mozcerts.exe - ${CURRENT_PACKAGES_DIR}/bin/qcatool.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/mozcerts.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/mozcerts.pdb - ${CURRENT_PACKAGES_DIR}/debug/bin/qcatool.exe -) - # Remove unneeded dirs file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/share/man @@ -106,7 +105,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ) - message(STATUS "Patching files done") # Handle copyright -- cgit v1.2.3 From 8b558dbe51f43ae68101fac0ac8a98672f22d4d2 Mon Sep 17 00:00:00 2001 From: Guillaume Dumont Date: Thu, 1 Dec 2016 10:19:31 -0500 Subject: Updated gflags to v2.2.0 --- ...-some-compilation-warnings-with-MSVC-2015.patch | 51 ---------------------- ports/gflags/CONTROL | 2 +- ports/gflags/portfile.cmake | 26 +++++------ 3 files changed, 13 insertions(+), 66 deletions(-) delete mode 100644 ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch diff --git a/ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch b/ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch deleted file mode 100644 index d099ea616..000000000 --- a/ports/gflags/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5af642bdfe023a7c857d1d26593af586516bf696 Mon Sep 17 00:00:00 2001 -From: Sergey Sharybin -Date: Thu, 31 Dec 2015 17:16:26 +0500 -Subject: [PATCH] Fix some compilation warnings with MSVC 2015 - -MSVC 2015 already defines vsnprintf() and va_copy(). ---- - src/windows_port.cc | 2 ++ - src/windows_port.h | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/src/windows_port.cc b/src/windows_port.cc -index 1f40458..b5b7194 100644 ---- a/src/windows_port.cc -+++ b/src/windows_port.cc -@@ -44,6 +44,7 @@ - - // These call the windows _vsnprintf, but always NUL-terminate. - #if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */ -+#if !(defined(_MSC_VER) && _MSC_VER >= 1900) /* msvc 2015 already defines */ - - #ifdef _MSC_VER - # pragma warning(push) -@@ -68,4 +69,5 @@ int snprintf(char *str, size_t size, const char *format, ...) { - return r; - } - -+#endif /* if !(defined(_MSC_VER) && _MSC_VER >= 1900) */ - #endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */ -diff --git a/src/windows_port.h b/src/windows_port.h -index c8ff24f..554b9c9 100644 ---- a/src/windows_port.h -+++ b/src/windows_port.h -@@ -63,12 +63,14 @@ - * name vsnprintf, since windows defines that (but not snprintf (!)). - */ - #if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */ -+#if !(defined(_MSC_VER) && _MSC_VER >= 1900) /* msvc 2015 already defines */ - extern GFLAGS_DLL_DECL int snprintf(char *str, size_t size, - const char *format, ...); - extern int GFLAGS_DLL_DECL safe_vsnprintf(char *str, size_t size, - const char *format, va_list ap); - #define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap) - #define va_copy(dst, src) (dst) = (src) -+#endif - #endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */ - - #ifdef _MSC_VER --- -2.10.0.windows.1 - diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 03977243f..62910c121 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.1.2 +Version: 2.2.0 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index b600d8832..66ac76227 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) find_program(GIT git) set(GIT_URL "https://github.com/gflags/gflags.git") -set(GIT_TAG "v2.1.2") +set(GIT_TAG "v2.2.0") if(NOT EXISTS "${DOWNLOADS}/gflags.git") message(STATUS "Cloning") @@ -22,17 +22,15 @@ if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") WORKING_DIRECTORY ${DOWNLOADS}/gflags.git LOGNAME worktree ) - message(STATUS "Patching") - vcpkg_execute_required_process( - COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-some-compilation-warnings-with-MSVC-2015.patch --ignore-whitespace --whitespace=fix - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src - LOGNAME patch - ) endif() -message(STATUS "Adding worktree and patching done") + +message(STATUS "Adding worktree") vcpkg_configure_cmake( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + OPTIONS + -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF + -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF ) vcpkg_install_cmake() @@ -49,24 +47,24 @@ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/gflags) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/gflags-export-debug.cmake GFLAGS_DEBUG_MODULE) +file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/gflags-targets-debug.cmake GFLAGS_DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" GFLAGS_DEBUG_MODULE "${GFLAGS_DEBUG_MODULE}") string(REPLACE "/Lib/gflags.dll" "/bin/gflags.dll" GFLAGS_DEBUG_MODULE "${GFLAGS_DEBUG_MODULE}") string(REPLACE "/Lib/gflags_nothreads.dll" "/bin/gflags_nothreads.dll" GFLAGS_DEBUG_MODULE "${GFLAGS_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export-debug.cmake "${GFLAGS_DEBUG_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets-debug.cmake "${GFLAGS_DEBUG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export-release.cmake GFLAGS_RELEASE_MODULE) +file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets-release.cmake GFLAGS_RELEASE_MODULE) string(REPLACE "/Lib/gflags.dll" "/bin/gflags.dll" GFLAGS_RELEASE_MODULE "${GFLAGS_RELEASE_MODULE}") string(REPLACE "/Lib/gflags_nothreads.dll" "/bin/gflags_nothreads.dll" GFLAGS_RELEASE_MODULE "${GFLAGS_RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export-release.cmake "${GFLAGS_RELEASE_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets-release.cmake "${GFLAGS_RELEASE_MODULE}") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export.cmake GFLAGS_CONFIG_MODULE) +file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake GFLAGS_CONFIG_MODULE) string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" GFLAGS_CONFIG_MODULE "${GFLAGS_CONFIG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-export.cmake ${GFLAGS_CONFIG_MODULE}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake ${GFLAGS_CONFIG_MODULE}) file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) -- cgit v1.2.3 From 5849d36d4891a832461e6061f7820b1e61e73461 Mon Sep 17 00:00:00 2001 From: Jason Yang Date: Fri, 2 Dec 2016 14:54:03 +0800 Subject: [azure-storage-cpp] add link to v2.5.0 --- ports/azure-storage-cpp/CONTROL | 5 + ports/azure-storage-cpp/cmake.patch | 181 +++++++++++++++++++++++++++++++++ ports/azure-storage-cpp/portfile.cmake | 34 +++++++ 3 files changed, 220 insertions(+) create mode 100644 ports/azure-storage-cpp/CONTROL create mode 100644 ports/azure-storage-cpp/cmake.patch create mode 100644 ports/azure-storage-cpp/portfile.cmake diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL new file mode 100644 index 000000000..78b7e0a11 --- /dev/null +++ b/ports/azure-storage-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: azure-storage-cpp +Version: 2.5.0 +Build-Depends: cpprestsdk [windows] +Description: Microsoft Azure Storage Client SDK for C++ + A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch new file mode 100644 index 000000000..7c70782b9 --- /dev/null +++ b/ports/azure-storage-cpp/cmake.patch @@ -0,0 +1,181 @@ +diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +index f037c7f..a0b5982 100644 +--- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt ++++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +@@ -1,6 +1,10 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) + cmake_minimum_required(VERSION 2.6) +-project(azurestorage) ++if(WIN32) ++ project(wastorage) ++else() ++ project(azurestorage) ++endif() + + enable_testing() + +@@ -59,12 +63,25 @@ if(UNIX) + install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) + file(GLOB WASCORE_DATA includes/wascore/*.dat) + install(FILES ${WASCORE_DATA} DESTINATION include/wascore) ++elseif(WIN32) ++ message("-- Setting WIN32 options") ++ find_package(Casablanca REQUIRED) ++ add_definitions(-DUNICODE -D_UNICODE -D_WIN32) ++ option(BUILD_SHARED_LIBS "Build shared Libraries." ON) ++ option(WASTORE_INSTALL_HEADERS "Install header files." ON) ++ if(WASTORE_INSTALL_HEADERS) ++ include_directories(includes) ++ file(GLOB WAS_HEADERS includes/was/*.h) ++ file(GLOB WASCORE_HEADERS includes/wascore/*.h) ++ file(GLOB WASCORE_DATA includes/wascore/*.dat) ++ endif() + else() + message("-- Unsupported Build Platform.") + endif() + ++ + # Compiler (not platform) specific settings +-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") ++if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + message("-- Setting gcc options") + + set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") +@@ -81,37 +98,56 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + add_definitions(-DBOOST_LOG_DYN_LINK) + endif() + add_definitions(-D_TURN_OFF_PLATFORM_STRING) +-elseif((CMAKE_CXX_COMPILER_ID MATCHES "Clang")) +- message("-- Setting clang options") ++elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++ message("-- Setting clang options") + +- set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls") +- set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") +- set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") ++ set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls") ++ set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") ++ set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") + +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") +- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") +- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") ++ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") ++ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") + +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") +- if (BUILD_SHARED_LIBS) +- add_definitions(-DBOOST_LOG_DYN_LINK) +- endif() +- add_definitions(-D_TURN_OFF_PLATFORM_STRING) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") ++ if (BUILD_SHARED_LIBS) ++ add_definitions(-DBOOST_LOG_DYN_LINK) ++ endif() ++ add_definitions(-D_TURN_OFF_PLATFORM_STRING) ++elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++ message("-- Setting MSVC options") ++ add_compile_options(/bigobj) ++ add_compile_options(/MP) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DWASTORAGE_DLL -D_USRDLL) ++ endif() + else() + message("-- Unknown compiler, success is doubtful.") + endif() + +-# Reconfigure final output directory +-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) ++if (WIN32) ++ # Reconfigure final output directory ++ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) ++ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) ++ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) + +-set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) +-set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) ++ set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) ++ set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS}) + ++ set(AZURESTORAGE_LIBRARY azure-storage-cpp) ++ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES}) ++else() ++ # Reconfigure final output directory ++ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) ++ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) ++ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) ++ ++ set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) ++ set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) + +-set(AZURESTORAGE_LIBRARY azurestorage) +-set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) ++ set(AZURESTORAGE_LIBRARY azurestorage) ++ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) ++endif() + + # Set version numbers centralized + set (AZURESTORAGE_VERSION_MAJOR 2) +diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +index 5c1df3c..da66eb4 100644 +--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake ++++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +@@ -27,6 +27,7 @@ find_path(CASABLANCA_INCLUDE_DIR + find_library(CASABLANCA_LIBRARY + NAMES + cpprest ++ cpprest_2_9.lib + PATHS + ${CASABLANCA_PKGCONF_LIBRARY_DIRS} + ${CASABLANCA_DIR} +diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt +index b08111f..ee5c9ed 100644 +--- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt ++++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt +@@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) + include_directories(${AZURESTORAGE_INCLUDE_DIRS}) + + # THE ORDER OF FILES IS VERY /VERY/ IMPORTANT +-if(UNIX) ++if(UNIX OR WIN32) + set(SOURCES + xmlhelpers.cpp + response_parsers.cpp +@@ -64,14 +64,17 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") + endif() + if (APPLE) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}") + else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + endif() + + add_library(${AZURESTORAGE_LIBRARY} ${SOURCES}) + + target_link_libraries(${AZURESTORAGE_LIBRARIES}) ++if(WIN32) ++ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) ++endif() + + # Portions specific to azure storage binary versioning and installation. + if(UNIX) +@@ -84,4 +87,14 @@ if(UNIX) + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) ++elseif(WIN32) ++ install(FILES ${WAS_HEADERS} DESTINATION include/was) ++ install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) ++ install(FILES ${WASCORE_DATA} DESTINATION include/wascore) ++ install( ++ TARGETS ${AZURESTORAGE_LIBRARY} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake new file mode 100644 index 000000000..8898a61a0 --- /dev/null +++ b/ports/azure-storage-cpp/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/azure-storage-cpp-2.5.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Azure/azure-storage-cpp/archive/v2.5.0.tar.gz" + FILENAME "azure-storage-cpp/v2.5.0.tar.gz" + SHA512 128e02f4c4f741083b7860a1aacabaeee5616684d6a5f7f1b3a88abf7f74e6c46610ed62def2a743e67a20a1d12604b9c44c202d94b56ca0ca02847a2b6c9e1b +) +vcpkg_extract_source_archive(${ARCHIVE}) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/Microsoft.WindowsAzure.Storage + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_SAMPLES=OFF +) + +vcpkg_install_cmake() + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-storage-cpp RENAME copyright) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + -- cgit v1.2.3 From 13b0c034ecfc78c683d1924334370f5cfcbeab71 Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Fri, 2 Dec 2016 10:12:57 +0100 Subject: [qca] downloading cacerts from curl homepage, because used version is very outdated. --- ports/qca/portfile.cmake | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index bdb5ac153..dc360af87 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -48,13 +48,18 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-fix-path-for-vcpkg.patch ) -# Importing local certificates +# According to: +# https://www.openssl.org/docs/faq.html#USER16 +# it is up to developers or admins to maintain CAs. +# So we do it here: +# Importing certificates from curl maintainers +# See: https://curl.haxx.se/docs/caextract.html message(STATUS "Importing certstore") file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem) -vcpkg_execute_required_process( - COMMAND "& ${CMAKE_CURRENT_LIST_DIR}/import-local-certificates.ps1 -outpath ${SOURCE_PATH}/certs/" - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} - LOGNAME certimport +file(DOWNLOAD https://curl.haxx.se/ca/cacert.pem + ${SOURCE_PATH}/certs/rootcerts.pem + SHOW_PROGRESS + TLS_VERIFY ON ) message(STATUS "Importing certstore done") -- cgit v1.2.3 From 31b4236f091a0d63fe4db8240d12466d19947be2 Mon Sep 17 00:00:00 2001 From: Jason Yang Date: Fri, 2 Dec 2016 17:17:53 +0800 Subject: rename dll to wastorage to keep consistency --- ports/azure-storage-cpp/cmake.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch index 7c70782b9..0275991ae 100644 --- a/ports/azure-storage-cpp/cmake.patch +++ b/ports/azure-storage-cpp/cmake.patch @@ -1,5 +1,5 @@ diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index f037c7f..a0b5982 100644 +index f037c7f..478bf48 100644 --- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt @@ -1,6 +1,10 @@ @@ -100,7 +100,7 @@ index f037c7f..a0b5982 100644 + set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) + set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS}) -+ set(AZURESTORAGE_LIBRARY azure-storage-cpp) ++ set(AZURESTORAGE_LIBRARY wastorage) + set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES}) +else() + # Reconfigure final output directory -- cgit v1.2.3 From 26793bd449ae34e6a781e765cd364eb16c0e6337 Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Sat, 3 Dec 2016 12:41:39 +0100 Subject: [qca] Added mk-ca-bundle.pl to generate certstore at build time. --- ports/qca/mk-ca-bundle.pl | 554 ++++++++++++++++++++++++++++++++++++++++++++++ ports/qca/portfile.cmake | 18 +- 2 files changed, 566 insertions(+), 6 deletions(-) create mode 100644 ports/qca/mk-ca-bundle.pl diff --git a/ports/qca/mk-ca-bundle.pl b/ports/qca/mk-ca-bundle.pl new file mode 100644 index 000000000..9574f1dbf --- /dev/null +++ b/ports/qca/mk-ca-bundle.pl @@ -0,0 +1,554 @@ +#!/usr/bin/perl -w +# *************************************************************************** +# * _ _ ____ _ +# * Project ___| | | | _ \| | +# * / __| | | | |_) | | +# * | (__| |_| | _ <| |___ +# * \___|\___/|_| \_\_____| +# * +# * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# * +# * This software is licensed as described in the file COPYING, which +# * you should have received as part of this distribution. The terms +# * are also available at https://curl.haxx.se/docs/copyright.html. +# * +# * You may opt to use, copy, modify, merge, publish, distribute and/or sell +# * copies of the Software, and permit persons to whom the Software is +# * furnished to do so, under the terms of the COPYING file. +# * +# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# * KIND, either express or implied. +# * +# *************************************************************************** +# This Perl script creates a fresh ca-bundle.crt file for use with libcurl. +# It downloads certdata.txt from Mozilla's source tree (see URL below), +# then parses certdata.txt and extracts CA Root Certificates into PEM format. +# These are then processed with the OpenSSL commandline tool to produce the +# final ca-bundle.crt file. +# The script is based on the parse-certs script written by Roland Krikava. +# This Perl script works on almost any platform since its only external +# dependency is the OpenSSL commandline tool for optional text listing. +# Hacked by Guenter Knauf. +# +use Encode; +use Getopt::Std; +use MIME::Base64; +use strict; +use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); +use List::Util; +use Text::Wrap; +my $MOD_SHA = "Digest::SHA"; +eval "require $MOD_SHA"; +if ($@) { + $MOD_SHA = "Digest::SHA::PurePerl"; + eval "require $MOD_SHA"; +} +eval "require LWP::UserAgent"; + +my %urls = ( + 'nss' => + 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', + 'central' => + 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'aurora' => + 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'beta' => + 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'release' => + 'https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', +); + +$opt_d = 'release'; + +# If the OpenSSL commandline is not in search path you can configure it here! +my $openssl = 'openssl'; + +my $version = '1.27'; + +$opt_w = 76; # default base64 encoded lines length + +# default cert types to include in the output (default is to include CAs which may issue SSL server certs) +my $default_mozilla_trust_purposes = "SERVER_AUTH"; +my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR"; +$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels; + +my @valid_mozilla_trust_purposes = ( + "DIGITAL_SIGNATURE", + "NON_REPUDIATION", + "KEY_ENCIPHERMENT", + "DATA_ENCIPHERMENT", + "KEY_AGREEMENT", + "KEY_CERT_SIGN", + "CRL_SIGN", + "SERVER_AUTH", + "CLIENT_AUTH", + "CODE_SIGNING", + "EMAIL_PROTECTION", + "IPSEC_END_SYSTEM", + "IPSEC_TUNNEL", + "IPSEC_USER", + "TIME_STAMPING", + "STEP_UP_APPROVED" +); + +my @valid_mozilla_trust_levels = ( + "TRUSTED_DELEGATOR", # CAs + "NOT_TRUSTED", # Don't trust these certs. + "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA. + "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA). +); + +my $default_signature_algorithms = $opt_s = "MD5"; + +my @valid_signature_algorithms = ( + "MD5", + "SHA1", + "SHA256", + "SHA384", + "SHA512" +); + +$0 =~ s@.*(/|\\)@@; +$Getopt::Std::STANDARD_HELP_VERSION = 1; +getopts('bd:fhiklmnp:qs:tuvw:'); + +if(!defined($opt_d)) { + # to make plain "-d" use not cause warnings, and actually still work + $opt_d = 'release'; +} + +# Use predefined URL or else custom URL specified on command line. +my $url; +if(defined($urls{$opt_d})) { + $url = $urls{$opt_d}; + if(!$opt_k && $url !~ /^https:\/\//i) { + die "The URL for '$opt_d' is not HTTPS. Use -k to override (insecure).\n"; + } +} +else { + $url = $opt_d; +} + +my $curl = `curl -V`; + +if ($opt_i) { + print ("=" x 78 . "\n"); + print "Script Version : $version\n"; + print "Perl Version : $]\n"; + print "Operating System Name : $^O\n"; + print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; + print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; + print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n" if($LWP::UserAgent::VERSION); + print "LWP.pm Version : ${LWP::VERSION}\n" if($LWP::VERSION); + print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION); + print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION); + print ("=" x 78 . "\n"); +} + +sub warning_message() { + if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit + print "Warning: Use of this script may pose some risk:\n"; + print "\n"; + print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n"; + print " 2) Default to 'release', but more recent updates may be found in other trees\n"; + print " 3) certdata.txt file format may change, lag time to update this script\n"; + print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; + print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; + print " 6) Use of this script will make a security engineer grind his teeth and\n"; + print " swear at you. ;)\n"; + exit; + } else { # Short Form Warning + print "Warning: Use of this script may pose some risk, -d risk for more details.\n"; + } +} + +sub HELP_MESSAGE() { + print "Usage:\t${0} [-b] [-d] [-f] [-i] [-k] [-l] [-n] [-p] [-q] [-s] [-t] [-u] [-v] [-w] []\n"; + print "\t-b\tbackup an existing version of ca-bundle.crt\n"; + print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n"; + print "\t\t Valid names are:\n"; + print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n"; + print "\t-f\tforce rebuild even if certdata.txt is current\n"; + print "\t-i\tprint version info about used modules\n"; + print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n"; + print "\t-l\tprint license info about certdata.txt\n"; + print "\t-m\tinclude meta data in output\n"; + print "\t-n\tno download of certdata.txt (to use existing)\n"; + print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n"; + print "\t\t Valid purposes are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n"; + print "\t\t Valid levels are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n"; + print "\t-q\tbe really quiet (no progress output at all)\n"; + print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n"); + print "\t\t Valid signature algorithms are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n"; + print "\t-t\tinclude plain text listing of certificates\n"; + print "\t-u\tunlink (remove) certdata.txt after processing\n"; + print "\t-v\tbe verbose and print out processed CAs\n"; + print "\t-w \twrap base64 output lines after chars (default: ${opt_w})\n"; + exit; +} + +sub VERSION_MESSAGE() { + print "${0} version ${version} running Perl ${]} on ${^O}\n"; +} + +warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); +HELP_MESSAGE() if ($opt_h); + +sub report($@) { + my $output = shift; + + print STDERR $output . "\n" unless $opt_q; +} + +sub is_in_list($@) { + my $target = shift; + + return defined(List::Util::first { $target eq $_ } @_); +} + +# Parses $param_string as a case insensitive comma separated list with optional whitespace +# validates that only allowed parameters are supplied +sub parse_csv_param($$@) { + my $description = shift; + my $param_string = shift; + my @valid_values = @_; + + my @values = map { + s/^\s+//; # strip leading spaces + s/\s+$//; # strip trailing spaces + uc $_ # return the modified string as upper case + } split( ',', $param_string ); + + # Find all values which are not in the list of valid values or "ALL" + my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values; + + if ( scalar(@invalid) > 0 ) { + # Tell the user which parameters were invalid and print the standard help message which will exit + print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n"; + HELP_MESSAGE(); + } + + @values = @valid_values if ( is_in_list("ALL",@values) ); + + return @values; +} + +sub sha256 { + my $result; + if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) { + open(FILE, $_[0]) or die "Can't open '$_[0]': $!"; + binmode(FILE); + $result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest; + close(FILE); + } else { + # Use OpenSSL command if Perl Digest::SHA modules not available + $result = `"$openssl" dgst -r -sha256 "$_[0]"`; + $result =~ s/^([0-9a-f]{64}) .+/$1/is; + } + return $result; +} + + +sub oldhash { + my $hash = ""; + open(C, "<$_[0]") || return 0; + while() { + chomp; + if($_ =~ /^\#\# SHA256: (.*)/) { + $hash = $1; + last; + } + } + close(C); + return $hash; +} + +if ( $opt_p !~ m/:/ ) { + print "Error: Mozilla trust identifier list must include both purposes and levels\n"; + HELP_MESSAGE(); +} + +(my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p ); +my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); +my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); + +my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms ); + +sub should_output_cert(%) { + my %trust_purposes_by_level = @_; + + foreach my $level (@included_mozilla_trust_levels) { + # for each level we want to output, see if any of our desired purposes are included + return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); + } + + return 0; +} + +my $crt = $ARGV[0] || 'ca-bundle.crt'; +(my $txt = $url) =~ s@(.*/|\?.*)@@g; + +my $stdout = $crt eq '-'; +my $resp; +my $fetched; + +my $oldhash = oldhash($crt); + +report "SHA256 of old file: $oldhash"; + +if(!$opt_n) { + report "Downloading $txt ..."; + + # If we have an HTTPS URL then use curl + if($url =~ /^https:\/\//i) { + if($curl) { + if($curl =~ /^Protocols:.* https( |$)/m) { + report "Get certdata with curl!"; + my $proto = !$opt_k ? "--proto =https" : ""; + my $quiet = $opt_q ? "-s" : ""; + my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; + if(@out && $out[0] == 200) { + $fetched = 1; + report "Downloaded $txt"; + } + else { + report "Failed downloading via HTTPS with curl"; + if(-e $txt && !unlink($txt)) { + report "Failed to remove '$txt': $!"; + } + } + } + else { + report "curl lacks https support"; + } + } + else { + report "curl not found"; + } + } + + # If nothing was fetched then use LWP + if(!$fetched) { + if($url =~ /^https:\/\//i) { + report "Falling back to HTTP"; + $url =~ s/^https:\/\//http:\/\//i; + } + if(!$opt_k) { + report "URLs other than HTTPS are disabled by default, to enable use -k"; + exit 1; + } + report "Get certdata with LWP!"; + if(!defined(${LWP::UserAgent::VERSION})) { + report "LWP is not available (LWP::UserAgent not found)"; + exit 1; + } + my $ua = new LWP::UserAgent(agent => "$0/$version"); + $ua->env_proxy(); + $resp = $ua->mirror($url, $txt); + if($resp && $resp->code eq '304') { + report "Not modified"; + exit 0 if -e $crt && !$opt_f; + } + else { + $fetched = 1; + report "Downloaded $txt"; + } + if(!$resp || $resp->code !~ /^(?:200|304)$/) { + report "Unable to download latest data: " + . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed"); + exit 1 if -e $crt || ! -r $txt; + } + } +} + +my $filedate = $resp ? $resp->last_modified : (stat($txt))[9]; +my $datesrc = "as of"; +if(!$filedate) { + # mxr.mozilla.org gave us a time, hg.mozilla.org does not! + $filedate = time(); + $datesrc="downloaded on"; +} + +# get the hash from the download file +my $newhash= sha256($txt); + +if(!$opt_f && $oldhash eq $newhash) { + report "Downloaded file identical to previous run\'s source file. Exiting"; + exit; +} + +report "SHA256 of new file: $newhash"; + +my $currentdate = scalar gmtime($filedate); + +my $format = $opt_t ? "plain text and " : ""; +if( $stdout ) { + open(CRT, '> -') or die "Couldn't open STDOUT: $!\n"; +} else { + open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n"; +} +print CRT <) { + if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) { + print CRT; + print if ($opt_l); + while () { + print CRT; + print if ($opt_l); + last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/); + } + } + elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) { + push @precert, $_; + next; + } + elsif(/^#|^\s*$/) { + undef @precert; + next; + } + chomp; + + # this is a match for the start of a certificate + if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { + $start_of_cert = 1 + } + if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) { + $caname = $1; + } + my %trust_purposes_by_level; + if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) { + my $data; + while () { + last if (/^END/); + chomp; + my @octets = split(/\\/); + shift @octets; + for (@octets) { + $data .= chr(oct); + } + } + # scan forwards until the trust part + while () { + last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/); + chomp; + } + # now scan the trust part to determine how we should trust this cert + while () { + last if (/^#/); + if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) { + if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) { + report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) { + report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } else { + push @{$trust_purposes_by_level{$2}}, $1; + } + } + } + + if ( !should_output_cert(%trust_purposes_by_level) ) { + $skipnum ++; + } else { + my $encoded = MIME::Base64::encode_base64($data, ''); + $encoded =~ s/(.{1,${opt_w}})/$1\n/g; + my $pem = "-----BEGIN CERTIFICATE-----\n" + . $encoded + . "-----END CERTIFICATE-----\n"; + print CRT "\n$caname\n"; + print CRT @precert if($opt_m); + my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK)); + if ($opt_t) { + foreach my $key (keys %trust_purposes_by_level) { + my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}}); + $maxStringLength = List::Util::max( length($string), $maxStringLength ); + print CRT $string . "\n"; + } + } + print CRT ("=" x $maxStringLength . "\n"); + if (!$opt_t) { + print CRT $pem; + } else { + my $pipe = ""; + foreach my $hash (@included_signature_algorithms) { + $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + $pipe = "|$openssl x509 -text -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + report "Parsing: $caname" if ($opt_v); + $certnum ++; + $start_of_cert = 0; + } + undef @precert; + } + +} +close(TXT) or die "Couldn't close $txt: $!\n"; +close(CRT) or die "Couldn't close $crt.~: $!\n"; +unless( $stdout ) { + if ($opt_b && -e $crt) { + my $bk = 1; + while (-e "$crt.~${bk}~") { + $bk++; + } + rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n"; + } elsif( -e $crt ) { + unlink( $crt ) or die "Failed to remove $crt: $!\n"; + } + rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n"; +} +if($opt_u && -e $txt && !unlink($txt)) { + report "Failed to remove $txt: $!\n"; +} +report "Done ($certnum CA certs processed, $skipnum skipped)."; diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index dc360af87..3050de917 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -1,5 +1,5 @@ # This portfile adds the Qt Cryptographic Arcitecture -# Changes to the original sources by this file: +# Changes to the original build: # No -qt5 suffix, which is recommended just for Linux # Output directories according to vcpkg # Updated certstore. See certstore.pem in the output dirs @@ -13,6 +13,9 @@ endif() include(vcpkg_common_functions) find_program(GIT git) +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") # Set git variables to qca version 2.2.0 commit set(GIT_URL "git://anongit.kde.org/qca.git") @@ -52,15 +55,18 @@ vcpkg_apply_patches( # https://www.openssl.org/docs/faq.html#USER16 # it is up to developers or admins to maintain CAs. # So we do it here: -# Importing certificates from curl maintainers -# See: https://curl.haxx.se/docs/caextract.html message(STATUS "Importing certstore") file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem) -file(DOWNLOAD https://curl.haxx.se/ca/cacert.pem - ${SOURCE_PATH}/certs/rootcerts.pem - SHOW_PROGRESS +# Using file(DOWNLOAD) to use https +file(DOWNLOAD https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt + ${CMAKE_CURRENT_LIST_DIR}/certdata.txt TLS_VERIFY ON ) +vcpkg_execute_required_process( + COMMAND ${PERL} ${CMAKE_CURRENT_LIST_DIR}/mk-ca-bundle.pl -n ${SOURCE_PATH}/certs/rootcerts.pem + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + LOGNAME ca-bundle +) message(STATUS "Importing certstore done") # Configure and build -- cgit v1.2.3 From bf187f318a735307bcf0a42c3879f00293e477cf Mon Sep 17 00:00:00 2001 From: Alexander Kaspar Date: Sat, 3 Dec 2016 12:41:39 +0100 Subject: [qca] Added mk-ca-bundle.pl to generate certstore at build time. --- ports/qca/import-local-certificates.ps1 | 37 --- ports/qca/mk-ca-bundle.pl | 554 ++++++++++++++++++++++++++++++++ ports/qca/portfile.cmake | 18 +- 3 files changed, 566 insertions(+), 43 deletions(-) delete mode 100644 ports/qca/import-local-certificates.ps1 create mode 100644 ports/qca/mk-ca-bundle.pl diff --git a/ports/qca/import-local-certificates.ps1 b/ports/qca/import-local-certificates.ps1 deleted file mode 100644 index df39cbb01..000000000 --- a/ports/qca/import-local-certificates.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -# According to: -# https://www.openssl.org/docs/faq.html#USER16 -# it is up to developers or admins to maintain CAs. -# -# This script imports LocalMachine certificates into rootcerts.pem -# needed by qca. -# -# PS> .\import-local-certificates.ps1 [-certstore Root] -outpath C:\src\git\vcpkg\ports\qca -# - -param ( - # one of Root, My, CA, ... - [string]$certstore = "Root", - # the path where it should be in qca buildtree (without trailing '\') - [Parameter(Mandatory=$true)][string]$outpath -) - -$certs = (Get-ChildItem -Path 'Cert:\LocalMachine\Root' -EKU "Server Authentication") -$outfile = $outpath + "rootcerts.pem" - -Write-Host "Importing: " $certs.Count " certificates ..." - -foreach ($cert in $certs) -{ - $out = New-Object String[] -ArgumentList 5 - - $out[0] = " " - $out[1] = "# " + $cert.Issuer - $out[2] = "-----BEGIN CERTIFICATE-----" - $out[3] = $([Convert]::ToBase64String($cert.Export('Cert'), [System.Base64FormattingOptions]::InsertLineBreaks)) - $out[4] = "-----END CERTIFICATE-----" - - [System.IO.File]::AppendAllLines($outfile,$out) -} - -Write-Host "Written to: " $outfile -Write-Host "Importing certificates done." diff --git a/ports/qca/mk-ca-bundle.pl b/ports/qca/mk-ca-bundle.pl new file mode 100644 index 000000000..9574f1dbf --- /dev/null +++ b/ports/qca/mk-ca-bundle.pl @@ -0,0 +1,554 @@ +#!/usr/bin/perl -w +# *************************************************************************** +# * _ _ ____ _ +# * Project ___| | | | _ \| | +# * / __| | | | |_) | | +# * | (__| |_| | _ <| |___ +# * \___|\___/|_| \_\_____| +# * +# * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# * +# * This software is licensed as described in the file COPYING, which +# * you should have received as part of this distribution. The terms +# * are also available at https://curl.haxx.se/docs/copyright.html. +# * +# * You may opt to use, copy, modify, merge, publish, distribute and/or sell +# * copies of the Software, and permit persons to whom the Software is +# * furnished to do so, under the terms of the COPYING file. +# * +# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# * KIND, either express or implied. +# * +# *************************************************************************** +# This Perl script creates a fresh ca-bundle.crt file for use with libcurl. +# It downloads certdata.txt from Mozilla's source tree (see URL below), +# then parses certdata.txt and extracts CA Root Certificates into PEM format. +# These are then processed with the OpenSSL commandline tool to produce the +# final ca-bundle.crt file. +# The script is based on the parse-certs script written by Roland Krikava. +# This Perl script works on almost any platform since its only external +# dependency is the OpenSSL commandline tool for optional text listing. +# Hacked by Guenter Knauf. +# +use Encode; +use Getopt::Std; +use MIME::Base64; +use strict; +use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); +use List::Util; +use Text::Wrap; +my $MOD_SHA = "Digest::SHA"; +eval "require $MOD_SHA"; +if ($@) { + $MOD_SHA = "Digest::SHA::PurePerl"; + eval "require $MOD_SHA"; +} +eval "require LWP::UserAgent"; + +my %urls = ( + 'nss' => + 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', + 'central' => + 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'aurora' => + 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'beta' => + 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'release' => + 'https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', +); + +$opt_d = 'release'; + +# If the OpenSSL commandline is not in search path you can configure it here! +my $openssl = 'openssl'; + +my $version = '1.27'; + +$opt_w = 76; # default base64 encoded lines length + +# default cert types to include in the output (default is to include CAs which may issue SSL server certs) +my $default_mozilla_trust_purposes = "SERVER_AUTH"; +my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR"; +$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels; + +my @valid_mozilla_trust_purposes = ( + "DIGITAL_SIGNATURE", + "NON_REPUDIATION", + "KEY_ENCIPHERMENT", + "DATA_ENCIPHERMENT", + "KEY_AGREEMENT", + "KEY_CERT_SIGN", + "CRL_SIGN", + "SERVER_AUTH", + "CLIENT_AUTH", + "CODE_SIGNING", + "EMAIL_PROTECTION", + "IPSEC_END_SYSTEM", + "IPSEC_TUNNEL", + "IPSEC_USER", + "TIME_STAMPING", + "STEP_UP_APPROVED" +); + +my @valid_mozilla_trust_levels = ( + "TRUSTED_DELEGATOR", # CAs + "NOT_TRUSTED", # Don't trust these certs. + "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA. + "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA). +); + +my $default_signature_algorithms = $opt_s = "MD5"; + +my @valid_signature_algorithms = ( + "MD5", + "SHA1", + "SHA256", + "SHA384", + "SHA512" +); + +$0 =~ s@.*(/|\\)@@; +$Getopt::Std::STANDARD_HELP_VERSION = 1; +getopts('bd:fhiklmnp:qs:tuvw:'); + +if(!defined($opt_d)) { + # to make plain "-d" use not cause warnings, and actually still work + $opt_d = 'release'; +} + +# Use predefined URL or else custom URL specified on command line. +my $url; +if(defined($urls{$opt_d})) { + $url = $urls{$opt_d}; + if(!$opt_k && $url !~ /^https:\/\//i) { + die "The URL for '$opt_d' is not HTTPS. Use -k to override (insecure).\n"; + } +} +else { + $url = $opt_d; +} + +my $curl = `curl -V`; + +if ($opt_i) { + print ("=" x 78 . "\n"); + print "Script Version : $version\n"; + print "Perl Version : $]\n"; + print "Operating System Name : $^O\n"; + print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; + print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; + print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n" if($LWP::UserAgent::VERSION); + print "LWP.pm Version : ${LWP::VERSION}\n" if($LWP::VERSION); + print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION); + print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION); + print ("=" x 78 . "\n"); +} + +sub warning_message() { + if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit + print "Warning: Use of this script may pose some risk:\n"; + print "\n"; + print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n"; + print " 2) Default to 'release', but more recent updates may be found in other trees\n"; + print " 3) certdata.txt file format may change, lag time to update this script\n"; + print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; + print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; + print " 6) Use of this script will make a security engineer grind his teeth and\n"; + print " swear at you. ;)\n"; + exit; + } else { # Short Form Warning + print "Warning: Use of this script may pose some risk, -d risk for more details.\n"; + } +} + +sub HELP_MESSAGE() { + print "Usage:\t${0} [-b] [-d] [-f] [-i] [-k] [-l] [-n] [-p] [-q] [-s] [-t] [-u] [-v] [-w] []\n"; + print "\t-b\tbackup an existing version of ca-bundle.crt\n"; + print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n"; + print "\t\t Valid names are:\n"; + print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n"; + print "\t-f\tforce rebuild even if certdata.txt is current\n"; + print "\t-i\tprint version info about used modules\n"; + print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n"; + print "\t-l\tprint license info about certdata.txt\n"; + print "\t-m\tinclude meta data in output\n"; + print "\t-n\tno download of certdata.txt (to use existing)\n"; + print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n"; + print "\t\t Valid purposes are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n"; + print "\t\t Valid levels are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n"; + print "\t-q\tbe really quiet (no progress output at all)\n"; + print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n"); + print "\t\t Valid signature algorithms are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n"; + print "\t-t\tinclude plain text listing of certificates\n"; + print "\t-u\tunlink (remove) certdata.txt after processing\n"; + print "\t-v\tbe verbose and print out processed CAs\n"; + print "\t-w \twrap base64 output lines after chars (default: ${opt_w})\n"; + exit; +} + +sub VERSION_MESSAGE() { + print "${0} version ${version} running Perl ${]} on ${^O}\n"; +} + +warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); +HELP_MESSAGE() if ($opt_h); + +sub report($@) { + my $output = shift; + + print STDERR $output . "\n" unless $opt_q; +} + +sub is_in_list($@) { + my $target = shift; + + return defined(List::Util::first { $target eq $_ } @_); +} + +# Parses $param_string as a case insensitive comma separated list with optional whitespace +# validates that only allowed parameters are supplied +sub parse_csv_param($$@) { + my $description = shift; + my $param_string = shift; + my @valid_values = @_; + + my @values = map { + s/^\s+//; # strip leading spaces + s/\s+$//; # strip trailing spaces + uc $_ # return the modified string as upper case + } split( ',', $param_string ); + + # Find all values which are not in the list of valid values or "ALL" + my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values; + + if ( scalar(@invalid) > 0 ) { + # Tell the user which parameters were invalid and print the standard help message which will exit + print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n"; + HELP_MESSAGE(); + } + + @values = @valid_values if ( is_in_list("ALL",@values) ); + + return @values; +} + +sub sha256 { + my $result; + if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) { + open(FILE, $_[0]) or die "Can't open '$_[0]': $!"; + binmode(FILE); + $result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest; + close(FILE); + } else { + # Use OpenSSL command if Perl Digest::SHA modules not available + $result = `"$openssl" dgst -r -sha256 "$_[0]"`; + $result =~ s/^([0-9a-f]{64}) .+/$1/is; + } + return $result; +} + + +sub oldhash { + my $hash = ""; + open(C, "<$_[0]") || return 0; + while() { + chomp; + if($_ =~ /^\#\# SHA256: (.*)/) { + $hash = $1; + last; + } + } + close(C); + return $hash; +} + +if ( $opt_p !~ m/:/ ) { + print "Error: Mozilla trust identifier list must include both purposes and levels\n"; + HELP_MESSAGE(); +} + +(my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p ); +my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); +my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); + +my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms ); + +sub should_output_cert(%) { + my %trust_purposes_by_level = @_; + + foreach my $level (@included_mozilla_trust_levels) { + # for each level we want to output, see if any of our desired purposes are included + return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); + } + + return 0; +} + +my $crt = $ARGV[0] || 'ca-bundle.crt'; +(my $txt = $url) =~ s@(.*/|\?.*)@@g; + +my $stdout = $crt eq '-'; +my $resp; +my $fetched; + +my $oldhash = oldhash($crt); + +report "SHA256 of old file: $oldhash"; + +if(!$opt_n) { + report "Downloading $txt ..."; + + # If we have an HTTPS URL then use curl + if($url =~ /^https:\/\//i) { + if($curl) { + if($curl =~ /^Protocols:.* https( |$)/m) { + report "Get certdata with curl!"; + my $proto = !$opt_k ? "--proto =https" : ""; + my $quiet = $opt_q ? "-s" : ""; + my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; + if(@out && $out[0] == 200) { + $fetched = 1; + report "Downloaded $txt"; + } + else { + report "Failed downloading via HTTPS with curl"; + if(-e $txt && !unlink($txt)) { + report "Failed to remove '$txt': $!"; + } + } + } + else { + report "curl lacks https support"; + } + } + else { + report "curl not found"; + } + } + + # If nothing was fetched then use LWP + if(!$fetched) { + if($url =~ /^https:\/\//i) { + report "Falling back to HTTP"; + $url =~ s/^https:\/\//http:\/\//i; + } + if(!$opt_k) { + report "URLs other than HTTPS are disabled by default, to enable use -k"; + exit 1; + } + report "Get certdata with LWP!"; + if(!defined(${LWP::UserAgent::VERSION})) { + report "LWP is not available (LWP::UserAgent not found)"; + exit 1; + } + my $ua = new LWP::UserAgent(agent => "$0/$version"); + $ua->env_proxy(); + $resp = $ua->mirror($url, $txt); + if($resp && $resp->code eq '304') { + report "Not modified"; + exit 0 if -e $crt && !$opt_f; + } + else { + $fetched = 1; + report "Downloaded $txt"; + } + if(!$resp || $resp->code !~ /^(?:200|304)$/) { + report "Unable to download latest data: " + . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed"); + exit 1 if -e $crt || ! -r $txt; + } + } +} + +my $filedate = $resp ? $resp->last_modified : (stat($txt))[9]; +my $datesrc = "as of"; +if(!$filedate) { + # mxr.mozilla.org gave us a time, hg.mozilla.org does not! + $filedate = time(); + $datesrc="downloaded on"; +} + +# get the hash from the download file +my $newhash= sha256($txt); + +if(!$opt_f && $oldhash eq $newhash) { + report "Downloaded file identical to previous run\'s source file. Exiting"; + exit; +} + +report "SHA256 of new file: $newhash"; + +my $currentdate = scalar gmtime($filedate); + +my $format = $opt_t ? "plain text and " : ""; +if( $stdout ) { + open(CRT, '> -') or die "Couldn't open STDOUT: $!\n"; +} else { + open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n"; +} +print CRT <) { + if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) { + print CRT; + print if ($opt_l); + while () { + print CRT; + print if ($opt_l); + last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/); + } + } + elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) { + push @precert, $_; + next; + } + elsif(/^#|^\s*$/) { + undef @precert; + next; + } + chomp; + + # this is a match for the start of a certificate + if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { + $start_of_cert = 1 + } + if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) { + $caname = $1; + } + my %trust_purposes_by_level; + if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) { + my $data; + while () { + last if (/^END/); + chomp; + my @octets = split(/\\/); + shift @octets; + for (@octets) { + $data .= chr(oct); + } + } + # scan forwards until the trust part + while () { + last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/); + chomp; + } + # now scan the trust part to determine how we should trust this cert + while () { + last if (/^#/); + if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) { + if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) { + report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) { + report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } else { + push @{$trust_purposes_by_level{$2}}, $1; + } + } + } + + if ( !should_output_cert(%trust_purposes_by_level) ) { + $skipnum ++; + } else { + my $encoded = MIME::Base64::encode_base64($data, ''); + $encoded =~ s/(.{1,${opt_w}})/$1\n/g; + my $pem = "-----BEGIN CERTIFICATE-----\n" + . $encoded + . "-----END CERTIFICATE-----\n"; + print CRT "\n$caname\n"; + print CRT @precert if($opt_m); + my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK)); + if ($opt_t) { + foreach my $key (keys %trust_purposes_by_level) { + my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}}); + $maxStringLength = List::Util::max( length($string), $maxStringLength ); + print CRT $string . "\n"; + } + } + print CRT ("=" x $maxStringLength . "\n"); + if (!$opt_t) { + print CRT $pem; + } else { + my $pipe = ""; + foreach my $hash (@included_signature_algorithms) { + $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + $pipe = "|$openssl x509 -text -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + report "Parsing: $caname" if ($opt_v); + $certnum ++; + $start_of_cert = 0; + } + undef @precert; + } + +} +close(TXT) or die "Couldn't close $txt: $!\n"; +close(CRT) or die "Couldn't close $crt.~: $!\n"; +unless( $stdout ) { + if ($opt_b && -e $crt) { + my $bk = 1; + while (-e "$crt.~${bk}~") { + $bk++; + } + rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n"; + } elsif( -e $crt ) { + unlink( $crt ) or die "Failed to remove $crt: $!\n"; + } + rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n"; +} +if($opt_u && -e $txt && !unlink($txt)) { + report "Failed to remove $txt: $!\n"; +} +report "Done ($certnum CA certs processed, $skipnum skipped)."; diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index dc360af87..072c4b7cb 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -1,5 +1,5 @@ # This portfile adds the Qt Cryptographic Arcitecture -# Changes to the original sources by this file: +# Changes to the original build: # No -qt5 suffix, which is recommended just for Linux # Output directories according to vcpkg # Updated certstore. See certstore.pem in the output dirs @@ -13,6 +13,9 @@ endif() include(vcpkg_common_functions) find_program(GIT git) +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") # Set git variables to qca version 2.2.0 commit set(GIT_URL "git://anongit.kde.org/qca.git") @@ -52,15 +55,18 @@ vcpkg_apply_patches( # https://www.openssl.org/docs/faq.html#USER16 # it is up to developers or admins to maintain CAs. # So we do it here: -# Importing certificates from curl maintainers -# See: https://curl.haxx.se/docs/caextract.html message(STATUS "Importing certstore") file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem) -file(DOWNLOAD https://curl.haxx.se/ca/cacert.pem - ${SOURCE_PATH}/certs/rootcerts.pem - SHOW_PROGRESS +# Using file(DOWNLOAD) to use https +file(DOWNLOAD https://raw.githubusercontent.com/mozilla/gecko-dev/master/security/nss/lib/ckfw/builtins/certdata.txt + ${CMAKE_CURRENT_LIST_DIR}/certdata.txt TLS_VERIFY ON ) +vcpkg_execute_required_process( + COMMAND ${PERL} ${CMAKE_CURRENT_LIST_DIR}/mk-ca-bundle.pl -n ${SOURCE_PATH}/certs/rootcerts.pem + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + LOGNAME ca-bundle +) message(STATUS "Importing certstore done") # Configure and build -- cgit v1.2.3 From 6e3b500a827b3a85e47c3c37047660f3cb369a8f Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 4 Dec 2016 15:03:47 +0100 Subject: [nana] initial commit --- ports/nana/CONTROL | 4 ++++ ports/nana/fix-linking.patch | 51 ++++++++++++++++++++++++++++++++++++++++++++ ports/nana/portfile.cmake | 36 +++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 ports/nana/CONTROL create mode 100644 ports/nana/fix-linking.patch create mode 100644 ports/nana/portfile.cmake diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL new file mode 100644 index 000000000..e7692526f --- /dev/null +++ b/ports/nana/CONTROL @@ -0,0 +1,4 @@ +Source: nana +Version: 1.4.1 +Description: Cross-platform library for GUI programming in modern C++ style. +Build-Depends: zlib, libpng, libjpeg-turbo diff --git a/ports/nana/fix-linking.patch b/ports/nana/fix-linking.patch new file mode 100644 index 000000000..08ab58151 --- /dev/null +++ b/ports/nana/fix-linking.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c9c9c9..8376431 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,26 +149,20 @@ endif () + # Find PNG + if(NANA_CMAKE_ENABLE_PNG) + add_definitions(-DNANA_ENABLE_PNG) +- set(NANA_LINKS "${NANA_LINKS} -lpng") + if(NANA_CMAKE_LIBPNG_FROM_OS) +- find_package(PNG) +- if (PNG_FOUND) +- include_directories( ${PNG_INCLUDE_DIRS}) +- add_definitions(-DUSE_LIBPNG_FROM_OS) +- endif(PNG_FOUND) ++ find_package(PNG REQUIRED) ++ include_directories(${PNG_INCLUDE_DIRS}) ++ add_definitions(-DUSE_LIBPNG_FROM_OS) + endif(NANA_CMAKE_LIBPNG_FROM_OS) + endif(NANA_CMAKE_ENABLE_PNG) + + # Find JPEG + if(NANA_CMAKE_ENABLE_JPEG) + add_definitions(-DNANA_ENABLE_JPEG) +- set(NANA_LINKS "${NANA_LINKS} -ljpeg") + if(NANA_CMAKE_LIBJPEG_FROM_OS) +- find_package(JPEG) +- if (JPEG_FOUND) +- include_directories( ${JPEG_INCLUDE_DIRS}) +- add_definitions(-DUSE_LIBJPEG_FROM_OS) +- endif(JPEG_FOUND) ++ find_package(JPEG REQUIRED) ++ include_directories(${JPEG_INCLUDE_DIRS}) ++ add_definitions(-DUSE_LIBJPEG_FROM_OS) + endif(NANA_CMAKE_LIBJPEG_FROM_OS) + endif(NANA_CMAKE_ENABLE_JPEG) + +@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS}) + + include_directories(${NANA_INCLUDE_DIR}) + add_library(${PROJECT_NAME} ${sources} ) +-target_link_libraries(${PROJECT_NAME} ${NANA_LINKS}) ++if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS) ++ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES}) ++endif() ++if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS) ++ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES}) ++endif() + + # Headers: use INCLUDE_DIRECTORIES + # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES) diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake new file mode 100644 index 000000000..66fca68fa --- /dev/null +++ b/ports/nana/portfile.cmake @@ -0,0 +1,36 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/nana) +vcpkg_download_distfile(ARCHIVE + URLS "http://downloads.sourceforge.net/project/nanapro/Nana/Nana 1.x/nana 1.4.1.zip" + FILENAME "nana 1.4.1.zip" + SHA512 38a4fe4c9f932d0e69753c0c1e28d0c8f7cc1ab73c639b87dd5ba102ed25da1ee04c93ec5d6bb79945f7bc118cc131022604c75c1bb6eaced3a071eb137115cd) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-linking.patch") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + -DNANA_CMAKE_ENABLE_PNG=ON + -DNANA_CMAKE_ENABLE_JPEG=ON + OPTIONS_DEBUG + -DNANA_CMAKE_INSTALL_INCLUDES=OFF) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/nana.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/nana.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() + +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nana/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/nana/copyright) -- cgit v1.2.3 From 49e760390ebd58670fb24a184e81db50360a8399 Mon Sep 17 00:00:00 2001 From: vlj Date: Fri, 2 Dec 2016 17:07:13 +0100 Subject: Expose some glslang internal includes and enforce static build. --- ports/glslang/portfile.cmake | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index bdeece78a..bbc868915 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -30,14 +30,10 @@ if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") LOGNAME worktree ) message(STATUS "Patching") - vcpkg_execute_required_process( - COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-export-symbol-for-Windows.patch --ignore-whitespace --whitespace=fix - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src - LOGNAME patch - ) endif() - +set(VCPKG_LIBRARY_LINKAGE "static") +set(VCPKG_CRT_LINKAGE "static") vcpkg_configure_cmake( SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" @@ -45,7 +41,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public/ShaderLang.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) +file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) +file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) +file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent) +file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) +file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) +file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools) file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe") file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe") @@ -56,12 +57,12 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe") file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*") list(LENGTH BIN_DIR BIN_DIR_SIZE) if(${BIN_DIR_SIZE} EQUAL 0) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") endif() file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*") list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE) if(${DEBUG_BIN_DIR_SIZE} EQUAL 0) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") endif() # Handle copyright -- cgit v1.2.3 From b78fdc699457118368e251029211fc701e10be56 Mon Sep 17 00:00:00 2001 From: vlj Date: Sun, 27 Nov 2016 12:07:15 +0100 Subject: Add shaderc. --- .../0001-Do-not-generate-build-version.inc.patch | 30 ++++++ ports/shaderc/CMakeLists.txt | 29 ++++++ ports/shaderc/CONTROL | 3 + ports/shaderc/build-version.inc | 3 + ports/shaderc/portfile.cmake | 114 +++++++++++++++++++++ 5 files changed, 179 insertions(+) create mode 100644 ports/shaderc/0001-Do-not-generate-build-version.inc.patch create mode 100644 ports/shaderc/CMakeLists.txt create mode 100644 ports/shaderc/CONTROL create mode 100644 ports/shaderc/build-version.inc create mode 100644 ports/shaderc/portfile.cmake diff --git a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch new file mode 100644 index 000000000..41cc81220 --- /dev/null +++ b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch @@ -0,0 +1,30 @@ +From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001 +From: vlj +Date: Fri, 2 Dec 2016 16:36:25 +0100 +Subject: [PATCH] Do not generate build-version.inc + +--- + CMakeLists.txt | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4c2fac..5544a2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,8 +53,8 @@ add_subdirectory(libshaderc) + add_subdirectory(glslc) + add_subdirectory(examples) + +-add_custom_target(build-version +- ${PYTHON_EXE} +- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py +- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} +- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") ++#add_custom_target(build-version ++# ${PYTHON_EXE} ++# ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py ++# ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ++# COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") +-- +2.10.2.windows.1 + diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt new file mode 100644 index 000000000..3dc7be973 --- /dev/null +++ b/ports/shaderc/CMakeLists.txt @@ -0,0 +1,29 @@ +option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) +if(NOT ${SUFFIX_D}) + find_library(GLSLANG glslang) + find_library(OSDEPENDENT OSDependent) + find_library(OGLCOMPILER OGLCompiler) + find_library(HLSLLIB HLSL) + find_library(SPIRVLIB SPIRV) +ELSE() + find_library(GLSLANG glslangd) + find_library(OSDEPENDENT OSDependentd) + find_library(OGLCOMPILER OGLCompilerd) + find_library(HLSLLIB HLSLd) + find_library(SPIRVLIB SPIRVd) +ENDIF() + +add_library(glslang STATIC IMPORTED GLOBAL) +set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}") + +add_library(OSDependent STATIC IMPORTED GLOBAL) +set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}") + +add_library(OGLCompiler STATIC IMPORTED GLOBAL) +set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}") + +add_library(HLSL STATIC IMPORTED GLOBAL) +set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}") + +add_library(SPIRV STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}") diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL new file mode 100644 index 000000000..7f82bee28 --- /dev/null +++ b/ports/shaderc/CONTROL @@ -0,0 +1,3 @@ +Source: shaderc +Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 +Description: A collection of tools, libraries and tests for shader compilation. diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc new file mode 100644 index 000000000..853e89916 --- /dev/null +++ b/ports/shaderc/build-version.inc @@ -0,0 +1,3 @@ +"shaderc v2016.2-dev unknown hash, 2016-12-02\n" +"spirv-tools v2016.6-dev unknown hash, 2016-12-02\n" +"glslang unknown hash, 2016-12-02\n" diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake new file mode 100644 index 000000000..74dff4d9d --- /dev/null +++ b/ports/shaderc/portfile.cmake @@ -0,0 +1,114 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +include(vcpkg_common_functions) +find_program(GIT git) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) + +set(SHADERC_GIT_URL "https://github.com/google/shaderc.git") +set(SHADERC_GIT_REF "2df47b51d83ad83cbc2e7f8ff2b56776293e8958") +if(NOT EXISTS "${DOWNLOADS}/shaderc.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${SHADERC_GIT_URL} ${DOWNLOADS}/shaderc.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() +if(NOT EXISTS "${SOURCE_PATH}/.git") + message(STATUS "Adding worktree and patching") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${SHADERC_GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/shaderc.git + LOGNAME worktree + ) + message(STATUS "Patching") + vcpkg_execute_required_process( + COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.patch --ignore-whitespace --whitespace=fix + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME patch + ) +endif() + +set(GLSLANG_GIT_URL "https://github.com/KhronosGroup/glslang.git") +set(GLSLANG_GIT_REF "1c573fbcfba6b3d631008b1babc838501ca925d3") +set(SPIRVTOOLS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git") +set(SPIRVTOOLS_GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40") +set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git") +set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c") + +if(NOT EXISTS "${DOWNLOADS}/SPIRV-Tools.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${SPIRVTOOLS_GIT_URL} ${DOWNLOADS}/SPIRV-Tools.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() +if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) +if(NOT EXISTS "${SOURCE_PATH}/third_party/spirv-tools/.git") + message(STATUS "Adding worktree and patching") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/third_party/spirv-tools ${SPIRVTOOLS_GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Tools.git + LOGNAME worktree + ) +endif() +if(NOT EXISTS "${SOURCE_PATH}/third_party/spirv-tools/external/spirv-headers/.git") + message(STATUS "Adding worktree and patching") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/third_party/spirv-tools/external/spirv-headers ${SPIRVHEADERS_GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git + LOGNAME worktree + ) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) + +#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work +set(VCPKG_LIBRARY_LINKAGE "static") +set(VCPKG_CRT_LINKAGE "static") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DSHADERC_SKIP_TESTS=true + OPTIONS_DEBUG -DSUFFIX_D=true + OPTIONS_RELEASE -DSUFFIX_D=false +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +#Safe to remove as libs are static +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +#Provided by another package (glslang) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shaderc/LICENSE ${CURRENT_PACKAGES_DIR}/share/shaderc/copyright) -- cgit v1.2.3 From fd74c49a5f9b8b2f5e20b82fe19ea273a8820eaa Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 4 Dec 2016 19:11:01 +0100 Subject: [lua] add interpreter and compiler --- ports/lua/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index 76ee6e15c..f929c41c9 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -41,6 +41,13 @@ INSTALL ( TARGETS lua ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) +IF (NOT DEFINED SKIP_INSTALL_TOOLS) + ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler + ADD_EXECUTABLE ( luai src/lua.c ${SRC_LIBLUA} ) # interpreter + SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) +ENDIF () + IF (NOT DEFINED SKIP_INSTALL_HEADERS) INSTALL( FILES @@ -51,4 +58,4 @@ IF (NOT DEFINED SKIP_INSTALL_HEADERS) src/lauxlib.h DESTINATION include ) -ENDIF () \ No newline at end of file +ENDIF () -- cgit v1.2.3 From fffc1dc71eb612b8e85ac5529df6913b0d6c2a4d Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 4 Dec 2016 19:12:21 +0100 Subject: [lua] no debug tools --- ports/lua/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index 598b15c94..0778a77f9 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON + -DSKIP_INSTALL_TOOLS=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From 58c6c686a6526a83014476e0ae71875536b2096b Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 5 Dec 2016 13:32:11 +0100 Subject: [nana] fix harmless but still ugly mix-up --- ports/nana/fix-linking.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nana/fix-linking.patch b/ports/nana/fix-linking.patch index 08ab58151..a687e228b 100644 --- a/ports/nana/fix-linking.patch +++ b/ports/nana/fix-linking.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c9c9c9..8376431 100644 +index 5c9c9c9..ae35185 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,26 +149,20 @@ endif () @@ -41,10 +41,10 @@ index 5c9c9c9..8376431 100644 add_library(${PROJECT_NAME} ${sources} ) -target_link_libraries(${PROJECT_NAME} ${NANA_LINKS}) +if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS) -+ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES}) +endif() +if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS) -+ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES}) +endif() # Headers: use INCLUDE_DIRECTORIES -- cgit v1.2.3 From d8db19a2c469bec4db87674be1d9e63ce5959587 Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 5 Dec 2016 14:40:10 +0100 Subject: [lua] bump version --- ports/lua/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index ae661f3f6..ca2a82b14 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.3 +Version: 5.3.3-1 Description: a powerful, fast, lightweight, embeddable scripting language -- cgit v1.2.3 From f62ad96c9ab7f09c80c42a95fee3dfd160fa825c Mon Sep 17 00:00:00 2001 From: ab Date: Mon, 5 Dec 2016 17:09:33 +0100 Subject: Update the cmakelists to build shared and static libraries properly. --- ports/http-parser/CMakeLists.txt | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt index 021b1842f..6e9067a04 100644 --- a/ports/http-parser/CMakeLists.txt +++ b/ports/http-parser/CMakeLists.txt @@ -1,22 +1,17 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.4) project (http-parser) -set(PUBLIC_HDRS - http_parser.h -) -set(PRIVATE_HDRS -) -set(SRCS - http_parser.c -) +if (BUILD_SHARED_LIBS) + SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() -add_library(http_parser STATIC ${SRCS} ${PUBLIC_HDRS} ${PRIAVTE_HDRS}) +add_library(http_parser http_parser.c http_parser.h) -if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - install(TARGETS http_parser - ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" ) -endif() +install(TARGETS http_parser + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" + ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" +) -if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) - install(FILES ${PUBLIC_HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include") +if (NOT SKIP_INSTALL_HEADERS) + install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include") endif() \ No newline at end of file -- cgit v1.2.3 From ff4d33b156e06b5457837361b28803fb8570d350 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 5 Dec 2016 16:42:30 -0800 Subject: [boost] Don't use --layout=system. Resolves #369 --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 57dfe58e3..91c8496a5 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,3 +1,3 @@ Source: boost -Version: 1.62-6 +Version: 1.62-7 Description: Peer-reviewed portable C++ source libraries diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 7cc0d60b0..67d9096ac 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -36,7 +36,6 @@ set(B2_OPTIONS --hash --without-python - --layout=system toolset=msvc threading=multi ) @@ -106,16 +105,16 @@ file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOO file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost RENAME copyright) message(STATUS "Packaging headers done") -function(boost_remove_lib_prefix_from_lib_files LIBS) +# This function makes the static build lib names match the dynamic build lib names which FindBoost.cmake is looking for by default. +# It also renames a couple of "libboost" lib files in the dynamic build (for example libboost_exception-vc140-mt-1_62.lib). +function(boost_rename_libs LIBS) foreach(LIB ${${LIBS}}) get_filename_component(OLD_FILENAME ${LIB} NAME) get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) - if (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) - else() - file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - endif() + string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs + string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) endforeach() endfunction() @@ -129,7 +128,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) FILES_MATCHING PATTERN "*.dll") endif() file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/libboost*.lib) -boost_remove_lib_prefix_from_lib_files(RELEASE_LIBS) +boost_rename_libs(RELEASE_LIBS) message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") @@ -142,7 +141,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) FILES_MATCHING PATTERN "*.dll") endif() file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/libboost*.lib) -boost_remove_lib_prefix_from_lib_files(DEBUG_LIBS) +boost_rename_libs(DEBUG_LIBS) message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") vcpkg_copy_pdbs() -- cgit v1.2.3 From 242a3b2a801fc343a867ad10258db411851f4652 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 26 Oct 2016 19:57:07 +0330 Subject: Update harfbuzz to 1.3.4 The needed local patches are now upstreamed thus no longer needed. Also Uniscribe backend is no longer default enabled so almost no lib is needed to be linked. --- ...0001-Add-an-extra-path-input-for-Freetype.patch | 40 ---------------------- .../0001-Set-d-suffix-for-debug-freetype-lib.patch | 28 --------------- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 20 ++++------- 4 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch delete mode 100644 ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch diff --git a/ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch b/ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch deleted file mode 100644 index 75b81c28f..000000000 --- a/ports/harfbuzz/0001-Add-an-extra-path-input-for-Freetype.patch +++ /dev/null @@ -1,40 +0,0 @@ -From be3c446b1dd798b835052188813ee4e7cf135a81 Mon Sep 17 00:00:00 2001 -From: Vincent Lejeune -Date: Wed, 12 Oct 2016 00:27:35 +0200 -Subject: [PATCH] Add an extra path input for Freetype. - ---- - win32/config-msvc.mak | 3 +++ - win32/detectenv-msvc.mak | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak -index e0c6468..1ad0913 100644 ---- a/win32/config-msvc.mak -+++ b/win32/config-msvc.mak -@@ -124,6 +124,9 @@ HB_DEFINES = $(HB_DEFINES) /DHAVE_CAIRO=1 - - # Enable freetype if desired - !if "$(FREETYPE)" == "1" -+HB_CFLAGS = \ -+ $(HB_CFLAGS) \ -+ /I$(FREETYPE_DIR) - HB_DEFINES = $(HB_DEFINES) /DHAVE_FREETYPE=1 - HB_SOURCES = $(HB_SOURCES) $(HB_FT_sources) - HB_HEADERS = $(HB_HEADERS) $(HB_FT_headers) -diff --git a/win32/detectenv-msvc.mak b/win32/detectenv-msvc.mak -index 83d8786..ad67493 100644 ---- a/win32/detectenv-msvc.mak -+++ b/win32/detectenv-msvc.mak -@@ -129,7 +129,7 @@ LDFLAGS_ARCH = /machine:x86 - !if "$(VALID_CFGSET)" == "TRUE" - CFLAGS = $(CFLAGS_ADD) /W3 /Zi /I.. /I..\src /I. /I$(PREFIX)\include - --LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG -+LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /libpath:$(VCPKG_LIB_DIR) /DEBUG - - !if "$(CFG)" == "debug" - LDFLAGS = $(LDFLAGS_BASE) --- -2.10.0.windows.1 - diff --git a/ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch b/ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch deleted file mode 100644 index fce3ba562..000000000 --- a/ports/harfbuzz/0001-Set-d-suffix-for-debug-freetype-lib.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2be3a687a3079c3988d718293e4ee5d8fc9797b7 Mon Sep 17 00:00:00 2001 -From: vlj -Date: Sat, 8 Oct 2016 21:14:57 +0200 -Subject: [PATCH] Set d suffix for debug freetype lib. - ---- - win32/config-msvc.mak | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/win32/config-msvc.mak b/win32/config-msvc.mak -index 9cc6608..236aef7 100644 ---- a/win32/config-msvc.mak -+++ b/win32/config-msvc.mak -@@ -12,7 +12,11 @@ HB_GLIB_LIBS = glib-2.0.lib - HB_GOBJECT_DEP_LIBS = gobject-2.0.lib $(HB_GLIB_LIBS) - - # Freetype is needed for building FreeType support and hb-view -+!if "$(CFG)" == "debug" -+FREETYPE_LIB = freetyped.lib -+!else - FREETYPE_LIB = freetype.lib -+!endif - - # Cairo is needed for building hb-view - CAIRO_LIB = cairo.lib --- -2.10.0.windows.1 - diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index dd5207077..eab88ff11 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.3.2 +Version: 1.3.4 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 2603fdf0a..b818e0938 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -11,34 +11,28 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.4) find_program(NMAKE nmake) vcpkg_download_distfile(ARCHIVE - URLS "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.3.2.tar.bz2" - FILENAME "harfbuzz-1.3.2.tar.bz2" - SHA512 19f846ee75d8a2d94da2a2b489fa8e54a5120599f998e451187f6695aa3931b28c491bbc0837892eaaebbd1da3441effe01f5f2470454f83cfa6a7c510ebcb32 + URLS "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.3.4.tar.bz2" + FILENAME "harfbuzz-1.3.4.tar.bz2" + SHA512 72027ce64d735f1f7ecabcc78ba426d6155cebd564439feb77cefdfc28b00bfd9f6314e6735addaa90cee1d98cf6d2c0b61f77b446ba34e11f7eb7cdfdcd386a ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Add-an-extra-path-input-for-Freetype.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Set-d-suffix-for-debug-freetype-lib.patch" -) - file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" FREETYPE_INCLUDE_DIR) file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib" FREETYPE_LIB_DIR_DBG) file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib" FREETYPE_LIB_DIR_REL) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f Makefile.vc CFG=debug FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} VCPKG_LIB_DIR=${FREETYPE_LIB_DIR_DBG} + COMMAND ${NMAKE} -f Makefile.vc CFG=debug FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} ADDITIONAL_LIB_DIR=${FREETYPE_LIB_DIR_DBG} WORKING_DIRECTORY ${SOURCE_PATH}/win32/ LOGNAME nmake-build-${TARGET_TRIPLET}-debug ) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f Makefile.vc CFG=release FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} VCPKG_LIB_DIR=${FREETYPE_LIB_DIR_REL} + COMMAND ${NMAKE} -f Makefile.vc CFG=release FREETYPE=1 FREETYPE_DIR=${FREETYPE_INCLUDE_DIR} ADDITIONAL_LIB_DIR=${FREETYPE_LIB_DIR_REL} WORKING_DIRECTORY ${SOURCE_PATH}/win32/ LOGNAME nmake-build-${TARGET_TRIPLET}-release ) @@ -61,5 +55,5 @@ vcpkg_execute_required_process( ) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.2/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.4/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz) file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright) -- cgit v1.2.3 From 33d5ff4e08be49c603bcc66de959d1e693255118 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Dec 2016 22:47:24 -0800 Subject: [gflags] Switch to using zip files -- this makes the download faster and easier to upgrade. Remove gflags_nothreads to avoid choices at link time. --- ports/gflags/CONTROL | 2 +- ports/gflags/portfile.cmake | 37 ++++++++++--------------------------- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 62910c121..0833c3c76 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.0 +Version: 2.2.0-1 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 66ac76227..ac8a44c6e 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -1,36 +1,21 @@ include(vcpkg_common_functions) find_program(GIT git) -set(GIT_URL "https://github.com/gflags/gflags.git") -set(GIT_TAG "v2.2.0") +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/gflags/gflags/archive/v2.2.0.zip" + FILENAME "gflags-v2.2.0.zip" + SHA512 638d094cdcc759a35ebd0e57900216deec6113242d2dcc964beff7b88cf56e3dbab3dce6e10a055bfd94cb5daebb8632382219a5ef40a689e14c76b263d3eca5) -if(NOT EXISTS "${DOWNLOADS}/gflags.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/gflags.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() -message(STATUS "Cloning done") - -if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_TAG} - WORKING_DIRECTORY ${DOWNLOADS}/gflags.git - LOGNAME worktree - ) -endif() +vcpkg_extract_source_archive(${ARCHIVE}) -message(STATUS "Adding worktree") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gflags-2.2.0) vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF - -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF + -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF + -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF + -DBUILD_gflags_nothreads_LIB:BOOL=OFF ) vcpkg_install_cmake() @@ -38,9 +23,7 @@ vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gflags.dll ${CURRENT_PACKAGES_DIR}/bin/gflags.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gflags_nothreads.dll ${CURRENT_PACKAGES_DIR}/bin/gflags_nothreads.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gflags.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gflags.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gflags_nothreads.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gflags_nothreads.dll) endif() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -- cgit v1.2.3 From 55605c73e04a08dd22b49b3e664441d579e0f2d5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 00:57:58 -0800 Subject: [gdal] Use CURRENT_INSTALLED_DIR instead of calculating it out. Use VCPKG_TARGET_ARCHITECTURE instead of parsing the triplet. --- ports/gdal/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index e5f148922..f198f4f0c 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -32,9 +32,9 @@ file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal" NATIVE_DATA_DIR) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal/html" NATIVE_HTML_DIR) -file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" PROJ_INCLUDE_DIR) -file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/proj.lib" PROJ_LIBRARY_REL) -file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib/projd.lib" PROJ_LIBRARY_DBG) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PROJ_INCLUDE_DIR) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/proj.lib" PROJ_LIBRARY_REL) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib" PROJ_LIBRARY_DBG) set(NMAKE_OPTIONS GDAL_HOME=${NATIVE_PACKAGES_DIR} @@ -44,7 +44,7 @@ set(NMAKE_OPTIONS MSVC_VER=1900 ) -if(TARGET_TRIPLET MATCHES "x64") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") list(APPEND NMAKE_OPTIONS WIN64=YES) endif() -- cgit v1.2.3 From 901b5978403ac144ec92a25a7a9a232c9b4a4f9e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 01:00:20 -0800 Subject: [gslang] Version bump to account for layout changes --- ports/glslang/CONTROL | 2 +- ports/glslang/portfile.cmake | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 7bd0c7e40..3b81f5287 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 1c573fbcfba6b3d631008b1babc838501ca925d3 +Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-1 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index bbc868915..9fd6ae468 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -33,7 +33,6 @@ if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") endif() set(VCPKG_LIBRARY_LINKAGE "static") -set(VCPKG_CRT_LINKAGE "static") vcpkg_configure_cmake( SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" -- cgit v1.2.3 From 6993803b05e065953dd917a1fc7ecc466c406f19 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 01:04:32 -0800 Subject: [shaderc] Enable dynamic CRT. Explicitly search for python3. Add Build-Depends on glslang. --- ports/shaderc/CONTROL | 1 + ports/shaderc/portfile.cmake | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 7f82bee28..e1e3d02b8 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,3 +1,4 @@ Source: shaderc Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 Description: A collection of tools, libraries and tests for shader compilation. +Build-Depends: glslang diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 74dff4d9d..542d18598 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -37,8 +37,6 @@ if(NOT EXISTS "${SOURCE_PATH}/.git") ) endif() -set(GLSLANG_GIT_URL "https://github.com/KhronosGroup/glslang.git") -set(GLSLANG_GIT_REF "1c573fbcfba6b3d631008b1babc838501ca925d3") set(SPIRVTOOLS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git") set(SPIRVTOOLS_GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40") set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git") @@ -61,7 +59,6 @@ if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git") ) endif() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) if(NOT EXISTS "${SOURCE_PATH}/third_party/spirv-tools/.git") message(STATUS "Adding worktree and patching") @@ -86,11 +83,19 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH} #Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work set(VCPKG_LIBRARY_LINKAGE "static") -set(VCPKG_CRT_LINKAGE "static") +set(OPTIONS) +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS -DSHADERC_ENABLE_SHARED_CRT=ON) +endif() + +# shaderc uses python to manipulate copyright information +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DSHADERC_SKIP_TESTS=true + OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} OPTIONS_DEBUG -DSUFFIX_D=true OPTIONS_RELEASE -DSUFFIX_D=false ) @@ -104,10 +109,6 @@ file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) #Safe to remove as libs are static file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -#Provided by another package (glslang) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) - # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc) -- cgit v1.2.3 From 5359a542a554668de7926a1b2c9a314db8b4d302 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 01:26:21 -0800 Subject: [vcpkg] Disable all interactions with CMake registry -- we are effectively implementing our own registry and they don't nest very well at all. Fixes #334. --- scripts/cmake/vcpkg_configure_cmake.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 901e57368..2c506ad94 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -38,6 +38,9 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8" + "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" ) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG -- cgit v1.2.3 From 1473e567298b6259df6d9ef4da183c602715f6fe Mon Sep 17 00:00:00 2001 From: Jason Yang Date: Tue, 6 Dec 2016 11:18:35 +0800 Subject: fix some comments --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/cmake.patch | 132 +++++++++++++++------------------ ports/azure-storage-cpp/portfile.cmake | 1 - 3 files changed, 61 insertions(+), 74 deletions(-) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 78b7e0a11..5fc7dbe13 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp Version: 2.5.0 -Build-Depends: cpprestsdk [windows] +Build-Depends: cpprestsdk Description: Microsoft Azure Storage Client SDK for C++ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch index 0275991ae..9487ab458 100644 --- a/ports/azure-storage-cpp/cmake.patch +++ b/ports/azure-storage-cpp/cmake.patch @@ -1,39 +1,34 @@ diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index f037c7f..478bf48 100644 +index f037c7f..a4dd278 100644 --- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -1,6 +1,10 @@ - set(CMAKE_LEGACY_CYGWIN_WIN32 0) - cmake_minimum_required(VERSION 2.6) --project(azurestorage) -+if(WIN32) -+ project(wastorage) -+else() -+ project(azurestorage) -+endif() +@@ -51,20 +51,25 @@ if(UNIX) + find_package(UnitTest++ REQUIRED) + endif() - enable_testing() +- option(BUILD_SHARED_LIBS "Build shared Libraries." ON) -@@ -59,12 +63,25 @@ if(UNIX) - install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) - file(GLOB WASCORE_DATA includes/wascore/*.dat) - install(FILES ${WASCORE_DATA} DESTINATION include/wascore) +- file(GLOB WAS_HEADERS includes/was/*.h) +- install(FILES ${WAS_HEADERS} DESTINATION include/was) +- file(GLOB WASCORE_HEADERS includes/wascore/*.h) +- install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) +- file(GLOB WASCORE_DATA includes/wascore/*.dat) +- install(FILES ${WASCORE_DATA} DESTINATION include/wascore) +elseif(WIN32) + message("-- Setting WIN32 options") + find_package(Casablanca REQUIRED) + add_definitions(-DUNICODE -D_UNICODE -D_WIN32) -+ option(BUILD_SHARED_LIBS "Build shared Libraries." ON) -+ option(WASTORE_INSTALL_HEADERS "Install header files." ON) -+ if(WASTORE_INSTALL_HEADERS) -+ include_directories(includes) -+ file(GLOB WAS_HEADERS includes/was/*.h) -+ file(GLOB WASCORE_HEADERS includes/wascore/*.h) -+ file(GLOB WASCORE_DATA includes/wascore/*.dat) -+ endif() else() message("-- Unsupported Build Platform.") endif() ++option(BUILD_SHARED_LIBS "Build shared Libraries." ON) ++option(WASTORE_INSTALL_HEADERS "Install header files." ON) ++if(WASTORE_INSTALL_HEADERS) ++ file(GLOB WAS_HEADERS includes/was/*.h) ++ file(GLOB WASCORE_HEADERS includes/wascore/basic_types.h includes/wascore/constants.h) ++ file(GLOB WASCORE_DATA includes/wascore/*.dat) ++endif() + # Compiler (not platform) specific settings -if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") @@ -41,7 +36,7 @@ index f037c7f..478bf48 100644 message("-- Setting gcc options") set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") -@@ -81,37 +98,56 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +@@ -81,22 +86,29 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") add_definitions(-DBOOST_LOG_DYN_LINK) endif() add_definitions(-D_TURN_OFF_PLATFORM_STRING) @@ -84,41 +79,14 @@ index f037c7f..478bf48 100644 else() message("-- Unknown compiler, success is doubtful.") endif() +@@ -109,7 +121,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) + set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) + set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) --# Reconfigure final output directory --set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) --set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) --set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) -+if (WIN32) -+ # Reconfigure final output directory -+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) -+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) -+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +- + set(AZURESTORAGE_LIBRARY azurestorage) + set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) --set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) --set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) -+ set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) -+ set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS}) - -+ set(AZURESTORAGE_LIBRARY wastorage) -+ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES}) -+else() -+ # Reconfigure final output directory -+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) -+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) -+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) -+ -+ set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) -+ set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) - --set(AZURESTORAGE_LIBRARY azurestorage) --set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) -+ set(AZURESTORAGE_LIBRARY azurestorage) -+ set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) -+endif() - - # Set version numbers centralized - set (AZURESTORAGE_VERSION_MAJOR 2) diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake index 5c1df3c..da66eb4 100644 --- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake @@ -132,7 +100,7 @@ index 5c1df3c..da66eb4 100644 ${CASABLANCA_PKGCONF_LIBRARY_DIRS} ${CASABLANCA_DIR} diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -index b08111f..ee5c9ed 100644 +index b08111f..74ba2fb 100644 --- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) @@ -144,7 +112,7 @@ index b08111f..ee5c9ed 100644 set(SOURCES xmlhelpers.cpp response_parsers.cpp -@@ -64,14 +64,17 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") +@@ -64,24 +64,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif() if (APPLE) @@ -153,6 +121,18 @@ index b08111f..ee5c9ed 100644 else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++endif() ++ ++if(MSVC) ++ add_compile_options(/Yustdafx.h) ++ set_source_files_properties(stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h") ++ ++ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*") ++ set_property(SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch") ++ set_property(SOURCE ${SOURCES} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch") ++ endif() ++ ++ list(APPEND SOURCES stdafx.cpp) endif() add_library(${AZURESTORAGE_LIBRARY} ${SOURCES}) @@ -164,18 +144,26 @@ index b08111f..ee5c9ed 100644 # Portions specific to azure storage binary versioning and installation. if(UNIX) -@@ -84,4 +87,14 @@ if(UNIX) - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - ) + set_target_properties(${AZURESTORAGE_LIBRARY} PROPERTIES + SOVERSION ${AZURESTORAGE_VERSION_MAJOR} + VERSION ${AZURESTORAGE_VERSION_MAJOR}.${AZURESTORAGE_VERSION_MINOR}) +- +- install( +- TARGETS ${AZURESTORAGE_LIBRARY} +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib +- ) +elseif(WIN32) -+ install(FILES ${WAS_HEADERS} DESTINATION include/was) -+ install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) -+ install(FILES ${WASCORE_DATA} DESTINATION include/wascore) -+ install( -+ TARGETS ${AZURESTORAGE_LIBRARY} -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+ ) ++ set_target_properties(${AZURESTORAGE_LIBRARY} PROPERTIES OUTPUT_NAME "wastorage") endif() ++ ++install(FILES ${WAS_HEADERS} DESTINATION include/was) ++install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) ++install(FILES ${WASCORE_DATA} DESTINATION include/wascore) ++ ++install( ++ TARGETS ${AZURESTORAGE_LIBRARY} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 8898a61a0..fdc858c1a 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -8,7 +8,6 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) - vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES -- cgit v1.2.3 From 134993109b00dac3ed92a66a57fbffb7f89e4a02 Mon Sep 17 00:00:00 2001 From: Mattias Cibien Date: Tue, 6 Dec 2016 11:17:25 +0100 Subject: Anax support for shared libs --- ports/anax/Add-bin-output.patch | 10 ++++++++++ ports/anax/portfile.cmake | 11 +++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 ports/anax/Add-bin-output.patch diff --git a/ports/anax/Add-bin-output.patch b/ports/anax/Add-bin-output.patch new file mode 100644 index 000000000..333a92fdc --- /dev/null +++ b/ports/anax/Add-bin-output.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt Tue Oct 13 13:47:40 2015 ++++ b/CMakeLists.txt Tue Dec 06 11:13:23 2016 +@@ -161,6 +161,7 @@ + # Library files + install( + TARGETS ${ANAX_LIBRARY_NAME} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake index ae22332cf..ef14f7264 100644 --- a/ports/anax/portfile.cmake +++ b/ports/anax/portfile.cmake @@ -6,10 +6,6 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/anax-2.1.0) @@ -20,8 +16,15 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/Add-bin-output.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From 34f103d4209885d43e1038570d0c04b9deb5e654 Mon Sep 17 00:00:00 2001 From: Mattias Cibien Date: Tue, 6 Dec 2016 11:29:22 +0100 Subject: [anax] Bump Version --- ports/anax/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL index f6d285b4c..ce3da2f57 100644 --- a/ports/anax/CONTROL +++ b/ports/anax/CONTROL @@ -1,3 +1,3 @@ Source: anax -Version: 2.1.0 +Version: 2.1.0-1 Description: An open source C++ entity system. -- cgit v1.2.3 From 175bb41f822891eb3a69795eb132c85f5b869a4b Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 6 Dec 2016 12:14:31 +0100 Subject: [libflac] initial commit --- ports/libflac/CMakeLists.txt | 74 ++++++++++++++++++++++++++++++++++++++++++++ ports/libflac/CONTROL | 4 +++ ports/libflac/portfile.cmake | 32 +++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 ports/libflac/CMakeLists.txt create mode 100644 ports/libflac/CONTROL create mode 100644 ports/libflac/portfile.cmake diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt new file mode 100644 index 000000000..2f3dedbdb --- /dev/null +++ b/ports/libflac/CMakeLists.txt @@ -0,0 +1,74 @@ +cmake_minimum_required(VERSION 2.6) +cmake_policy(SET CMP0005 NEW) # do not escape preprocessor defines + +project(libflac) + +if(NOT DEFINED LIBFLAC_OGG_LIB OR NOT DEFINED LIBFLAC_OGG_INCLUDES) + message(FATAL_ERROR "Ogg library required") +endif() + +if(NOT DEFINED LIBFLAC_ARCHITECTURE) + message(FATAL_ERROR "Target architecture not specified") +endif() + +file(GLOB LIBFLAC_SOURCES + ${PROJECT_SOURCE_DIR}/src/libFLAC/*.c + ${PROJECT_SOURCE_DIR}/src/share/win_utf8_io/win_utf8_io.c) + +file(GLOB LIBFLACXX_SOURCES + ${PROJECT_SOURCE_DIR}/src/libFLAC++/*.cpp) + +include_directories(${PROJECT_SOURCE_DIR}/include) +include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include) +include_directories(${LIBFLAC_OGG_INCLUDES}) + +if(NOT LIBFLAC_ARCHITECTURE MATCHES arm) + add_definitions(-DFLAC__SSE_OS) + add_definitions(-DFLAC__HAS_X86INTRIN) +endif() + +if(LIBFLAC_ARCHITECTURE MATCHES x86) + add_definitions(-DFLAC__CPU_IA32) +elseif(LIBFLAC_ARCHITECTURE MATCHES x64) + add_definitions(-DFLAC__CPU_X86_64) +endif() + +if(CMAKE_BUILD_TYPE MATCHES Debug) + add_definitions(-DFLAC__OVERFLOW_DETECT) +endif() + +add_definitions(-DVERSION="1.3.1") +add_definitions(-DFLAC__HAS_OGG) +add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary +add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) + +add_library(libFLAC ${LIBFLAC_SOURCES}) +add_library(libFLACXX ${LIBFLACXX_SOURCES}) + +set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac) +set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++) + +target_link_libraries(libFLAC ${LIBFLAC_OGG_LIB}) +target_link_libraries(libFLACXX libFLAC) + +if(BUILD_SHARED_LIBS) + set_target_properties(libFLACXX PROPERTIES COMPILE_FLAGS -DFLACPP_API_EXPORTS) + set_target_properties(libFLAC PROPERTIES COMPILE_FLAGS -DFLAC_API_EXPORTS) +else() + add_definitions(-DFLAC__NO_DLL) +endif() + +install(TARGETS libFLAC libFLACXX + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT DEFINED LIBFLAC_SKIP_HEADERS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC/ + DESTINATION include/FLAC + FILES_MATCHING PATTERN "*.h") + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC++/ + DESTINATION include/FLAC++ + FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL new file mode 100644 index 000000000..557b30123 --- /dev/null +++ b/ports/libflac/CONTROL @@ -0,0 +1,4 @@ +Source: libflac +Version: 1.3.1 +Description: Library for manipulating FLAC files +Build-Depends: libogg diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake new file mode 100644 index 000000000..bb7daae72 --- /dev/null +++ b/ports/libflac/portfile.cmake @@ -0,0 +1,32 @@ + # libFLAC uses winapi functons not avalible in WindowsStore +if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz" + FILENAME "flac-1.3.1.tar.xz" + SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DLIBFLAC_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} + -DLIBFLAC_OGG_LIB=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/ogg.lib + -DLIBFLAC_OGG_INCLUDES=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include + OPTIONS_DEBUG + -DLIBFLAC_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# This license (BSD) is relevant only for library - if someone would want to install +# FLAC cmd line tools as well additional license (GPL) should be included +file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libflac/COPYING.Xiph ${CURRENT_PACKAGES_DIR}/share/libflac/copyright) -- cgit v1.2.3 From 05fdf3a01fb0f702c034d58850d47607713d60ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christophe=20Gu=C3=A9bert?= Date: Tue, 6 Dec 2016 14:33:43 +0100 Subject: Add libssh2. --- ports/libssh2/CONTROL | 4 ++++ ports/libssh2/LICENSE | 41 +++++++++++++++++++++++++++++++++++++++++ ports/libssh2/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 ports/libssh2/CONTROL create mode 100644 ports/libssh2/LICENSE create mode 100644 ports/libssh2/portfile.cmake diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL new file mode 100644 index 000000000..d66030b71 --- /dev/null +++ b/ports/libssh2/CONTROL @@ -0,0 +1,4 @@ +Source: libssh2 +Version: 1.8.0 +Build-Depends: zlib, openssl +Description: The SSH library \ No newline at end of file diff --git a/ports/libssh2/LICENSE b/ports/libssh2/LICENSE new file mode 100644 index 000000000..d629fbd3f --- /dev/null +++ b/ports/libssh2/LICENSE @@ -0,0 +1,41 @@ +/* Copyright (c) 2004-2007 Sara Golemon + * Copyright (c) 2005,2006 Mikhail Gusarov + * Copyright (c) 2006-2007 The Written Word, Inc. + * Copyright (c) 2007 Eli Fant + * Copyright (c) 2009-2014 Daniel Stenberg + * Copyright (C) 2008, 2009 Simon Josefsson + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ \ No newline at end of file diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake new file mode 100644 index 000000000..9b4cc77dd --- /dev/null +++ b/ports/libssh2/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh2-1.8.0) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://www.libssh2.org/download/libssh2-1.8.0.tar.gz" + FILENAME "libssh2-1.8.0.tar.gz" + SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DENABLE_ZLIB_COMPRESSION=ON + OPTIONS_DEBUG + -DENABLE_DEBUG_LOGGING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 7a061e8d90818b9058ff9b31376445c9dac2cfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christophe=20Gu=C3=A9bert?= Date: Tue, 6 Dec 2016 16:39:57 +0100 Subject: Add uWebSockets. --- ports/uwebsockets/0001_cmake.patch | 40 ++++++++++++++++++++++++++++++++++++++ ports/uwebsockets/CONTROL | 4 ++++ ports/uwebsockets/portfile.cmake | 26 +++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 ports/uwebsockets/0001_cmake.patch create mode 100644 ports/uwebsockets/CONTROL create mode 100644 ports/uwebsockets/portfile.cmake diff --git a/ports/uwebsockets/0001_cmake.patch b/ports/uwebsockets/0001_cmake.patch new file mode 100644 index 000000000..f4004a5bb --- /dev/null +++ b/ports/uwebsockets/0001_cmake.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fadf72..6ee984d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,11 @@ if(NOT LIBUV_INCLUDE_DIR) + find_path(LIBUV_INCLUDE_DIR uv.h) + endif() + if(NOT LIBUV_LIBRARY) +- find_library(LIBUV_LIBRARY NAMES uv uv1) ++ if(WIN32) ++ find_library(LIBUV_LIBRARY NAMES libuv) ++ else() ++ find_library(LIBUV_LIBRARY NAMES uv uv1) ++ endif() + endif() + + add_library(uWS src/Extensions.cpp src/Group.cpp src/WebSocketImpl.cpp src/Networking.cpp src/Hub.cpp src/Node.cpp src/WebSocket.cpp src/HTTPSocket.cpp src/Socket.cpp) +@@ -38,4 +42,20 @@ install (TARGETS uWS DESTINATION /usr/lib64) + install (FILES src/Extensions.h src/WebSocketProtocol.h src/Networking.h src/WebSocket.h src/Hub.h src/Group.h src/Node.h src/Socket.h src/HTTPSocket.h src/uWS.h DESTINATION /usr/include/uWS) + endif (UNIX) + +-add_subdirectory(examples) ++#add_subdirectory(examples) ++ ++if(WIN32) ++ target_link_libraries (uWS PUBLIC psapi.lib iphlpapi.lib userenv.lib) ++ install (FILES src/Extensions.h src/WebSocketProtocol.h src/Networking.h src/WebSocket.h src/Hub.h src/Group.h src/Node.h src/Socket.h src/HTTPSocket.h src/uWS.h DESTINATION include/uWS) ++ ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries (uWS PUBLIC ws2_32.lib) ++ endif() ++endif() ++ ++install( ++ TARGETS uWS ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +\ No newline at end of file \ No newline at end of file diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL new file mode 100644 index 000000000..840990004 --- /dev/null +++ b/ports/uwebsockets/CONTROL @@ -0,0 +1,4 @@ +Source: uwebsockets +Version: 0.12.0 +Build-Depends: libuv, openssl, zlib +Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js \ No newline at end of file diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake new file mode 100644 index 000000000..881f35086 --- /dev/null +++ b/ports/uwebsockets/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uwebsockets-0.12.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/uWebSockets/uWebSockets/archive/v0.12.0.zip" + FILENAME "uwebsockets-v0.12.0.zip" + SHA512 ea10682608d5f6c8b246f186dfc2f14f496858cc7e468880b96b111f10058daf529f1aa9662a851e21494dde9a4faadf2b9904483dac5350d0ca8736500cdda8 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uwebsockets) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/uwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/uwebsockets/copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From 8bb60f70ef93a98b4a32156831827839fd4b1e5d Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Tue, 6 Dec 2016 09:05:27 -0800 Subject: fixed openssl hash for uwp builds --- ports/openssl/portfile-uwp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index 34861c122..13bb6a3f5 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -35,7 +35,7 @@ set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") vcpkg_download_distfile(ARCHIVE URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2_WinRT-stable.zip" FILENAME "openssl-microsoft-1.0.2.zip" - SHA512 f265b7dbeca6b86815dbc14af9f2b6688407efd921eb335b1acf5a642dddb6b6334a794fe0939666d9db66976db11a67ad78a3ed74484708d3bf2040aae598d2 + SHA512 10c3d7eb354a0b39a837e0c48f31415444acd5b1e7df52ed49a735ea63bf8b7548602a266baa012f1703888e68fdd5cb070fc610584a2f3f9a555e7d62d8b44b ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From c128d007df40ee0f4a55f954cb153ddd983a4d36 Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Tue, 6 Dec 2016 10:08:15 -0800 Subject: use VCPKG_CMAKE_SYSTEM_NAME instead of TRIPLET_SYSTEM_NAME --- ports/sqlite3/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 760684493..dbe636b79 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -17,7 +17,8 @@ target_compile_definitions(sqlite3 PRIVATE -DSQLITE_ENABLE_UNLOCK_NOTIFY ) target_include_directories(sqlite3 INTERFACE $) -if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore") + +if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) endif() -- cgit v1.2.3 From f1a3424c772581f70351a9dfbf73c9f8d2a9e521 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 6 Dec 2016 22:38:25 +0100 Subject: [libflac] update config in static builds Now static libs can be used without defining FLAC__NO_DLL by user. --- ports/libflac/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index bb7daae72..79445a406 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -26,6 +26,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC/export.h "#undef FLAC_API\n#define FLAC_API\n") + file(APPEND ${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h "#undef FLAC_API\n#define FLAC_API\n") +endif() + # This license (BSD) is relevant only for library - if someone would want to install # FLAC cmd line tools as well additional license (GPL) should be included file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac) -- cgit v1.2.3 From a545be80b4a5388e6cfde1ab9cd554bcaede4065 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 6 Dec 2016 13:48:37 -0800 Subject: [boost] Fix dynamic build lib renaming --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 91c8496a5..52273d80e 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,3 +1,3 @@ Source: boost -Version: 1.62-7 +Version: 1.62-8 Description: Peer-reviewed portable C++ source libraries diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 67d9096ac..f9d70554a 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -114,7 +114,11 @@ function(boost_rename_libs LIBS) string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs - file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + if (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) + else() + file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + endif() endforeach() endfunction() -- cgit v1.2.3 From a05a033d744ad28b1eb8c8faa8ef8c21854c05f7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 13:58:04 -0800 Subject: [aws-sdk-cpp] Check VCPKG_CRT_LINKAGE instead of VCPKG_LIBRARY_LINKAGE. Rename archive to avoid collisions with other libraries. --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index bfeed7a0b..05ea2fc08 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,3 @@ Source: aws-sdk-cpp -Version: 1.0.34 +Version: 1.0.34-1 Description: AWS SDK for C++ diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index a1f1a40b9..1cff4bee7 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.34) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.34.tar.gz" - FILENAME "1.0.34.tar.gz" + FILENAME "aws-sdk-cpp-1.0.34.tar.gz" SHA512 21ca03eb323eecb55c29866b73c07956a36aad7c9c051eb7ca201cfd356c3f9732c89898cf0c89660d6c1279dc52438bb389b37d613bf741bae81bb3e773a3c5 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -13,7 +13,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/drop_git.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_CRT_LINKAGE STREQUAL static) set(FORCE_SHARED_CRT OFF) else() set(FORCE_SHARED_CRT ON) @@ -37,7 +37,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/nuget ${CURRENT_PACKAGES_DIR}/debug/nuget) -if(${VCPKG_LIBRARY_LINKAGE} STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -- cgit v1.2.3 From c0c2135a604f9ae7beb4aed936f9b9160b956e7a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 14:18:37 -0800 Subject: [gflags] Add quotes to avoid stripping semicolons from the config module. --- ports/gflags/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index ac8a44c6e..61a28055f 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -47,7 +47,7 @@ file(READ ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake GFLAGS_CONFI string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" GFLAGS_CONFIG_MODULE "${GFLAGS_CONFIG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake ${GFLAGS_CONFIG_MODULE}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake "${GFLAGS_CONFIG_MODULE}") file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) -- cgit v1.2.3 From dd7c39f0e328276adf74eb9a944080c06807fa60 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 14:22:24 -0800 Subject: [gflags] Lowercase install directories. Bump version to account for this and c0c2135. --- ports/gflags/CONTROL | 2 +- ports/gflags/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 0833c3c76..b84a3b67d 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.0-1 +Version: 2.2.0-2 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 61a28055f..91da22ae6 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -51,5 +51,8 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake "${GFLAGS_C file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) +file(RENAME ${CURRENT_PACKAGES_DIR}/Include ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/Lib ${CURRENT_PACKAGES_DIR}/lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/Lib ${CURRENT_PACKAGES_DIR}/debug/lib) vcpkg_copy_pdbs() -- cgit v1.2.3 From 59587d94c730056138d2c0ce3e542d4640fc595d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 6 Dec 2016 14:39:17 -0800 Subject: [libflac] Fix typo --- ports/libflac/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index 79445a406..38b4846be 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -1,4 +1,4 @@ - # libFLAC uses winapi functons not avalible in WindowsStore + # libFLAC uses winapi functions not available in WindowsStore if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() @@ -9,7 +9,7 @@ vcpkg_download_distfile(ARCHIVE URLS "http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz" FILENAME "flac-1.3.1.tar.xz" SHA512 923cd0ffe2155636febf2b4633791bc83370d57080461b97ebb69ea21a4b1be7c0ff376c7fc8ca3979af4714e761112114a24b49ff6c80228b58b929db6e96d5) - + vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From db4dc6d1ce8f8cf455bb908560c34a58465cd85a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 16:15:50 -0800 Subject: [openssl] Do not use branches; these will update and constantly break the hash. --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile-uwp.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index d0cd893f5..cb7bc7493 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2j +Version: 1.0.2j-1 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. \ No newline at end of file diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index 13bb6a3f5..d78b29bc4 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -33,9 +33,9 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2_WinRT-stable.zip" - FILENAME "openssl-microsoft-1.0.2.zip" - SHA512 10c3d7eb354a0b39a837e0c48f31415444acd5b1e7df52ed49a735ea63bf8b7548602a266baa012f1703888e68fdd5cb070fc610584a2f3f9a555e7d62d8b44b + URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2j_WinRT.zip" + FILENAME "openssl-microsoft-1.0.2j_WinRT.zip" + SHA512 0860d1f5fca7b1345870e866d7bb78f14672c5bb63c56bb04360ee891be542b4b56625ab971ef9b304b792b6cf36c9508bfd812c4a133f6ba8bafdde5e2f8fcf ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From ed2994a5e930b27fd5dbe121b35fe0abba428376 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 16:17:58 -0800 Subject: [openssl] Fix source path for new archive. --- ports/openssl/portfile-uwp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index d78b29bc4..f4a0a716b 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -26,7 +26,7 @@ endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2_WinRT-stable) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2j_WinRT) vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -- cgit v1.2.3 From b65005b241c58763b239fa9151f42e286b692813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christophe=20Gu=C3=A9bert?= Date: Wed, 7 Dec 2016 12:30:12 +0100 Subject: Add CharLS. --- ports/charls/0001_cmake.patch | 12 ++++++++++++ ports/charls/CONTROL | 3 +++ ports/charls/portfile.cmake | 27 +++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 ports/charls/0001_cmake.patch create mode 100644 ports/charls/CONTROL create mode 100644 ports/charls/portfile.cmake diff --git a/ports/charls/0001_cmake.patch b/ports/charls/0001_cmake.patch new file mode 100644 index 000000000..7f50a98e6 --- /dev/null +++ b/ports/charls/0001_cmake.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1aa40a8..1051997 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,6 +33,7 @@ option (BUILD_TESTING "Build tests" ON) + if (WIN32) + if (BUILD_SHARED_LIBS) + add_definitions(-D CHARLS_DLL) ++ set_source_files_properties(src/interface.cpp PROPERTIES COMPILE_FLAGS -DCHARLS_DLL_BUILD) + else() + add_definitions(-D CHARLS_STATIC) + endif() diff --git a/ports/charls/CONTROL b/ports/charls/CONTROL new file mode 100644 index 000000000..8be1a5027 --- /dev/null +++ b/ports/charls/CONTROL @@ -0,0 +1,3 @@ +Source: charls +Version: 2.0.0 +Description: CharLS, a C++ JPEG-LS library implementation. \ No newline at end of file diff --git a/ports/charls/portfile.cmake b/ports/charls/portfile.cmake new file mode 100644 index 000000000..69726f1c3 --- /dev/null +++ b/ports/charls/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/charls-2.0.0) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://github.com/team-charls/charls/archive/2.0.0.tar.gz" + FILENAME "charls-2.0.0.tar.gz" + SHA512 0a2862fad6d65b941c81f5f838db1fdc6a4625887281ddbf27e21be9084f607d27c8a27d246d6252e08358b2ed4aa0c2b7407048ca559fb40e94313ca72487dd +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/charls RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 7927112acb2ab216a8e45b13922bb78d87bd3bff Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 7 Dec 2016 17:48:01 +0100 Subject: [libflac] link to correct version of ogg --- ports/libflac/CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt index 2f3dedbdb..afe55f55e 100644 --- a/ports/libflac/CMakeLists.txt +++ b/ports/libflac/CMakeLists.txt @@ -3,10 +3,6 @@ cmake_policy(SET CMP0005 NEW) # do not escape preprocessor defines project(libflac) -if(NOT DEFINED LIBFLAC_OGG_LIB OR NOT DEFINED LIBFLAC_OGG_INCLUDES) - message(FATAL_ERROR "Ogg library required") -endif() - if(NOT DEFINED LIBFLAC_ARCHITECTURE) message(FATAL_ERROR "Target architecture not specified") endif() @@ -20,7 +16,6 @@ file(GLOB LIBFLACXX_SOURCES include_directories(${PROJECT_SOURCE_DIR}/include) include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include) -include_directories(${LIBFLAC_OGG_INCLUDES}) if(NOT LIBFLAC_ARCHITECTURE MATCHES arm) add_definitions(-DFLAC__SSE_OS) @@ -49,7 +44,11 @@ add_library(libFLACXX ${LIBFLACXX_SOURCES}) set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac) set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++) -target_link_libraries(libFLAC ${LIBFLAC_OGG_LIB}) +find_library(OGG_LIBRARY ogg) +find_path(OGG_INCLUDE_DIR ogg/ogg.h) + +include_directories(${OGG_INCLUDE_DIR}) +target_link_libraries(libFLAC ${OGG_LIBRARY}) target_link_libraries(libFLACXX libFLAC) if(BUILD_SHARED_LIBS) -- cgit v1.2.3 From 764563457f17f93f62fa0f2c5dedca35547facf1 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 7 Dec 2016 17:49:28 +0100 Subject: [libflac] remove unused flags --- ports/libflac/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index 38b4846be..4ed496fb8 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -18,8 +18,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DLIBFLAC_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} - -DLIBFLAC_OGG_LIB=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/ogg.lib - -DLIBFLAC_OGG_INCLUDES=${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include OPTIONS_DEBUG -DLIBFLAC_SKIP_HEADERS=ON) -- cgit v1.2.3 From abc8c375209b0ee8d99e50a6ac9172a83ee61e6d Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 7 Dec 2016 17:50:56 +0100 Subject: [libflac] bump version --- ports/libflac/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index 557b30123..9b1a37531 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac -Version: 1.3.1 +Version: 1.3.1-1 Description: Library for manipulating FLAC files Build-Depends: libogg -- cgit v1.2.3 From 31c4de315a218117f2f88742b3be58f9df9b76ac Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 13:14:10 -0800 Subject: Add "vcpkg /?" which is equivalent to "vcpkg help" --- toolsrc/src/commands_other.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 5f4128bb1..bb1768048 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -74,6 +74,7 @@ namespace vcpkg const std::vector>& get_available_commands_type_b() { static std::vector> t = { + {"/?", help_command}, {"help", help_command}, {"search", search_command}, {"list", list_command}, -- cgit v1.2.3 From f047bd733e85b8e32b72a9f2a633255bb4da0fa8 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 7 Dec 2016 23:02:23 +0100 Subject: [sfml] initial commit --- ports/sfml/CMakeLists.txt | 123 ++++++++++++++++++++++++++++++++++++++++++++++ ports/sfml/CONTROL | 4 ++ ports/sfml/portfile.cmake | 34 +++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 ports/sfml/CMakeLists.txt create mode 100644 ports/sfml/CONTROL create mode 100644 ports/sfml/portfile.cmake diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt new file mode 100644 index 000000000..1eda7edb2 --- /dev/null +++ b/ports/sfml/CMakeLists.txt @@ -0,0 +1,123 @@ +cmake_minimum_required(VERSION 2.6) +project(SFML) + +include_directories(${PROJECT_SOURCE_DIR}/include) +include_directories(${PROJECT_SOURCE_DIR}/src) +include_directories(${SFML_DEPENDENCIES_PATH}/include) + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DSFML_STATIC) +endif() +add_definitions(-DUNICODE -D_UNICODE) +add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) + +# import SFML's 'sfml_add_library' macro and find_package utils + +set(VERSION_MAJOR 2) +set(SFML_OS_WINDOWS ON) +set(SFML_GENERATE_PDB ON) +include(cmake/macros.cmake) +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/) + +# system module + +file(GLOB SFML_SYSTEM_SOURCES + ${PROJECT_SOURCE_DIR}/src/SFML/System/*.cpp + ${PROJECT_SOURCE_DIR}/src/SFML/System/Win32/*cpp) + +sfml_add_library(sfml-system + SOURCES ${SFML_SYSTEM_SOURCES} + EXTERNAL_LIBS winmm) + +# window module + +file(GLOB SFML_WINDOW_SOURCES + ${PROJECT_SOURCE_DIR}/src/SFML/Window/*.cpp + ${PROJECT_SOURCE_DIR}/src/SFML/Window/Win32/*cpp) + +list(REMOVE_ITEM SFML_WINDOW_SOURCES + ${PROJECT_SOURCE_DIR}/src/SFML/Window/EGLCheck.cpp + ${PROJECT_SOURCE_DIR}/src/SFML/Window/EglContext.cpp) + +sfml_add_library(sfml-window + SOURCES ${SFML_WINDOW_SOURCES} + DEPENDS sfml-system + EXTERNAL_LIBS winmm gdi32 opengl32) + +# network module + +file(GLOB SFML_NETWORK_SOURCES + ${PROJECT_SOURCE_DIR}/src/SFML/Network/*.cpp + ${PROJECT_SOURCE_DIR}/src/SFML/Network/Win32/*cpp) + +sfml_add_library(sfml-network + SOURCES ${SFML_NETWORK_SOURCES} + DEPENDS sfml-system + EXTERNAL_LIBS ws2_32) + +# audio module + +file(GLOB SFML_AUDIO_SOURCES + ${PROJECT_SOURCE_DIR}/src/SFML/Audio/*.cpp) + +find_package(OpenAL REQUIRED) +find_package(Vorbis REQUIRED) +find_package(FLAC REQUIRED) + +sfml_add_library(sfml-audio + SOURCES ${SFML_AUDIO_SOURCES} + DEPENDS sfml-system + EXTERNAL_LIBS ${OPENAL_LIBRARY} ${VORBIS_LIBRARIES} ${FLAC_LIBRARY}) + +target_include_directories(sfml-audio SYSTEM PRIVATE ${OPENAL_INCLUDE_DIR}) +target_include_directories(sfml-audio SYSTEM PRIVATE ${VORBIS_INCLUDE_DIRS}) +target_include_directories(sfml-audio SYSTEM PRIVATE ${FLAC_INCLUDE_DIR}) + +# graphics module + +file(GLOB SFML_GRAPHICS_SOURCES + ${PROJECT_SOURCE_DIR}/src/SFML/Graphics/*.cpp) + +find_package(JPEG REQUIRED) +find_package(Freetype REQUIRED) # fails to find debug lib +if(CMAKE_BUILD_TYPE MATCHES Debug) + find_library(FREETYPE_DEBUG_LIBRARY freetyped) + set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_DEBUG_LIBRARY}) +else() + set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_LIBRARY}) +endif() +find_path(STB_HEADERS stb_image.h) + +sfml_add_library(sfml-graphics + SOURCES ${SFML_GRAPHICS_SOURCES} + DEPENDS sfml-system sfml-window + EXTERNAL_LIBS ${FREETYPE_ACTUAL_LIBRARY} ${JPEG_LIBRARY} opengl32) + +target_include_directories(sfml-graphics SYSTEM PRIVATE ${STB_HEADERS}) +target_include_directories(sfml-graphics SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS}) +target_include_directories(sfml-graphics SYSTEM PRIVATE ${JPEG_INCLUDE_DIR}) +set_target_properties(sfml-graphics PROPERTIES COMPILE_FLAGS -DSTBI_FAILURE_USERMSG) + +# main module + +add_library(sfml-main STATIC ${PROJECT_SOURCE_DIR}/src/SFML/Main/MainWin32.cpp) +set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d) +install(TARGETS sfml-main ARCHIVE DESTINATION lib) + +# headers + +if(NOT DEFINED SFML_SKIP_HEADERS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include) +endif() + +# log linked libraries + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${VORBIS_LIBRARY}) +message(STATUS " " ${VORBISFILE_LIBRARY}) +message(STATUS " " ${VORBISENC_LIBRARY}) +message(STATUS " " ${OGG_LIBRARY}) +message(STATUS " " ${OPENAL_LIBRARY}) +message(STATUS " " ${FLAC_LIBRARY}) +message(STATUS " " ${FREETYPE_ACTUAL_LIBRARY}) +message(STATUS " " ${JPEG_LIBRARY}) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL new file mode 100644 index 000000000..175aaa0ab --- /dev/null +++ b/ports/sfml/CONTROL @@ -0,0 +1,4 @@ +Source: sfml +Version: 2.4.1 +Description: Simple and fast multimedia library +Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake new file mode 100644 index 000000000..916b033ef --- /dev/null +++ b/ports/sfml/portfile.cmake @@ -0,0 +1,34 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SFML-2.4.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.sfml-dev.org/files/SFML-2.4.1-sources.zip" + FILENAME "SFML-2.4.1-sources.zip" + SHA512 e2a49927e1db6ab94fa52b88460782fa2b28ccd4a8c75793e10c7669b24736f63aab723c2e1d8befc96f6f5cf4ed185f13da2550da721d206780003f158e5507) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DSFML_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# don't force users to define SFML_STATIC while using static library +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(APPEND ${CURRENT_PACKAGES_DIR}/include/SFML/Config.hpp "#undef SFML_API_IMPORT\n#define SFML_API_IMPORT\n") +endif() + +# move sfml-main to manual link dir +file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) + +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sfml/license.txt ${CURRENT_PACKAGES_DIR}/share/sfml/copyright) -- cgit v1.2.3 From f8c119d7fe05a1005c0b8ca86d7d62d4bd251e95 Mon Sep 17 00:00:00 2001 From: Guillaume Dumont Date: Wed, 7 Dec 2016 17:22:38 -0500 Subject: Fixed wrong location of gflags license file --- ports/gflags/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 91da22ae6..37fea35c3 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -49,7 +49,7 @@ string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PAT GFLAGS_CONFIG_MODULE "${GFLAGS_CONFIG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/gflags/gflags-targets.cmake "${GFLAGS_CONFIG_MODULE}") -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) file(RENAME ${CURRENT_PACKAGES_DIR}/Include ${CURRENT_PACKAGES_DIR}/include) file(RENAME ${CURRENT_PACKAGES_DIR}/Lib ${CURRENT_PACKAGES_DIR}/lib) -- cgit v1.2.3 From 040555ee81c0a70509e635f060836b7656fc4f36 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 7 Dec 2016 23:33:00 +0100 Subject: [sfml] this shouldn't be here... --- ports/sfml/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt index 1eda7edb2..e8e16edec 100644 --- a/ports/sfml/CMakeLists.txt +++ b/ports/sfml/CMakeLists.txt @@ -3,7 +3,6 @@ project(SFML) include_directories(${PROJECT_SOURCE_DIR}/include) include_directories(${PROJECT_SOURCE_DIR}/src) -include_directories(${SFML_DEPENDENCIES_PATH}/include) if(NOT BUILD_SHARED_LIBS) add_definitions(-DSFML_STATIC) -- cgit v1.2.3 From ade896e4bffe80a38e3f5f9cc588669b9c24e9c0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:18:07 -0800 Subject: [asio] Use SOURCE_PATH --- ports/asio/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake index c966b157e..345ddd673 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/asio-asio-1-10-6/asio/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio) file(RENAME ${CURRENT_PACKAGES_DIR}/share/asio/COPYING ${CURRENT_PACKAGES_DIR}/share/asio/copyright) # Copy the asio header files -- cgit v1.2.3 From e8b46b89d09ce9c5c0775ae29be9925cce8f16a1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:19:16 -0800 Subject: [assimp] Extract variable SOURCE_PATH --- ports/assimp/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 04d19cdd3..452233265 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -7,6 +7,7 @@ # include(vcpkg_common_functions) +SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/assimp/assimp/archive/v3.3.1.zip" FILENAME "assimp-3.3.1.zip" @@ -15,7 +16,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1 + SOURCE_PATH ${SOURCE_PATH} OPTIONS -DASSIMP_BUILD_TESTS=False -DASSIMP_BUILD_ASSIMP_VIEW=False -DASSIMP_BUILD_ZLIB=False @@ -33,7 +34,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From e6ebc0369990c1d670d87bec248ffb04739df334 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:21:30 -0800 Subject: [freeglut] Extract SOURCE_PATH variable --- ports/freeglut/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 67c0b402b..929d8b9e4 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -1,4 +1,5 @@ include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0) vcpkg_download_distfile(ARCHIVE URLS "http://downloads.sourceforge.net/project/freeglut/freeglut/3.0.0/freeglut-3.0.0.tar.gz" FILENAME "freeglut-3.0.0.tar.gz" @@ -15,7 +16,7 @@ else() endif() vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0 + SOURCE_PATH ${SOURCE_PATH} OPTIONS -DFREEGLUT_BUILD_STATIC_LIBS=${FREEGLUT_STATIC} -DFREEGLUT_BUILD_SHARED_LIBS=${FREEGLUT_DYNAMIC} @@ -28,7 +29,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/freeglut-3.0.0/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeglut) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeglut) file(RENAME ${CURRENT_PACKAGES_DIR}/share/freeglut/COPYING ${CURRENT_PACKAGES_DIR}/share/freeglut/copyright) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 7555e6576bff0b588edb40d4b531a92546de2b2f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:23:50 -0800 Subject: [geos] Extract SOURCE_PATH variable --- ports/geos/portfile.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index 60d907acd..7cd50db58 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -7,6 +7,7 @@ # include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5) #downloading 3.5 from their SVN repo and not the release tarball #because the 3.5 release did not build on windows, and fixes were backported #without generating a new release tarball (I don't think very many GIS people use win) @@ -17,12 +18,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -#we need to do this because GOES deploy process is totally broken for cmake +#we need to do this because GEOS deploy process is totally broken for cmake #file(DOWNLOAD http://svn.osgeo.org/geos/tags/3.5.0/cmake/modules/GenerateSourceGroups.cmake -# ${CURRENT_BUILDTREES_DIR}/src/geos-3.5.0/cmake/modules/GenerateSourceGroups.cmake) -file(WRITE ${CURRENT_BUILDTREES_DIR}/src/3.5/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261") +# ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake) +file(WRITE ${SOURCE_PATH}/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261") vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5 + SOURCE_PATH ${SOURCE_PATH} OPTIONS -DGEOS_ENABLE_TESTS=False -DBUILD_TESTING=False ) @@ -31,7 +32,7 @@ vcpkg_build_cmake() vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/3.5/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos) file(RENAME ${CURRENT_PACKAGES_DIR}/share/geos/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeos.lib) -- cgit v1.2.3 From 220a8597c2ee8088ff36309eaf88b51fea21f297 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:25:33 -0800 Subject: [glbinding] Extract SOURCE_PATH variable --- ports/glbinding/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index 6da7d4858..165c8d889 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -7,14 +7,14 @@ # include(vcpkg_common_functions) - +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/cginternals/glbinding/archive/v2.1.1.zip" FILENAME "glbinding-2.1.1.zip" SHA512 66b21853a4f4760b7b22cafd5211958769c513e83be999018fe79cf56a9271e0e28566caaa2286393f54ac2154d564a68d12159598d03c965adf6756f3753f11 ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1) +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) #vcpkg_build_cmake() vcpkg_install_cmake() @@ -54,7 +54,7 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/AUTHORS ) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/glbinding) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/glbinding) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 91a6913493c180d8b051a8c130f9bc542ad93161 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:26:30 -0800 Subject: [globjects] Use SOURCE_PATH variable --- ports/globjects/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake index e46c34509..5ab880ad6 100644 --- a/ports/globjects/portfile.cmake +++ b/ports/globjects/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/globjects-1.0.0) +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) #vcpkg_build_cmake() vcpkg_install_cmake() @@ -55,7 +55,7 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/AUTHORS ) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/globjects-1.0.0/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/globjects) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/globjects) file(RENAME ${CURRENT_PACKAGES_DIR}/share/globjects/LICENSE ${CURRENT_PACKAGES_DIR}/share/globjects/copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From dea170b46970171a104551d2d6512dee1469646b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:35:23 -0800 Subject: [harfbuzz] Use SOURCE_PATH for copying license --- ports/harfbuzz/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index b818e0938..911dea860 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -55,5 +55,5 @@ vcpkg_execute_required_process( ) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.3.4/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz) file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright) -- cgit v1.2.3 From a73feb7c99c62bc97a53e8497c41f1854e524108 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 15:38:17 -0800 Subject: [ragel] Use SOURCE_PATH when copying license --- ports/ragel/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ragel/portfile.cmake b/ports/ragel/portfile.cmake index 8568f6bac..c240fdefd 100644 --- a/ports/ragel/portfile.cmake +++ b/ports/ragel/portfile.cmake @@ -36,5 +36,5 @@ vcpkg_install_cmake() file(WRITE ${CURRENT_PACKAGES_DIR}/include/ragel.txt) # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/ragel-6.9/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel) file(RENAME ${CURRENT_PACKAGES_DIR}/share/ragel/COPYING ${CURRENT_PACKAGES_DIR}/share/ragel/copyright) -- cgit v1.2.3 From 31b713ca1fe74f784f01cdc6ed0cfdaf4a5fcaf7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Dec 2016 21:40:36 -0800 Subject: [vcpkg] Remove all instances of TRIPLET_SYSTEM_NAME; use VCPKG_CMAKE_SYSTEM_NAME instead. --- ports/boost/portfile.cmake | 2 +- ports/sdl2/portfile.cmake | 2 +- scripts/cmake/vcpkg_configure_cmake.cmake | 6 +++--- scripts/ports.cmake | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index f9d70554a..fcf60402b 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -55,7 +55,7 @@ endif() if(TRIPLET_SYSTEM_ARCH MATCHES "x64") list(APPEND B2_OPTIONS address-model=64) endif() -if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore") +if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") list(APPEND B2_OPTIONS windows-api=store) set(ENV{BOOST_BUILD_PATH} ${CMAKE_CURRENT_LIST_DIR}) endif() diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 6fcb94c8b..fd9bbd8d4 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore") +if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj ) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 2c506ad94..179703172 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -4,11 +4,11 @@ function(vcpkg_configure_cmake) if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) - elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x86") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x64") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "arm") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm") set(GENERATOR "Visual Studio 14 2015 ARM") # elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND") # set(GENERATOR "Ninja") diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 762997491..4e28cbb67 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -33,7 +33,6 @@ endif() if(CMD MATCHES "^BUILD$") string(REGEX REPLACE "([^-]*)-([^-]*)" "\\1" TRIPLET_SYSTEM_ARCH ${TARGET_TRIPLET}) - string(REGEX REPLACE "([^-]*)-([^-]*)" "\\2" TRIPLET_SYSTEM_NAME ${TARGET_TRIPLET}) set(CMAKE_TRIPLET_FILE ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake) if(NOT EXISTS ${CMAKE_TRIPLET_FILE}) -- cgit v1.2.3 From 93d83e0a60a6e66f91a1cf9d02a490ca01348958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christophe=20Gu=C3=A9bert?= Date: Wed, 7 Dec 2016 09:04:49 +0100 Subject: Add a patch for curl to find the libssh2 library --- ports/curl/0001_cmake.patch | 13 +++++++++++++ ports/curl/portfile.cmake | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 ports/curl/0001_cmake.patch diff --git a/ports/curl/0001_cmake.patch b/ports/curl/0001_cmake.patch new file mode 100644 index 000000000..db281e122 --- /dev/null +++ b/ports/curl/0001_cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake +index 12a7c61..9839c67 100644 +--- a/CMake/FindLibSSH2.cmake ++++ b/CMake/FindLibSSH2.cmake +@@ -12,7 +12,7 @@ endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY) + FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h + ) + +-FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 ++FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 libssh2 + ) + + if(LIBSSH2_INCLUDE_DIR) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index e2359f73d..01c76718b 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -7,6 +7,12 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch +) + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) SET(CURL_STATICLIB OFF) else() -- cgit v1.2.3 From 2307fa6274326cfaaf49303f728bdededa436a93 Mon Sep 17 00:00:00 2001 From: codeandroid Date: Thu, 8 Dec 2016 17:03:45 +0100 Subject: [boost] unset BOOST_AUTO_LINK_NOMANGLE flag (fixes #397). This was a remnant of a previously enabled system install option which has been disabled in the meantime. --- ports/boost/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index fcf60402b..3c408bca7 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -100,7 +100,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) "\n#define BOOST_ALL_DYN_LINK\n" ) endif() -file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_AUTO_LINK_NOMANGLE\n") file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost RENAME copyright) message(STATUS "Packaging headers done") -- cgit v1.2.3 From c10e7e49606d087e5dacd6f26026e2489ed4ef62 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Dec 2016 14:20:03 -0800 Subject: [curl] Bump version and require libssh2 --- ports/curl/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index bca23865d..e18ea2f67 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,4 @@ Source: curl -Version: 7.51.0-1 -Build-Depends: zlib, openssl +Version: 7.51.0-2 +Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs -- cgit v1.2.3 From 48ca773907beeb4465ecb1a0c8446f738f4eda1e Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 11 Dec 2016 14:04:59 +0100 Subject: [sdl2] enable static build --- ports/sdl2/portfile.cmake | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index fd9bbd8d4..81439567c 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -1,7 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.5) vcpkg_download_distfile(ARCHIVE_FILE @@ -32,10 +28,25 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(RENAME ${CURRENT_PACKAGES_DIR}/include/include ${CURRENT_PACKAGES_DIR}/include/SDL2) else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SDL_STATIC_LIB ON) + set(SDL_SHARED_LIB OFF) + else() + set(SDL_STATIC_LIB OFF) + set(SDL_SHARED_LIB ON) + endif() + if(VCPKG_CRT_LINKAGE STREQUAL static) + set(SDL_STATIC_CRT ON) + else() + set(SDL_STATIC_CRT OFF) + endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DSDL_STATIC=OFF + -DSDL_STATIC=${SDL_STATIC_LIB} + -DSDL_SHARED=${SDL_SHARED_LIB} + -DFORCE_STATIC_VCRT=${SDL_STATIC_CRT} ) vcpkg_install_cmake() @@ -43,5 +54,10 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) endif() +file(COPY ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib) + file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 7b111b87a817455922a0bcc5aa7579e7baeaa2b0 Mon Sep 17 00:00:00 2001 From: gknowles Date: Mon, 12 Dec 2016 12:05:20 -0800 Subject: Add dimcli --- ports/dimcli/CONTROL | 4 ++++ ports/dimcli/portfile.cmake | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ports/dimcli/CONTROL create mode 100644 ports/dimcli/portfile.cmake diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL new file mode 100644 index 000000000..c85457c89 --- /dev/null +++ b/ports/dimcli/CONTROL @@ -0,0 +1,4 @@ +Source: dimcli +Version: 1.0.3 +Description: C++ command line parser toolkit + diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake new file mode 100644 index 000000000..465e1699e --- /dev/null +++ b/ports/dimcli/portfile.cmake @@ -0,0 +1,37 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +set(ver 1.0.3) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dimcli-${ver}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/gknowles/dimcli/archive/v${ver}.zip" + FILENAME "dimcli-${ver}.zip" + SHA512 5168aff22223cb85421fabd4ce82f3ec0bcab6551704484bc5b05be02ead23bd3d4a629c558a15f214e9d999eccc9c129649d066fdacfda3c839a40b48f8ec17 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +set(staticCrt OFF) +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(staticCrt ON) +endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} +) + +vcpkg_install_cmake() + +# Remove includes from ${CMAKE_INSTALL_PREFIX}/debug +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli" + RENAME copyright) + -- cgit v1.2.3 From 1310e9e052de50a8d53bc9b88696f8b6c61bece6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 12 Dec 2016 14:03:13 -0800 Subject: Add SQM User Id to metrics --- toolsrc/include/metrics.h | 1 + toolsrc/src/main.cpp | 1 + toolsrc/src/metrics.cpp | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/toolsrc/include/metrics.h b/toolsrc/include/metrics.h index 52662cd97..a0f4fc61d 100644 --- a/toolsrc/include/metrics.h +++ b/toolsrc/include/metrics.h @@ -13,6 +13,7 @@ namespace vcpkg void TrackProperty(const std::string& name, const std::string& value); void TrackProperty(const std::string& name, const std::wstring& value); bool GetCompiledMetricsEnabled(); + std::wstring GetSQMUser(); void Upload(const std::string& payload); void Flush(); diff --git a/toolsrc/src/main.cpp b/toolsrc/src/main.cpp index f937be7f1..5e9dcf7ff 100644 --- a/toolsrc/src/main.cpp +++ b/toolsrc/src/main.cpp @@ -197,6 +197,7 @@ int wmain(const int argc, const wchar_t* const* const argv) const std::string trimmed_command_line = trim_path_from_command_line(Strings::utf16_to_utf8(GetCommandLineW())); TrackProperty("cmdline", trimmed_command_line); loadConfig(); + TrackProperty("sqmuser", GetSQMUser()); const vcpkg_cmd_arguments args = vcpkg_cmd_arguments::create_from_command_line(argc, argv); diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 23962bcfe..51c7179c8 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -235,6 +235,40 @@ true return DISABLE_METRICS == 0; } + std::wstring GetSQMUser() + { + LONG err = NULL; + + struct RAII_HKEY { + HKEY hkey = NULL; + ~RAII_HKEY() + { + if (hkey != NULL) + RegCloseKey(hkey); + } + } HKCU_SQMClient; + + err = RegOpenKeyExW(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", NULL, KEY_READ, &HKCU_SQMClient.hkey); + if (err != ERROR_SUCCESS) + { + return L"{}"; + } + + std::array buffer; + DWORD lType = 0; + DWORD dwBufferSize = static_cast(buffer.size() * sizeof(wchar_t)); + err = RegQueryValueExW(HKCU_SQMClient.hkey, L"UserId", NULL, &lType, reinterpret_cast(buffer.data()), &dwBufferSize); + if (err == ERROR_SUCCESS && lType == REG_SZ && dwBufferSize >= sizeof(wchar_t)) + { + size_t sz = dwBufferSize / sizeof(wchar_t); + if (buffer[sz - 1] == '\0') + --sz; + return std::wstring(buffer.begin(), buffer.begin() + sz); + } + + return L"{}"; + } + void SetUserInformation(const std::string& user_id, const std::string& first_use_time) { g_metricmessage.user_id = user_id; -- cgit v1.2.3 From d02fe9bdae3553660896d14ef24c2b6dc82bb6db Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 14:58:38 -0800 Subject: Add System::println(std::string) overloads --- toolsrc/include/vcpkg_System.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index e059bde0a..ca81235ed 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -39,6 +39,26 @@ namespace vcpkg {namespace System void print(color c, const char* message); void println(color c, const char* message); + inline void print(const std::string& message) + { + return print(message.c_str()); + } + + inline void println(const std::string& message) + { + return println(message.c_str()); + } + + inline void print(color c, const std::string& message) + { + return print(c, message.c_str()); + } + + inline void println(color c, const std::string& message) + { + return println(c, message.c_str()); + } + template void print(const char* messageTemplate, const Args&... messageArgs) { -- cgit v1.2.3 From b629cd904440c640b7e5b4c3fdf17df5aac90bad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:03:36 -0800 Subject: [vcpkg_cmd_arguments] Use std::string instead of char* --- toolsrc/include/vcpkg_cmd_arguments.h | 6 +++--- toolsrc/src/commands_cache.cpp | 2 +- toolsrc/src/commands_create.cpp | 4 ++-- toolsrc/src/commands_edit.cpp | 2 +- toolsrc/src/commands_hash.cpp | 4 ++-- toolsrc/src/commands_import.cpp | 2 +- toolsrc/src/commands_installation.cpp | 6 +++--- toolsrc/src/commands_integration.cpp | 2 +- toolsrc/src/commands_list.cpp | 2 +- toolsrc/src/commands_owns.cpp | 2 +- toolsrc/src/commands_portsdiff.cpp | 4 ++-- toolsrc/src/commands_remove.cpp | 2 +- toolsrc/src/commands_search.cpp | 2 +- toolsrc/src/vcpkg_cmd_arguments.cpp | 6 +++--- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/toolsrc/include/vcpkg_cmd_arguments.h b/toolsrc/include/vcpkg_cmd_arguments.h index 95feb4814..2194e6d2c 100644 --- a/toolsrc/include/vcpkg_cmd_arguments.h +++ b/toolsrc/include/vcpkg_cmd_arguments.h @@ -24,11 +24,11 @@ namespace vcpkg std::unordered_set check_and_get_optional_command_arguments(const std::vector& valid_options) const; void check_max_arg_count(const size_t expected_arg_count) const; - void check_max_arg_count(const size_t expected_arg_count, const char* example_text) const; + void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const; void check_min_arg_count(const size_t expected_arg_count) const; - void check_min_arg_count(const size_t expected_arg_count, const char* example_text) const; + void check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const; void check_exact_arg_count(const size_t expected_arg_count) const; - void check_exact_arg_count(const size_t expected_arg_count, const char* example_text) const; + void check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const; private: std::unordered_set optional_command_arguments; diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index 19c762caf..f43b054a6 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -38,7 +38,7 @@ namespace vcpkg { static const std::string example = Strings::format( "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", create_example_string("cache png")); - args.check_max_arg_count(1, example.c_str()); + args.check_max_arg_count(1, example); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index d1611eb5c..ad00cd676 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -9,8 +9,8 @@ namespace vcpkg void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###"); - args.check_max_arg_count(3, example.c_str()); - args.check_min_arg_count(2, example.c_str()); + args.check_max_arg_count(3, example); + args.check_min_arg_count(2, example); const std::string port_name = args.command_arguments.at(0); Environment::ensure_utilities_on_path(paths); diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index f07a15875..fbf4eab62 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -7,7 +7,7 @@ namespace vcpkg void edit_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = create_example_string("edit zlib"); - args.check_exact_arg_count(1, example.c_str()); + args.check_exact_arg_count(1, example); const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp index 17c191b78..42d1823fa 100644 --- a/toolsrc/src/commands_hash.cpp +++ b/toolsrc/src/commands_hash.cpp @@ -27,8 +27,8 @@ namespace vcpkg { static const std::string example = Strings::format( "The argument should be a file path\n%s", create_example_string("hash boost_1_62_0.tar.bz2")); - args.check_min_arg_count(1, example.c_str()); - args.check_max_arg_count(2, example.c_str()); + args.check_min_arg_count(1, example); + args.check_max_arg_count(2, example); if (args.command_arguments.size() == 1) { diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp index e5e731799..3832f0e7b 100644 --- a/toolsrc/src/commands_import.cpp +++ b/toolsrc/src/commands_import.cpp @@ -78,7 +78,7 @@ namespace vcpkg void import_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = create_example_string(R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); - args.check_exact_arg_count(3, example.c_str()); + args.check_exact_arg_count(3, example); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]); diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 1abd16796..c376d522f 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -216,7 +216,7 @@ namespace vcpkg void install_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) { static const std::string example = create_example_string("install zlib zlib:x64-windows curl boost"); - args.check_min_arg_count(1, example.c_str()); + args.check_min_arg_count(1, example); StatusParagraphs status_db = database_load_check(paths); std::vector specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example.c_str()); @@ -276,7 +276,7 @@ namespace vcpkg // Installing multiple packages leads to unintuitive behavior if one of them depends on another. // Allowing only 1 package for now. - args.check_exact_arg_count(1, example.c_str()); + args.check_exact_arg_count(1, example); StatusParagraphs status_db = database_load_check(paths); @@ -332,7 +332,7 @@ namespace vcpkg void build_external_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) { static const std::string example = create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); - args.check_exact_arg_count(2, example.c_str()); + args.check_exact_arg_count(2, example); expected maybe_current_spec = package_spec::from_string(args.command_arguments[0], default_target_triplet); if (auto spec = maybe_current_spec.get()) diff --git a/toolsrc/src/commands_integration.cpp b/toolsrc/src/commands_integration.cpp index cd303c649..31f30f216 100644 --- a/toolsrc/src/commands_integration.cpp +++ b/toolsrc/src/commands_integration.cpp @@ -297,7 +297,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { static const std::string example = Strings::format("Commands:\n" "%s", INTEGRATE_COMMAND_HELPSTRING); - args.check_exact_arg_count(1, example.c_str()); + args.check_exact_arg_count(1, example); if (args.command_arguments[0] == "install") { diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index 2d6b42008..cc51232e9 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -17,7 +17,7 @@ namespace vcpkg { static const std::string example = Strings::format( "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", create_example_string("list png")); - args.check_max_arg_count(1, example.c_str()); + args.check_max_arg_count(1, example); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages; diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/commands_owns.cpp index 45f073304..62dac57eb 100644 --- a/toolsrc/src/commands_owns.cpp +++ b/toolsrc/src/commands_owns.cpp @@ -24,7 +24,7 @@ namespace vcpkg void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = Strings::format("The argument should be a pattern to search for. %s", create_example_string("owns zlib.dll")); - args.check_exact_arg_count(1, example.c_str()); + args.check_exact_arg_count(1, example); StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index b6b604e54..46c6c90c7 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -100,8 +100,8 @@ namespace vcpkg void portsdiff_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", create_example_string("portsdiff mybranchname")); - args.check_min_arg_count(1, example.c_str()); - args.check_max_arg_count(2, example.c_str()); + args.check_min_arg_count(1, example); + args.check_max_arg_count(2, example); Environment::ensure_git_on_path(paths); const std::wstring git_commit_id_for_previous_snapshot = Strings::utf8_to_utf16(args.command_arguments.at(0)); diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 31331fc2f..9d3352532 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -169,7 +169,7 @@ namespace vcpkg void remove_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) { static const std::string example = create_example_string("remove zlib zlib:x64-windows curl boost"); - args.check_min_arg_count(1, example.c_str()); + args.check_min_arg_count(1, example); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_PURGE}); auto status_db = database_load_check(paths); diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index a604c5383..a4714477e 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -43,7 +43,7 @@ namespace vcpkg void search_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = Strings::format("The argument should be a substring to search for, or no argument to display all libraries.\n%s", create_example_string("search png")); - args.check_max_arg_count(1, example.c_str()); + args.check_max_arg_count(1, example); const std::vector source_paragraphs = read_all_source_paragraphs(paths); diff --git a/toolsrc/src/vcpkg_cmd_arguments.cpp b/toolsrc/src/vcpkg_cmd_arguments.cpp index d61e420ab..2cc1f811c 100644 --- a/toolsrc/src/vcpkg_cmd_arguments.cpp +++ b/toolsrc/src/vcpkg_cmd_arguments.cpp @@ -179,7 +179,7 @@ namespace vcpkg return check_exact_arg_count(expected_arg_count, ""); } - void vcpkg_cmd_arguments::check_max_arg_count(const size_t expected_arg_count, const char* example_text) const + void vcpkg_cmd_arguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const { const size_t actual_arg_count = command_arguments.size(); if (actual_arg_count > expected_arg_count) @@ -190,7 +190,7 @@ namespace vcpkg } } - void vcpkg_cmd_arguments::check_min_arg_count(const size_t expected_arg_count, const char* example_text) const + void vcpkg_cmd_arguments::check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const { const size_t actual_arg_count = command_arguments.size(); if (actual_arg_count < expected_arg_count) @@ -201,7 +201,7 @@ namespace vcpkg } } - void vcpkg_cmd_arguments::check_exact_arg_count(const size_t expected_arg_count, const char* example_text) const + void vcpkg_cmd_arguments::check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const { const size_t actual_arg_count = command_arguments.size(); if (actual_arg_count != expected_arg_count) -- cgit v1.2.3 From 852acbc2638c21d9639258417b8cd9fceed722c2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:05:49 -0800 Subject: [vcpkg_Input] Use std::string instead of char* --- toolsrc/include/vcpkg_Input.h | 4 ++-- toolsrc/src/commands_installation.cpp | 4 ++-- toolsrc/src/commands_remove.cpp | 2 +- toolsrc/src/vcpkg_Input.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/toolsrc/include/vcpkg_Input.h b/toolsrc/include/vcpkg_Input.h index bbf3adfbf..5ce90e3b9 100644 --- a/toolsrc/include/vcpkg_Input.h +++ b/toolsrc/include/vcpkg_Input.h @@ -5,9 +5,9 @@ namespace vcpkg {namespace Input { - package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const char* example_text); + package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const std::string& example_text); - std::vector check_and_get_package_specs(const std::vector& package_specs_as_strings, const triplet& default_target_triplet, const char* example_text); + std::vector check_and_get_package_specs(const std::vector& package_specs_as_strings, const triplet& default_target_triplet, const std::string& example_text); void check_triplet(const triplet& t, const vcpkg_paths& paths); diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index c376d522f..c7bac3fc1 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -219,7 +219,7 @@ namespace vcpkg args.check_min_arg_count(1, example); StatusParagraphs status_db = database_load_check(paths); - std::vector specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example.c_str()); + std::vector specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example); Input::check_triplets(specs, paths); std::vector install_plan = Dependencies::create_install_plan(paths, specs, status_db); Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty"); @@ -280,7 +280,7 @@ namespace vcpkg StatusParagraphs status_db = database_load_check(paths); - const package_spec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_target_triplet, example.c_str()); + const package_spec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_target_triplet, example); Input::check_triplet(spec.target_triplet(), paths); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 9d3352532..445213fc2 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -174,7 +174,7 @@ namespace vcpkg const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_PURGE}); auto status_db = database_load_check(paths); - std::vector specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example.c_str()); + std::vector specs = Input::check_and_get_package_specs(args.command_arguments, default_target_triplet, example); Input::check_triplets(specs, paths); bool alsoRemoveFolderFromPackages = options.find(OPTION_PURGE) != options.end(); diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index f7aae1929..29d487fdb 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -5,7 +5,7 @@ namespace vcpkg {namespace Input { - package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const char* example_text) + package_spec check_and_get_package_spec(const std::string& package_spec_as_string, const triplet& default_target_triplet, const std::string& example_text) { const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); expected expected_spec = package_spec::from_string(as_lowercase, default_target_triplet); @@ -20,7 +20,7 @@ namespace vcpkg {namespace Input exit(EXIT_FAILURE); } - std::vector check_and_get_package_specs(const std::vector& package_specs_as_strings, const triplet& default_target_triplet, const char* example_text) + std::vector check_and_get_package_specs(const std::vector& package_specs_as_strings, const triplet& default_target_triplet, const std::string& example_text) { std::vector specs; for (const std::string& spec : package_specs_as_strings) -- cgit v1.2.3 From c77be8f221dbbb7b38c74ce382be9b4dbb4d296b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:08:26 -0800 Subject: [vcpkg_System] Add missing const keywords --- toolsrc/include/vcpkg_System.h | 12 ++++++------ toolsrc/src/vcpkg_System.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index ca81235ed..1101c9b27 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -36,8 +36,8 @@ namespace vcpkg {namespace System void print(const char* message); void println(const char* message); - void print(color c, const char* message); - void println(color c, const char* message); + void print(const color c, const char* message); + void println(const color c, const char* message); inline void print(const std::string& message) { @@ -49,12 +49,12 @@ namespace vcpkg {namespace System return println(message.c_str()); } - inline void print(color c, const std::string& message) + inline void print(const color c, const std::string& message) { return print(c, message.c_str()); } - inline void println(color c, const std::string& message) + inline void println(const color c, const std::string& message) { return println(c, message.c_str()); } @@ -66,7 +66,7 @@ namespace vcpkg {namespace System } template - void print(color c, const char* messageTemplate, const Args&... messageArgs) + void print(const color c, const char* messageTemplate, const Args&... messageArgs) { return print(c, Strings::format(messageTemplate, messageArgs...).c_str()); } @@ -78,7 +78,7 @@ namespace vcpkg {namespace System } template - void println(color c, const char* messageTemplate, const Args&... messageArgs) + void println(const color c, const char* messageTemplate, const Args&... messageArgs) { return println(c, Strings::format(messageTemplate, messageArgs...).c_str()); } diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index cb3eb6584..43eae3412 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -56,7 +56,7 @@ namespace vcpkg {namespace System std::cout << "\n"; } - void print(color c, const char* message) + void print(const color c, const char* message) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); @@ -69,7 +69,7 @@ namespace vcpkg {namespace System SetConsoleTextAttribute(hConsole, original_color); } - void println(color c, const char* message) + void println(const color c, const char* message) { print(c, message); std::cout << "\n"; -- cgit v1.2.3 From 9796e2532cc34896e38a6c0702e538454ffb5586 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:10:29 -0800 Subject: Use System::println(std::string&) overload --- toolsrc/src/commands_cache.cpp | 4 ++-- toolsrc/src/commands_hash.cpp | 2 +- toolsrc/src/commands_other.cpp | 2 +- toolsrc/src/vcpkg_cmd_arguments.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index f43b054a6..17b04b093 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -52,7 +52,7 @@ namespace vcpkg for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { const std::string displayname = binary_paragraph.displayname(); - System::println(displayname.c_str()); + System::println(displayname); } } else @@ -66,7 +66,7 @@ namespace vcpkg continue; } - System::println(displayname.c_str()); + System::println(displayname); } } diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp index 42d1823fa..0e3e8a77c 100644 --- a/toolsrc/src/commands_hash.cpp +++ b/toolsrc/src/commands_hash.cpp @@ -20,7 +20,7 @@ namespace vcpkg auto hash = output.substr(start, end - start); hash.erase(std::remove_if(hash.begin(), hash.end(), isspace), hash.end()); - System::println(hash.c_str()); + System::println(hash); } void hash_command(const vcpkg_cmd_arguments& args) diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index bb1768048..16b697952 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -50,7 +50,7 @@ namespace vcpkg void print_example(const char* command_and_arguments) { - System::println(create_example_string(command_and_arguments).c_str()); + System::println(create_example_string(command_and_arguments)); } void internal_test_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& /*paths*/) diff --git a/toolsrc/src/vcpkg_cmd_arguments.cpp b/toolsrc/src/vcpkg_cmd_arguments.cpp index 2cc1f811c..a3648668f 100644 --- a/toolsrc/src/vcpkg_cmd_arguments.cpp +++ b/toolsrc/src/vcpkg_cmd_arguments.cpp @@ -156,7 +156,7 @@ namespace vcpkg System::println(System::color::error, "Unknown option(s) for command '%s':", this->command); for (const std::string& option : options_copy) { - System::println(option.c_str()); + System::println(option); } exit(EXIT_FAILURE); } -- cgit v1.2.3 From e523668cce29745d8024dd5d56ee1d705da24a49 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:13:24 -0800 Subject: Change signature to std::string& (from char*) --- toolsrc/include/vcpkg_Commands.h | 4 ++-- toolsrc/src/commands_installation.cpp | 2 +- toolsrc/src/commands_other.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 8272929a7..fd427fd40 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -8,8 +8,8 @@ namespace vcpkg extern const char*const INTEGRATE_COMMAND_HELPSTRING; void print_usage(); - void print_example(const char* command_and_arguments); - std::string create_example_string(const char* command_and_arguments); + void print_example(const std::string& command_and_arguments); + std::string create_example_string(const std::string& command_and_arguments); void update_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); void build_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet); diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index c7bac3fc1..fd318d2e7 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -349,7 +349,7 @@ namespace vcpkg } System::println(System::color::error, "Error: %s: %s", maybe_current_spec.error_code().message(), args.command_arguments[0]); - print_example(Strings::format("%s zlib:x64-windows", args.command).c_str()); + print_example(Strings::format("%s zlib:x64-windows", args.command)); exit(EXIT_FAILURE); } } diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 16b697952..6df325100 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -41,14 +41,14 @@ namespace vcpkg , INTEGRATE_COMMAND_HELPSTRING); } - std::string create_example_string(const char* command_and_arguments) + std::string create_example_string(const std::string& command_and_arguments) { std::string cs = Strings::format("Example:\n" " vcpkg %s", command_and_arguments); return cs; } - void print_example(const char* command_and_arguments) + void print_example(const std::string& command_and_arguments) { System::println(create_example_string(command_and_arguments)); } -- cgit v1.2.3 From dd8cbba38b9b2c6443dcd35bd1cd070a26ba7990 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 18:13:32 -0800 Subject: Update CHANGELOG and bump version to v0.0.65 --- CHANGELOG.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4e056cdc..464d5c3e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,48 @@ +vcpkg (0.0.65) +-------------- + * Add ports: + - anax 2.1.0-1 + - aws-sdk-cpp 1.0.34-1 + - azure-storage-cpp 2.5.0 + - charls 2.0.0 + - dimcli 1.0.3 + - entityx 1.2.0 + - freeimage 3.17.0 + - gdal 1.11.3 + - globjects 1.0.0 + - http-parser 2.7.1 + - icu 58.1 + - libflac 1.3.1-1 + - libssh2 1.8.0 + - nana 1.4.1 + - qca 2.2.0 + - sfml 2.4.1 + - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 + - uwebsockets 0.12.0 + - yaml-cpp 0.5.4 candidate + * Update ports: + - boost 1.62-6 -> 1.62-8 + - curl 7.51.0-1 -> 7.51.0-2 + - gflags 2.1.2 -> 2.2.0-2 + - glbinding 2.1.1 -> 2.1.1-1 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3 -> 1c573fbcfba6b3d631008b1babc838501ca925d3-1 + - harfbuzz 1.3.2 -> 1.3.4 + - jxrlib 1.1-1 -> 1.1-2 + - libraw 0.17.2 -> 0.17.2-2 + - lua 5.3.3 -> 5.3.3-1 + - openssl 1.0.2j -> 1.0.2j-1 + * Improvements in the post-build checks: + - Add check for files in the `\` dir and `\debug\` dir + * Introduce pre-install checks: + - The `install` command now checks that files will not be overwrriten when installing a package. A particular file can only be owned by a single package + * Introduce 'lib\manul-link\' directory. Libraries placing the lib files in that directory are not automatically added to the link line + * Disable all interactions with CMake registry + * `vcpkg /?` is now a valid equivalent of `vcpkg help` + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 12 Dec 2016 18:15:00 -0800 + + vcpkg (0.0.61) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 7d83b8c7b..1c65f15d9 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.61" \ No newline at end of file +"0.0.65" \ No newline at end of file -- cgit v1.2.3 From c9b310c16528c907ab12bcc5ec9a0f5795ebf29f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 13 Dec 2016 16:35:06 -0800 Subject: Minor code clarity change --- toolsrc/src/commands_installation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index fd318d2e7..35c29b6a8 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -161,7 +161,9 @@ namespace vcpkg const size_t package_remove_char_count = package_dir.generic_string().size() + 1; // +1 for the slash std::transform(package_file_paths.cbegin(), package_file_paths.cend(), std::back_inserter(package_files), [package_remove_char_count](const fs::path& path) { - return path.generic_string().erase(0, package_remove_char_count); + std::string as_string = path.generic_string(); + as_string.erase(0, package_remove_char_count); + return std::move(as_string); }); std::sort(package_files.begin(), package_files.end()); -- cgit v1.2.3 From b1681d0838fdc3a3bd361e5678d23d2376a3edbd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 13 Dec 2016 19:02:02 -0800 Subject: Avoid copying struct --- toolsrc/src/vcpkg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 88b05b0a9..74b02e612 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -161,8 +161,8 @@ std::vector vcpkg::get_installed_files(con }), installed_files_of_current_pgh.end()); - const StatusParagraph_and_associated_files pgh_and_files = {*pgh, std::move(installed_files_of_current_pgh)}; - installed_files.push_back(pgh_and_files); + StatusParagraph_and_associated_files pgh_and_files = {*pgh, std::move(installed_files_of_current_pgh)}; + installed_files.push_back(std::move(pgh_and_files)); } return installed_files; -- cgit v1.2.3 From 6507a1ea321effda7c0c2ffc8cdc4982bac1b5d5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 14 Dec 2016 12:25:34 -0800 Subject: [boost] Bump version --- ports/boost/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index ab7f87cc1..9e2afdf8a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.62-8 +Version: 1.62-9 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib -- cgit v1.2.3 From 5d54e079f7096251208d9b745cf865327110f849 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 14 Dec 2016 16:51:05 -0800 Subject: Refactor writing of listfile --- toolsrc/src/commands_installation.cpp | 36 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 35c29b6a8..e61a2dbfe 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -69,16 +69,16 @@ namespace vcpkg static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryParagraph& bpgh) { - std::fstream listfile(paths.listfile_path(bpgh), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); + std::vector output; - auto package_prefix_path = paths.package_dir(bpgh.spec); - auto prefix_length = package_prefix_path.native().size(); + const fs::path package_prefix_path = paths.package_dir(bpgh.spec); + const size_t prefix_length = package_prefix_path.native().size(); const triplet& target_triplet = bpgh.spec.target_triplet(); const std::string& target_triplet_as_string = target_triplet.canonical_name(); std::error_code ec; fs::create_directory(paths.installed / target_triplet_as_string, ec); - listfile << target_triplet << "\n"; + output.push_back(Strings::format(R"(%s)", target_triplet_as_string)); for (auto it = fs::recursive_directory_iterator(package_prefix_path); it != fs::recursive_directory_iterator(); ++it) { @@ -89,8 +89,8 @@ namespace vcpkg continue; } - auto suffix = it->path().generic_u8string().substr(prefix_length + 1); - auto target = paths.installed / target_triplet_as_string / suffix; + const std::string suffix = it->path().generic_u8string().substr(prefix_length + 1); + const fs::path target = paths.installed / target_triplet_as_string / suffix; auto status = it->status(ec); if (ec) @@ -98,6 +98,7 @@ namespace vcpkg System::println(System::color::error, "failed: %s: %s", it->path().u8string(), ec.message()); continue; } + if (fs::is_directory(status)) { fs::create_directory(target, ec); @@ -106,25 +107,36 @@ namespace vcpkg System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message()); } - listfile << target_triplet << "/" << suffix << "\n"; + // Trailing backslash for directories + output.push_back(Strings::format(R"(%s/%s)", target_triplet_as_string, suffix)); + continue; } - else if (fs::is_regular_file(status)) + + if (fs::is_regular_file(status)) { fs::copy_file(*it, target, ec); if (ec) { System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message()); } - listfile << target_triplet << "/" << suffix << "\n"; + output.push_back(Strings::format(R"(%s/%s)", target_triplet_as_string, suffix)); + continue; } - else if (!fs::status_known(status)) + + if (!fs::status_known(status)) { System::println(System::color::error, "failed: %s: unknown status", it->path().u8string()); + continue; } - else - System::println(System::color::error, "failed: %s: cannot handle file type", it->path().u8string()); + + System::println(System::color::error, "failed: %s: cannot handle file type", it->path().u8string()); } + std::fstream listfile(paths.listfile_path(bpgh), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); + for (const std::string& line : output) + { + listfile << line << "\n"; + } listfile.close(); } -- cgit v1.2.3 From 786d591cc363dcbba1e47bd148f31eba2197bba9 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 15 Dec 2016 21:11:27 +0100 Subject: [fastlz] specify correct source path --- ports/fastlz/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/fastlz/portfile.cmake b/ports/fastlz/portfile.cmake index 5b28df291..c9198f0f2 100644 --- a/ports/fastlz/portfile.cmake +++ b/ports/fastlz/portfile.cmake @@ -1,7 +1,8 @@ +set(FASTLZ_HASH f1217348a868bdb9ee0730244475aee05ab329c5) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FastLZ-master) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FastLZ-${FASTLZ_HASH}) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ariya/FastLZ/archive/f1217348a868bdb9ee0730244475aee05ab329c5.zip" + URLS "https://github.com/ariya/FastLZ/archive/${FASTLZ_HASH}.zip" FILENAME "fastlz.zip" SHA512 edfefbf4151e7ea6451a6fbb6d464a2a0f48ab50622f936634ec3ea4542ad3e1f075892a422e0fc5a23f2092be4ec890e6f91c4622bcd0d195fed84d4044d5df ) -- cgit v1.2.3 From 43262d24daa44a418c77bff87ee537a47344bb77 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 15 Dec 2016 13:30:48 -0800 Subject: [fastlz] Name downloaded archive to avoid conflicts with future versions --- ports/fastlz/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/fastlz/portfile.cmake b/ports/fastlz/portfile.cmake index c9198f0f2..16a727246 100644 --- a/ports/fastlz/portfile.cmake +++ b/ports/fastlz/portfile.cmake @@ -3,7 +3,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FastLZ-${FASTLZ_HASH}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/ariya/FastLZ/archive/${FASTLZ_HASH}.zip" - FILENAME "fastlz.zip" + FILENAME "fastlz-${FASTLZ_HASH}.zip" SHA512 edfefbf4151e7ea6451a6fbb6d464a2a0f48ab50622f936634ec3ea4542ad3e1f075892a422e0fc5a23f2092be4ec890e6f91c4622bcd0d195fed84d4044d5df ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 88daca5f547d00d58637a501c10c57e823771a02 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 15 Dec 2016 14:28:43 -0800 Subject: [listfile] When reading a listfile, add / at the end of directories --- toolsrc/src/vcpkg.cpp | 98 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 14 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 74b02e612..6f1d30bc5 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -10,6 +10,7 @@ #include "vcpkg_Files.h" #include "Paragraphs.h" #include +#include "metrics.h" using namespace vcpkg; @@ -109,6 +110,82 @@ void vcpkg::write_update(const vcpkg_paths& paths, const StatusParagraph& p) fs::rename(tmp_update_filename, update_filename); } +static void upgrade_to_slash_terminated_sorted_format(std::vector* lines, const fs::path& listfile_path) +{ + static bool was_tracked = false; + + if (lines->empty()) + { + return; + } + + if (lines->at(0).back() == '/') + { + return; // File already in the new format + } + + if (!was_tracked) + { + was_tracked = true; + TrackProperty("listfile", "update to new format"); + } + + // The files are sorted such that directories are placed just before the files they contain + // (They are not necessarily sorted alphabetically, e.g. libflac) + // Therefore we can detect the entries that represent directories by comparing every element with the next one + // and checking if the next has a slash immediately after the current one's length + for (int i = 0; i < lines->size() - 1; i++) + { + std::string& current_string = lines->at(i); + const std::string& next_string = lines->at(i + 1); + + const size_t potential_slash_char_index = current_string.length(); + // Make sure the index exists first + if (next_string.size() > potential_slash_char_index && next_string.at(potential_slash_char_index) == '/') + { + current_string += '/'; // Mark as a directory + } + } + + // After suffixing the directories with a slash, we can now sort. + // We cannot sort before adding the suffixes because the following (actual example): + /* + x86-windows/include/FLAC <<<<<< This would be separated from its group due to sorting + x86-windows/include/FLAC/all.h + x86-windows/include/FLAC/assert.h + x86-windows/include/FLAC/callback.h + x86-windows/include/FLAC++ + x86-windows/include/FLAC++/all.h + x86-windows/include/FLAC++/decoder.h + x86-windows/include/FLAC++/encoder.h + * + x86-windows/include/FLAC/ <<<<<< This will now be kept with its group when sorting + x86-windows/include/FLAC/all.h + x86-windows/include/FLAC/assert.h + x86-windows/include/FLAC/callback.h + x86-windows/include/FLAC++/ + x86-windows/include/FLAC++/all.h + x86-windows/include/FLAC++/decoder.h + x86-windows/include/FLAC++/encoder.h + */ + // Note that after sorting, the FLAC++/ group will be placed before the FLAC/ group + // The new format is lexicographically sorted + std::sort(lines->begin(), lines->end()); + +#if 0 + // Replace the listfile on disk + const fs::path updated_listfile_path = listfile_path.generic_string() + "_updated"; + std::fstream output(updated_listfile_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); + for (const std::string& line : *lines) + { + output << line << "\n"; + } + output.close(); + + fs::rename(updated_listfile_path, listfile_path); +#endif +} + std::vector vcpkg::get_installed_files(const vcpkg_paths& paths, const StatusParagraphs& status_db) { static const std::string MARK_FOR_REMOVAL = ""; @@ -124,7 +201,8 @@ std::vector vcpkg::get_installed_files(con continue; } - std::fstream listfile(paths.listfile_path(pgh->package)); + const fs::path listfile_path = paths.listfile_path(pgh->package); + std::fstream listfile(listfile_path); std::vector installed_files_of_current_pgh; while (std::getline(listfile, line)) @@ -136,22 +214,14 @@ std::vector vcpkg::get_installed_files(con installed_files_of_current_pgh.push_back(line); } + listfile.close(); + upgrade_to_slash_terminated_sorted_format(&installed_files_of_current_pgh, listfile_path); - // Should already be sorted - std::sort(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end()); - - // Since the files are sorted, we can detect the entries that represent directories - // by comparing every element with the next one and checking if the next has a slash immediately after the current one's length - for (int i = 1; i < installed_files_of_current_pgh.size(); i++) + for (std::string& file : installed_files_of_current_pgh) { - std::string& current_string = installed_files_of_current_pgh.at(i - 1); - const std::string& next_string = installed_files_of_current_pgh.at(i); - - const size_t potential_slash_char_index = current_string.length(); - // Make sure the index exists first - if (next_string.size() > potential_slash_char_index && next_string.at(potential_slash_char_index) == '/') + if (file.back() == '/') { - current_string = MARK_FOR_REMOVAL; + file = MARK_FOR_REMOVAL; } } -- cgit v1.2.3 From 8f397bb8d1bd05a2e1f6d5de808322364100ae5d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 15 Dec 2016 17:09:14 -0800 Subject: Add Strings::trim() function --- toolsrc/include/vcpkg_Strings.h | 4 ++++ toolsrc/src/vcpkg_Strings.cpp | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 859da5658..92c24298c 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -69,4 +69,8 @@ namespace vcpkg {namespace Strings std::string ascii_to_lowercase(const std::string& input); std::string join(const std::vector& v, const std::string& delimiter); + + void trim(std::string* s); + + std::string trimmed(const std::string& s); }} diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 19ba8595f..4859a480b 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -4,9 +4,16 @@ #include #include #include +#include +#include namespace vcpkg {namespace Strings {namespace details { + static const auto isspace = [](const char c) + { + return std::isspace(c); + }; + std::string format_internal(const char* fmtstr, ...) { va_list lst; @@ -85,4 +92,17 @@ namespace vcpkg {namespace Strings return output; } + + void trim(std::string* s) + { + s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); + s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); + } + + std::string trimmed(const std::string& s) + { + auto whitespace_front = std::find_if_not(s.begin(), s.end(), details::isspace); + auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); + return (whitespace_back <= whitespace_front ? std::string() : std::string(whitespace_front, whitespace_back)); + } }} -- cgit v1.2.3 From e4548a8cf46b20b8e89ab75ee9201e3b244484ba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 15 Dec 2016 18:19:22 -0800 Subject: Add Files::read_all_lines() and Files::write_all_lines() --- toolsrc/include/vcpkg_Files.h | 4 ++++ toolsrc/src/vcpkg_Files.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h index 8b320303d..5e788f7be 100644 --- a/toolsrc/include/vcpkg_Files.h +++ b/toolsrc/include/vcpkg_Files.h @@ -14,6 +14,10 @@ namespace vcpkg {namespace Files expected get_contents(const fs::path& file_path) noexcept; + expected> read_all_lines(const fs::path& file_path); + + void write_all_lines(const fs::path& file_path, const std::vector& lines); + fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename); template diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 698579736..889ceb055 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -42,6 +42,35 @@ namespace vcpkg {namespace Files return std::move(output); } + expected> read_all_lines(const fs::path& file_path) + { + std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); + if (file_stream.fail()) + { + return std::errc::no_such_file_or_directory; + } + + std::vector output; + std::string line; + while (std::getline(file_stream, line)) + { + output.push_back(line); + } + file_stream.close(); + + return std::move(output); + } + + void write_all_lines(const fs::path& file_path, const std::vector& lines) + { + std::fstream output(file_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); + for (const std::string& line : lines) + { + output << line << "\n"; + } + output.close(); + } + fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) { fs::path current_dir = starting_dir; -- cgit v1.2.3 From 15ca6919ad7d5dd86596603663845b3ea84d0d3b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 15 Dec 2016 18:24:06 -0800 Subject: Use Files::write_all_lines() --- toolsrc/src/commands_installation.cpp | 7 +------ toolsrc/src/vcpkg.cpp | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index e61a2dbfe..605343dfc 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -132,12 +132,7 @@ namespace vcpkg System::println(System::color::error, "failed: %s: cannot handle file type", it->path().u8string()); } - std::fstream listfile(paths.listfile_path(bpgh), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); - for (const std::string& line : output) - { - listfile << line << "\n"; - } - listfile.close(); + Files::write_all_lines(paths.listfile_path(bpgh), output); } static void remove_first_n_chars(std::vector* strings, const size_t n) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 6f1d30bc5..98c53f9ef 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -175,13 +175,7 @@ static void upgrade_to_slash_terminated_sorted_format(std::vector* #if 0 // Replace the listfile on disk const fs::path updated_listfile_path = listfile_path.generic_string() + "_updated"; - std::fstream output(updated_listfile_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); - for (const std::string& line : *lines) - { - output << line << "\n"; - } - output.close(); - + Files::write_all_lines(updated_listfile_path, *lines); fs::rename(updated_listfile_path, listfile_path); #endif } -- cgit v1.2.3 From 38859d5c91c6411fb2b0757a68fd3ca297927650 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 15 Dec 2016 18:41:01 -0800 Subject: Improve code that filters out the directories from a vector of paths --- toolsrc/src/vcpkg.cpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 98c53f9ef..8d01cb267 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -182,8 +182,6 @@ static void upgrade_to_slash_terminated_sorted_format(std::vector* std::vector vcpkg::get_installed_files(const vcpkg_paths& paths, const StatusParagraphs& status_db) { - static const std::string MARK_FOR_REMOVAL = ""; - std::vector installed_files; std::string line; @@ -211,19 +209,13 @@ std::vector vcpkg::get_installed_files(con listfile.close(); upgrade_to_slash_terminated_sorted_format(&installed_files_of_current_pgh, listfile_path); - for (std::string& file : installed_files_of_current_pgh) - { - if (file.back() == '/') - { - file = MARK_FOR_REMOVAL; - } - } - - installed_files_of_current_pgh.erase(std::remove_if(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end(), [](const std::string& file) - { - return file == MARK_FOR_REMOVAL; - }), - installed_files_of_current_pgh.end()); + // Remove the directories + installed_files_of_current_pgh.erase( + std::remove_if(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end(), [](const std::string& file) -> bool + { + return file.back() == '/'; + } + ), installed_files_of_current_pgh.end()); StatusParagraph_and_associated_files pgh_and_files = {*pgh, std::move(installed_files_of_current_pgh)}; installed_files.push_back(std::move(pgh_and_files)); -- cgit v1.2.3 From bd50778cb53d7071d65159f0aa67e685a6628e19 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 15:42:15 -0800 Subject: [install_command] now overwrites files if they are already present The listfile checks ensures that no other package claims ownership of the particular file --- toolsrc/src/commands_installation.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 605343dfc..8d940bc9d 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -114,7 +114,11 @@ namespace vcpkg if (fs::is_regular_file(status)) { - fs::copy_file(*it, target, ec); + if (fs::exists(target)) + { + System::println(System::color::warning, "File %s was already present and will be overwritten", target.u8string(), ec.message()); + } + fs::copy_file(*it, target, fs::copy_options::overwrite_existing, ec); if (ec) { System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message()); -- cgit v1.2.3 From a5c3fddfe7bc4f765a0efdd9b109709f2fb4ae9c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 16:02:19 -0800 Subject: Add Strings::trim_all_and_remove_whitespace_strings() --- toolsrc/include/vcpkg_Strings.h | 2 ++ toolsrc/src/vcpkg_Strings.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 92c24298c..a117a1a81 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -73,4 +73,6 @@ namespace vcpkg {namespace Strings void trim(std::string* s); std::string trimmed(const std::string& s); + + void trim_all_and_remove_whitespace_strings(std::vector* strings); }} diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 4859a480b..403900dae 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -9,6 +9,7 @@ namespace vcpkg {namespace Strings {namespace details { + // To disambiguate between two overloads static const auto isspace = [](const char c) { return std::isspace(c); @@ -105,4 +106,13 @@ namespace vcpkg {namespace Strings auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); return (whitespace_back <= whitespace_front ? std::string() : std::string(whitespace_front, whitespace_back)); } + + void trim_all_and_remove_whitespace_strings(std::vector* strings) + { + strings->erase(std::remove_if(strings->begin(), strings->end(), [](std::string& s)-> bool + { + trim(&s); + return s == ""; + }), strings->end()); + } }} -- cgit v1.2.3 From 843e390c94cae55fdd4d411fc5c96f399af0f6f0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 16:20:27 -0800 Subject: Replace reading lines and ignoring empty lines with the new functions Namely: Files::read_all_lines(); Strings::trim_all_and_remove_whitespace_strings() --- toolsrc/src/vcpkg.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 8d01cb267..bf9dbd6ab 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -184,8 +184,6 @@ std::vector vcpkg::get_installed_files(con { std::vector installed_files; - std::string line; - for (const std::unique_ptr& pgh : status_db) { if (pgh->state != install_state_t::installed) @@ -194,19 +192,8 @@ std::vector vcpkg::get_installed_files(con } const fs::path listfile_path = paths.listfile_path(pgh->package); - std::fstream listfile(listfile_path); - - std::vector installed_files_of_current_pgh; - while (std::getline(listfile, line)) - { - if (line.empty()) - { - continue; - } - - installed_files_of_current_pgh.push_back(line); - } - listfile.close(); + std::vector installed_files_of_current_pgh = Files::read_all_lines(listfile_path).get_or_throw(); + Strings::trim_all_and_remove_whitespace_strings(&installed_files_of_current_pgh); upgrade_to_slash_terminated_sorted_format(&installed_files_of_current_pgh, listfile_path); // Remove the directories -- cgit v1.2.3 From e4571e75c2e572ef6a9f094bdd00326f8711e195 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 17:48:37 -0800 Subject: Do the trim and empty string erase in separate passes --- toolsrc/src/vcpkg_Strings.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 403900dae..d2e153ede 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -109,9 +109,13 @@ namespace vcpkg {namespace Strings void trim_all_and_remove_whitespace_strings(std::vector* strings) { - strings->erase(std::remove_if(strings->begin(), strings->end(), [](std::string& s)-> bool + for (std::string& s : *strings) + { + trim(&s); + } + + strings->erase(std::remove_if(strings->begin(), strings->end(), [](const std::string& s)-> bool { - trim(&s); return s == ""; }), strings->end()); } -- cgit v1.2.3 From fdec39f452df368a0dd9184cd556607857605832 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 19:37:11 -0800 Subject: Use check_exit() instead of check_throw() --- toolsrc/src/vcpkg_Files.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 889ceb055..853a57d16 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -9,7 +9,7 @@ namespace vcpkg {namespace Files void check_is_directory(const fs::path& dirpath) { - Checks::check_throw(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string()); + Checks::check_exit(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string()); } bool has_invalid_chars_for_filesystem(const std::string s) -- cgit v1.2.3 From b666e90c32e58a673331b303e64e299cc1168aa2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 19:38:02 -0800 Subject: Pass by ref --- toolsrc/include/vcpkg_Files.h | 2 +- toolsrc/src/vcpkg_Files.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h index 5e788f7be..b0a9747bf 100644 --- a/toolsrc/include/vcpkg_Files.h +++ b/toolsrc/include/vcpkg_Files.h @@ -10,7 +10,7 @@ namespace vcpkg {namespace Files void check_is_directory(const fs::path& dirpath); - bool has_invalid_chars_for_filesystem(const std::string s); + bool has_invalid_chars_for_filesystem(const std::string& s); expected get_contents(const fs::path& file_path) noexcept; diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 853a57d16..9e7002a37 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -12,7 +12,7 @@ namespace vcpkg {namespace Files Checks::check_exit(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string()); } - bool has_invalid_chars_for_filesystem(const std::string s) + bool has_invalid_chars_for_filesystem(const std::string& s) { return std::regex_search(s, FILESYSTEM_INVALID_CHARACTERS_REGEX); } -- cgit v1.2.3 From aad0cc4c042aad87b2b52eded0e465ed01e799c1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 19:40:58 -0800 Subject: Files::get_contents() -> Files::read_contents() --- toolsrc/include/vcpkg_Files.h | 2 +- toolsrc/src/Paragraphs.cpp | 2 +- toolsrc/src/commands_cache.cpp | 2 +- toolsrc/src/commands_integration.cpp | 2 +- toolsrc/src/commands_update.cpp | 2 +- toolsrc/src/main.cpp | 2 +- toolsrc/src/vcpkg.cpp | 6 +++--- toolsrc/src/vcpkg_Files.cpp | 2 +- toolsrc/src/vcpkg_metrics_uploader.cpp | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h index b0a9747bf..6c9d0d365 100644 --- a/toolsrc/include/vcpkg_Files.h +++ b/toolsrc/include/vcpkg_Files.h @@ -12,7 +12,7 @@ namespace vcpkg {namespace Files bool has_invalid_chars_for_filesystem(const std::string& s); - expected get_contents(const fs::path& file_path) noexcept; + expected read_contents(const fs::path& file_path) noexcept; expected> read_all_lines(const fs::path& file_path); diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 5efa9a7b3..823b4a85e 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -153,7 +153,7 @@ namespace vcpkg { namespace Paragraphs std::vector> get_paragraphs(const fs::path& control_path) { - return parse_paragraphs(Files::get_contents(control_path).get_or_throw()); + return parse_paragraphs(Files::read_contents(control_path).get_or_throw()); } std::vector> parse_paragraphs(const std::string& str) diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index 17b04b093..1a10b93cf 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -15,7 +15,7 @@ namespace vcpkg try { - auto file_contents = Files::get_contents(path / "CONTROL"); + auto file_contents = Files::read_contents(path / "CONTROL"); if (auto text = file_contents.get()) { auto pghs = Paragraphs::parse_paragraphs(*text); diff --git a/toolsrc/src/commands_integration.cpp b/toolsrc/src/commands_integration.cpp index 31f30f216..e7e5b2d8d 100644 --- a/toolsrc/src/commands_integration.cpp +++ b/toolsrc/src/commands_integration.cpp @@ -173,7 +173,7 @@ namespace vcpkg bool should_install_system = true; if (fs::exists(system_wide_targets_file)) { - auto system_wide_file_contents = Files::get_contents(system_wide_targets_file); + auto system_wide_file_contents = Files::read_contents(system_wide_targets_file); if (auto contents_data = system_wide_file_contents.get()) { std::regex re(R"###()###"); diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 82e3b7e52..a4ab7c6e7 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -71,7 +71,7 @@ namespace vcpkg System::println("\nTo update these packages, run\n vcpkg remove --purge ...\n vcpkg install ..."); } - auto version_file = Files::get_contents(paths.root / "toolsrc" / "VERSION.txt"); + auto version_file = Files::read_contents(paths.root / "toolsrc" / "VERSION.txt"); if (auto version_contents = version_file.get()) { int maj1, min1, rev1; diff --git a/toolsrc/src/main.cpp b/toolsrc/src/main.cpp index 5e9dcf7ff..7703c541f 100644 --- a/toolsrc/src/main.cpp +++ b/toolsrc/src/main.cpp @@ -113,7 +113,7 @@ static void loadConfig() try { - std::string config_contents = Files::get_contents(localappdata / "vcpkg" / "config").get_or_throw(); + std::string config_contents = Files::read_contents(localappdata / "vcpkg" / "config").get_or_throw(); std::unordered_map keys; auto pghs = Paragraphs::parse_paragraphs(config_contents); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index bf9dbd6ab..6858d5518 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -27,7 +27,7 @@ static StatusParagraphs load_current_database(const fs::path& vcpkg_dir_status_f fs::rename(vcpkg_dir_status_file_old, vcpkg_dir_status_file); } - auto text = Files::get_contents(vcpkg_dir_status_file).get_or_throw(); + auto text = Files::read_contents(vcpkg_dir_status_file).get_or_throw(); auto pghs = Paragraphs::parse_paragraphs(text); std::vector> status_pghs; @@ -70,7 +70,7 @@ StatusParagraphs vcpkg::database_load_check(const vcpkg_paths& paths) if (b->path().filename() == "incomplete") continue; - auto text = Files::get_contents(b->path()).get_or_throw(); + auto text = Files::read_contents(b->path()).get_or_throw(); auto pghs = Paragraphs::parse_paragraphs(text); for (auto&& p : pghs) { @@ -230,7 +230,7 @@ expected vcpkg::try_load_cached_package(const vcpkg_paths& path { const fs::path path = paths.package_dir(spec) / "CONTROL"; - auto control_contents_maybe = Files::get_contents(path); + auto control_contents_maybe = Files::read_contents(path); if (auto control_contents = control_contents_maybe.get()) { std::vector> pghs; diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 9e7002a37..48283e43f 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -17,7 +17,7 @@ namespace vcpkg {namespace Files return std::regex_search(s, FILESYSTEM_INVALID_CHARACTERS_REGEX); } - expected get_contents(const fs::path& file_path) noexcept + expected read_contents(const fs::path& file_path) noexcept { std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); if (file_stream.fail()) diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp index 63668d1d7..14fc9ae48 100644 --- a/toolsrc/src/vcpkg_metrics_uploader.cpp +++ b/toolsrc/src/vcpkg_metrics_uploader.cpp @@ -19,5 +19,5 @@ WinMain( szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); Checks::check_exit(argCount == 2, "Requires exactly one argument, the path to the payload file"); - Upload(Files::get_contents(szArgList[1]).get_or_throw()); + Upload(Files::read_contents(szArgList[1]).get_or_throw()); } -- cgit v1.2.3 From 73bf8306b29d68853dc3c97d5dd415bd5e857cf5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 20:11:50 -0800 Subject: Pass by const ref --- toolsrc/include/coff_file_reader.h | 4 ++-- toolsrc/src/coff_file_reader.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/coff_file_reader.h index 1a9a071ef..edf6910a5 100644 --- a/toolsrc/include/coff_file_reader.h +++ b/toolsrc/include/coff_file_reader.h @@ -15,7 +15,7 @@ namespace vcpkg {namespace COFFFileReader std::vector machine_types; }; - dll_info read_dll(const fs::path path); + dll_info read_dll(const fs::path& path); - lib_info read_lib(const fs::path path); + lib_info read_lib(const fs::path& path); }} diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index 3bf7922f5..1f30ea70b 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -223,7 +223,7 @@ namespace vcpkg { namespace COFFFileReader verify_equal_strings(FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START"); } - dll_info read_dll(const fs::path path) + dll_info read_dll(const fs::path& path) { std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); Checks::check_exit(fs.is_open(), "Could not open file %s for reading", path.generic_string()); @@ -260,7 +260,7 @@ namespace vcpkg { namespace COFFFileReader fpos_t m_absolute_position = 0; }; - lib_info read_lib(const fs::path path) + lib_info read_lib(const fs::path& path) { std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); Checks::check_exit(fs.is_open(), "Could not open file %s for reading", path.generic_string()); -- cgit v1.2.3 From 835693ce97f271c0213f65c1c782e8df84cfb409 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 20:17:24 -0800 Subject: Don't return by const value --- toolsrc/include/BuildInfo.h | 2 +- toolsrc/src/BuildInfo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h index 9f872385e..49811d521 100644 --- a/toolsrc/include/BuildInfo.h +++ b/toolsrc/include/BuildInfo.h @@ -104,7 +104,7 @@ namespace vcpkg { namespace PostBuildLint OutdatedDynamicCrt() = delete; - const std::regex crt_regex() const; + std::regex crt_regex() const; const std::string& toString() const; private: diff --git a/toolsrc/src/BuildInfo.cpp b/toolsrc/src/BuildInfo.cpp index ddd44a1e6..f151a3ea5 100644 --- a/toolsrc/src/BuildInfo.cpp +++ b/toolsrc/src/BuildInfo.cpp @@ -151,7 +151,7 @@ namespace vcpkg { namespace PostBuildLint const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT20_DLL = OutdatedDynamicCrt("msvcrt20.dll", R"(msvcrt20\.dll)");; const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT40_DLL = OutdatedDynamicCrt("msvcrt40.dll", R"(msvcrt40\.dll)");; - const std::regex OutdatedDynamicCrt::crt_regex() const + std::regex OutdatedDynamicCrt::crt_regex() const { const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase); return r; -- cgit v1.2.3 From 869071a34ea0c2614231f3c85db58b8f0f43f721 Mon Sep 17 00:00:00 2001 From: vlj Date: Mon, 12 Dec 2016 20:07:43 +0100 Subject: Add spirv-tools. --- ports/spirv-tools/CONTROL | 3 ++ ports/spirv-tools/portfile.cmake | 78 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 ports/spirv-tools/CONTROL create mode 100644 ports/spirv-tools/portfile.cmake diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL new file mode 100644 index 000000000..0e1a82706 --- /dev/null +++ b/ports/spirv-tools/CONTROL @@ -0,0 +1,3 @@ +Source: spirv-tools +Version: +Description: diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake new file mode 100644 index 000000000..c9bb5f85f --- /dev/null +++ b/ports/spirv-tools/portfile.cmake @@ -0,0 +1,78 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +include(vcpkg_common_functions) +find_program(GIT git) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) + +set(GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git") +set(GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40") + +if(NOT EXISTS "${DOWNLOADS}/spirv-tools.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/spirv-tools.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() + +if(NOT EXISTS "${SOURCE_PATH}/.git") + message(STATUS "Adding worktree and patching") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/spirv-tools.git + LOGNAME worktree + ) + message(STATUS "Patching") +endif() + +set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git") +set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c") + +if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() + +if(NOT EXISTS "${SOURCE_PATH}/external/spirv-headers/.git") + message(STATUS "Adding worktree and patching") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/external/spirv-headers ${SPIRVHEADERS_GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git + LOGNAME worktree + ) +endif() + +set(VCPKG_LIBRARY_LINKAGE "static") + +vcpkg_configure_cmake( + SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE ${EXES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirv-tools) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/spirv-tools/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-tools/copyright) -- cgit v1.2.3 From ea3113a4f520f7cb6383df1c261138cc21abceb6 Mon Sep 17 00:00:00 2001 From: sdcb Date: Sun, 18 Dec 2016 16:26:12 +0800 Subject: [mongo-x-driver] upgrade to 1.51/3.10 --- ports/libbson/portfile.cmake | 102 ++++++++++---------- ports/mongo-c-driver/portfile.cmake | 92 +++++++++--------- ports/mongo-cxx-driver/portfile.cmake | 175 +++++++++++++++++----------------- 3 files changed, 185 insertions(+), 184 deletions(-) diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 7642c3437..e6e5ff352 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -1,52 +1,52 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.5.0-rc6) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/libbson/archive/1.5.0-rc6.tar.gz" - FILENAME "libbson-1.5.0-rc6.tar.gz" - SHA512 15cf590b488f7de8d614ddcc2c1536b05b607311f3cd3353418469c7a62177124fb4fb1c53f51b0de4c7491b21051c1ec47fbc12856cc69e37baebb3d65897c5 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DENABLE_TESTS=OFF - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON -) - -vcpkg_install_cmake() - -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/libbson-1.0 - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) - - # drop the __declspec(dllimport) when building static - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch - ) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib) -endif() - +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.5.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mongodb/libbson/archive/1.5.1.tar.gz" + FILENAME "libbson-1.5.1.tar.gz" + SHA512 b641e23ca041e532fe566167ad0292d12934e0fae2c110f81bf6ca3b71b5d01b651a604a7ce6da0d1b54b98cd95674ef331ef4e23c2dedfc706f371eac4efaec +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENABLE_TESTS=OFF + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON +) + +vcpkg_install_cmake() + +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/libbson-1.0 + ${CURRENT_PACKAGES_DIR}/temp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) + + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) + + # drop the __declspec(dllimport) when building static + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static.patch + ) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib) +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright) \ No newline at end of file diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index f9a247499..c3b7a0817 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -1,47 +1,47 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.5.0-rc6) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-c-driver/archive/1.5.0-rc6.tar.gz" - FILENAME "mongo-c-driver-1.5.0-rc6.tar.gz" - SHA512 708caf4e963bad97b4802456c6f5809a0ba8c24fe5faaf0e91aa889a0690df4324005f8d324b3bfc80ffc76f1594612a8d391d7421dd914c58369c24cf8cc965 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} - -DENABLE_TESTS=OFF - -DENABLE_EXAMPLES=OFF - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON -) - -vcpkg_install_cmake() - -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0 - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib) -endif() - +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.5.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mongodb/mongo-c-driver/archive/1.5.1.tar.gz" + FILENAME "mongo-c-driver-1.5.1.tar.gz" + SHA512 2977e6e1fb3c45256161d2c9bd711fea69b9f8c9ff15362fa636068e0a347c42e10d72fed5649504b552c8212f21cb1ae74d2dc8ca3d1388f49e63b2baf6e16d +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DENABLE_TESTS=OFF + -DENABLE_EXAMPLES=OFF + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON +) + +vcpkg_install_cmake() + +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0 + ${CURRENT_PACKAGES_DIR}/temp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) + + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib) +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver RENAME copyright) \ No newline at end of file diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index fa0549fd7..a6c97335c 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -1,88 +1,89 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.0.3) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.3.tar.gz" - FILENAME "mongo-cxx-driver-r3.0.3.tar.gz" - SHA512 29f7ae77dab160c4279eb2eba8e960b25afc7118bf82570d240f5c68e1e17b10dc99910c855888467c304d70399f2d02031463b0c168a95ad0b9323742ccfd35 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch - ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} - -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON -) - -vcpkg_install_cmake() - -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx) - -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib/cmake - ${CURRENT_PACKAGES_DIR}/debug/lib/cmake - - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party - - ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake - ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/test - ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util - ${CURRENT_PACKAGES_DIR}/include/mongocxx/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private - - ${CURRENT_PACKAGES_DIR}/debug/include) - - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib - ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) - - # define MONGOCXX_STATIC in config/export.hpp - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch - ) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib) -endif() - +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.1.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.1.0.tar.gz" + FILENAME "mongo-cxx-driver-r3.1.0.tar.gz" + SHA512 2c9323f5e28304057b6ed6fc8bf33aad14db1313e234eaa74a96fb4cf93e99d24fd8c7c3f20b4b29cda7b1fe5c58f08dcb5cddcffbf62259c08334312fda4fba +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch + ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} + -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON +) + +vcpkg_install_cmake() + +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx + ${CURRENT_PACKAGES_DIR}/temp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx) +file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx) + +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx + ${CURRENT_PACKAGES_DIR}/temp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx) +file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party + + ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake + ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/test + ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util + ${CURRENT_PACKAGES_DIR}/include/mongocxx/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/options + + ${CURRENT_PACKAGES_DIR}/debug/include) + + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) + + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib + ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) + + # define MONGOCXX_STATIC in config/export.hpp + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static.patch + ) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib) +endif() + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From b5368c404d51424c81a83834ac3fe1a628a54834 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 18 Dec 2016 15:18:24 +0100 Subject: [libmodplug] initial commit --- ports/libmodplug/CONTROL | 3 +++ .../automagically-define-modplug-static.patch | 13 ++++++++++ ports/libmodplug/portfile.cmake | 30 ++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 ports/libmodplug/CONTROL create mode 100644 ports/libmodplug/automagically-define-modplug-static.patch create mode 100644 ports/libmodplug/portfile.cmake diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL new file mode 100644 index 000000000..8aca622a4 --- /dev/null +++ b/ports/libmodplug/CONTROL @@ -0,0 +1,3 @@ +Source: libmodplug +Version: 0.8.8.5-bb25b05 +Description: The ModPlug mod file playing library. diff --git a/ports/libmodplug/automagically-define-modplug-static.patch b/ports/libmodplug/automagically-define-modplug-static.patch new file mode 100644 index 000000000..b7982b2d3 --- /dev/null +++ b/ports/libmodplug/automagically-define-modplug-static.patch @@ -0,0 +1,13 @@ +diff --git a/libmodplug/modplug.h b/libmodplug/modplug.h +index 3ffbf9d..fd19ae5 100644 +--- a/libmodplug/modplug.h ++++ b/libmodplug/modplug.h +@@ -11,6 +11,8 @@ + extern "C" { + #endif + ++#define MODPLUG_STATIC ++ + #if defined(_WIN32) || defined(__CYGWIN__) + # if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */ + # define MODPLUG_EXPORT __declspec(dllexport) diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake new file mode 100644 index 000000000..7ffff7091 --- /dev/null +++ b/ports/libmodplug/portfile.cmake @@ -0,0 +1,30 @@ + +set(MODPLUG_HASH bb25b059a963f62aa0a3fe4c580da7da47f2b9c0) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmodplug-${MODPLUG_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Konstanty/libmodplug/archive/${MODPLUG_HASH}.zip" + FILENAME "libmodplug-0.8.8.5-${MODPLUG_HASH}" + SHA512 65840b7748284b400dfe99775e18f44dcc4846bc0ff522d18b9ded42c7032e10683e453110d530722d9e22547b7e5f4878ebfff92f232691cbd5b0638c48d88b) + +vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/bin/modplug.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/debug/bin/modplug.dll) + vcpkg_copy_pdbs() +else() + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/automagically-define-modplug-static.patch) +endif() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodplug) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmodplug/COPYING ${CURRENT_PACKAGES_DIR}/share/libmodplug/copyright) -- cgit v1.2.3 From effbdfbb91e3672e41cfc442ce0244872b1fad8c Mon Sep 17 00:00:00 2001 From: Silvio Date: Sun, 18 Dec 2016 23:00:35 +0100 Subject: Add ogre port --- ports/ogre/0001-use-vcpkg-freeimage.patch | 17 ++++++++ ports/ogre/0002-ogre-cmake-dir-as-option.patch | 19 ++++++++ ports/ogre/0003-use-flat-installation.patch | 41 ++++++++++++++++++ ports/ogre/CONTROL | 4 ++ ports/ogre/OGREConfig.cmake | 37 ++++++++++++++++ ports/ogre/portfile.cmake | 60 ++++++++++++++++++++++++++ 6 files changed, 178 insertions(+) create mode 100644 ports/ogre/0001-use-vcpkg-freeimage.patch create mode 100644 ports/ogre/0002-ogre-cmake-dir-as-option.patch create mode 100644 ports/ogre/0003-use-flat-installation.patch create mode 100644 ports/ogre/CONTROL create mode 100644 ports/ogre/OGREConfig.cmake create mode 100644 ports/ogre/portfile.cmake diff --git a/ports/ogre/0001-use-vcpkg-freeimage.patch b/ports/ogre/0001-use-vcpkg-freeimage.patch new file mode 100644 index 000000000..0266e5e89 --- /dev/null +++ b/ports/ogre/0001-use-vcpkg-freeimage.patch @@ -0,0 +1,17 @@ +diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt +index 6a43378..22f950e 100644 +--- a/OgreMain/CMakeLists.txt ++++ b/OgreMain/CMakeLists.txt +@@ -220,7 +220,11 @@ endif () + list(APPEND HEADER_FILES ${THREAD_HEADER_FILES}) + + # Add needed definitions and nedmalloc include dir +-add_definitions(-DOGRE_NONCLIENT_BUILD -DFREEIMAGE_LIB -D_MT -D_USRDLL) ++# vcpkg specific patch: we removed -DFREEIMAGE_LIB ++# from the defines, because vcpkg's freeimage can ++# be both static or dynamic, and FREEIMAGE_LIB ++# remove all the symbol exporting declaration from FreeImage.h ++add_definitions(-DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/nedmalloc) + + set(LIBRARIES ${PLATFORM_LIBS}) diff --git a/ports/ogre/0002-ogre-cmake-dir-as-option.patch b/ports/ogre/0002-ogre-cmake-dir-as-option.patch new file mode 100644 index 000000000..c5d75e20c --- /dev/null +++ b/ports/ogre/0002-ogre-cmake-dir-as-option.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index 4c496b7..feb4017 100644 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -14,10 +14,12 @@ + ############################################################# + + if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") ++ set(OGRE_DEFAULT_CMAKE_DIR "CMake") + else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ set(OGRE_DEFAULT_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") + endif() ++set(OGRE_CMAKE_DIR ${OGRE_DEFAULT_CMAKE_DIR} CACHE STRING "Install directory for CMake files.") ++mark_as_advanced(OGRE_DEFAULT_CMAKE_DIR) + + set(INST_FILES + Packages/FindOIS.cmake diff --git a/ports/ogre/0003-use-flat-installation.patch b/ports/ogre/0003-use-flat-installation.patch new file mode 100644 index 000000000..c5a382c1f --- /dev/null +++ b/ports/ogre/0003-use-flat-installation.patch @@ -0,0 +1,41 @@ +diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake +index c6b3b40..2da7ebf 100644 +--- a/CMake/Utils/OgreConfigTargets.cmake ++++ b/CMake/Utils/OgreConfigTargets.cmake +@@ -41,15 +41,28 @@ if (NOT OGRE_RUNTIME_OUTPUT) + set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin) + endif () + ++option(OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32 "Do not install in configuration-specific directories in Windows" FALSE) ++ + if (WIN32) +- set(OGRE_RELEASE_PATH "/Release") +- set(OGRE_RELWDBG_PATH "/RelWithDebInfo") +- set(OGRE_MINSIZE_PATH "/MinSizeRel") +- set(OGRE_DEBUG_PATH "/Debug") +- set(OGRE_LIB_RELEASE_PATH "/Release") +- set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo") +- set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel") +- set(OGRE_LIB_DEBUG_PATH "/Debug") ++ if (OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32) ++ set(OGRE_RELEASE_PATH "") ++ set(OGRE_RELWDBG_PATH "") ++ set(OGRE_MINSIZE_PATH "") ++ set(OGRE_DEBUG_PATH "") ++ set(OGRE_LIB_RELEASE_PATH "") ++ set(OGRE_LIB_RELWDBG_PATH "") ++ set(OGRE_LIB_MINSIZE_PATH "") ++ set(OGRE_LIB_DEBUG_PATH "/") ++ else () ++ set(OGRE_RELEASE_PATH "/Release") ++ set(OGRE_RELWDBG_PATH "/RelWithDebInfo") ++ set(OGRE_MINSIZE_PATH "/MinSizeRel") ++ set(OGRE_DEBUG_PATH "/Debug") ++ set(OGRE_LIB_RELEASE_PATH "/Release") ++ set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo") ++ set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel") ++ set(OGRE_LIB_DEBUG_PATH "/Debug") ++ endif () + set(OGRE_PLUGIN_PATH "/opt") + set(OGRE_SAMPLE_PATH "/opt/samples") + elseif (UNIX) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL new file mode 100644 index 000000000..40d9e2416 --- /dev/null +++ b/ports/ogre/CONTROL @@ -0,0 +1,4 @@ +Source: ogre +Version: 1.9.0 +Build-Depends: freeimage, freetype, zlib, zziplib +Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ogre/OGREConfig.cmake b/ports/ogre/OGREConfig.cmake new file mode 100644 index 000000000..a20544431 --- /dev/null +++ b/ports/ogre/OGREConfig.cmake @@ -0,0 +1,37 @@ +#.rst: +# OGREConfig +# ------------ +# +# Dummy OGREConfig to simplify use of OGRE-provided FindOGRE module. +# +# This file is provided as part of the vcpkg port of OGRE . +# It is meant to be found automatically by find_package(OGRE), +# but then offloads all the real work to the FindOGRE module by temporarly +# adding its directory to CMAKE_MODULE_PATH +# +# See the FindOGRE module to see the defined variables:: +# + +# Temporarly add the directory in which OGREConfig.cmake is contained to +# get access to the FindOGRE module +get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${SELF_DIR}) +find_package(OGRE MODULE) + +# Leave CMAKE_MODULE_PATH as we found it +set(CMAKE_MODULE_PATH ${ORIGINAL_CMAKE_MODULE_PATH}) + +# Handle components +# imported from https://github.com/Kitware/CMake/blob/v3.7.1/Modules/CMakePackageConfigHelpers.cmake#L300 +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +check_required_components(OGRE) \ No newline at end of file diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake new file mode 100644 index 000000000..a0989a4a2 --- /dev/null +++ b/ports/ogre/portfile.cmake @@ -0,0 +1,60 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sinbad-ogre-dd30349ea667) +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/sinbad/ogre/get/v1-9-0.zip" + FILENAME "ogre-v1-9-0.zip" + SHA512 de7315a2450ecf0d9073e6a8f0c54737e041016f7ad820556d10701c7d23eefab9d3473476a8e95447c30ab21518b8e4cfb0271db72494ea67a3dea284c9a3d3 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-use-vcpkg-freeimage.patch" + "${CMAKE_CURRENT_LIST_DIR}/0002-ogre-cmake-dir-as-option.patch" + "${CMAKE_CURRENT_LIST_DIR}/0003-use-flat-installation.patch" +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(OGRE_STATIC ON) +else() + set(OGRE_STATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DOGRE_USE_BOOST:BOOL=OFF + -DOGRE_BUILD_RENDERSYSTEM_D3D9:BOOL=OFF + -DOGRE_INSTALL_DEPENDENCIES:BOOL=OFF + -DOGRE_COPY_DEPENDENCIES:BOOL=OFF + -DOGRE_BUILD_TOOLS:BOOL=OFF + -DOGRE_CMAKE_DIR:STRING=share/ogre + -DOGRE_STATIC:BOOL=${OGRE_STATIC} + -DOGRE_INSTALL_SAMPLES:BOOL=OFF + -DOGRE_INSTALL_TOOLS:BOOL=OFF + # We disable this option because it is broken and we rely on vcpkg_copy_pdbs + -DOGRE_INSTALL_PDB:BOOL=OFF + -DOGRE_BUILD_DOCS:BOOL=OFF + -DOGRE_INSTALL_DOCS:BOOL=OFF + -DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF + -DOGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32:BOOL=ON +) + +vcpkg_install_cmake() + +# Add a OGREConfig.cmake to simplify the process of finding vcpkg OGRE +file(COPY ${CMAKE_CURRENT_LIST_DIR}/OGREConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre) + +# Remove debug includes +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Remove debug CMake files +# Note that at the moment OGRE do not export imported targets, +# so we do not need to copy the debug imported targets in the +# release CMake path +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ogre/COPYING ${CURRENT_PACKAGES_DIR}/share/ogre/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 419d0509337156310b6df7f1b19329f2e46a1c2f Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 18 Dec 2016 23:37:12 +0100 Subject: [libmodplug] dont package internal headers --- ports/libmodplug/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index 7ffff7091..c6088d960 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -13,6 +13,11 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# don't package internal headers +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/it_defs.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/sndfile.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/stdafx.h) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/bin/modplug.dll) -- cgit v1.2.3 From f2578ccceed25646b7af6fd0c42e0babce4f7038 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 18 Dec 2016 23:51:24 +0100 Subject: [libmodplug] ...not in this directory though --- ports/libmodplug/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index c6088d960..91f03f690 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -14,9 +14,9 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # don't package internal headers -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/it_defs.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/sndfile.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/stdafx.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libmodplug/it_defs.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libmodplug/sndfile.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libmodplug/stdafx.h) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) -- cgit v1.2.3 From 0fca9cfcf7831f669cd92e89c03e8c9753e99ad8 Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 19 Dec 2016 00:37:11 +0100 Subject: [libmodplug] nevermind Those headers are used by ModplugXMMS project --- ports/libmodplug/portfile.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index 91f03f690..7ffff7091 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -13,11 +13,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# don't package internal headers -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libmodplug/it_defs.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libmodplug/sndfile.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libmodplug/stdafx.h) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/modplug.dll ${CURRENT_PACKAGES_DIR}/bin/modplug.dll) -- cgit v1.2.3 From 92124c9b5ef9baae6d57e57880e32489cba8068d Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 19 Dec 2016 17:38:48 +0100 Subject: [libmodplug] preserve archive extension --- ports/libmodplug/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libmodplug/portfile.cmake b/ports/libmodplug/portfile.cmake index 7ffff7091..6d2070975 100644 --- a/ports/libmodplug/portfile.cmake +++ b/ports/libmodplug/portfile.cmake @@ -4,7 +4,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmodplug-${MODPLUG_HASH}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/Konstanty/libmodplug/archive/${MODPLUG_HASH}.zip" - FILENAME "libmodplug-0.8.8.5-${MODPLUG_HASH}" + FILENAME "libmodplug-0.8.8.5-${MODPLUG_HASH}.zip" SHA512 65840b7748284b400dfe99775e18f44dcc4846bc0ff522d18b9ded42c7032e10683e453110d530722d9e22547b7e5f4878ebfff92f232691cbd5b0638c48d88b) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From bcab7f39130af7399453c53ba3a69f1e4d920f95 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 19 Dec 2016 15:16:38 -0800 Subject: [mongo/libbson] Tabs to spaces --- ports/libbson/portfile.cmake | 50 ++++++++-------- ports/mongo-c-driver/portfile.cmake | 40 ++++++------- ports/mongo-cxx-driver/portfile.cmake | 108 +++++++++++++++++----------------- 3 files changed, 99 insertions(+), 99 deletions(-) diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index e6e5ff352..ce2ccea40 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -10,43 +10,43 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DENABLE_TESTS=OFF - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON + OPTIONS + -DENABLE_TESTS=OFF + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ) vcpkg_install_cmake() file(RENAME - ${CURRENT_PACKAGES_DIR}/include/libbson-1.0 - ${CURRENT_PACKAGES_DIR}/temp) + ${CURRENT_PACKAGES_DIR}/include/libbson-1.0 + ${CURRENT_PACKAGES_DIR}/temp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) - - # drop the __declspec(dllimport) when building static - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch - ) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) + + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) + + # drop the __declspec(dllimport) when building static + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static.patch + ) else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib) endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright) \ No newline at end of file diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index c3b7a0817..833d7393c 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -10,38 +10,38 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} - -DENABLE_TESTS=OFF - -DENABLE_EXAMPLES=OFF - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON + OPTIONS + -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DENABLE_TESTS=OFF + -DENABLE_EXAMPLES=OFF + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ) vcpkg_install_cmake() file(RENAME - ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0 - ${CURRENT_PACKAGES_DIR}/temp) + ${CURRENT_PACKAGES_DIR}/include/libmongoc-1.0 + ${CURRENT_PACKAGES_DIR}/temp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) + + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib) endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver RENAME copyright) \ No newline at end of file diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index a6c97335c..137088109 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -10,80 +10,80 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch - ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch + ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} - -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON + OPTIONS + -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} + -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} + -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ) vcpkg_install_cmake() file(RENAME - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx - ${CURRENT_PACKAGES_DIR}/temp) + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx + ${CURRENT_PACKAGES_DIR}/temp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx) file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx) file(RENAME - ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx - ${CURRENT_PACKAGES_DIR}/temp) + ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx + ${CURRENT_PACKAGES_DIR}/temp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx) file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx) -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib/cmake - ${CURRENT_PACKAGES_DIR}/debug/lib/cmake - - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party - - ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake - ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/test - ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util - ${CURRENT_PACKAGES_DIR}/include/mongocxx/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/options - - ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party + + ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake + ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/test + ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util + ${CURRENT_PACKAGES_DIR}/include/mongocxx/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/options + + ${CURRENT_PACKAGES_DIR}/debug/include) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib - ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) - - # define MONGOCXX_STATIC in config/export.hpp - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch - ) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) + + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib + ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) + + # define MONGOCXX_STATIC in config/export.hpp + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static.patch + ) else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib) endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From a077ccc4c7dfd7f2fd3a63aed9458952febcd94a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 19 Dec 2016 15:39:57 -0800 Subject: Avoid unnecessary copy --- toolsrc/src/post_build_lint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/post_build_lint.cpp b/toolsrc/src/post_build_lint.cpp index 3043bd4fa..4f0adf677 100644 --- a/toolsrc/src/post_build_lint.cpp +++ b/toolsrc/src/post_build_lint.cpp @@ -507,7 +507,7 @@ namespace vcpkg { namespace PostBuildLint static lint_status check_outdated_crt_linkage_of_dlls(const std::vector& dlls) { - const std::vector outdated_crts = OutdatedDynamicCrt::values(); + const std::vector& outdated_crts = OutdatedDynamicCrt::values(); std::vector dlls_with_outdated_crt; -- cgit v1.2.3 From d68abcd321e7cabe3c25a72a90a3c8db6c079e6d Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Tue, 20 Dec 2016 09:21:15 +0100 Subject: Mention blank-property trap in FAQ. --- docs/FAQ.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/FAQ.md b/docs/FAQ.md index 7bc57f605..0a82d320e 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -61,6 +61,9 @@ In a corporate scenario, we currently recommend building the libraries once and ## What Visual C++ toolsets are supported? We plan to only support Visual Studio 2015 and above. +## Why does Visual Studio not use my libraries with user-wide integration enabled? +Enabling user-wide integration (`vcpkg integrate install`) changes the default for some project properties. In particular, "C/C++/General/Additional Include Directories" and "Linker/General/Additional Library Directories" are normally blank *without* user-wide integration. *With* integration, a blank value means that the augmented default supplied by vcpkg is overridden, and headers/libraries will not be found. To reinstate the default, set the properties to inherit from parent. + ## Can I acquire my package's sources by Git url+tag? Yes, however we prefer compressed archives of the specific release/commit since the internal downloads and build trees are meant to be read only. Github provides archives for every commit, tag, and branch, so it's always possible to perform this substitution for repositories hosted there. -- cgit v1.2.3 From 704e1ea85af0ee75cc41234e5c9a3df8dd544777 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 20 Dec 2016 14:52:13 +0100 Subject: [sdl2] make SDL2 use libc --- ports/sdl2/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 81439567c..ba99334eb 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -47,6 +47,7 @@ else() -DSDL_STATIC=${SDL_STATIC_LIB} -DSDL_SHARED=${SDL_SHARED_LIB} -DFORCE_STATIC_VCRT=${SDL_STATIC_CRT} + -DLIBC=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From a5bb368f2480bc8d1d6cbeaa9b264792430b1728 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 20 Dec 2016 15:17:24 +0100 Subject: [smpeg2] initial commit --- ports/smpeg2/CMakeLists.txt | 57 ++++++++++++++++++++++++++++++ ports/smpeg2/CONTROL | 4 +++ ports/smpeg2/correct-sdl-headers-dir.patch | 17 +++++++++ ports/smpeg2/portfile.cmake | 27 ++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 ports/smpeg2/CMakeLists.txt create mode 100644 ports/smpeg2/CONTROL create mode 100644 ports/smpeg2/correct-sdl-headers-dir.patch create mode 100644 ports/smpeg2/portfile.cmake diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt new file mode 100644 index 000000000..9f061cfb8 --- /dev/null +++ b/ports/smpeg2/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 2.6) +project(SMPEG2) + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_library(SDL_LIBRARY SDL2) + +include_directories(${SDL_INCLUDE_DIR}) +include_directories(${SDL_INCLUDE_DIR}/SDL2) +include_directories(${CMAKE_SOURCE_DIR}) + +add_definitions(-DNOCONTROLS -DTHREADED_AUDIO) + +# some c++ code just assumes memset is available +file(WRITE ${CMAKE_SOURCE_DIR}/declare_memset.h "#include \n") +add_definitions(-FIdeclare_memset.h) + +add_library(smpeg2 + audio/bitwindow.cpp + audio/filter.cpp + audio/filter_2.cpp + audio/hufftable.cpp + audio/mpeglayer1.cpp + audio/mpeglayer2.cpp + audio/mpeglayer3.cpp + audio/mpegtable.cpp + audio/mpegtoraw.cpp + audio/MPEGaudio.cpp + video/decoders.cpp + video/floatdct.cpp + video/gdith.cpp + video/jrevdct.cpp + video/motionvec.cpp + video/parseblock.cpp + video/readfile.cpp + video/util.cpp + video/video.cpp + video/MPEGvideo.cpp + MPEG.cpp + MPEGlist.cpp + MPEGring.cpp + MPEGstream.cpp + MPEGsystem.cpp + smpeg.cpp) + +target_link_libraries(smpeg2 ${SDL_LIBRARY}) + +install(TARGETS smpeg2 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT DEFINED SMPEG_SKIP_HEADERS) + install(FILES smpeg.h MPEGframe.h DESTINATION include) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${SDL_LIBRARY}) diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL new file mode 100644 index 000000000..8465a6446 --- /dev/null +++ b/ports/smpeg2/CONTROL @@ -0,0 +1,4 @@ +Source: smpeg2 +Version: 2.0.0 +Description: SDL MPEG Player Library +Build-Depends: sdl2 diff --git a/ports/smpeg2/correct-sdl-headers-dir.patch b/ports/smpeg2/correct-sdl-headers-dir.patch new file mode 100644 index 000000000..601b6c8a8 --- /dev/null +++ b/ports/smpeg2/correct-sdl-headers-dir.patch @@ -0,0 +1,17 @@ +diff --git a/smpeg.h b/smpeg.h +index 6bc2dbd..d12c8f8 100644 +--- a/smpeg.h ++++ b/smpeg.h +@@ -22,9 +22,9 @@ + #ifndef _SMPEG_H_ + #define _SMPEG_H_ + +-#include "SDL.h" +-#include "SDL_mutex.h" +-#include "SDL_audio.h" ++#include "SDL2/SDL.h" ++#include "SDL2/SDL_mutex.h" ++#include "SDL2/SDL_audio.h" + #include "MPEGframe.h" + + #ifdef __cplusplus diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake new file mode 100644 index 000000000..43e6e623e --- /dev/null +++ b/ports/smpeg2/portfile.cmake @@ -0,0 +1,27 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/smpeg2-2.0.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-2.0.0.tar.gz" + FILENAME "smpeg2-2.0.0.tar.gz" + SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/correct-sdl-headers-dir.patch) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DSMPEG_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/smpeg2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/smpeg2/COPYING ${CURRENT_PACKAGES_DIR}/share/smpeg2/copyright) -- cgit v1.2.3 From 12f8636815aeb4fbee37f4eda6fb9cc8354d8936 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 20 Dec 2016 15:37:45 +0100 Subject: [sdl2] bump version --- ports/sdl2/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 7f10c1954..3e6b8a5ec 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.5 -Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. \ No newline at end of file +Version: 2.0.5-1 +Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. -- cgit v1.2.3 From 32ada00583cb96fd40849eb6b2003b8479b65d89 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Dec 2016 14:45:13 -0800 Subject: Improve error message --- toolsrc/src/vcpkg_Dependencies.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 41172ba0f..ae7f697fa 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -58,7 +58,7 @@ namespace vcpkg { namespace Dependencies expected maybe_spgh = try_load_port(paths, spec.name()); SourceParagraph* spgh = maybe_spgh.get(); - Checks::check_exit(spgh != nullptr, "Cannot find package"); + Checks::check_exit(spgh != nullptr, "Cannot find package %s", spec.name()); process_dependencies(filter_dependencies(spgh->depends, spec.target_triplet())); was_examined.emplace(spec, install_plan_action{install_plan_type::BUILD_AND_INSTALL, nullptr, std::make_unique(std::move(*spgh))}); } -- cgit v1.2.3 From 8b9e624d0dfd4d0ce833027cdc7ac40bad2fe928 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Dec 2016 14:45:35 -0800 Subject: Improve trim implementation --- toolsrc/src/vcpkg_Strings.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index d2e153ede..46a4b1855 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -96,15 +96,15 @@ namespace vcpkg {namespace Strings void trim(std::string* s) { - s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); + s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); } std::string trimmed(const std::string& s) { - auto whitespace_front = std::find_if_not(s.begin(), s.end(), details::isspace); auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); - return (whitespace_back <= whitespace_front ? std::string() : std::string(whitespace_front, whitespace_back)); + auto whitespace_front = std::find_if_not(s.begin(), whitespace_back, details::isspace); + return std::string(whitespace_front, whitespace_back); } void trim_all_and_remove_whitespace_strings(std::vector* strings) -- cgit v1.2.3 From a82d7a440509a038a18b22d9de419a8d491bf0ea Mon Sep 17 00:00:00 2001 From: Charlie Barto Date: Tue, 20 Dec 2016 20:36:34 -0500 Subject: work on qt5 5.7.1 --- ports/qt5/CONTROL | 2 +- ports/qt5/portfile.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index e38a2c835..dd52e6a64 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.7-1 +Version: 5.7.1 Description: Qt5 application framework main components. Webengine, examples and tests not included. Build-Depends: sqlite3, libpq \ No newline at end of file diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index 3cc3a17bb..2152a80e9 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -1,6 +1,6 @@ include(${CMAKE_TRIPLET_FILE}) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.1) set(OUTPUT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) set(ENV{QTDIR} ${OUTPUT_PATH}/qtbase) set(ENV{PATH} "${OUTPUT_PATH}/qtbase/bin;$ENV{PATH}") @@ -16,13 +16,13 @@ set(ENV{PATH} "${JOM_EXE_PATH};${PYTHON3_EXE_PATH};${PERL_EXE_PATH};$ENV{PATH}") set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}") vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.7z" - FILENAME "qt-5.7.0.7z" - SHA512 96f0b6bd221be0ed819bc9b52eefcee1774945e25b89169fa927148c1c4a2d85faf63b1d09ef5067573bda9bbf1270fce5f181d086bfe585ddbad4cd77f7f418 + URLS "http://download.qt.io/official_releases/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.1.7z" + FILENAME "qt-5.7.1.7z" + SHA512 3ffcf490a1c0107a05113aebbf70015c50d05fbb35439273c243133ddb146d51aacae15ecd6411d563cc8cfe103df896394c365a69bc48fc86c3bce6a1af3107 ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.0) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.0 ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.0) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.1) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.7.1 ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.1) endif() file(MAKE_DIRECTORY ${OUTPUT_PATH}) -- cgit v1.2.3 From 8d9c8a6269ee624d38e4c880171429293835177d Mon Sep 17 00:00:00 2001 From: vlj Date: Sat, 17 Dec 2016 11:42:30 +0100 Subject: Modify shaderc so that it uses spirv-tools lib. --- ports/shaderc/CMakeLists_spirv.txt | 14 +++++++++++ ports/shaderc/CONTROL | 2 +- ports/shaderc/portfile.cmake | 48 +++++--------------------------------- 3 files changed, 21 insertions(+), 43 deletions(-) create mode 100644 ports/shaderc/CMakeLists_spirv.txt diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/CMakeLists_spirv.txt new file mode 100644 index 000000000..6aa738b1f --- /dev/null +++ b/ports/shaderc/CMakeLists_spirv.txt @@ -0,0 +1,14 @@ +option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) +if(NOT ${SUFFIX_D}) + find_library(SPIRVTOOLSOPT spirv-tools-opt) + find_library(SPIRVTOOLS spirv-tools) +ELSE() + find_library(SPIRVTOOLSOPT spirv-tools-opt) + find_library(SPIRVTOOLS spirv-tools) +ENDIF() + +add_library(SPIRV-Tools-opt STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV-Tools-opt PROPERTY IMPORTED_LOCATION "${SPIRVTOOLSOPT}") + +add_library(SPIRV-Tools STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV-Tools PROPERTY IMPORTED_LOCATION "${SPIRVTOOLS}") \ No newline at end of file diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index e1e3d02b8..6cab280a6 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,4 @@ Source: shaderc Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 Description: A collection of tools, libraries and tests for shader compilation. -Build-Depends: glslang +Build-Depends: glslang, spirv-tools diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 542d18598..eb17aa827 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -37,48 +37,9 @@ if(NOT EXISTS "${SOURCE_PATH}/.git") ) endif() -set(SPIRVTOOLS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git") -set(SPIRVTOOLS_GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40") -set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git") -set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c") - -if(NOT EXISTS "${DOWNLOADS}/SPIRV-Tools.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${SPIRVTOOLS_GIT_URL} ${DOWNLOADS}/SPIRV-Tools.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() -if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) -if(NOT EXISTS "${SOURCE_PATH}/third_party/spirv-tools/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/third_party/spirv-tools ${SPIRVTOOLS_GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Tools.git - LOGNAME worktree - ) -endif() -if(NOT EXISTS "${SOURCE_PATH}/third_party/spirv-tools/external/spirv-headers/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/third_party/spirv-tools/external/spirv-headers ${SPIRVHEADERS_GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git - LOGNAME worktree - ) -endif() - +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools) +file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt) file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) #Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work @@ -102,13 +63,16 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) #Safe to remove as libs are static file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/shaderc.txt) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc) -- cgit v1.2.3 From e88b9c916003b8a4384aa46c53d33ae10c9d5cc4 Mon Sep 17 00:00:00 2001 From: Charlie Barto Date: Wed, 21 Dec 2016 14:56:51 -0500 Subject: bump qt5 version --- ports/qt5/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index 2152a80e9..c487d79a2 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -117,7 +117,9 @@ file(REMOVE ${DEBUG_LIB_FILES}) file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.prl") file(REMOVE ${DEBUG_LIB_FILES}) file(GLOB DEBUG_LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/*d.pdb") -file(REMOVE ${DEBUG_LIB_FILES}) +if(DEBUG_LIB_FILES) + file(REMOVE ${DEBUG_LIB_FILES}) +endif() file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.lib ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.prl ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.prl) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") -- cgit v1.2.3 From c0cb3ca00997207be8896475667bdca19938c925 Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Fri, 23 Dec 2016 11:14:17 +0100 Subject: Copy DLLs for all project types. $(TargetPath) is a simpler way of getting the primary output than assembling it from multiple variables. In addition, $(OutputType) matches $(TargetExt) only for .exe projects. --- scripts/buildsystems/msbuild/vcpkg.targets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 7782551c2..ddae84806 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -41,17 +41,17 @@ - + -- cgit v1.2.3 From 335c15a9d05f6410d3df6133ffc60b04fdfbe20f Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Fri, 23 Dec 2016 14:45:29 +0100 Subject: Copy DLLs before attempting to regsvr32. --- scripts/buildsystems/msbuild/vcpkg.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index ddae84806..0c748c1d6 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -41,7 +41,7 @@ - + -- cgit v1.2.3 From daeab46090dba4592b776d2e829ad19b9e6b2bff Mon Sep 17 00:00:00 2001 From: vlj Date: Fri, 23 Dec 2016 19:49:55 +0100 Subject: Add gli. --- ports/gli/CONTROL | 3 +++ ports/gli/portfile.cmake | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ports/gli/CONTROL create mode 100644 ports/gli/portfile.cmake diff --git a/ports/gli/CONTROL b/ports/gli/CONTROL new file mode 100644 index 000000000..8d89bc2d1 --- /dev/null +++ b/ports/gli/CONTROL @@ -0,0 +1,3 @@ +Source: gli +Version: 0.8.2 +Description: OpenGL Image (GLI) https://gli.g-truc.net diff --git a/ports/gli/portfile.cmake b/ports/gli/portfile.cmake new file mode 100644 index 000000000..60ab1e409 --- /dev/null +++ b/ports/gli/portfile.cmake @@ -0,0 +1,21 @@ +#Header only + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gli-0.8.2.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/g-truc/gli/archive/0.8.2.0.tar.gz" + FILENAME "0.8.2.0.tar.gz" + SHA512 c254a4e1497d0add985e4a882c552db99c512cc0e9cc72145d51a6e7deada817d624d9818099a47136a8a3ef1223a26a34e355e3c713166f0bb062e506059834 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Remove glm/CMakeLists.txt +file(REMOVE ${SOURCE_PATH}/glm/CMakeLists.txt) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/external/glm/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gli/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gli/copying.txt ${CURRENT_PACKAGES_DIR}/share/gli/copyright) + +# Copy the glm header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/gli/*) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gli) -- cgit v1.2.3 From 31d5994dd592422e3daaee325eeae727458c0e09 Mon Sep 17 00:00:00 2001 From: nekko1119 Date: Sat, 24 Dec 2016 05:27:22 +0900 Subject: Fix signed/unsigned mismatch warning --- toolsrc/src/vcpkg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 6858d5518..4748aeb54 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -134,7 +134,7 @@ static void upgrade_to_slash_terminated_sorted_format(std::vector* // (They are not necessarily sorted alphabetically, e.g. libflac) // Therefore we can detect the entries that represent directories by comparing every element with the next one // and checking if the next has a slash immediately after the current one's length - for (int i = 0; i < lines->size() - 1; i++) + for (size_t i = 0; i < lines->size() - 1; i++) { std::string& current_string = lines->at(i); const std::string& next_string = lines->at(i + 1); -- cgit v1.2.3 From 3d58393ad2ee3d0b33fc202f60d22a327928c403 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 24 Dec 2016 02:02:55 +0100 Subject: [lua] don't export from executables --- ports/lua/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index f929c41c9..68de76788 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -25,16 +25,16 @@ src/ltable.c src/ltablib.c src/ltm.c src/lundump.c src/lutf8lib.c src/lvm.c src/ # append headers to sources to make them show up in MSVC GUI LIST(APPEND SRC_LIBLUA ${HDR_LIBLUA}) -IF (BUILD_SHARED_LIBS) - ADD_DEFINITIONS ( -DLUA_BUILD_AS_DLL ) -ENDIF () - # remove warnings ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS ) #DLL ADD_LIBRARY ( lua ${SRC_LIBLUA} ) +IF (BUILD_SHARED_LIBS) + TARGET_COMPILE_DEFINITIONS (lua PRIVATE -DLUA_BUILD_AS_DLL ) +ENDIF () + INSTALL ( TARGETS lua RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib -- cgit v1.2.3 From 90d814f3e28e64542a9a3cc65c99a94286cbdee2 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 24 Dec 2016 02:03:25 +0100 Subject: [lua] bump version --- ports/lua/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index ca2a82b14..b284bfa85 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.3-1 +Version: 5.3.3-2 Description: a powerful, fast, lightweight, embeddable scripting language -- cgit v1.2.3 From 8bcf57f68ad3f2e8052de4b1b2e5e51fde002dc7 Mon Sep 17 00:00:00 2001 From: flysha Date: Sat, 24 Dec 2016 20:16:31 +0800 Subject: [libbson, mongo-c-driver] bump version to 1.5.1 I upgraded libbson and mongo-c-driver to 1.5.1, but forgot to bump the version, this patch fixed it. --- ports/libbson/CONTROL | 2 +- ports/mongo-c-driver/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index 089e34672..371dfcf0c 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,3 +1,3 @@ Source: libbson -Version: 1.5.0-rc6 +Version: 1.5.1 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. \ No newline at end of file diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 330ff27af..c77352848 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver -Version: 1.5.0-rc6 +Version: 1.5.1 Build-Depends: libbson Description: Client library written in C for MongoDB. \ No newline at end of file -- cgit v1.2.3 From efb81070ced633c52e6672d5d1bc5336cde3f1d2 Mon Sep 17 00:00:00 2001 From: flysha Date: Sat, 24 Dec 2016 21:36:21 +0800 Subject: [aws-sdk-cpp] upgrade to 1.0.47 --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 05ea2fc08..989d3a9eb 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,3 @@ Source: aws-sdk-cpp -Version: 1.0.34-1 +Version: 1.0.47 Description: AWS SDK for C++ diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 1cff4bee7..5313e85b7 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.34) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.47) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.34.tar.gz" - FILENAME "aws-sdk-cpp-1.0.34.tar.gz" - SHA512 21ca03eb323eecb55c29866b73c07956a36aad7c9c051eb7ca201cfd356c3f9732c89898cf0c89660d6c1279dc52438bb389b37d613bf741bae81bb3e773a3c5 + URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.47.tar.gz" + FILENAME "aws-sdk-cpp-1.0.47.tar.gz" + SHA512 ce7471bafe2763f1c382eed8afeaf6422058599a3aa11ae52909da668c45d12827fcd06b9b3ce34e3c2fa33297fd2e09421b8a89833d581efaf62b7108232acf ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 1cc6a9c4ce2d920f8786789cf9913db07bbb4aee Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 24 Dec 2016 15:26:58 +0100 Subject: [qt5] Explicitly avoid compiling qt dependencies that could be available in vcpkg To avoid problems such as the one described in https://github.com/Microsoft/vcpkg/issues/412 . If a particular dependency is actually needed, it can be added `-qt-` or `-system- to use the vcpkg version, see https://github.com/Microsoft/vcpkg/issues/455 . --- ports/qt5/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index c487d79a2..41c103870 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -47,6 +47,10 @@ vcpkg_execute_required_process( -debug-and-release -force-debug-info ${QT_RUNTIME_LINKAGE} -qt-zlib -qt-libjpeg + -no-libpng + -no-freetype + -no-pcre + -no-harfbuzz -system-sqlite -nomake examples -nomake tests -skip webengine -qt-sql-sqlite -qt-sql-psql -- cgit v1.2.3 From 91f51a084fec588854ea784f3e8a829540664e43 Mon Sep 17 00:00:00 2001 From: flysha Date: Sun, 25 Dec 2016 18:44:20 +0800 Subject: [antlr4] initial commit --- ports/antlr4/CONTROL | 3 ++ ports/antlr4/crt_mt.patch | 36 ++++++++++++++++++++++ ports/antlr4/portfile.cmake | 74 +++++++++++++++++++++++++++++++++++++++++++++ ports/antlr4/static.patch | 12 ++++++++ 4 files changed, 125 insertions(+) create mode 100644 ports/antlr4/CONTROL create mode 100644 ports/antlr4/crt_mt.patch create mode 100644 ports/antlr4/portfile.cmake create mode 100644 ports/antlr4/static.patch diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL new file mode 100644 index 000000000..dbcf5219c --- /dev/null +++ b/ports/antlr4/CONTROL @@ -0,0 +1,3 @@ +Source: antlr4 +Version: 4.6 +Description: ANother Tool for Language Recognition \ No newline at end of file diff --git a/ports/antlr4/crt_mt.patch b/ports/antlr4/crt_mt.patch new file mode 100644 index 000000000..d2e8a28da --- /dev/null +++ b/ports/antlr4/crt_mt.patch @@ -0,0 +1,36 @@ +diff --git a/runtime/antlr4cpp-vs2015.vcxproj b/runtime/antlr4cpp-vs2015.vcxproj +index 85fa3da..540f031 100644 +--- a/runtime/antlr4cpp-vs2015.vcxproj ++++ b/runtime/antlr4cpp-vs2015.vcxproj +@@ -201,6 +201,7 @@ + 4251 + true + false ++ MultiThreadedDebug + + + Windows +@@ -239,6 +240,7 @@ + 4251 + true + false ++ MultiThreadedDebug + + + Windows +@@ -281,6 +283,7 @@ + + 4251 + true ++ MultiThreaded + + + Windows +@@ -325,6 +328,7 @@ + + 4251 + true ++ MultiThreaded + + + Windows diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake new file mode 100644 index 000000000..8b11c95b0 --- /dev/null +++ b/ports/antlr4/portfile.cmake @@ -0,0 +1,74 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/runtime) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.antlr.org/download/antlr4-cpp-runtime-4.6-source.zip" + FILENAME "antlr4-cpp-runtime-4.6-source.zip" + SHA512 e123c2227e41ce80da5a3758725a018690ed70a4e10c23da26c966259e6bdafa192f4363f5a7e1181ef9a47bf3cc50d6b0ca7b26c8dd2b19222a7edf54de8de2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + PATCHES ${CMAKE_CURRENT_LIST_DIR}/crt_mt.patch +) + +if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) + set(DEBUG_CONFIG "Debug Static") + set(RELEASE_CONFIG "Release Static") +else() + set(DEBUG_CONFIG "Debug DLL") + set(RELEASE_CONFIG "Release DLL") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/antlr4cpp-vs2015.vcxproj + DEBUG_CONFIGURATION ${DEBUG_CONFIG} + RELEASE_CONFIGURATION ${RELEASE_CONFIG} +) + +file (MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include) +FILE(COPY ${SOURCE_PATH}/src/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN "*.h") + +file (MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch + ) +else() + file (MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(COPY + ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.dll + ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG}/antlr4-runtime.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY + ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.dll + ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() + + +# license not exist in antlr folder. +vcpkg_download_distfile(LICENSE + URLS https://raw.githubusercontent.com/antlr/antlr4/master/LICENSE.txt + FILENAME "antlr4-copyright" + SHA512 c72ae3d5c9f3f07160405b5ca44f01116a9602d82291d6cd218fcc5ec6e8baf985e4baa2acf3d621079585385708bd171c96ef44dd808e60c40a48bc1f56c9ae +) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright) + +message(STATUS "Installing done") \ No newline at end of file diff --git a/ports/antlr4/static.patch b/ports/antlr4/static.patch new file mode 100644 index 000000000..fb54c5ae4 --- /dev/null +++ b/ports/antlr4/static.patch @@ -0,0 +1,12 @@ +diff --git a/antlr4-common.h b/antlr4-common.h +index 197fd6d..34a62c8 100644 +--- a/antlr4-common.h ++++ b/antlr4-common.h +@@ -34,6 +34,7 @@ + #include + #include + ++#define ANTLR4CPP_STATIC + // Defines for the Guid class and other platform dependent stuff. + #ifdef _WIN32 + #pragma warning (disable: 4250) // Class inherits by dominance. -- cgit v1.2.3 From e67cbc48be72a635a75a24e877e8d7a27fb0cc20 Mon Sep 17 00:00:00 2001 From: Olaf van der Spek Date: Sun, 25 Dec 2016 12:22:46 +0100 Subject: Typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 99d8dc0b3..78470dd0c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Finally, create a New Project (or open an existing one) in Visual Studio 2015 or ## Examples See the [`docs\EXAMPLES.md`](docs/EXAMPLES.md) document for specific walkthroughs, including using a package and adding a new package. -See a 4 mm [demo in video](https://www.youtube.com/watch?v=y41WFKbQFTw). +See a 4 minute [demo in video](https://www.youtube.com/watch?v=y41WFKbQFTw). ## Contributing Vcpkg is built with your contributions. Here are some ways you can contribute: -- cgit v1.2.3 From 7ecf688cca944629a8cf09eaf1276b7dc69c1021 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 25 Dec 2016 14:34:01 +0100 Subject: add liblzma --- ports/liblzma/CMakeLists.txt | 104 ++++++++++++++++++++++++ ports/liblzma/CONTROL | 3 + ports/liblzma/auto-define-lzma-api-static.patch | 14 ++++ ports/liblzma/portfile.cmake | 29 +++++++ 4 files changed, 150 insertions(+) create mode 100644 ports/liblzma/CMakeLists.txt create mode 100644 ports/liblzma/CONTROL create mode 100644 ports/liblzma/auto-define-lzma-api-static.patch create mode 100644 ports/liblzma/portfile.cmake diff --git a/ports/liblzma/CMakeLists.txt b/ports/liblzma/CMakeLists.txt new file mode 100644 index 000000000..5bf723c2f --- /dev/null +++ b/ports/liblzma/CMakeLists.txt @@ -0,0 +1,104 @@ +cmake_minimum_required(VERSION 3.0) +project(liblzma) + +add_definitions(-DHAVE_CONFIG_H) +if(BUILD_SHARED_LIBS) + add_definitions(-DLIBLZMADLL_EXPORTS) + add_definitions(-DDLL_EXPORT) +endif() + +include_directories(windows) +include_directories(src/liblzma/common) +include_directories(src/common) +include_directories(src/liblzma/api) +include_directories(src/liblzma/check) +include_directories(src/liblzma/delta) +include_directories(src/liblzma/lz) +include_directories(src/liblzma/lzma) +include_directories(src/liblzma/rangecoder) +include_directories(src/liblzma/simple) + +add_library(liblzma + src/common/tuklib_cpucores.c + src/common/tuklib_physmem.c + src/liblzma/check/check.c + src/liblzma/check/crc32_fast.c + src/liblzma/check/crc32_table.c + src/liblzma/check/crc64_fast.c + src/liblzma/check/crc64_table.c + src/liblzma/check/sha256.c + src/liblzma/common/alone_decoder.c + src/liblzma/common/alone_encoder.c + src/liblzma/common/auto_decoder.c + src/liblzma/common/block_buffer_decoder.c + src/liblzma/common/block_buffer_encoder.c + src/liblzma/common/block_decoder.c + src/liblzma/common/block_encoder.c + src/liblzma/common/block_header_decoder.c + src/liblzma/common/block_header_encoder.c + src/liblzma/common/block_util.c + src/liblzma/common/common.c + src/liblzma/common/easy_buffer_encoder.c + src/liblzma/common/easy_decoder_memusage.c + src/liblzma/common/easy_encoder.c + src/liblzma/common/easy_encoder_memusage.c + src/liblzma/common/easy_preset.c + src/liblzma/common/filter_buffer_decoder.c + src/liblzma/common/filter_buffer_encoder.c + src/liblzma/common/filter_common.c + src/liblzma/common/filter_decoder.c + src/liblzma/common/filter_encoder.c + src/liblzma/common/filter_flags_decoder.c + src/liblzma/common/filter_flags_encoder.c + src/liblzma/common/hardware_cputhreads.c + src/liblzma/common/hardware_physmem.c + src/liblzma/common/index.c + src/liblzma/common/index_decoder.c + src/liblzma/common/index_encoder.c + src/liblzma/common/index_hash.c + src/liblzma/common/outqueue.c + src/liblzma/common/stream_buffer_decoder.c + src/liblzma/common/stream_buffer_encoder.c + src/liblzma/common/stream_decoder.c + src/liblzma/common/stream_encoder.c + src/liblzma/common/stream_encoder_mt.c + src/liblzma/common/stream_flags_common.c + src/liblzma/common/stream_flags_decoder.c + src/liblzma/common/stream_flags_encoder.c + src/liblzma/common/vli_decoder.c + src/liblzma/common/vli_encoder.c + src/liblzma/common/vli_size.c + src/liblzma/delta/delta_common.c + src/liblzma/delta/delta_decoder.c + src/liblzma/delta/delta_encoder.c + src/liblzma/lzma/fastpos_table.c + src/liblzma/lzma/lzma2_decoder.c + src/liblzma/lzma/lzma2_encoder.c + src/liblzma/lzma/lzma_decoder.c + src/liblzma/lzma/lzma_encoder.c + src/liblzma/lzma/lzma_encoder_optimum_fast.c + src/liblzma/lzma/lzma_encoder_optimum_normal.c + src/liblzma/lzma/lzma_encoder_presets.c + src/liblzma/lz/lz_decoder.c + src/liblzma/lz/lz_encoder.c + src/liblzma/lz/lz_encoder_mf.c + src/liblzma/rangecoder/price_table.c + src/liblzma/simple/arm.c + src/liblzma/simple/armthumb.c + src/liblzma/simple/ia64.c + src/liblzma/simple/powerpc.c + src/liblzma/simple/simple_coder.c + src/liblzma/simple/simple_decoder.c + src/liblzma/simple/simple_encoder.c + src/liblzma/simple/sparc.c + src/liblzma/simple/x86.c) + +install(TARGETS liblzma + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT LIBLZMA_SKIP_HEADERS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma DESTINATION include) + install(FILES ${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma.h DESTINATION include) +endif() diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL new file mode 100644 index 000000000..648316130 --- /dev/null +++ b/ports/liblzma/CONTROL @@ -0,0 +1,3 @@ +Source: liblzma +Version: 5.2.2 +Description: Compression library with an API similar to that of zlib. diff --git a/ports/liblzma/auto-define-lzma-api-static.patch b/ports/liblzma/auto-define-lzma-api-static.patch new file mode 100644 index 000000000..b2643fe6a --- /dev/null +++ b/ports/liblzma/auto-define-lzma-api-static.patch @@ -0,0 +1,14 @@ +diff --git a/lzma.h b/lzma.h +index ce675a7..ac0fc98 100644 +--- a/lzma.h ++++ b/lzma.h +@@ -187,6 +187,9 @@ + * need to worry about LZMA_API_STATIC. Also the calling convention is + * omitted on Cygwin but not on MinGW. + */ ++ ++#define LZMA_API_STATIC ++ + #ifndef LZMA_API_IMPORT + # if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__) + # define LZMA_API_IMPORT __declspec(dllimport) diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake new file mode 100644 index 000000000..bb2b6e083 --- /dev/null +++ b/ports/liblzma/portfile.cmake @@ -0,0 +1,29 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xz-5.2.2) +vcpkg_download_distfile(ARCHIVE + URLS "http://tukaani.org/xz/xz-5.2.2.tar.gz" + FILENAME "xz-5.2.2.tar.gz" + SHA512 8d6249f93c5c43e1c8eeb21f93b22330fd54575e20bbb4af3d06721192d9f0ca3351878964c9640238ac410b7dd9f16329793c7be7355c7ca0db92c6db6ab813) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DLIBLZMA_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/auto-define-lzma-api-static.patch) +endif() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/liblzma/COPYING ${CURRENT_PACKAGES_DIR}/share/liblzma/copyright) -- cgit v1.2.3 From f70486314e3ba1962bd80a894e700a4de7fa55cd Mon Sep 17 00:00:00 2001 From: Jason Yang Date: Tue, 27 Dec 2016 18:07:53 +0800 Subject: [azure-storage-cpp] Upgrade to v2.6.0 --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 5fc7dbe13..29c80c703 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 2.5.0 +Version: 2.6.0 Build-Depends: cpprestsdk Description: Microsoft Azure Storage Client SDK for C++ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index fdc858c1a..d83a6d854 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/azure-storage-cpp-2.5.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/azure-storage-cpp-2.6.0) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Azure/azure-storage-cpp/archive/v2.5.0.tar.gz" - FILENAME "azure-storage-cpp/v2.5.0.tar.gz" - SHA512 128e02f4c4f741083b7860a1aacabaeee5616684d6a5f7f1b3a88abf7f74e6c46610ed62def2a743e67a20a1d12604b9c44c202d94b56ca0ca02847a2b6c9e1b + URLS "https://github.com/Azure/azure-storage-cpp/archive/v2.6.0.tar.gz" + FILENAME "azure-storage-cpp/v2.6.0.tar.gz" + SHA512 383fc709b04b7a116b553575f27a95b95a66105fe9b96d412fc4f1938e51288f81e49a9578c02993d0bc2a4771265694117b82fd5beaeaf4c32f81eeb8f9be6a ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 04b62c7be9868ecd180c29a127e3be4072e25a81 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Dec 2016 14:18:23 -0800 Subject: [gli] Make "header-only" comment same as other ports --- ports/gli/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/gli/portfile.cmake b/ports/gli/portfile.cmake index 60ab1e409..c0854909f 100644 --- a/ports/gli/portfile.cmake +++ b/ports/gli/portfile.cmake @@ -1,5 +1,4 @@ -#Header only - +#header-only library include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gli-0.8.2.0) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 2d9f8ff115f77a4355b304e3c9c98441606bc605 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Dec 2016 14:23:20 -0800 Subject: [qt5] Bump version --- ports/qt5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index dd52e6a64..0b34843f1 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.7.1 +Version: 5.7.1-1 Description: Qt5 application framework main components. Webengine, examples and tests not included. Build-Depends: sqlite3, libpq \ No newline at end of file -- cgit v1.2.3 From 9a2825a0a40855e2fdca807abdb872edf0283d85 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 28 Dec 2016 12:20:11 +0100 Subject: [icu] update to 58.2 --- ports/icu/CONTROL | 2 +- ports/icu/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL index a0d0552d7..bbc4a8082 100644 --- a/ports/icu/CONTROL +++ b/ports/icu/CONTROL @@ -1,3 +1,3 @@ Source: icu -Version: 58.1 +Version: 58.2 Description: Mature and widely used Unicode and localization library. diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index a8bdd1d80..1d05824a7 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -10,9 +10,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/icu) vcpkg_download_distfile(ARCHIVE - URLS "http://download.icu-project.org/files/icu4c/58.1/icu4c-58_1-src.zip" - FILENAME "icu4c-58_1-src.zip" - SHA512 b13b1d8aa5e6a08a5cecaea85252354150064ef98ed7bb66b70d32eac5c80874c11f1fc9e3a667075b867fcc848c33ad90e6cada3a279f65b62cb9d46e25181d) + URLS "http://download.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.zip" + FILENAME "icu4c-58_2-src.zip" + SHA512 b985b553186d11d9e5157fc981af5483c435a7b4f3df9574d253d6229ecaf8af0f722488542c3f64f9726ad25e17978eae970d78300a55479df74495f6745d16) vcpkg_extract_source_archive(${ARCHIVE}) if (TRIPLET_SYSTEM_ARCH MATCHES "x86") -- cgit v1.2.3 From da63f3353190339c67cdbe25d99b6bd6be99ba7d Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 29 Dec 2016 01:00:43 +0100 Subject: [sdl2] link to CRT libraries --- ports/sdl2/CONTROL | 2 +- ports/sdl2/dont-ignore-default-libs.patch | 22 ++++++++++++++++++++++ ports/sdl2/portfile.cmake | 6 ++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ports/sdl2/dont-ignore-default-libs.patch diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 3e6b8a5ec..c0d747691 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.5-1 +Version: 2.0.5-2 Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl2/dont-ignore-default-libs.patch b/ports/sdl2/dont-ignore-default-libs.patch new file mode 100644 index 000000000..c9f4c6079 --- /dev/null +++ b/ports/sdl2/dont-ignore-default-libs.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54a23f0..91c5736 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1549,7 +1549,7 @@ if(SDL_SHARED) + SOVERSION ${LT_REVISION} + OUTPUT_NAME "SDL2") + endif() +- if(MSVC) ++ if(MSVC AND NOT LIBC) + # Don't try to link with the default set of libraries. + set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB") + set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") +@@ -1564,7 +1564,7 @@ if(SDL_STATIC) + add_library(SDL2-static STATIC ${SOURCE_FILES}) + set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2") + set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC}) +- if(MSVC) ++ if(MSVC AND NOT LIBC) + set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB") + set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") + set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index ba99334eb..185e39665 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -7,6 +7,12 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch +) + if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj -- cgit v1.2.3 From 6741f959bb56e750c0aa871212987a0df228f8e5 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 29 Dec 2016 10:59:02 +0100 Subject: [qt5] Turn -no-pcre -qt-pcre Despite Qt documentation ( http://doc.qt.io/qt-5/configure-options.html ) `-no-pcre` is not recognized as an option, while `-qt-pcre` is recognized as an option. --- ports/qt5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index 41c103870..adcec1c8b 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -49,7 +49,7 @@ vcpkg_execute_required_process( -qt-libjpeg -no-libpng -no-freetype - -no-pcre + -qt-pcre -no-harfbuzz -system-sqlite -nomake examples -nomake tests -skip webengine -- cgit v1.2.3 From 614320e0074ed764f4ffba365e18bf0e32cbce85 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 29 Dec 2016 10:59:48 +0100 Subject: [qt5] Bump version --- ports/qt5/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 0b34843f1..40bde5f2a 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.7.1-1 +Version: 5.7.1-2 Description: Qt5 application framework main components. Webengine, examples and tests not included. -Build-Depends: sqlite3, libpq \ No newline at end of file +Build-Depends: sqlite3, libpq -- cgit v1.2.3 From 2d746d8913405693a18d594759c481929704f36f Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 30 Dec 2016 13:11:58 +0100 Subject: [icu] force rebuild of database --- ports/icu/CONTROL | 2 +- ports/icu/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL index bbc4a8082..80a6eb9a6 100644 --- a/ports/icu/CONTROL +++ b/ports/icu/CONTROL @@ -1,3 +1,3 @@ Source: icu -Version: 58.2 +Version: 58.2-1 Description: Mature and widely used Unicode and localization library. diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 1d05824a7..183db43bd 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -25,6 +25,11 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/source/allinone/allinone.sln PLATFORM ${BUILD_ARCH}) +# force rebuild of database as it sometimies gets overriden by dummy one +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/source/data/makedata.vcxproj + PLATFORM ${BUILD_ARCH}) + set(ICU_VERSION 58) if(TRIPLET_SYSTEM_ARCH MATCHES "x64") set(ICU_BIN bin64) -- cgit v1.2.3 From bf559d51ec103b1267ba61798f230f8cca413adb Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 30 Dec 2016 13:31:33 +0100 Subject: add lz4 --- ports/lz4/CMakeLists.txt | 26 ++++++++++++++++++++++++++ ports/lz4/CONTROL | 3 +++ ports/lz4/auto-define-import-macro.patch | 28 ++++++++++++++++++++++++++++ ports/lz4/portfile.cmake | 29 +++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 ports/lz4/CMakeLists.txt create mode 100644 ports/lz4/CONTROL create mode 100644 ports/lz4/auto-define-import-macro.patch create mode 100644 ports/lz4/portfile.cmake diff --git a/ports/lz4/CMakeLists.txt b/ports/lz4/CMakeLists.txt new file mode 100644 index 000000000..a5366f5ab --- /dev/null +++ b/ports/lz4/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.0) +project(lz4) + +if(BUILD_SHARED_LIBS) + add_definitions(-DLZ4_DLL_EXPORT) +endif() +add_definitions(-DXXH_NAMESPACE=LZ4_) + +add_library(lz4 + lib/lz4.c + lib/lz4frame.c + lib/lz4hc.c + lib/xxhash.c) + +install(TARGETS lz4 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT LZ4_SKIP_INCLUDES) + install(FILES + lib/lz4.h + lib/lz4frame.h + lib/lz4hc.h + DESTINATION include) +endif() diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL new file mode 100644 index 000000000..90be24a5b --- /dev/null +++ b/ports/lz4/CONTROL @@ -0,0 +1,3 @@ +Source: lz4 +Version: 1.7.4.2 +Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/lz4/auto-define-import-macro.patch b/ports/lz4/auto-define-import-macro.patch new file mode 100644 index 000000000..48b4585ea --- /dev/null +++ b/ports/lz4/auto-define-import-macro.patch @@ -0,0 +1,28 @@ +diff --git a/lz4.h b/lz4.h +index 7420ad8..c1c3e56 100644 +--- a/lz4.h ++++ b/lz4.h +@@ -73,6 +73,9 @@ extern "C" { + * LZ4_DLL_EXPORT : + * Enable exporting of functions when building a Windows DLL + */ ++ ++#define LZ4_DLL_IMPORT 1 ++ + #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) + # define LZ4LIB_API __declspec(dllexport) + #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +diff --git a/lz4frame.h b/lz4frame.h +index 3104d2e..4442461 100644 +--- a/lz4frame.h ++++ b/lz4frame.h +@@ -55,6 +55,9 @@ extern "C" { + * LZ4_DLL_EXPORT : + * Enable exporting of functions when building a Windows DLL + */ ++ ++#define LZ4_DLL_IMPORT 1 ++ + #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) + # define LZ4FLIB_API __declspec(dllexport) + #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake new file mode 100644 index 000000000..9e2153e4b --- /dev/null +++ b/ports/lz4/portfile.cmake @@ -0,0 +1,29 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lz4-1.7.4.2) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/lz4/lz4/archive/v1.7.4.2.zip" + FILENAME "lz4-1.7.4.2.zip" + SHA512 c9a65031225ccda43ad4c7622e9f36762c18e58b4aaf43b1a33f219186fb55c43ca354f574a1591188db39f57631351b1b90f96e0c150e28de08dcb65c6759d0) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DLZ4_SKIP_INCLUDES=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/auto-define-import-macro.patch) +endif() + +file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright) -- cgit v1.2.3 From aab12428e51d53a1952da92a6b1a50c4cadc3e4e Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 30 Dec 2016 15:27:25 +0100 Subject: [icu] fix typo --- ports/icu/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 183db43bd..f2bf7fb6e 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -25,7 +25,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/source/allinone/allinone.sln PLATFORM ${BUILD_ARCH}) -# force rebuild of database as it sometimies gets overriden by dummy one +# force rebuild of database as it sometimes gets overriden by dummy one vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/source/data/makedata.vcxproj PLATFORM ${BUILD_ARCH}) -- cgit v1.2.3