From 99a8d745495815916801003c744b845c2f9e278a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 17:31:51 +0200 Subject: Use ICU in boost build --- ports/boost/0001-Fix-boost-ICU-support.patch | 166 +++++++++++++++++++++++++++ ports/boost/CONTROL | 2 +- ports/boost/desktop/user-config.jam | 28 +++++ ports/boost/portfile.cmake | 6 +- ports/boost/uwp/user-config.jam | 8 ++ 5 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 ports/boost/0001-Fix-boost-ICU-support.patch diff --git a/ports/boost/0001-Fix-boost-ICU-support.patch b/ports/boost/0001-Fix-boost-ICU-support.patch new file mode 100644 index 000000000..1952f5a64 --- /dev/null +++ b/ports/boost/0001-Fix-boost-ICU-support.patch @@ -0,0 +1,166 @@ +--- + libs/locale/build/Jamfile.v2 | 63 ++++++-------------------------------- + libs/locale/build/has_icu_test.cpp | 4 --- + libs/regex/build/Jamfile.v2 | 47 +++++++--------------------- + 3 files changed, 20 insertions(+), 94 deletions(-) + +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 578e722..5f25917 100644 +--- a/libs/locale/build/Jamfile.v2 ++++ b/libs/locale/build/Jamfile.v2 +@@ -70,62 +70,17 @@ if $(ICU_LINK) + } + else + { +- searched-lib icuuc : : icuuc +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : msvc +- debug +- icuucd +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : this_is_an_invalid_library_name ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudata +- shared +- shared ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudt +- msvc +- shared +- shared ; +- +- searched-lib icudt : : this_is_an_invalid_library_name ; +- +- searched-lib icuin : : $(ICU_PATH)/lib +- icui18n +- shared +- shared ; +- +- searched-lib icuin : : msvc +- debug +- icuind +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : msvc +- release +- icuin +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : this_is_an_invalid_library_name ; +- +- explicit icuuc icudt icuin ; ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = $(ICU_PATH)/include +- icuuc/shared/shared +- icudt/shared/shared +- icuin/shared/shared +- $(ICU_PATH)/bin +- shared ; ++ icuuc ++ icuin ++ icudt ++ $(ICU_PATH)/bin ; + + + +diff --git a/libs/locale/build/has_icu_test.cpp b/libs/locale/build/has_icu_test.cpp +index 9419b30..ed9be05 100644 +--- a/libs/locale/build/has_icu_test.cpp ++++ b/libs/locale/build/has_icu_test.cpp +@@ -15,10 +15,6 @@ + #include + #include + +-#if defined(_MSC_VER) && !defined(_DLL) +-#error "Mixing ICU with a static runtime doesn't work" +-#endif +- + int main() + { + icu::Locale loc; +diff --git a/libs/regex/build/Jamfile.v2 b/libs/regex/build/Jamfile.v2 +index 58fd1fb..76ee9f4 100644 +--- a/libs/regex/build/Jamfile.v2 ++++ b/libs/regex/build/Jamfile.v2 +@@ -48,50 +48,25 @@ if ! $(disable-icu) + } + else + { +- lib icuuc : : shared @path_options ; +- lib icuuc : : msvc debug icuucd shared @path_options ; +- lib icuuc : : intel windows debug icuucd shared @path_options ; +- lib icuuc : : sicuuc static @path_options ; +- lib icuuc : : msvc debug sicuucd static @path_options ; +- lib icuuc : : intel windows debug sicuucd static @path_options ; +- lib icuuc : : this_is_an_invalid_library_name ; +- +- lib icudt : : icudata shared @path_options ; +- lib icudt : : icudt msvc shared @path_options ; +- lib icudt : : icudt intel windows shared @path_options ; +- lib icudt : : sicudata static @path_options ; +- lib icudt : : sicudt msvc static @path_options ; +- lib icudt : : sicudt intel windows static @path_options ; +- lib icudt : : this_is_an_invalid_library_name ; +- +- lib icuin : : icui18n shared @path_options ; +- lib icuin : : msvc debug icuind shared @path_options ; +- lib icuin : : msvc icuin shared @path_options ; +- lib icuin : : intel windows debug icuind shared @path_options ; +- lib icuin : : intel windows icuin shared @path_options ; +- lib icuin : : sicui18n static @path_options ; +- lib icuin : : msvc debug sicuind static @path_options ; +- lib icuin : : msvc sicuin static @path_options ; +- lib icuin : : intel windows debug sicuind static @path_options ; +- lib icuin : : intel windows sicuin static @path_options ; +- lib icuin : : this_is_an_invalid_library_name ; ++ ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = + $(ICU_PATH)/include +- shared:icuuc/shared +- shared:icudt/shared +- shared:icuin/shared +- static:icuuc +- static:icudt +- static:icuin +- BOOST_HAS_ICU=1 +- static:U_STATIC_IMPLEMENTATION=1 ++ icuuc ++ icudt ++ icuin ++ BOOST_HAS_ICU=1 + ; + } + + } + +-unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ; ++exe has_icu : has_icu_test.cpp : $(ICU_OPTS) ; + explicit has_icu ; + + alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ; +-- +2.12.2.windows.2 + diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 8200d54d1..6c7732021 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2 +Build-Depends: zlib, bzip2, icu [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 8faba6d72..212cd06b8 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -5,3 +5,31 @@ using msvc : 14.0 : cl.exe : using msvc : 14.1 : cl.exe : echo ; + +project user-config ; +lib advapi32 ; +lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ + advapi32 ; + +lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icuucd : : + @LIB_RUNTIME_LINK@ + advapi32 ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icuind : : + @LIB_RUNTIME_LINK@ ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icudtd : : + @LIB_RUNTIME_LINK@ ; \ No newline at end of file diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 3ed0ed9c5..74db8a524 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -32,7 +32,8 @@ FILE(READ "${DIFF}" content) STRING(REGEX REPLACE "include/" "" content "${content}") set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed) FILE(WRITE ${DIFF2} "${content}") -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2} + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-boost-ICU-support.patch) ###################### # Cleanup previous builds @@ -83,6 +84,7 @@ message(STATUS "Bootstrapping done") set(B2_OPTIONS -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" + -sICU_PATH="${CURRENT_INSTALLED_DIR}" -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration --hash @@ -92,10 +94,12 @@ set(B2_OPTIONS threading=multi ) +set(LIB_RUNTIME_LINK "shared") if (VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND B2_OPTIONS runtime-link=shared) else() list(APPEND B2_OPTIONS runtime-link=static) + set(LIB_RUNTIME_LINK "static") endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/boost/uwp/user-config.jam b/ports/boost/uwp/user-config.jam index 88e7c5974..975b1d412 100644 --- a/ports/boost/uwp/user-config.jam +++ b/ports/boost/uwp/user-config.jam @@ -13,3 +13,11 @@ using msvc : 14.1 : cl.exe : RuntimeObject.lib ole32.lib ; + +project user-config ; + +lib icuuc : : dummy_lib_that_doesnt_exist ; + +lib icuin : : dummy_lib_that_doesnt_exist ; + +lib icudt : : dummy_lib_that_doesnt_exist ; \ No newline at end of file -- cgit v1.2.3 From 481128e9792d47343b3a5682350569ebcebc63f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 19:12:01 +0200 Subject: Build boost.python --- ports/boost/CONTROL | 2 +- ports/boost/desktop/user-config.jam | 3 +++ ports/boost/portfile.cmake | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 6c7732021..e2d9f7dba 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows] +Build-Depends: zlib, bzip2, icu [windows], python3 [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 212cd06b8..83206c098 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -6,6 +6,9 @@ using msvc : 14.1 : cl.exe : echo ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; + project user-config ; lib advapi32 ; lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 74db8a524..8fd29a1f6 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -90,7 +90,6 @@ set(B2_OPTIONS --hash -q - --without-python threading=multi ) @@ -147,6 +146,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") --without-thread --without-iostreams --without-container + --without-python ) if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") find_path(PATH_TO_CL cl.exe) @@ -165,6 +165,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) endif() -- cgit v1.2.3 From 1304b772024dc09227fea9242a867794f764f9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 19:16:26 +0200 Subject: Bump boost version --- ports/boost/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index e2d9f7dba..1743379fb 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.65-1 +Version: 1.65-2 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2, icu [windows], python3 [windows] -- cgit v1.2.3 From d88f53de9c284cfc67ba21707d60a44ba41ede8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 14 Jul 2017 23:07:55 +0200 Subject: In debug configuration, link boost with debug Python libraries instead of release ones --- ports/boost/portfile.cmake | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 8fd29a1f6..530351c7e 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -93,6 +93,21 @@ set(B2_OPTIONS threading=multi ) +# Add build type specific options +set(B2_OPTIONS_DBG + -sZLIB_BINARY=zlibd + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" +) + +set(B2_OPTIONS_REL + -sZLIB_BINARY=zlib + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" +) + set(LIB_RUNTIME_LINK "shared") if (VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND B2_OPTIONS runtime-link=shared) @@ -172,6 +187,8 @@ else() string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + list(APPEND B2_OPTIONS_DBG + python-debugging=on) endif() if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") @@ -182,21 +199,14 @@ else() message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") endif() -# Add build type specific options set(B2_OPTIONS_DBG ${B2_OPTIONS} - -sZLIB_BINARY=zlibd - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - -sBZIP2_BINARY=bz2d - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + ${B2_OPTIONS_DBG} ) set(B2_OPTIONS_REL ${B2_OPTIONS} - -sZLIB_BINARY=zlib - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" - -sBZIP2_BINARY=bz2 - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + ${B2_OPTIONS_REL} ) ###################### -- cgit v1.2.3 From 3e4b7edb79073719b7cb6115279ce5150b7c761a Mon Sep 17 00:00:00 2001 From: Fabian Parzefall Date: Mon, 9 Oct 2017 12:48:44 +0200 Subject: Add port for imgui library --- ports/imgui/CMakeLists.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ ports/imgui/CONTROL | 4 ++++ ports/imgui/portfile.cmake | 23 +++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 ports/imgui/CMakeLists.txt create mode 100644 ports/imgui/CONTROL create mode 100644 ports/imgui/portfile.cmake diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt new file mode 100644 index 000000000..e0f524f02 --- /dev/null +++ b/ports/imgui/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.8) +project(imgui CXX) + +find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h) + +set(IMGUI_INCLUDES_PUBLIC + imgui.h + imconfig.h +) + +set(IMGUI_INCLUDES_PRIVATE + imgui_internal.h +) + +set(IMGUI_SOURCES + imgui.cpp + imgui_demo.cpp + imgui_draw.cpp +) + +add_library(imgui STATIC + ${IMGUI_INCLUDES_PUBLIC} + ${IMGUI_INCLUDES_PRIVATE} + ${IMGUI_SOURCES} +) + +target_include_directories(imgui + PRIVATE + ${IMGUI_INCLUDES_PRIVATE} + ${STB_INCLUDE_DIR} + + PUBLIC + ${IMGUI_INCLUDES_PUBLIC} +) + +install(TARGETS imgui + ARCHIVE DESTINATION lib +) + +if(NOT IMGUI_SKIP_HEADERS) + install( + FILES ${IMGUI_INCLUDES_PUBLIC} + DESTINATION include + ) +endif() diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL new file mode 100644 index 000000000..d0baa98db --- /dev/null +++ b/ports/imgui/CONTROL @@ -0,0 +1,4 @@ +Source: imgui +Version: 1.51 +Build-Depends: stb (windows) +Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake new file mode 100644 index 000000000..022efd8ce --- /dev/null +++ b/ports/imgui/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/imgui-1.51) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/ocornut/imgui/archive/v1.51.zip" + FILENAME "imgui-1.51.zip" + SHA512 a3c77887396991f8371c0cf5b42d781d758877cdb194a7c6ea8b34939f4b300f55f176d601dd0e167ea2a20bd8a47b958ad1bca16864a19c1cc9b2c7a889ab29 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DIMGUI_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright) -- cgit v1.2.3 From 88761e1b2fcd0a8c6fd153e589bc6f28c5bb0812 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 12 Oct 2017 12:56:58 +0300 Subject: [libidn2] initial port --- ports/libidn2/CMakeLists.txt | 105 +++++ ports/libidn2/CONTROL | 4 + ports/libidn2/config.h | 995 +++++++++++++++++++++++++++++++++++++++++++ ports/libidn2/portfile.cmake | 56 +++ ports/libidn2/string.h | 10 + 5 files changed, 1170 insertions(+) create mode 100644 ports/libidn2/CMakeLists.txt create mode 100644 ports/libidn2/CONTROL create mode 100644 ports/libidn2/config.h create mode 100644 ports/libidn2/portfile.cmake create mode 100644 ports/libidn2/string.h diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt new file mode 100644 index 000000000..9fbe1bcdd --- /dev/null +++ b/ports/libidn2/CMakeLists.txt @@ -0,0 +1,105 @@ +cmake_minimum_required(VERSION 3.8) + +project(libidn2 C) + +find_path(ICONV_INCLUDE_DIR iconv.h) +find_library(ICONV NAMES libiconv) +find_library(ICONV_CHARSET NAMES libcharset) + +set(CMAKE_DEBUG_POSTFIX "d") + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_definitions(-DIDN2_BUILDING) + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DIDN2_STATIC) +endif() + +# List the source files +set(LIB_SRC lib/bidi.c + lib/context.c + lib/data.c + lib/decode.c + lib/error.c + lib/free.c + lib/idna.c + lib/lookup.c + lib/puny_decode.c + lib/puny_encode.c + lib/register.c + lib/tables.c + lib/tr46map.c + lib/tr46map_data.c + lib/version.c +) + +# List the libunistring source files +set(UNISTR_SRC unistring/c-ctype.c + unistring/c-strcasecmp.c + unistring/c-strncasecmp.c + unistring/malloca.c + unistring/striconveh.c + unistring/striconveha.c + unistring/uniconv/u8-conv-from-enc.c + unistring/uniconv/u8-strconv-from-enc.c + unistring/uniconv/u8-strconv-from-locale.c + unistring/uniconv/u8-strconv-to-enc.c + unistring/uniconv/u8-strconv-to-locale.c + unistring/unistr/u32-cpy.c + unistring/unistr/u32-cpy-alloc.c + unistring/unistr/u32-mbtouc-unsafe.c + unistring/unistr/u32-strlen.c + unistring/unistr/u32-to-u8.c + unistring/unistr/u32-uctomb.c + unistring/unistr/u8-check.c + unistring/unistr/u8-mblen.c + unistring/unistr/u8-mbtouc.c + unistring/unistr/u8-mbtouc-aux.c + unistring/unistr/u8-mbtouc-unsafe.c + unistring/unistr/u8-mbtouc-unsafe-aux.c + unistring/unistr/u8-mbtoucr.c + unistring/unistr/u8-prev.c + unistring/unistr/u8-strlen.c + unistring/unistr/u8-to-u32.c + unistring/unistr/u8-uctomb.c + unistring/unistr/u8-uctomb-aux.c + unistring/uninorm/canonical-decomposition.c + unistring/uninorm/composition.c + unistring/uninorm/decompose-internal.c + unistring/uninorm/decomposition-table.c + unistring/uninorm/nfc.c + unistring/uninorm/nfd.c + unistring/uninorm/u32-normalize.c + unistring/unictype/bidi_of.c + unistring/unictype/categ_M.c + unistring/unictype/categ_none.c + unistring/unictype/categ_of.c + unistring/unictype/categ_test.c + unistring/unictype/combiningclass.c + unistring/unictype/joiningtype_of.c + unistring/unictype/scripts.c +) + +# List the gnulib source files +set(GL_SRC gl/rawmemchr.c + gl/strchrnul.c + gl/strverscmp.c + gl/msvc-inval.c + gl/msvc-nothrow.c +) + +add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) + +target_include_directories(libidn2 PRIVATE . ./unistring ./gl ${ICONV_INCLUDE_DIR}) +target_link_libraries(libidn2 PRIVATE ${ICONV} ${ICONV_CHARSET}) + +install(TARGETS libidn2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES lib/idn2.h DESTINATION include) diff --git a/ports/libidn2/CONTROL b/ports/libidn2/CONTROL new file mode 100644 index 000000000..46e81c7bf --- /dev/null +++ b/ports/libidn2/CONTROL @@ -0,0 +1,4 @@ +Source: libidn2 +Version: 2.0.4 +Build-Depends: libiconv +Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names. diff --git a/ports/libidn2/config.h b/ports/libidn2/config.h new file mode 100644 index 000000000..9e61bc8f2 --- /dev/null +++ b/ports/libidn2/config.h @@ -0,0 +1,995 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +/* #undef BITSIZEOF_PTRDIFF_T */ + +/* Define to the number of bits in type 'sig_atomic_t'. */ +/* #undef BITSIZEOF_SIG_ATOMIC_T */ + +/* Define to the number of bits in type 'size_t'. */ +/* #undef BITSIZEOF_SIZE_T */ + +/* Define to the number of bits in type 'wchar_t'. */ +/* #undef BITSIZEOF_WCHAR_T */ + +/* Define to the number of bits in type 'wint_t'. */ +/* #undef BITSIZEOF_WINT_T */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if // is a file system root distinct from /. */ +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module msvc-nothrow shall be considered present. */ +#define GNULIB_MSVC_NOTHROW 1 + +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#define GNULIB_STRERROR 1 + +/* Define to 1 when the gnulib module getdelim should be tested. */ +/* #undef GNULIB_TEST_GETDELIM */ + +/* Define to 1 when the gnulib module getline should be tested. */ +/* #undef GNULIB_TEST_GETLINE */ + +/* Define to 1 when the gnulib module malloc-posix should be tested. */ +/* #undef GNULIB_TEST_MALLOC_POSIX */ + +/* Define to 1 when the gnulib module rawmemchr should be tested. */ +/* #undef GNULIB_TEST_RAWMEMCHR */ + +/* Define to 1 when the gnulib module strchrnul should be tested. */ +/* #undef GNULIB_TEST_STRCHRNUL */ + +/* Define to 1 when the gnulib module strerror should be tested. */ +/* #undef GNULIB_TEST_STRERROR */ + +/* Define to 1 when the gnulib module strverscmp should be tested. */ +/* #undef GNULIB_TEST_STRVERSCMP */ + +/* Define to 1 when the gnulib module uninorm/u32-normalize should be tested. + */ +/* #undef GNULIB_TEST_UNINORM_U32_NORMALIZE */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u32-mbtouc-unsafe shall be considered + present. */ +#define GNULIB_UNISTR_U32_MBTOUC_UNSAFE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u32-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U32_UCTOMB 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtouc shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUC 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUCR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered + present. */ +#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U8_UCTOMB 1 + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getdelim', and to 0 if you + don't. */ +#define HAVE_DECL_GETDELIM 0 + +/* Define to 1 if you have the declaration of `getline', and to 0 if you + don't. */ +#define HAVE_DECL_GETLINE 0 + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 + +/* Define to 1 if you have the declaration of `program_invocation_short_name', + and to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 0 + +/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. + */ +#define HAVE_DECL___ARGV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `flockfile' function. */ +/* #undef HAVE_FLOCKFILE */ + +/* Define to 1 if you have the `funlockfile' function. */ +/* #undef HAVE_FUNLOCKFILE */ + +/* Define to 1 if you have the 'getdelim' function. */ +/* #undef HAVE_GETDELIM */ + +/* Define to 1 if you have the 'getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the 'getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if the compiler supports one of the keywords 'inline', + '__inline__', '__inline' and effectively inlines functions marked as such. + */ +#define HAVE_INLINE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define if you have the libunistring library. */ +/* #undef HAVE_LIBUNISTRING */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define if the 'malloc' function is POSIX compliant. */ +/* #undef HAVE_MALLOC_POSIX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 + +/* Define to 1 if you have the `rawmemchr' function. */ +/* #undef HAVE_RAWMEMCHR */ + +/* Define to 1 if atoll is declared even after undefining macros. */ +#define HAVE_RAW_DECL_ATOLL 1 + +/* Define to 1 if canonicalize_file_name is declared even after undefining + macros. */ +/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if chdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_CHDIR */ + +/* Define to 1 if chown is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_CHOWN */ + +/* Define to 1 if dprintf is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DPRINTF */ + +/* Define to 1 if dup is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP */ + +/* Define to 1 if dup2 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP2 */ + +/* Define to 1 if dup3 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP3 */ + +/* Define to 1 if endusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ENDUSERSHELL */ + +/* Define to 1 if environ is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ENVIRON */ + +/* Define to 1 if euidaccess is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_EUIDACCESS */ + +/* Define to 1 if faccessat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FACCESSAT */ + +/* Define to 1 if fchdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FCHDIR */ + +/* Define to 1 if fchownat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FCHOWNAT */ + +/* Define to 1 if fdatasync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FDATASYNC */ + +/* Define to 1 if ffsl is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FFSL */ + +/* Define to 1 if ffsll is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FFSLL */ + +/* Define to 1 if fpurge is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FPURGE */ + +/* Define to 1 if fseeko is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FSEEKO 1 + +/* Define to 1 if fsync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FSYNC */ + +/* Define to 1 if ftello is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FTELLO 1 + +/* Define to 1 if ftruncate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FTRUNCATE 1 + +/* Define to 1 if getcwd is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETCWD */ + +/* Define to 1 if getdelim is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDELIM */ + +/* Define to 1 if getdomainname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDOMAINNAME */ + +/* Define to 1 if getdtablesize is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDTABLESIZE */ + +/* Define to 1 if getgroups is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETGROUPS */ + +/* Define to 1 if gethostname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETHOSTNAME */ + +/* Define to 1 if getline is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLINE */ + +/* Define to 1 if getloadavg is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOADAVG */ + +/* Define to 1 if getlogin is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOGIN */ + +/* Define to 1 if getlogin_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOGIN_R */ + +/* Define to 1 if getpagesize is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETPAGESIZE */ + +/* Define to 1 if gets is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETS */ + +/* Define to 1 if getsubopt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETSUBOPT */ + +/* Define to 1 if getusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETUSERSHELL */ + +/* Define to 1 if grantpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GRANTPT */ + +/* Define to 1 if group_member is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GROUP_MEMBER */ + +/* Define to 1 if initstate is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE */ + +/* Define to 1 if initstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE_R */ + +/* Define to 1 if isatty is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ISATTY */ + +/* Define to 1 if lchown is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LCHOWN */ + +/* Define to 1 if link is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LINK */ + +/* Define to 1 if linkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LINKAT */ + +/* Define to 1 if lseek is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LSEEK */ + +/* Define to 1 if memmem is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMMEM */ + +/* Define to 1 if mempcpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMPCPY */ + +/* Define to 1 if memrchr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMRCHR */ + +/* Define to 1 if mkdtemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKDTEMP */ + +/* Define to 1 if mkostemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKOSTEMP */ + +/* Define to 1 if mkostemps is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKOSTEMPS */ + +/* Define to 1 if mkstemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKSTEMP */ + +/* Define to 1 if mkstemps is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKSTEMPS */ + +/* Define to 1 if pclose is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PCLOSE */ + +/* Define to 1 if pipe is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PIPE */ + +/* Define to 1 if pipe2 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PIPE2 */ + +/* Define to 1 if popen is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_POPEN */ + +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_POSIX_OPENPT */ + +/* Define to 1 if pread is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PREAD */ + +/* Define to 1 if ptsname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME */ + +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME_R */ + +/* Define to 1 if pwrite is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PWRITE */ + +/* Define to 1 if qsort_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_QSORT_R */ + +/* Define to 1 if random is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RANDOM */ + +/* Define to 1 if random_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RANDOM_R */ + +/* Define to 1 if rawmemchr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RAWMEMCHR */ + +/* Define to 1 if readlink is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_READLINK */ + +/* Define to 1 if readlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_READLINKAT */ + +/* Define to 1 if realpath is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_REALPATH */ + +/* Define to 1 if renameat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RENAMEAT */ + +/* Define to 1 if rmdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RMDIR */ + +/* Define to 1 if rpmatch is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RPMATCH */ + +/* Define to 1 if secure_getenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SECURE_GETENV */ + +/* Define to 1 if setenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETENV */ + +/* Define to 1 if sethostname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETHOSTNAME */ + +/* Define to 1 if setstate is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETSTATE */ + +/* Define to 1 if setstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETSTATE_R */ + +/* Define to 1 if setusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETUSERSHELL */ + +/* Define to 1 if sleep is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SLEEP 1 + +/* Define to 1 if snprintf is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SNPRINTF 1 + +/* Define to 1 if srandom is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SRANDOM */ + +/* Define to 1 if srandom_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SRANDOM_R */ + +/* Define to 1 if stpcpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STPCPY */ + +/* Define to 1 if stpncpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STPNCPY */ + +/* Define to 1 if strcasestr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRCASESTR */ + +/* Define to 1 if strchrnul is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRCHRNUL */ + +/* Define to 1 if strdup is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRDUP 1 + +/* Define to 1 if strerror_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRERROR_R */ + +/* Define to 1 if strncat is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNCAT 1 + +/* Define to 1 if strndup is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRNDUP */ + +/* Define to 1 if strnlen is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNLEN 1 + +/* Define to 1 if strpbrk is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRPBRK */ + +/* Define to 1 if strsep is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRSEP */ + +/* Define to 1 if strsignal is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRSIGNAL */ + +/* Define to 1 if strtod is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRTOD 1 + +/* Define to 1 if strtok_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOK_R */ + +/* Define to 1 if strtoll is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOLL */ + +/* Define to 1 if strtoull is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOULL */ + +/* Define to 1 if strverscmp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRVERSCMP */ + +/* Define to 1 if symlink is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SYMLINK */ + +/* Define to 1 if symlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SYMLINKAT */ + +/* Define to 1 if tmpfile is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_TMPFILE */ + +/* Define to 1 if truncate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_TRUNCATE 1 + +/* Define to 1 if ttyname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_TTYNAME_R */ + +/* Define to 1 if unlink is declared even after undefining macros. */ +#define HAVE_RAW_DECL_UNLINK 1 + +/* Define to 1 if unlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNLINKAT */ + +/* Define to 1 if unlockpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNLOCKPT */ + +/* Define to 1 if unsetenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNSETENV */ + +/* Define to 1 if usleep is declared even after undefining macros. */ +#define HAVE_RAW_DECL_USLEEP 1 + +/* Define to 1 if vdprintf is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_VDPRINTF */ + +/* Define to 1 if vsnprintf is declared even after undefining macros. */ +#define HAVE_RAW_DECL_VSNPRINTF 1 + +/* Define to 1 if _Exit is declared even after undefining macros. */ +#define HAVE_RAW_DECL__EXIT 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchrnul' function. */ +/* #undef HAVE_STRCHRNUL */ + +/* Define to 1 if you have the `strerror_r' function. */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strverscmp' function. */ +/* #undef HAVE_STRVERSCMP */ + +/* Define to 1 if you have the 'symlink' function. */ +/* #undef HAVE_SYMLINK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKET_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define if you have a global __progname variable */ +/* #undef HAVE_VAR___PROGNAME */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +/* #undef HAVE_VISIBILITY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK2_H 1 + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if O_NOATIME works. */ +#define HAVE_WORKING_O_NOATIME 0 + +/* Define to 1 if O_NOFOLLOW works. */ +#define HAVE_WORKING_O_NOFOLLOW 0 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 1 +#endif + + +/* Name of package */ +#define PACKAGE "libidn2" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "help-libidn@gnu.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libidn2" + +/* String identifying the packager of this software */ +/* #undef PACKAGE_PACKAGER */ + +/* Packager info for bug reports (URL/e-mail/...) */ +/* #undef PACKAGE_PACKAGER_BUG_REPORTS */ + +/* Packager-specific version information */ +/* #undef PACKAGE_PACKAGER_VERSION */ + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libidn2 2.0.4" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libidn2" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://www.gnu.org/software/libidn/#libidn2" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.0.4" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +/* #undef PTRDIFF_T_SUFFIX */ + +/* Define to 1 if strerror(0) does not return a message implying success. */ +/* #undef REPLACE_STRERROR_0 */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +/* #undef SIG_ATOMIC_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +/* #undef SIZE_T_SUFFIX */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.0.4" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +/* #undef WCHAR_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +/* #undef WINT_T_SUFFIX */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +/* #undef _NETBSD_SOURCE */ + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* For standard stat data types on VMS. */ +#define _USE_STD_STAT 1 + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_CONSTANT_MACROS */ + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_LIMIT_MACROS */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* A replacement for va_copy, if needed. */ +#define gl_va_copy(a,b) ((a) = (b)) + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#define ssize_t intptr_t + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED +#else +# define _GL_UNUSED_LABEL +#endif + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + + +/* Define as a macro for copying va_list variables. */ +/* #undef va_copy */ diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake new file mode 100644 index 000000000..41d79e3b1 --- /dev/null +++ b/ports/libidn2/portfile.cmake @@ -0,0 +1,56 @@ +include(vcpkg_common_functions) + +set(IDN2_VERSION 2.0.4) +set(IDN2_FILENAME libidn2-${IDN2_VERSION}.tar.gz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libidn2-${IDN2_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" + FILENAME "${IDN2_FILENAME}" + SHA512 1e51bd4b8f8907531576291f1c2a8865d17429b4105418b4c98754eb982cd1cbb3adbeab4ec0c1c561d2dba11d876c7c09e5dc5b315c55a2c24986d7a2a3b4d2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl) + +function(simple_copy_template_header FILE_PATH BASE_NAME) + if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h) + if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h) + configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h) + endif() + endif() +endfunction() + +# There seems to be no difference between source and destination files after 'configure' +# apart from auto-generated notification at the top. So why not just do a simple copy. +simple_copy_template_header(${SOURCE_PATH}/unistring uniconv) +simple_copy_template_header(${SOURCE_PATH}/unistring unictype) +simple_copy_template_header(${SOURCE_PATH}/unistring uninorm) +simple_copy_template_header(${SOURCE_PATH}/unistring unistr) +simple_copy_template_header(${SOURCE_PATH}/unistring unitypes) +simple_copy_template_header(${SOURCE_PATH}/unistring alloca) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(IDN2_BUILD_SHARED_LIBS ON) +else() + set(IDN2_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_SHARED_LIBS=${IDN2_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2) + +vcpkg_copy_pdbs() diff --git a/ports/libidn2/string.h b/ports/libidn2/string.h new file mode 100644 index 000000000..7ed5f5fdc --- /dev/null +++ b/ports/libidn2/string.h @@ -0,0 +1,10 @@ +#ifndef _GL_STRING_H +#define _GL_STRING_H + +char * strchrnul (const char *s, int c_in); +int strverscmp (const char *s1, const char *s2); +void * rawmemchr (const void *s, int c_in); + +#include <../ucrt/string.h> + +#endif /* _GL_STRING_H */ -- cgit v1.2.3 From bc141aa2c7e9e9adb81c16353d6de7e44c6136a1 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 12 Oct 2017 20:06:28 +0300 Subject: [libidn2] Remove redundant cmake option. --- ports/libidn2/portfile.cmake | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake index 41d79e3b1..bbe8f7bbe 100644 --- a/ports/libidn2/portfile.cmake +++ b/ports/libidn2/portfile.cmake @@ -33,16 +33,8 @@ simple_copy_template_header(${SOURCE_PATH}/unistring unistr) simple_copy_template_header(${SOURCE_PATH}/unistring unitypes) simple_copy_template_header(${SOURCE_PATH}/unistring alloca) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(IDN2_BUILD_SHARED_LIBS ON) -else() - set(IDN2_BUILD_SHARED_LIBS OFF) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_SHARED_LIBS=${IDN2_BUILD_SHARED_LIBS} ) vcpkg_install_cmake() -- cgit v1.2.3 From 3dfffcd5fd913aeff9fd3a0e9b0efdf40b6ff49b Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 13 Oct 2017 15:55:20 -0700 Subject: fix ceres VS2017 compilation error --- ports/ceres/CONTROL | 2 +- ports/ceres/portfile.cmake | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 4dde8c0bd..300b106da 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.13.0-1 +Version: 1.13.0-2 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 2f9d9d6e9..49353205e 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,24 +1,9 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - if(VCPKG_CRT_LINKAGE STREQUAL "static") message(FATAL_ERROR "Ceres does not currently support static CRT linkage") endif() include(vcpkg_common_functions) -set(VCPKG_PLATFORM_TOOLSET "v140") # Force VS2015 because VS2017 compiler return internal error -# eigen3\eigen\src\core\redux.h(237): fatal error C1001: An internal error has occurred in the compiler. [internal\ceres\ceres.vcxproj] - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ceres-solver/ceres-solver -- cgit v1.2.3 From 4ce8f0aa31da63f84fc81dfd895faaeb03d5c7b1 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 13 Oct 2017 21:25:18 -0700 Subject: new port: cgal --- ports/cgal/CONTROL | 4 ++++ ports/cgal/portfile.cmake | 26 ++++++++++++++++++++++++++ scripts/cmake/vcpkg_from_github.cmake | 1 + 3 files changed, 31 insertions(+) create mode 100644 ports/cgal/CONTROL create mode 100644 ports/cgal/portfile.cmake diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL new file mode 100644 index 000000000..d6d01956d --- /dev/null +++ b/ports/cgal/CONTROL @@ -0,0 +1,4 @@ +Source: cgal +Version: 4.11 +Build-Depends:mpfr, mpir, zlib, boost, qt5 +Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake new file mode 100644 index 000000000..c55d0ba3e --- /dev/null +++ b/ports/cgal/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGAL/cgal + REF releases/CGAL-4.11 + SHA512 91e555d5988bee387afa31331e1e3a8990206468fd8c774fd82979d9ff169e9c4835ecc6ba3d576cda617b6cb2cd52d27657d2434e38b29ce0e7e643436810ab + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/CGAL") + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright of suitesparse and metis +file(COPY ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 645690353..d14077410 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -80,6 +80,7 @@ function(vcpkg_from_github) else() # Sometimes GitHub strips a leading 'v' off the REF. string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) set(SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") if(EXISTS ${SOURCE_PATH}) set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) -- cgit v1.2.3 From 1f84970219822f8cf124925f7e8923c797a7d883 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 21:57:18 -0700 Subject: [abseil] Remove patch that has already been upstreamed. Fixes #1977 --- ports/abseil/fix-intrin.patch | 12 ------------ ports/abseil/portfile.cmake | 5 ----- 2 files changed, 17 deletions(-) delete mode 100644 ports/abseil/fix-intrin.patch diff --git a/ports/abseil/fix-intrin.patch b/ports/abseil/fix-intrin.patch deleted file mode 100644 index 285adde0f..000000000 --- a/ports/abseil/fix-intrin.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/absl/base/optimization.h b/absl/base/optimization.h -index db8beaf..aaaffa4 100644 ---- a/absl/base/optimization.h -+++ b/absl/base/optimization.h -@@ -46,6 +46,7 @@ - // GCC will not tail call given inline volatile assembly. - #define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") - #elif defined(_MSC_VER) -+#include - // The __nop() intrinsic blocks the optimisation. - #define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __nop() - #else diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 8273f80e3..d74369951 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -15,11 +15,6 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-intrin.patch" -) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( -- cgit v1.2.3 From a607ad686033e455286986934ad57cebdf0a84f5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 22:26:06 -0700 Subject: [imgui] Use vcpkg_from_github, use stb from vcpkg. --- ports/imgui/CMakeLists.txt | 16 +++++++--------- ports/imgui/CONTROL | 4 ++-- ports/imgui/portfile.cmake | 22 ++++++++++++++++------ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index e0f524f02..a4c49a337 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.8) project(imgui CXX) +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h) set(IMGUI_INCLUDES_PUBLIC @@ -18,22 +21,17 @@ set(IMGUI_SOURCES imgui_draw.cpp ) -add_library(imgui STATIC +add_library(imgui ${IMGUI_INCLUDES_PUBLIC} ${IMGUI_INCLUDES_PRIVATE} ${IMGUI_SOURCES} ) -target_include_directories(imgui - PRIVATE - ${IMGUI_INCLUDES_PRIVATE} - ${STB_INCLUDE_DIR} - - PUBLIC - ${IMGUI_INCLUDES_PUBLIC} -) +target_include_directories(imgui PUBLIC ${STB_INCLUDE_DIR}) install(TARGETS imgui + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index d0baa98db..35e041de1 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,4 +1,4 @@ Source: imgui -Version: 1.51 -Build-Depends: stb (windows) +Version: 1.51-1 +Build-Depends: stb Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 022efd8ce..587a4cf19 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -1,13 +1,23 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/imgui-1.51) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ocornut/imgui/archive/v1.51.zip" - FILENAME "imgui-1.51.zip" - SHA512 a3c77887396991f8371c0cf5b42d781d758877cdb194a7c6ea8b34939f4b300f55f176d601dd0e167ea2a20bd8a47b958ad1bca16864a19c1cc9b2c7a889ab29 + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ocornut/imgui + REF v1.51 + SHA512 33aea46d0ab8419fcd4af765c9f1a88dfb1b80ad466276b655a67f40ffedabe399db6b0d76a2ece74e551928bd6f842ae3fa42998e0b1a2206157a3852e002d6 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(GLOB STB_HEADERS ${SOURCE_PATH}/stb_*.h) +if(STB_HEADERS) + file(REMOVE ${STB_HEADERS}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 93497f5eab0c1628cc5b1a3a9a671c069c8f8533 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 22:16:46 -0700 Subject: Casing and specification correctness --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 23c2c2f7e..3901566d9 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -93,16 +93,21 @@ namespace vcpkg::Commands::Autocomplete struct CommandEntry { + constexpr CommandEntry(const CStringView& regex, const CommandStructure& structure) + : regex(regex), structure(structure) + { + } + CStringView regex; const CommandStructure& structure; }; - static constexpr CommandEntry commands[] = { - {R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, - {R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, - {R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + static constexpr CommandEntry COMMANDS[] = { + CommandEntry{R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, + CommandEntry{R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, }; - for (auto&& command : commands) + for (auto&& command : COMMANDS) { if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()})) { -- cgit v1.2.3 From 6942c00a453c9fa4f9fbde7ba821974110b43d57 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:23:39 -0700 Subject: [triplet] Remove obsolete check about dash in the name Triplets haven't required that for a while now --- toolsrc/src/vcpkg/triplet.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index 8a84ee2b2..4ebb97a9b 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -41,9 +41,6 @@ namespace vcpkg Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) { std::string s(Strings::ascii_to_lowercase(triplet_as_string)); - const auto it = std::find(s.cbegin(), s.cend(), '-'); - Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string); - const auto p = g_triplet_instances.emplace(std::move(s)); return &*p.first; } -- cgit v1.2.3 From b486be5eb3b12c0a6fa0a81992768340317ec5c2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:24:34 -0700 Subject: Introduce VcpkgPaths::get_available_triplets() --- toolsrc/include/vcpkg/vcpkgpaths.h | 2 ++ toolsrc/src/vcpkg/help.cpp | 4 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 25 ++++++++++++++++--------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index fb9285a84..32dd2e833 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -36,6 +36,7 @@ namespace vcpkg fs::path build_info_file_path(const PackageSpec& spec) const; fs::path listfile_path(const BinaryParagraph& pgh) const; + const std::vector& get_available_triplets() const; bool is_valid_triplet(const Triplet& t) const; fs::path root; @@ -74,6 +75,7 @@ namespace vcpkg Files::Filesystem& get_filesystem() const; private: + Lazy> available_triplets; Lazy cmake_exe; Lazy git_exe; Lazy nuget_exe; diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 7867f71d2..2a0578211 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -16,9 +16,9 @@ namespace vcpkg::Help void help_topic_valid_triplet(const VcpkgPaths& paths) { System::println("Available architecture triplets:"); - for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.triplets)) + for (auto&& triplet : paths.get_available_triplets()) { - System::println(" %s", path.stem().filename().string()); + System::println(" %s", triplet); } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 07ce5c961..c57077eaa 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -255,18 +255,25 @@ namespace vcpkg return this->vcpkg_dir_info / (pgh.fullstem() + ".list"); } - bool VcpkgPaths::is_valid_triplet(const Triplet& t) const + const std::vector& VcpkgPaths::get_available_triplets() const { - for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets)) - { - const std::string triplet_file_name = path.stem().generic_u8string(); - if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare + return this->available_triplets.get_lazy([this]() -> std::vector { + + std::vector output; + for (auto&& path : this->get_filesystem().get_files_non_recursive(this->triplets)) { - // t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare - return true; + output.push_back(path.stem().filename().string()); } - } - return false; + + return output; + }); + } + + bool VcpkgPaths::is_valid_triplet(const Triplet& t) const + { + auto it = Util::find_if(this->get_available_triplets(), + [&](auto&& available_triplet) { return t.canonical_name() == available_triplet; }); + return it != this->get_available_triplets().cend(); } const fs::path& VcpkgPaths::get_cmake_exe() const -- cgit v1.2.3 From e46ec5369318f84f359af9f88cb3d517329bf088 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:33:52 -0700 Subject: Remove unused functions --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 34 ----------------------------- 1 file changed, 34 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 3901566d9..feca75dcd 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -10,40 +10,6 @@ namespace vcpkg::Commands::Autocomplete { - std::vector autocomplete_install( - const std::vector>& source_paragraphs, const std::string& start_with) - { - std::vector results; - - for (const auto& source_control_file : source_paragraphs) - { - auto&& sp = *source_control_file->core_paragraph; - - if (Strings::case_insensitive_ascii_starts_with(sp.name, start_with)) - { - results.push_back(sp.name); - } - } - return results; - } - - std::vector autocomplete_remove(std::vector installed_packages, - const std::string& start_with) - { - std::vector results; - - for (const auto& installed_package : installed_packages) - { - const auto sp = installed_package->package.displayname(); - - if (Strings::case_insensitive_ascii_starts_with(sp, start_with)) - { - results.push_back(sp); - } - } - return results; - } - [[noreturn]] static void output_sorted_results_and_exit(const LineInfo& line_info, std::vector&& results) { -- cgit v1.2.3 From 798f8a91e43bfdeda8113639ff262f42e5ab6f84 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:53:35 -0700 Subject: Introduce Vectors::concatenate() --- toolsrc/include/vcpkg/base/util.h | 17 +++++++++++++---- toolsrc/src/vcpkg/install.cpp | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 3834580b6..4f06a8231 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -7,6 +7,18 @@ namespace vcpkg::Util { + template + using ElementT = std::remove_reference_t()))>; + + namespace Vectors + { + template> + void concatenate(std::vector* augend, const Container& addend) + { + augend->insert(augend->end(), addend.begin(), addend.end()); + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); @@ -71,9 +83,6 @@ namespace vcpkg::Util return std::find_if(begin(cont), end(cont), pred); } - template - using ElementT = std::remove_reference_t()))>; - template> std::vector element_pointers(Container&& cont) { @@ -153,4 +162,4 @@ namespace vcpkg::Util std::unique_lock m_lock; T& m_ptr; }; -} \ No newline at end of file +} diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 26f729a57..4a1e5537b 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -145,7 +145,7 @@ namespace vcpkg::Install continue; } - output.insert(output.end(), t.files.begin(), t.files.end()); + Util::Vectors::concatenate(&output, t.files); } std::sort(output.begin(), output.end()); -- cgit v1.2.3 From 01f47f5823b0c0db4a7e3e5b690dbc809429da56 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 01:14:04 -0700 Subject: [autocomplete] Add triplet completion for `vcpkg install` --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 65 +++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index feca75dcd..addb9edaf 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -19,6 +19,13 @@ namespace vcpkg::Commands::Autocomplete Checks::exit_success(line_info); } + std::vector combine_port_with_triplets(const std::string& port, + const std::vector& triplets) + { + return Util::fmap(triplets, + [&](const std::string& triplet) { return Strings::format("%s:%s", port, triplet); }); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { Metrics::g_metrics.lock()->set_send_metrics(false); @@ -57,41 +64,75 @@ namespace vcpkg::Commands::Autocomplete output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands)); } + // Handles vcpkg install package: + if (std::regex_match(to_autocomplete, match, std::regex{R"###(^install(.*|)\s([^:]+):(\S*)$)###"})) + { + const auto port_name = match[2].str(); + const auto triplet_prefix = match[3].str(); + + auto maybe_port = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(port_name)); + if (maybe_port.error()) + { + Checks::exit_success(VCPKG_LINE_INFO); + } + + std::vector triplets = paths.get_available_triplets(); + Util::unstable_keep_if(triplets, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, triplet_prefix); + }); + + auto result = combine_port_with_triplets(port_name, triplets); + + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(result)); + } + struct CommandEntry { - constexpr CommandEntry(const CStringView& regex, const CommandStructure& structure) - : regex(regex), structure(structure) + constexpr CommandEntry(const CStringView& name, const CStringView& regex, const CommandStructure& structure) + : name(name), regex(regex), structure(structure) { } + CStringView name; CStringView regex; const CommandStructure& structure; }; + static constexpr CommandEntry COMMANDS[] = { - CommandEntry{R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, - CommandEntry{R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, - CommandEntry{R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, + CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, }; for (auto&& command : COMMANDS) { if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()})) { - auto prefix = match[2].str(); - std::vector v; + const auto prefix = match[2].str(); + std::vector results; + if (Strings::case_insensitive_ascii_starts_with(prefix, "-")) { - v = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); + results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); } else { - v = command.structure.valid_arguments(paths); + results = command.structure.valid_arguments(paths); } - Util::unstable_keep_if( - v, [&](const std::string& s) { return Strings::case_insensitive_ascii_starts_with(s, prefix); }); + Util::unstable_keep_if(results, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, prefix); + }); + + if (command.name == "install" && results.size() == 1) + { + const auto port_at_each_triplet = + combine_port_with_triplets(results[0], paths.get_available_triplets()); + Util::Vectors::concatenate(&results, port_at_each_triplet); + } - output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(v)); + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(results)); } } -- cgit v1.2.3 From 81613fa0ff506852fbb90757fc27f87ffe591fee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 16 Oct 2017 11:22:21 -0700 Subject: [vcpkg-toolchain] Improvements; add VCPKG_CHAINLOAD_TOOLCHAIN_FILE --- ports/butteraugli/CMakeLists.txt | 24 +-- ports/libjpeg-turbo/portfile.cmake | 15 +- scripts/buildsystems/vcpkg.cmake | 267 ++++++++++++++++-------------- scripts/cmake/vcpkg_configure_cmake.cmake | 106 +++++++----- 4 files changed, 219 insertions(+), 193 deletions(-) diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt index 3bd8a6c37..0b5373c5a 100644 --- a/ports/butteraugli/CMakeLists.txt +++ b/ports/butteraugli/CMakeLists.txt @@ -1,29 +1,19 @@ cmake_minimum_required(VERSION 3.8.0) -project(butteraugli) +project(butteraugli CXX) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018) endif() - - find_package(JPEG REQUIRED) find_package(PNG REQUIRED) -include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) - -if(BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() - +include_directories(".") add_library(butteraugli_lib butteraugli/butteraugli.cc) -add_executable(butteraugli butteraugli/butteraugli_main.cc) - -target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) - - install( TARGETS butteraugli_lib RUNTIME DESTINATION bin @@ -32,6 +22,10 @@ install( ) if(NOT DISABLE_INSTALL_TOOLS) + add_executable(butteraugli butteraugli/butteraugli_main.cc) + target_include_directories(butteraugli PRIVATE ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) + target_link_libraries(butteraugli PRIVATE butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) + install ( TARGETS butteraugli RUNTIME DESTINATION tools/butteraugli diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index d1138dbbf..a5d09fda2 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -16,12 +16,12 @@ vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_STATIC OFF) - set(NOT_BUILD_STATIC ON) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(ENABLE_STATIC OFF) + set(ENABLE_SHARED ON) else() - set(BUILD_STATIC ON) - set(NOT_BUILD_STATIC OFF) + set(ENABLE_STATIC ON) + set(ENABLE_SHARED OFF) endif() if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") @@ -32,9 +32,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DENABLE_STATIC=${BUILD_STATIC} - -DENABLE_SHARED=${NOT_BUILD_STATIC} - -DWITH_CRT_DLL=ON + -DENABLE_STATIC=${ENABLE_STATIC} + -DENABLE_SHARED=${ENABLE_SHARED} -DENABLE_EXECUTABLES=OFF -DINSTALL_DOCS=OFF ${LIBJPEGTURBO_SIMD} diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d8c7ee6b8..19fc99af7 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,156 +1,175 @@ # Mark variables as used so cmake doesn't complain about them -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) -if(NOT VCPKG_TOOLCHAIN) - if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") +mark_as_advanced(CMAKE_TOOLCHAIN_FILE) + +if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") +endif() + +if(VCPKG_TOOLCHAIN) + return() +endif() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if( _CMAKE_IN_TRY_COMPILE ) + include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) +endif() + +if(VCPKG_TARGET_TRIPLET) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) +else() + if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() - if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + find_program(_VCPKG_CL cl) + if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + elseif(_VCPKG_CL MATCHES "arm/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() - find_program(_VCPKG_CL cl) - if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(_VCPKG_CL MATCHES "arm/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - else() - message(FATAL_ERROR "Unable to determine target architecture.") - endif() + message(FATAL_ERROR "Unable to determine target architecture.") endif() endif() +endif() - if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") - set(_VCPKG_TARGET_TRIPLET_PLAT uwp) - else() - set(_VCPKG_TARGET_TRIPLET_PLAT windows) - endif() +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(_VCPKG_TARGET_TRIPLET_PLAT uwp) +else() + set(_VCPKG_TARGET_TRIPLET_PLAT windows) +endif() - set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") - set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) +set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") +set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) - #Detect .vcpkg-root to figure VCPKG_ROOT_DIR - SET(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) - while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") - get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) - if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive - message(FATAL_ERROR "Could not find .vcpkg-root") - else() - SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) - endif() - endwhile() - set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) - set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) - - if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) - list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug - ) - list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link - ) +# Detect .vcpkg-root to figure VCPKG_ROOT_DIR +set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) +while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") + get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) + if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive + message(FATAL_ERROR "Could not find .vcpkg-root") + else() + SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) endif() +endwhile() +set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) +set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) + +if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ) list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ) +endif() +list(APPEND CMAKE_PREFIX_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} +) +list(APPEND CMAKE_LIBRARY_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link +) - set(Boost_COMPILER "-vc140") +set(Boost_COMPILER "-vc140") - if (NOT DEFINED CMAKE_SYSTEM_VERSION) - include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) - # This is used as an implicit parameter for vcpkg_get_windows_sdk - set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) - vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) - unset(VCPKG_ROOT_DIR) - set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION}) - endif() +if (NOT DEFINED CMAKE_SYSTEM_VERSION) + include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) + # This is used as an implicit parameter for vcpkg_get_windows_sdk + set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) + vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) + unset(VCPKG_ROOT_DIR) + set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version") +endif() - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) - set(CMAKE_SYSTEM_IGNORE_PATH - "${_programfiles}/OpenSSL" - "${_programfiles}/OpenSSL-Win32" - "${_programfiles}/OpenSSL-Win64" - "${_programfiles}/OpenSSL-Win32/lib/VC" - "${_programfiles}/OpenSSL-Win64/lib/VC" - "${_programfiles}/OpenSSL-Win32/lib/VC/static" - "${_programfiles}/OpenSSL-Win64/lib/VC/static" - "C:/OpenSSL/" - "C:/OpenSSL-Win32/" - "C:/OpenSSL-Win64/" - "C:/OpenSSL-Win32/lib/VC" - "C:/OpenSSL-Win64/lib/VC" - "C:/OpenSSL-Win32/lib/VC/static" - "C:/OpenSSL-Win64/lib/VC/static" - ) +file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) +set(CMAKE_SYSTEM_IGNORE_PATH + "${_programfiles}/OpenSSL" + "${_programfiles}/OpenSSL-Win32" + "${_programfiles}/OpenSSL-Win64" + "${_programfiles}/OpenSSL-Win32/lib/VC" + "${_programfiles}/OpenSSL-Win64/lib/VC" + "${_programfiles}/OpenSSL-Win32/lib/VC/static" + "${_programfiles}/OpenSSL-Win64/lib/VC/static" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + "C:/OpenSSL-Win32/lib/VC" + "C:/OpenSSL-Win64/lib/VC" + "C:/OpenSSL-Win32/lib/VC/static" + "C:/OpenSSL-Win64/lib/VC/static" +) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) - file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) - foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) - if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) - endif() - endforeach() - - option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) - function(add_executable name) - _add_executable(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) - if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - if(VCPKG_APPLOCAL_DEPS) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 - -targetBinary $ - -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" - -OutVariable out - ) - endif() - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) - endif() - endfunction() - - function(add_library name) - _add_library(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "INTERFACE" INTERFACE_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) - if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) - endif() - endfunction() +set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) +file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) +foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) + if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) + endif() +endforeach() - macro(find_package name) - if(name STREQUAL "Boost") - unset(Boost_USE_STATIC_LIBS) +option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) +function(add_executable name) + _add_executable(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + if(VCPKG_APPLOCAL_DEPS) + add_custom_command(TARGET ${name} POST_BUILD + COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 + -targetBinary $ + -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" + -OutVariable out + ) endif() - _find_package(${ARGV}) - endmacro() + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() - set(VCPKG_TOOLCHAIN ON) -endif() +function(add_library name) + _add_library(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "INTERFACE" INTERFACE_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() + +macro(find_package name) + if(name STREQUAL "Boost") + unset(Boost_USE_STATIC_LIBS) + endif() + _find_package(${ARGV}) +endmacro() -set(_UNUSED ${CMAKE_TOOLCHAIN_FILE}) +set(VCPKG_TOOLCHAIN ON) set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) + +if(NOT _CMAKE_IN_TRY_COMPILE) + file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" + "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" + "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n") +endif() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index bfb6a19fd..b979245aa 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -61,37 +61,39 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") + else() + message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") endif() # If we use Ninja, make sure it's on PATH @@ -104,15 +106,18 @@ function(vcpkg_configure_cmake) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) - list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") endif() if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) - list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") endif() - if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) - elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) + else() + message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". It must be \"static\" or \"dynamic\"") endif() if((NOT DEFINED VCPKG_CXX_FLAGS_DEBUG AND NOT DEFINED VCPKG_C_FLAGS_DEBUG) OR @@ -131,10 +136,45 @@ function(vcpkg_configure_cmake) message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") endif() + if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + else() + set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}") + set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" + ) + elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" + ) + else() + message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") + endif() + + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + ) + list(APPEND _csc_OPTIONS + "-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}" + ) + endif() + list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" - "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" - "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" @@ -151,32 +191,6 @@ function(vcpkg_configure_cmake) ) endif() - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - - elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - endif() - - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( -- cgit v1.2.3 From 7214c3583bdf569bc873305908ec109a6c8716cc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 16 Oct 2017 11:44:04 -0700 Subject: [vcpkg] Push use of UTF-16 to only around Win32 call boundaries. --- toolsrc/include/pch.h | 18 ++- toolsrc/include/vcpkg/base/cstringview.h | 1 + toolsrc/include/vcpkg/base/expected.h | 2 +- toolsrc/include/vcpkg/base/files.h | 14 ++- toolsrc/include/vcpkg/base/graphs.h | 6 +- toolsrc/include/vcpkg/base/strings.h | 19 +-- toolsrc/include/vcpkg/base/system.h | 15 +-- toolsrc/include/vcpkg/base/util.h | 3 +- toolsrc/include/vcpkg/build.h | 2 +- toolsrc/include/vcpkg/dependencies.h | 5 +- toolsrc/include/vcpkg/packagespec.h | 33 +++--- toolsrc/include/vcpkg/packagespecparseresult.h | 2 +- toolsrc/include/vcpkg/paragraphparseresult.h | 11 +- toolsrc/include/vcpkg/sourceparagraph.h | 2 +- toolsrc/include/vcpkg/triplet.h | 11 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 4 + toolsrc/include/vcpkg/vcpkglib.h | 15 ++- toolsrc/include/vcpkg/vcpkgpaths.h | 8 +- toolsrc/src/vcpkg.cpp | 46 ++++++-- toolsrc/src/vcpkg/base/checks.cpp | 12 +- toolsrc/src/vcpkg/base/cofffilereader.cpp | 7 +- toolsrc/src/vcpkg/base/files.cpp | 13 +- toolsrc/src/vcpkg/base/strings.cpp | 21 +++- toolsrc/src/vcpkg/base/system.cpp | 157 ++++++++++++++++++------- toolsrc/src/vcpkg/binaryparagraph.cpp | 4 +- toolsrc/src/vcpkg/build.cpp | 72 ++++++------ toolsrc/src/vcpkg/commands.create.cpp | 6 +- toolsrc/src/vcpkg/commands.edit.cpp | 15 ++- toolsrc/src/vcpkg/commands.env.cpp | 2 +- toolsrc/src/vcpkg/commands.exportifw.cpp | 32 ++--- toolsrc/src/vcpkg/commands.hash.cpp | 23 ++-- toolsrc/src/vcpkg/commands.integrate.cpp | 33 ++++-- toolsrc/src/vcpkg/commands.portsdiff.cpp | 46 ++++---- toolsrc/src/vcpkg/commands.version.cpp | 15 ++- toolsrc/src/vcpkg/dependencies.cpp | 15 ++- toolsrc/src/vcpkg/export.cpp | 43 ++++--- toolsrc/src/vcpkg/globalstate.cpp | 8 +- toolsrc/src/vcpkg/install.cpp | 5 +- toolsrc/src/vcpkg/metrics.cpp | 44 ++++--- toolsrc/src/vcpkg/packagespec.cpp | 4 +- toolsrc/src/vcpkg/parse.cpp | 2 +- toolsrc/src/vcpkg/postbuildlint.cpp | 39 ++---- toolsrc/src/vcpkg/remove.cpp | 2 +- toolsrc/src/vcpkg/sourceparagraph.cpp | 6 +- toolsrc/src/vcpkg/triplet.cpp | 11 +- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 14 ++- toolsrc/src/vcpkg/vcpkglib.cpp | 26 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 102 ++++++++-------- 48 files changed, 592 insertions(+), 404 deletions(-) diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 8333eb927..5c31fbbd1 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -1,5 +1,6 @@ #pragma once +#if defined(_WIN32) #define NOMINMAX #define WIN32_LEAN_AND_MEAN @@ -9,6 +10,13 @@ #pragma warning(suppress : 4768) #include +#include +#include +#include +#else +#include +#endif + #include #include #include @@ -19,7 +27,12 @@ #include #include #include +#if defined(_WIN32) #include +#else +#include +#endif +#include #include #include #include @@ -28,18 +41,17 @@ #include #include #include -#include #include #include -#include #include #include #include +#include #include +#include #include #include #include #include #include #include -#include diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index 341830f05..eac204f97 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -1,5 +1,6 @@ #pragma once +#include #include namespace vcpkg diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index a946c442e..b3b81ae81 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -33,7 +33,7 @@ namespace vcpkg ErrorHolder() = default; ErrorHolder(const std::error_code& err) : m_err(err) {} - constexpr bool has_error() const { return bool(m_err); } + bool has_error() const { return bool(m_err); } const std::error_code& error() const { return m_err; } std::error_code& error() { return m_err; } diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index f4bcf742c..63cf3c6fd 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -2,7 +2,11 @@ #include +#if defined(_WIN32) #include +#else +#include +#endif namespace fs { @@ -19,7 +23,7 @@ namespace fs namespace vcpkg::Files { - __interface Filesystem + struct Filesystem { virtual Expected read_contents(const fs::path& file_path) const = 0; virtual Expected> read_lines(const fs::path& file_path) const = 0; @@ -40,8 +44,10 @@ namespace vcpkg::Files virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0; virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0; virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0; - virtual bool copy_file( - const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0; + virtual bool copy_file(const fs::path& oldpath, + const fs::path& newpath, + fs::copy_options opts, + std::error_code& ec) = 0; virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; }; @@ -53,5 +59,5 @@ namespace vcpkg::Files void print_paths(const std::vector& paths); - std::vector find_from_PATH(const std::wstring& name); + std::vector find_from_PATH(const std::string& name); } diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h index ff56cb298..b585d2bb9 100644 --- a/toolsrc/include/vcpkg/base/graphs.h +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -20,11 +20,11 @@ namespace vcpkg::Graphs }; template - __interface AdjacencyProvider + struct AdjacencyProvider { - std::vector adjacency_list(const U& vertex) const; + virtual std::vector adjacency_list(const U& vertex) const = 0; - U load_vertex_data(const V& vertex) const; + virtual U load_vertex_data(const V& vertex) const = 0; }; template diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 59823deb8..93b36a29d 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -16,15 +16,11 @@ namespace vcpkg::Strings::details inline const char* to_printf_arg(const char* s) { return s; } - inline int to_printf_arg(const int s) { return s; } - - inline long long to_printf_arg(const long long s) { return s; } - - inline unsigned long to_printf_arg(const unsigned long s) { return s; } - - inline size_t to_printf_arg(const size_t s) { return s; } - - inline double to_printf_arg(const double s) { return s; } + template::value>> + inline T to_printf_arg(T s) + { + return s; + } std::string format_internal(const char* fmtstr, ...); @@ -37,9 +33,6 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { - static constexpr const char* EMPTY = ""; - static constexpr const wchar_t* WEMPTY = L""; - template std::string format(const char* fmtstr, const Args&... args) { @@ -62,7 +55,7 @@ namespace vcpkg::Strings bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); - bool case_insensitive_ascii_compare(const CStringView left, const CStringView right); + bool case_insensitive_ascii_equals(const CStringView left, const CStringView right); std::string ascii_to_lowercase(const std::string& input); diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index a2e8f3f45..f2344c919 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -4,7 +4,6 @@ #include #include -#include namespace vcpkg::System { @@ -18,13 +17,13 @@ namespace vcpkg::System std::string output; }; - int cmd_execute_clean(const CWStringView cmd_line); + int cmd_execute_clean(const CStringView cmd_line); - int cmd_execute(const CWStringView cmd_line); + int cmd_execute(const CStringView cmd_line); - ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line); + ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY); + std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args = ""); enum class Color { @@ -63,9 +62,11 @@ namespace vcpkg::System return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); } - Optional get_environment_variable(const CWStringView varname) noexcept; + Optional get_environment_variable(const CStringView varname) noexcept; - Optional get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); + Optional get_registry_string(void* base_hkey, + const CWStringView subkey, + const CWStringView valuename); enum class CPUArchitecture { diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 4f06a8231..d5db6b6ee 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -98,7 +99,7 @@ namespace vcpkg::Util } template - void group_by(const Container& cont, _Inout_ std::map>* output, Func&& f) + void group_by(const Container& cont, std::map>* output, Func&& f) { for (const V& element : cont) { diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index f146e9951..774e25922 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -96,7 +96,7 @@ namespace vcpkg::Build Optional visual_studio_path; }; - std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); struct ExtendedBuildResult { diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 2301dbc36..585338ae2 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -115,7 +115,10 @@ namespace vcpkg::Dependencies RequestType request_type; }; - __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; }; + struct PortFileProvider + { + virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0; + }; struct MapPortFile : Util::ResourceBase, PortFileProvider { diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index ee34f14a3..60c99782e 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -76,20 +76,23 @@ namespace vcpkg bool operator!=(const PackageSpec& left, const PackageSpec& right); } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::PackageSpec& value) const + template<> + struct hash { - size_t hash = 17; - hash = hash * 31 + std::hash()(value.name()); - hash = hash * 31 + std::hash()(value.triplet()); - return hash; - } -}; - -template<> -struct std::equal_to -{ - bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; } -}; + size_t operator()(const vcpkg::PackageSpec& value) const + { + size_t hash = 17; + hash = hash * 31 + std::hash()(value.name()); + hash = hash * 31 + std::hash()(value.triplet()); + return hash; + } + }; + + template<> + struct equal_to + { + bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; } + }; +} diff --git a/toolsrc/include/vcpkg/packagespecparseresult.h b/toolsrc/include/vcpkg/packagespecparseresult.h index 8a56574fd..dd91c9a67 100644 --- a/toolsrc/include/vcpkg/packagespecparseresult.h +++ b/toolsrc/include/vcpkg/packagespecparseresult.h @@ -20,7 +20,7 @@ namespace vcpkg ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {} ErrorHolder(PackageSpecParseResult err) : m_err(err) {} - constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } + bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } const PackageSpecParseResult& error() const { return m_err; } PackageSpecParseResult& error() { return m_err; } diff --git a/toolsrc/include/vcpkg/paragraphparseresult.h b/toolsrc/include/vcpkg/paragraphparseresult.h index abdd9eecd..558715bbc 100644 --- a/toolsrc/include/vcpkg/paragraphparseresult.h +++ b/toolsrc/include/vcpkg/paragraphparseresult.h @@ -26,8 +26,11 @@ namespace vcpkg ParagraphParseResult to_paragraph_parse_result(std::error_code ec); } -// Enable implicit conversion to std::error_code -template<> -struct std::is_error_code_enum : ::std::true_type +namespace std { -}; + // Enable implicit conversion to std::error_code + template<> + struct is_error_code_enum : ::std::true_type + { + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 0a02e4cda..dcbbc1c3b 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -3,8 +3,8 @@ #include #include -#include #include +#include #include #include diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 46a52f8e6..50d731593 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -36,8 +36,11 @@ namespace vcpkg bool operator!=(const Triplet& left, const Triplet& right); } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } -}; + template<> + struct hash + { + size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 8b1d766b6..d9895f4b8 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -19,7 +19,11 @@ namespace vcpkg struct VcpkgCmdArguments { +#if defined(_WIN32) static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); +#else + static VcpkgCmdArguments create_from_command_line(const int argc, const char* const* const argv); +#endif static VcpkgCmdArguments create_from_arg_sequence(const std::string* arg_begin, const std::string* arg_end); std::unique_ptr vcpkg_root_dir; diff --git a/toolsrc/include/vcpkg/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h index b2aad8d7b..9a7fdb861 100644 --- a/toolsrc/include/vcpkg/vcpkglib.h +++ b/toolsrc/include/vcpkg/vcpkglib.h @@ -22,17 +22,16 @@ namespace vcpkg struct CMakeVariable { - CMakeVariable(const CWStringView varname, const wchar_t* varvalue); - CMakeVariable(const CWStringView varname, const std::string& varvalue); - CMakeVariable(const CWStringView varname, const std::wstring& varvalue); - CMakeVariable(const CWStringView varname, const fs::path& path); + CMakeVariable(const CStringView varname, const char* varvalue); + CMakeVariable(const CStringView varname, const std::string& varvalue); + CMakeVariable(const CStringView varname, const fs::path& path); - std::wstring s; + std::string s; }; - std::wstring make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables); + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables); std::string shorten_text(const std::string& desc, size_t length); } // namespace vcpkg diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 32dd2e833..781dabd1a 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -3,15 +3,15 @@ #include #include -#include #include #include +#include namespace vcpkg { struct ToolsetArchOption { - CWStringView name; + CStringView name; System::CPUArchitecture host_arch; System::CPUArchitecture target_arch; }; @@ -21,8 +21,8 @@ namespace vcpkg fs::path visual_studio_root_path; fs::path dumpbin; fs::path vcvarsall; - std::vector vcvarsall_options; - CWStringView version; + std::vector vcvarsall_options; + CStringView version; std::vector supported_architectures; }; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index f1a86ae22..e1e2240e7 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -1,6 +1,15 @@ +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include +#pragma warning(push) +#pragma warning(disable : 4768) +#include +#pragma warning(pop) +#else +#include +#endif + #include #include #include @@ -13,10 +22,6 @@ #include #include -#pragma warning(push) -#pragma warning(disable : 4768) -#include -#pragma warning(pop) #include #include #include @@ -44,7 +49,7 @@ static void inner(const VcpkgCmdArguments& args) static const auto find_command = [&](auto&& commands) { auto it = Util::find_if(commands, [&](auto&& commandc) { - return Strings::case_insensitive_ascii_compare(commandc.name, args.command); + return Strings::case_insensitive_ascii_equals(commandc.name, args.command); }); using std::end; if (it != end(commands)) @@ -67,7 +72,7 @@ static void inner(const VcpkgCmdArguments& args) } else { - const Optional vcpkg_root_dir_env = System::get_environment_variable(L"VCPKG_ROOT"); + const auto vcpkg_root_dir_env = System::get_environment_variable("VCPKG_ROOT"); if (const auto v = vcpkg_root_dir_env.get()) { vcpkg_root_dir = fs::stdfs::absolute(*v); @@ -95,7 +100,11 @@ static void inner(const VcpkgCmdArguments& args) expected_paths.error().message()); const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); +#if defined(_WIN32) const int exit_code = _wchdir(paths.root.c_str()); +#else + const int exit_code = chdir(paths.root.c_str()); +#endif Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); Commands::Version::warn_if_vcpkg_version_mismatch(paths); @@ -111,11 +120,10 @@ static void inner(const VcpkgCmdArguments& args) } else { - const Optional vcpkg_default_triplet_env = - System::get_environment_variable(L"VCPKG_DEFAULT_TRIPLET"); + const auto vcpkg_default_triplet_env = System::get_environment_variable("VCPKG_DEFAULT_TRIPLET"); if (const auto v = vcpkg_default_triplet_env.get()) { - default_triplet = Triplet::from_canonical_name(Strings::to_utf8(*v)); + default_triplet = Triplet::from_canonical_name(*v); } else { @@ -135,6 +143,7 @@ static void inner(const VcpkgCmdArguments& args) static void load_config() { +#if defined(_WIN32) fs::path localappdata; { // Config path in AppDataLocal @@ -194,6 +203,7 @@ static void load_config() catch (...) { } +#endif } static std::string trim_path_from_command_line(const std::string& full_command_line) @@ -217,24 +227,32 @@ static std::string trim_path_from_command_line(const std::string& full_command_l return std::string(it, full_command_line.cend()); } +#if defined(_WIN32) int wmain(const int argc, const wchar_t* const* const argv) +#else +int main(const int argc, const char* const* const argv) +#endif { if (argc == 0) std::abort(); + *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started(); + +#if defined(_WIN32) GlobalState::g_init_console_cp = GetConsoleCP(); GlobalState::g_init_console_output_cp = GetConsoleOutputCP(); SetConsoleCP(65001); SetConsoleOutputCP(65001); - *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started(); - const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); +#endif { auto locked_metrics = Metrics::g_metrics.lock(); locked_metrics->track_property("version", Commands::Version::version()); +#if defined(_WIN32) locked_metrics->track_property("cmdline", trimmed_command_line); +#endif } load_config(); Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user()); @@ -283,6 +301,12 @@ int wmain(const int argc, const wchar_t* const* const argv) exc_msg); fflush(stdout); for (int x = 0; x < argc; ++x) + { +#if defined(_WIN32) System::println("%s|", Strings::to_utf8(argv[x])); +#else + System::println("%s|", argv[x]); +#endif + } fflush(stdout); } diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index 73c7b9b1a..ed28d6e2b 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -17,14 +17,21 @@ namespace vcpkg::Checks GlobalState::debugging = false; metrics->flush(); +#if defined(_WIN32) SetConsoleCP(GlobalState::g_init_console_cp); SetConsoleOutputCP(GlobalState::g_init_console_output_cp); +#endif fflush(nullptr); +#if defined(_WIN32) ::TerminateProcess(::GetCurrentProcess(), exit_code); +#else + ::exit(exit_code); +#endif } +#if defined(_WIN32) static BOOL ctrl_handler(DWORD fdw_ctrl_type) { { @@ -39,6 +46,9 @@ namespace vcpkg::Checks { SetConsoleCtrlHandler(reinterpret_cast(ctrl_handler), TRUE); } +#else + void register_console_ctrl_handler() {} +#endif [[noreturn]] void unreachable(const LineInfo& line_info) { @@ -67,7 +77,7 @@ namespace vcpkg::Checks { if (!expression) { - exit_with_message(line_info, Strings::EMPTY); + exit_with_message(line_info, ""); } } diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 5e9c86998..1927e0b5e 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -7,6 +7,7 @@ using namespace std; namespace vcpkg::CoffFileReader { +#if defined(_WIN32) template static T reinterpret_bytes(const char* data) { @@ -24,7 +25,7 @@ namespace vcpkg::CoffFileReader template static T peek_value_from_stream(fstream& fs) { - const fpos_t original_pos = fs.tellg().seekpos(); + const std::streampos original_pos = fs.tellg(); T data; fs.read(reinterpret_cast(&data), sizeof data); fs.seekg(original_pos); @@ -305,4 +306,8 @@ namespace vcpkg::CoffFileReader return {std::vector(machine_types.cbegin(), machine_types.cend())}; } +#else + DllInfo read_dll(const fs::path& path) { exit(-1); } + LibInfo read_lib(const fs::path& path) { exit(-1); } +#endif } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index f8b239eaa..6e43debb1 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -163,7 +163,12 @@ namespace vcpkg::Files virtual void write_contents(const fs::path& file_path, const std::string& data) override { FILE* f = nullptr; +#if defined(_WIN32) auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb"); +#else + f = fopen(file_path.native().c_str(), "wb"); + int ec = f != nullptr ? 0 : 1; +#endif Checks::check_exit( VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str()); auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); @@ -194,9 +199,13 @@ namespace vcpkg::Files System::println(); } - std::vector find_from_PATH(const std::wstring& name) + std::vector find_from_PATH(const std::string& name) { - const std::wstring cmd = Strings::wformat(L"where.exe %s", name); +#if defined(_WIN32) + const std::string cmd = Strings::format("where.exe %s", name); +#else + const std::string cmd = Strings::format("which %s", name); +#endif auto out = System::cmd_execute_and_capture_output(cmd); if (out.exit_code != 0) { diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 2a6d3dff2..fa04279b9 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -37,7 +37,8 @@ namespace vcpkg::Strings::details #if defined(_WIN32) _vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); #else - vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); + va_start(args, fmtstr); + auto res = vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); #endif va_end(args); @@ -73,20 +74,28 @@ namespace vcpkg::Strings { std::wstring to_utf16(const CStringView s) { +#if defined(_WIN32) const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); std::wstring output; output.resize(size - 1); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); return output; +#else + Checks::unreachable(VCPKG_LINE_INFO); +#endif } std::string to_utf8(const CWStringView w) { +#if defined(_WIN32) const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); std::string output; output.resize(size - 1); WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); return output; +#else + Checks::unreachable(VCPKG_LINE_INFO); +#endif } std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) @@ -104,9 +113,13 @@ namespace vcpkg::Strings return case_insensitive_ascii_find(s, pattern) != s.end(); } - bool case_insensitive_ascii_compare(const CStringView left, const CStringView right) + bool case_insensitive_ascii_equals(const CStringView left, const CStringView right) { +#if defined(_WIN32) return _stricmp(left.c_str(), right.c_str()) == 0; +#else + return strcasecmp(left.c_str(), right.c_str()) == 0; +#endif } std::string ascii_to_lowercase(const std::string& input) @@ -118,7 +131,11 @@ namespace vcpkg::Strings bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) { +#if defined(_WIN32) return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; +#else + return strncasecmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; +#endif } void trim(std::string* s) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index d5d39461c..e92d06f6e 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -4,6 +4,8 @@ #include #include +#include + #pragma comment(lib, "Advapi32") namespace vcpkg::System @@ -13,35 +15,46 @@ namespace vcpkg::System using std::chrono::system_clock; std::time_t now_time = system_clock::to_time_t(system_clock::now()); tm parts; +#if defined(_WIN32) localtime_s(&parts, &now_time); +#else + parts = *localtime(&now_time); +#endif return parts; } fs::path get_exe_path_of_current_process() { +#if defined(_WIN32) wchar_t buf[_MAX_PATH]; const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); +#else + std::array buf; + auto written = readlink("/proc/self/exe", buf.data(), buf.size()); + Checks::check_exit(VCPKG_LINE_INFO, written != -1, "Could not determine current executable path."); + return fs::path(buf.data(), buf.data() + written); +#endif } Optional to_cpu_architecture(CStringView arch) { - if (Strings::case_insensitive_ascii_compare(arch, "x86")) return CPUArchitecture::X86; - if (Strings::case_insensitive_ascii_compare(arch, "x64")) return CPUArchitecture::X64; - if (Strings::case_insensitive_ascii_compare(arch, "amd64")) return CPUArchitecture::X64; - if (Strings::case_insensitive_ascii_compare(arch, "arm")) return CPUArchitecture::ARM; - if (Strings::case_insensitive_ascii_compare(arch, "arm64")) return CPUArchitecture::ARM64; + if (Strings::case_insensitive_ascii_equals(arch, "x86")) return CPUArchitecture::X86; + if (Strings::case_insensitive_ascii_equals(arch, "x64")) return CPUArchitecture::X64; + if (Strings::case_insensitive_ascii_equals(arch, "amd64")) return CPUArchitecture::X64; + if (Strings::case_insensitive_ascii_equals(arch, "arm")) return CPUArchitecture::ARM; + if (Strings::case_insensitive_ascii_equals(arch, "arm64")) return CPUArchitecture::ARM64; return nullopt; } CPUArchitecture get_host_processor() { - auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432"); - if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO); + auto w6432 = get_environment_variable("PROCESSOR_ARCHITEW6432"); + if (const auto p = w6432.get()) return to_cpu_architecture(*p).value_or_exit(VCPKG_LINE_INFO); - const auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); - return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO); + const auto procarch = get_environment_variable("PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); + return to_cpu_architecture(procarch).value_or_exit(VCPKG_LINE_INFO); } std::vector get_supported_host_architectures() @@ -58,12 +71,13 @@ namespace vcpkg::System return supported_architectures; } - int cmd_execute_clean(const CWStringView cmd_line) + int cmd_execute_clean(const CStringView cmd_line) { - static const std::wstring SYSTEM_ROOT = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); - static const std::wstring SYSTEM_32 = SYSTEM_ROOT + LR"(\system32)"; - static const std::wstring NEW_PATH = Strings::wformat( - LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); +#if defined(_WIN32) + static const std::string SYSTEM_ROOT = get_environment_variable("SystemRoot").value_or_exit(VCPKG_LINE_INFO); + static const std::string SYSTEM_32 = SYSTEM_ROOT + R"(\system32)"; + static const std::string NEW_PATH = Strings::format( + R"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); std::vector env_wstrings = { L"ALLUSERSPROFILE", @@ -118,17 +132,17 @@ namespace vcpkg::System for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(env_wstring); + const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); env_cstr.push_back(L'='); - env_cstr.append(*v); + env_cstr.append(Strings::to_utf16(*v)); env_cstr.push_back(L'\0'); } - env_cstr.append(NEW_PATH); + env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); STARTUPINFOW startup_info; @@ -139,10 +153,10 @@ namespace vcpkg::System memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); // Basically we are wrapping it in quotes - std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line); - Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line)); + std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); + Debug::println("CreateProcessW(%s)", actual_cmd_line); bool succeeded = TRUE == CreateProcessW(nullptr, - actual_cmd_line.data(), + Strings::to_utf16(actual_cmd_line).data(), nullptr, nullptr, FALSE, @@ -164,18 +178,28 @@ namespace vcpkg::System Debug::println("CreateProcessW() returned %lu", exit_code); return static_cast(exit_code); +#else + fflush(nullptr); + return system(cmd_line.c_str()); +#endif } - int cmd_execute(const CWStringView cmd_line) + int cmd_execute(const CStringView cmd_line) { // Flush stdout before launching external process fflush(nullptr); // Basically we are wrapping it in quotes - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); - Debug::println("_wsystem(%s)", Strings::to_utf8(actual_cmd_line)); - const int exit_code = _wsystem(actual_cmd_line.c_str()); + const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); +#if defined(_WIN32) + Debug::println("_wsystem(%s)", actual_cmd_line); + const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str()); Debug::println("_wsystem() returned %d", exit_code); +#else + Debug::println("_system(%s)", actual_cmd_line); + const int exit_code = system(actual_cmd_line.c_str()); + Debug::println("_system() returned %d", exit_code); +#endif return exit_code; } @@ -190,17 +214,18 @@ namespace vcpkg::System } } - ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line) + ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) { // Flush stdout before launching external process fflush(stdout); - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); +#if defined(_WIN32) + const auto actual_cmd_line = Strings::format(R"###("%s 2>&1")###", cmd_line); - Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); + Debug::println("_wpopen(%s)", actual_cmd_line); std::wstring output; wchar_t buf[1024]; - const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); + const auto pipe = _wpopen(Strings::to_utf16(actual_cmd_line).c_str(), L"r"); if (pipe == nullptr) { return {1, Strings::to_utf8(output)}; @@ -218,27 +243,52 @@ namespace vcpkg::System Debug::println("_pclose() returned %d", ec); remove_byte_order_marks(&output); return {ec, Strings::to_utf8(output)}; +#else + const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line); + + Debug::println("popen(%s)", actual_cmd_line); + std::string output; + char buf[1024]; + const auto pipe = popen(actual_cmd_line.c_str(), "r"); + if (pipe == nullptr) + { + return {1, output}; + } + while (fgets(buf, 1024, pipe)) + { + output.append(buf); + } + if (!feof(pipe)) + { + return {1, output}; + } + + const auto ec = pclose(pipe); + Debug::println("pclose() returned %d", ec); + return {ec, output}; +#endif } - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args) + std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::wformat( - LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); + return Strings::format( + R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); } - void println() { println(Strings::EMPTY); } + void println() { putchar('\n'); } void print(const CStringView message) { fputs(message.c_str(), stdout); } void println(const CStringView message) { print(message); - putchar('\n'); + println(); } void print(const Color c, const CStringView message) { +#if defined(_WIN32) const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; @@ -248,37 +298,50 @@ namespace vcpkg::System SetConsoleTextAttribute(console_handle, static_cast(c) | (original_color & 0xF0)); print(message); SetConsoleTextAttribute(console_handle, original_color); +#else + print(message); +#endif } void println(const Color c, const CStringView message) { print(c, message); - putchar('\n'); + println(); } - Optional get_environment_variable(const CWStringView varname) noexcept + Optional get_environment_variable(const CStringView varname) noexcept { - const auto sz = GetEnvironmentVariableW(varname.c_str(), nullptr, 0); +#if defined(_WIN32) + const auto w_varname = Strings::to_utf16(varname); + const auto sz = GetEnvironmentVariableW(w_varname.c_str(), nullptr, 0); if (sz == 0) return nullopt; std::wstring ret(sz, L'\0'); Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size()); - const auto sz2 = GetEnvironmentVariableW(varname.c_str(), ret.data(), static_cast(ret.size())); + const auto sz2 = GetEnvironmentVariableW(w_varname.c_str(), ret.data(), static_cast(ret.size())); Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret.pop_back(); - return ret; + return Strings::to_utf8(ret); +#else + auto v = getenv(varname.c_str()); + if (!v) return nullopt; + return std::string(v); +#endif } +#if defined(_WIN32) static bool is_string_keytype(DWORD hkey_type) { return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; } - Optional get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename) + Optional get_registry_string(void* base_hkey, + const CWStringView sub_key, + const CWStringView valuename) { HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(base, sub_key.c_str(), NULL, KEY_READ, &k); + const LSTATUS ec = RegOpenKeyExW(reinterpret_cast(base_hkey), sub_key.c_str(), NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; DWORD dw_buffer_size = 0; @@ -298,17 +361,25 @@ namespace vcpkg::System ret.pop_back(); // remove extra trailing null byte return ret; } +#else + Optional get_registry_string(void* base_hkey, + const CWStringView sub_key, + const CWStringView valuename) + { + return nullopt; + } +#endif static const fs::path& get_program_files() { - static const fs::path PATH = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + static const fs::path PATH = System::get_environment_variable("PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); return PATH; } const fs::path& get_program_files_32_bit() { static const fs::path PATH = []() -> fs::path { - auto value = System::get_environment_variable(L"ProgramFiles(x86)"); + auto value = System::get_environment_variable("ProgramFiles(x86)"); if (auto v = value.get()) { return std::move(*v); @@ -321,7 +392,7 @@ namespace vcpkg::System const fs::path& get_program_files_platform_bitness() { static const fs::path PATH = []() -> fs::path { - auto value = System::get_environment_variable(L"ProgramW6432"); + auto value = System::get_environment_variable("ProgramW6432"); if (auto v = value.get()) { return std::move(*v); diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index ef943011f..3a493eb4c 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -80,10 +80,10 @@ namespace vcpkg BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = Strings::EMPTY; + this->version = ""; this->feature = fpgh.name; this->description = fpgh.description; - this->maintainer = Strings::EMPTY; + this->maintainer = ""; this->depends = filter_dependencies(fpgh.depends, triplet); } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 99ec541c1..3d3bcb5fe 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -155,16 +155,16 @@ namespace vcpkg::Build static const std::string LIBRARY_LINKAGE = "LibraryLinkage"; } - CWStringView to_vcvarsall_target(const std::string& cmake_system_name) + CStringView to_vcvarsall_target(const std::string& cmake_system_name) { - if (cmake_system_name == Strings::EMPTY) return Strings::WEMPTY; - if (cmake_system_name == "Windows") return Strings::WEMPTY; - if (cmake_system_name == "WindowsStore") return L"store"; + if (cmake_system_name.empty()) return ""; + if (cmake_system_name == "Windows") return ""; + if (cmake_system_name == "WindowsStore") return "store"; Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name); } - CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) + CStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) { auto maybe_target_arch = System::to_cpu_architecture(target_architecture); Checks::check_exit( @@ -183,23 +183,23 @@ namespace vcpkg::Build Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); } - std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { - const wchar_t* tonull = L" >nul"; + const char* tonull = " >nul"; if (GlobalState::debugging) { - tonull = Strings::WEMPTY; + tonull = ""; } const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); - return Strings::wformat(LR"("%s" %s %s %s %s 2>&1)", - toolset.vcvarsall.native(), - Strings::join(L" ", toolset.vcvarsall_options), - arch, - target, - tonull); + return Strings::format(R"("%s" %s %s %s %s 2>&1)", + toolset.vcvarsall.u8string(), + Strings::join(" ", toolset.vcvarsall_options), + arch, + target, + tonull); } static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, @@ -265,8 +265,6 @@ namespace vcpkg::Build const fs::path ports_cmake_script_path = paths.ports_cmake; const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); std::string features; if (GlobalState::feature_packages) @@ -284,22 +282,26 @@ namespace vcpkg::Build } } - const std::wstring cmd_launch_cmake = make_cmake_cmd( + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + + const std::string cmd_launch_cmake = make_cmake_cmd( cmake_exe_path, ports_cmake_script_path, { - {L"CMD", L"BUILD"}, - {L"PORT", config.src.name}, - {L"CURRENT_PORT_DIR", config.port_dir / "/."}, - {L"TARGET_TRIPLET", triplet.canonical_name()}, - {L"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, - {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, - {L"GIT", git_exe_path}, - {L"FEATURES", features}, + {"CMD", "BUILD"}, + {"PORT", config.src.name}, + {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"TARGET_TRIPLET", triplet.canonical_name()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"GIT", git_exe_path}, + {"FEATURES", features}, }); - const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + std::string command; + const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); + command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); const auto timer = Chrono::ElapsedTime::create_started(); @@ -461,14 +463,12 @@ namespace vcpkg::Build const fs::path ports_cmake_script_path = paths.scripts / "get_triplet_environment.cmake"; const fs::path triplet_file_path = paths.triplets / (triplet.canonical_name() + ".cmake"); - const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, - ports_cmake_script_path, - { - {L"CMAKE_TRIPLET_FILE", triplet_file_path}, - }); - - const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake); - const auto ec_data = System::cmd_execute_and_capture_output(command); + const auto cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, + ports_cmake_script_path, + { + {"CMAKE_TRIPLET_FILE", triplet_file_path}, + }); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_launch_cmake); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); const std::vector lines = Strings::split(ec_data.output, "\n"); @@ -491,7 +491,7 @@ namespace vcpkg::Build const bool variable_with_no_value = s.size() == 1; const std::string variable_name = s.at(0); - const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1); + const std::string variable_value = variable_with_no_value ? "" : s.at(1); if (variable_name == "VCPKG_TARGET_ARCHITECTURE") { diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index d923cf555..85763f25e 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -20,7 +20,7 @@ namespace vcpkg::Commands::Create const fs::path& cmake_exe = paths.get_cmake_exe(); - std::vector cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}}; + std::vector cmake_args{{"CMD", "CREATE"}, {"PORT", port_name}, {"URL", url}}; if (args.command_arguments.size() >= 3) { @@ -30,10 +30,10 @@ namespace vcpkg::Commands::Create R"(Filename cannot contain invalid chars %s, but was %s)", Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name); - cmake_args.push_back({L"FILENAME", zip_file_name}); + cmake_args.push_back({"FILENAME", zip_file_name}); } - const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); + const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute_clean(cmd_launch_cmake)); } } diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index a90ae1bc3..fe6f76bd2 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -17,6 +17,7 @@ namespace vcpkg::Commands::Edit }; std::vector output; +#if defined(_WIN32) for (auto&& keypath : REGKEYS) { const Optional code_installpath = @@ -28,6 +29,7 @@ namespace vcpkg::Commands::Edit output.push_back(install_path / "Code.exe"); } } +#endif return output; } @@ -72,7 +74,7 @@ namespace vcpkg::Commands::Edit Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); std::vector candidate_paths; - const std::vector from_path = Files::find_from_PATH(L"EDITOR"); + const std::vector from_path = Files::find_from_PATH("EDITOR"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); @@ -98,13 +100,16 @@ namespace vcpkg::Commands::Edit { const auto buildtrees_current_dir = paths.buildtrees / port_name; - const std::wstring cmd_line = - Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native()); + const auto cmd_line = + Strings::format(R"("%s" "%s" -n)", env_editor.u8string(), buildtrees_current_dir.u8string()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } - const std::wstring cmd_line = Strings::wformat( - LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native()); + const auto cmd_line = Strings::format( + R"("%s" "%s" "%s" -n)", + env_editor.u8string(), + portpath.u8string(), + (portpath / "portfile.cmake").u8string()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } } diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index 089881588..9f8ae5207 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Commands::Env const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + L" && cmd"); + System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + " && cmd"); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index fbf3beb8c..682267acb 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -29,7 +29,7 @@ namespace vcpkg::Export::IFW std::string safe_rich_from_plain_text(const std::string& text) { - // match standalone ampersand, no HTML number or name + // match standalone ampersand, no HTML number or name std::regex standalone_ampersand(R"###(&(?!(#[0-9]+|\w+);))###"); return std::regex_replace(text, standalone_ampersand, "&"); @@ -350,10 +350,10 @@ namespace vcpkg::Export::IFW Checks::check_exit( VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string()); - const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", - repogen_exe.native(), - packages_dir.native(), - repository_dir.native()); + const auto cmd_line = Strings::format(R"("%s" --packages "%s" "%s" > nul)", + repogen_exe.u8string(), + packages_dir.u8string(), + repository_dir.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); @@ -371,24 +371,24 @@ namespace vcpkg::Export::IFW System::println("Generating installer %s...", installer_file.generic_string()); - std::wstring cmd_line; + std::string cmd_line; std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); if (!ifw_repo_url.empty()) { - cmd_line = Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - repository_dir.native(), - installer_file.native()); + cmd_line = Strings::format(R"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", + binarycreator_exe.u8string(), + config_file.u8string(), + repository_dir.u8string(), + installer_file.u8string()); } else { - cmd_line = Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - packages_dir.native(), - installer_file.native()); + cmd_line = Strings::format(R"("%s" --config "%s" --packages "%s" "%s" > nul)", + binarycreator_exe.u8string(), + config_file.u8string(), + packages_dir.u8string(), + installer_file.u8string()); } const int exit_code = System::cmd_execute_clean(cmd_line); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 394a02e23..4bc58b509 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,26 +7,21 @@ namespace vcpkg::Commands::Hash { - static void do_file_hash(fs::path const& path, std::wstring const& hash_type) + static void do_file_hash(fs::path const& path, std::string const& hash_type) { - const auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hash_type); + const auto cmd_line = Strings::format(R"(CertUtil.exe -hashfile "%s" %s)", path.u8string().c_str(), hash_type); const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit( - VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); std::string const& output = ec_data.output; const auto start = output.find_first_of("\r\n"); - Checks::check_exit(VCPKG_LINE_INFO, - start != std::string::npos, - "Unexpected output format from command: %s", - Strings::to_utf8(cmd_line)); + Checks::check_exit( + VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line); const auto end = output.find_first_of("\r\n", start + 1); - Checks::check_exit(VCPKG_LINE_INFO, - end != std::string::npos, - "Unexpected output format from command: %s", - Strings::to_utf8(cmd_line)); + Checks::check_exit( + VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", cmd_line); auto hash = output.substr(start, end - start); Util::erase_remove_if(hash, isspace); @@ -43,11 +38,11 @@ namespace vcpkg::Commands::Hash if (args.command_arguments.size() == 1) { - do_file_hash(args.command_arguments[0], L"SHA512"); + do_file_hash(args.command_arguments[0], "SHA512"); } if (args.command_arguments.size() == 2) { - do_file_hash(args.command_arguments[0], Strings::to_utf16(args.command_arguments[1])); + do_file_hash(args.command_arguments[0], args.command_arguments[1]); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 85b567adb..0d185476e 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -8,12 +8,6 @@ namespace vcpkg::Commands::Integrate { - static const std::array OLD_SYSTEM_TARGET_FILES = { - System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; - static const fs::path SYSTEM_WIDE_TARGETS_FILE = - System::get_program_files_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; - static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept { return Strings::format(R"###( @@ -111,6 +105,7 @@ namespace vcpkg::Commands::Integrate NO }; +#if defined(_WIN32) static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { SHELLEXECUTEINFOW sh_ex_info = {0}; @@ -138,16 +133,29 @@ namespace vcpkg::Commands::Integrate CloseHandle(sh_ex_info.hProcess); return ElevationPromptChoice::YES; } +#endif +#if defined(_WIN32) static fs::path get_appdata_targets_path() { static const fs::path LOCAL_APP_DATA = - fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); + fs::path(System::get_environment_variable("LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets"; } +#endif +#if defined(_WIN32) static void integrate_install(const VcpkgPaths& paths) { + static const std::array OLD_SYSTEM_TARGET_FILES = { + System::get_program_files_32_bit() / + "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", + System::get_program_files_32_bit() / + "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; + static const fs::path SYSTEM_WIDE_TARGETS_FILE = + System::get_program_files_32_bit() / + "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; + auto& fs = paths.get_filesystem(); // TODO: This block of code should eventually be removed @@ -262,6 +270,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", Checks::exit_success(VCPKG_LINE_INFO); } +#endif static void integrate_project(const VcpkgPaths& paths) { @@ -286,10 +295,10 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", fs.write_contents(nuspec_file_path, create_nuspec_file_contents(paths.root, nuget_id, nupkg_version)); // Using all forward slashes for the command line - const std::wstring cmd_line = Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" > nul)", - nuget_exe.native(), - buildsystems_dir.native(), - nuspec_file_path.native()); + const std::string cmd_line = Strings::format(R"("%s" pack -OutputDirectory "%s" "%s" > nul)", + nuget_exe.u8string(), + buildsystems_dir.u8string(), + nuspec_file_path.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); @@ -325,6 +334,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console args.check_exact_arg_count(1, EXAMPLE); args.check_and_get_optional_command_arguments({}); +#if defined(_WIN32) if (args.command_arguments[0] == "install") { return integrate_install(paths); @@ -337,6 +347,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { return integrate_project(paths); } +#endif Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); } diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index b70ad2b80..a8c043751 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -75,28 +75,28 @@ namespace vcpkg::Commands::PortsDiff } static std::map read_ports_from_commit(const VcpkgPaths& paths, - const std::wstring& git_commit_id) + const std::string& git_commit_id) { std::error_code ec; auto& fs = paths.get_filesystem(); const fs::path& git_exe = paths.get_git_exe(); const fs::path dot_git_dir = paths.root / ".git"; - const std::wstring ports_dir_name_as_string = paths.ports.filename().native(); + const std::string ports_dir_name_as_string = paths.ports.filename().u8string(); const fs::path temp_checkout_path = - paths.root / Strings::wformat(L"%s-%s", ports_dir_name_as_string, git_commit_id); + paths.root / Strings::format("%s-%s", ports_dir_name_as_string, git_commit_id); fs.create_directory(temp_checkout_path, ec); - const std::wstring checkout_this_dir = - Strings::wformat(LR"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository - - const std::wstring cmd = - Strings::wformat(LR"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)", - git_exe.native(), - dot_git_dir.native(), - temp_checkout_path.native(), - git_commit_id, - checkout_this_dir, - L".vcpkg-root", - git_exe.native()); + const auto checkout_this_dir = + Strings::format(R"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository + + const std::string cmd = + Strings::format(R"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)", + git_exe.u8string(), + dot_git_dir.u8string(), + temp_checkout_path.u8string(), + git_commit_id, + checkout_this_dir, + ".vcpkg-root", + git_exe.u8string()); System::cmd_execute_clean(cmd); const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); @@ -104,16 +104,14 @@ namespace vcpkg::Commands::PortsDiff return names_and_versions; } - static void check_commit_exists(const fs::path& git_exe, const std::wstring& git_commit_id) + static void check_commit_exists(const fs::path& git_exe, const std::string& git_commit_id) { static const std::string VALID_COMMIT_OUTPUT = "commit\n"; - const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id); + const auto cmd = Strings::format(R"("%s" cat-file -t %s)", git_exe.u8string(), git_commit_id); const System::ExitCodeAndOutput output = System::cmd_execute_and_capture_output(cmd); - Checks::check_exit(VCPKG_LINE_INFO, - output.output == VALID_COMMIT_OUTPUT, - "Invalid commit id %s", - Strings::to_utf8(git_commit_id)); + Checks::check_exit( + VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", git_commit_id); } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) @@ -126,9 +124,9 @@ namespace vcpkg::Commands::PortsDiff const fs::path& git_exe = paths.get_git_exe(); - const std::wstring git_commit_id_for_previous_snapshot = Strings::to_utf16(args.command_arguments.at(0)); - const std::wstring git_commit_id_for_current_snapshot = - args.command_arguments.size() < 2 ? L"HEAD" : Strings::to_utf16(args.command_arguments.at(1)); + const std::string git_commit_id_for_previous_snapshot = args.command_arguments.at(0); + const std::string git_commit_id_for_current_snapshot = + args.command_arguments.size() < 2 ? "HEAD" : args.command_arguments.at(1); check_commit_exists(git_exe, git_commit_id_for_current_snapshot); check_commit_exists(git_exe, git_commit_id_for_previous_snapshot); diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index c6cc82d1f..403c355b5 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -20,20 +20,29 @@ namespace vcpkg::Commands::Version #ifndef NDEBUG + std::string("-debug") #endif - + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external"); + + std::string(Metrics::get_compiled_metrics_enabled() ? "" : "-external"); return S_VERSION; } + static int scan3(const char* input, const char* pattern, int* a, int* b, int* c) + { +#if defined(_WIN32) + return sscanf_s(input, pattern, a, b, c); +#else + return sscanf(input, pattern, a, b, c); +#endif + } + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths) { auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); if (const auto version_contents = version_file.get()) { int maj1, min1, rev1; - const auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); + const auto num1 = scan3(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); int maj2, min2, rev2; - const auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); + const auto num2 = scan3(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); if (num1 == 3 && num2 == 3) { diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index da8f1e178..02b2ec785 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -43,14 +43,17 @@ namespace vcpkg::Dependencies bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + template<> + struct hash { - return std::hash()(value.ptr->spec); - } -}; + size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + { + return std::hash()(value.ptr->spec); + } + }; +} namespace vcpkg::Dependencies { diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index de6464c87..5e27d4126 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -137,11 +137,10 @@ namespace vcpkg::Export fs.write_contents(nuspec_file_path, nuspec_file_content); // -NoDefaultExcludes is needed for ".vcpkg-root" - const std::wstring cmd_line = - Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)", - nuget_exe.native(), - output_dir.native(), - nuspec_file_path.native()); + const auto cmd_line = Strings::format(R"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)", + nuget_exe.u8string(), + output_dir.u8string(), + nuspec_file_path.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: NuGet package creation failed"); @@ -160,25 +159,25 @@ namespace vcpkg::Export constexpr ArchiveFormat() = delete; - constexpr ArchiveFormat(BackingEnum backing_enum, const wchar_t* extension, const wchar_t* cmake_option) + constexpr ArchiveFormat(BackingEnum backing_enum, const char* extension, const char* cmake_option) : backing_enum(backing_enum), m_extension(extension), m_cmake_option(cmake_option) { } constexpr operator BackingEnum() const { return backing_enum; } - constexpr CWStringView extension() const { return this->m_extension; } - constexpr CWStringView cmake_option() const { return this->m_cmake_option; } + constexpr CStringView extension() const { return this->m_extension; } + constexpr CStringView cmake_option() const { return this->m_cmake_option; } private: BackingEnum backing_enum; - const wchar_t* m_extension; - const wchar_t* m_cmake_option; + const char* m_extension; + const char* m_cmake_option; }; namespace ArchiveFormatC { - constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, L"zip", L"zip"); - constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, L"7z", L"7zip"); + constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, "zip", "zip"); + constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, "7z", "7zip"); } static fs::path do_archive_export(const VcpkgPaths& paths, @@ -188,17 +187,17 @@ namespace vcpkg::Export { const fs::path& cmake_exe = paths.get_cmake_exe(); - const std::wstring exported_dir_filename = raw_exported_dir.filename().native(); - const std::wstring exported_archive_filename = - Strings::wformat(L"%s.%s", exported_dir_filename, format.extension()); + const std::string exported_dir_filename = raw_exported_dir.filename().u8string(); + const std::string exported_archive_filename = + Strings::format("%s.%s", exported_dir_filename, format.extension()); const fs::path exported_archive_path = (output_dir / exported_archive_filename); // -NoDefaultExcludes is needed for ".vcpkg-root" - const std::wstring cmd_line = Strings::wformat(LR"("%s" -E tar "cf" "%s" --format=%s -- "%s")", - cmake_exe.native(), - exported_archive_path.native(), - format.cmake_option(), - raw_exported_dir.native()); + const auto cmd_line = Strings::format(R"("%s" -E tar "cf" "%s" --format=%s -- "%s")", + cmake_exe.u8string(), + exported_archive_path.u8string(), + format.cmake_option(), + raw_exported_dir.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit( @@ -361,13 +360,13 @@ namespace vcpkg::Export static void print_next_step_info(const fs::path& prefix) { const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + const CMakeVariable cmake_variable = CMakeVariable("CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); System::println("\n" "To use the exported libraries in CMake projects use:" "\n" " %s" "\n", - Strings::to_utf8(cmake_variable.s)); + cmake_variable.s); }; static void handle_raw_based_export(Span export_plan, diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index de564d357..43230fa4b 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -5,9 +5,9 @@ namespace vcpkg { Util::LockGuarded GlobalState::timer; - std::atomic GlobalState::debugging = false; - std::atomic GlobalState::feature_packages = false; + std::atomic GlobalState::debugging(false); + std::atomic GlobalState::feature_packages(false); - std::atomic GlobalState::g_init_console_cp = 0; - std::atomic GlobalState::g_init_console_output_cp = 0; + std::atomic GlobalState::g_init_console_cp(0); + std::atomic GlobalState::g_init_console_output_cp(0); } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 4a1e5537b..adbd8c943 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -70,9 +70,8 @@ namespace vcpkg::Install } const std::string filename = file.filename().generic_string(); - if (fs::is_regular_file(status) && - (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") || - Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO"))) + if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || + Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO"))) { // Do not copy the control file continue; diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 84c1ee208..854baa0ca 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -19,6 +19,7 @@ namespace vcpkg::Metrics std::array date; date.fill(0); +#if defined(_WIN32) struct _timeb timebuffer; _ftime_s(&timebuffer); @@ -26,10 +27,17 @@ namespace vcpkg::Metrics const int milli = timebuffer.millitm; const errno_t err = gmtime_s(&newtime, &now); + if (err) { - return Strings::EMPTY; + return ""; } +#else + time_t now; + time(&now); + gmtime_r(&now, &newtime); + const int milli = 0; +#endif strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime); return std::string(&date[0]) + "." + std::to_string(milli) + "Z"; @@ -121,6 +129,7 @@ namespace vcpkg::Metrics static std::string get_os_version_string() { +#if defined(_WIN32) std::wstring path; path.resize(MAX_PATH); const auto n = GetSystemDirectoryW(&path[0], static_cast(path.size())); @@ -128,16 +137,16 @@ namespace vcpkg::Metrics path += L"\\kernel32.dll"; const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); - if (versz == 0) return Strings::EMPTY; + if (versz == 0) return ""; std::vector verbuf; verbuf.resize(versz); - if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return Strings::EMPTY; + if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return ""; void* rootblock; UINT rootblocksize; - if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY; + if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return ""; auto rootblock_ffi = static_cast(rootblock); @@ -145,6 +154,9 @@ namespace vcpkg::Metrics static_cast(HIWORD(rootblock_ffi->dwProductVersionMS)), static_cast(LOWORD(rootblock_ffi->dwProductVersionMS)), static_cast(HIWORD(rootblock_ffi->dwProductVersionLS))); +#else + return "unknown"; +#endif } struct MetricMessage @@ -223,9 +235,13 @@ namespace vcpkg::Metrics std::wstring get_SQM_user() { +#if defined(_WIN32) auto hkcu_sqmclient = System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId"); return hkcu_sqmclient.value_or(L"{}"); +#else + return L"{}"; +#endif } void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time) @@ -264,6 +280,7 @@ namespace vcpkg::Metrics void Metrics::upload(const std::string& payload) { +#if defined(_WIN32) HINTERNET connect = nullptr, request = nullptr; BOOL results = FALSE; @@ -344,18 +361,12 @@ namespace vcpkg::Metrics if (request) WinHttpCloseHandle(request); if (connect) WinHttpCloseHandle(connect); if (session) WinHttpCloseHandle(session); - } - - static fs::path get_bindir() - { - wchar_t buf[_MAX_PATH]; - const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); - if (bytes == 0) std::abort(); - return fs::path(buf, buf + bytes); +#endif } void Metrics::flush() { +#if defined(_WIN32) const std::string payload = g_metricmessage.format_event_data_template(); if (g_should_print_metrics) std::cerr << payload << "\n"; if (!g_should_send_metrics) return; @@ -373,14 +384,14 @@ namespace vcpkg::Metrics if (true) { const fs::path exe_path = [&fs]() -> fs::path { - auto vcpkgdir = get_bindir().parent_path(); + auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; if (fs.exists(path)) return path; path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; if (fs.exists(path)) return path; - return Strings::WEMPTY; + return ""; }(); std::error_code ec; @@ -391,8 +402,9 @@ namespace vcpkg::Metrics const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload); - const std::wstring cmd_line = - Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native()); + const std::string cmd_line = + Strings::format("start %s %s", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); +#endif } } diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index 01a09618d..6e40d70f5 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -38,7 +38,7 @@ namespace vcpkg for (auto&& feature : spec->features) f_specs.push_back(FeatureSpec{pspec, feature}); - if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY}); + if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""}); } else { @@ -56,7 +56,7 @@ namespace vcpkg std::vector ret; for (auto&& spec : specs) { - ret.emplace_back(spec.package_spec, Strings::EMPTY); + ret.emplace_back(spec.package_spec, ""); for (auto&& feature : spec.features) ret.emplace_back(spec.package_spec, feature); } diff --git a/toolsrc/src/vcpkg/parse.cpp b/toolsrc/src/vcpkg/parse.cpp index 116a7f5c8..c2670f561 100644 --- a/toolsrc/src/vcpkg/parse.cpp +++ b/toolsrc/src/vcpkg/parse.cpp @@ -31,7 +31,7 @@ namespace vcpkg::Parse } std::string ParagraphParser::optional_field(const std::string& fieldname) const { - return remove_field(&fields, fieldname).value_or(Strings::EMPTY); + return remove_field(&fields, fieldname).value_or(""); } std::unique_ptr ParagraphParser::error_info(const std::string& name) const { diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 22cf67e86..0063f8d98 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -284,13 +284,10 @@ namespace vcpkg::PostBuildLint std::vector dlls_with_no_exports; for (const fs::path& dll : dlls) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native()); + const std::string cmd_line = + Strings::format(R"("%s" /exports "%s")", dumpbin_exe.u8string(), dll.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); if (ec_data.output.find("ordinal hint RVA name") == std::string::npos) { @@ -321,13 +318,10 @@ namespace vcpkg::PostBuildLint std::vector dlls_with_improper_uwp_bit; for (const fs::path& dll : dlls) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native()); + const std::string cmd_line = + Strings::format(R"("%s" /headers "%s")", dumpbin_exe.u8string(), dll.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); if (ec_data.output.find("App Container") == std::string::npos) { @@ -599,13 +593,10 @@ namespace vcpkg::PostBuildLint for (const fs::path& lib : libs) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native()); + const std::string cmd_line = + Strings::format(R"("%s" /directives "%s")", dumpbin_exe.u8string(), lib.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); for (const BuildType& bad_build_type : bad_build_types) { @@ -655,13 +646,9 @@ namespace vcpkg::PostBuildLint for (const fs::path& dll : dlls) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native()); + const auto cmd_line = Strings::format(R"("%s" /dependents "%s")", dumpbin_exe.u8string(), dll.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141")) { @@ -696,8 +683,8 @@ namespace vcpkg::PostBuildLint std::vector misplaced_files = fs.get_files_non_recursive(dir); Util::unstable_keep_if(misplaced_files, [&fs](const fs::path& path) { const std::string filename = path.filename().generic_string(); - if (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") || - Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO")) + if (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || + Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO")) return false; return !fs.is_directory(path); }); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 04ddba1e4..2ec32855a 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -21,7 +21,7 @@ namespace vcpkg::Remove { auto& fs = paths.get_filesystem(); auto spghs = status_db->find_all(spec.name(), spec.triplet()); - const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); + const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), ""); for (auto&& spgh : spghs) { diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index d766dcb72..2a9480538 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -178,11 +178,11 @@ namespace vcpkg return Strings::format("%s[%s]", this->depend.name, features); } - std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) + std::vector expand_qualified_dependencies(const std::vector& depends) { return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY); + if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, ""); // expect of the form "\w+ \[\w+\]" Dependency dep; @@ -190,7 +190,7 @@ namespace vcpkg if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. - return Dependency::parse_dependency(depend_string, Strings::EMPTY); + return Dependency::parse_dependency(depend_string, ""); } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index 4ebb97a9b..4cba1523d 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -18,11 +18,14 @@ namespace vcpkg const TripletInstance Triplet::DEFAULT_INSTANCE({}); } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } -}; + template<> + struct hash + { + size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } + }; +} namespace vcpkg { diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 522961693..209f6a3f2 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -45,12 +45,20 @@ namespace vcpkg option_field = new_setting; } +#if defined(_WIN32) VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv) +#else + VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const char* const* const argv) +#endif { std::vector v; for (int i = 1; i < argc; ++i) { +#if defined(_WIN32) v.push_back(Strings::to_utf8(argv[i])); +#else + v.push_back(argv[i]); +#endif } return VcpkgCmdArguments::create_from_arg_sequence(v.data(), v.data() + v.size()); @@ -223,17 +231,17 @@ namespace vcpkg void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const { - return check_max_arg_count(expected_arg_count, Strings::EMPTY); + return check_max_arg_count(expected_arg_count, ""); } void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const { - return check_min_arg_count(expected_arg_count, Strings::EMPTY); + return check_min_arg_count(expected_arg_count, ""); } void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const { - return check_exact_arg_count(expected_arg_count, Strings::EMPTY); + return check_exact_arg_count(expected_arg_count, ""); } void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index 23c774210..38b130f6f 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -212,30 +212,26 @@ namespace vcpkg return installed_files; } - CMakeVariable::CMakeVariable(const CWStringView varname, const wchar_t* varvalue) - : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue)) + CMakeVariable::CMakeVariable(const CStringView varname, const char* varvalue) + : s(Strings::format(R"("-D%s=%s")", varname, varvalue)) { } - CMakeVariable::CMakeVariable(const CWStringView varname, const std::string& varvalue) - : CMakeVariable(varname, Strings::to_utf16(varvalue).c_str()) - { - } - CMakeVariable::CMakeVariable(const CWStringView varname, const std::wstring& varvalue) + CMakeVariable::CMakeVariable(const CStringView varname, const std::string& varvalue) : CMakeVariable(varname, varvalue.c_str()) { } - CMakeVariable::CMakeVariable(const CWStringView varname, const fs::path& path) - : CMakeVariable(varname, path.generic_wstring()) + CMakeVariable::CMakeVariable(const CStringView varname, const fs::path& path) + : CMakeVariable(varname, path.generic_u8string()) { } - std::wstring make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables) + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables) { - const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; }); - return Strings::wformat( - LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); + const std::string cmd_cmake_pass_variables = Strings::join(" ", pass_variables, [](auto&& v) { return v.s; }); + return Strings::format( + R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); } std::string shorten_text(const std::string& desc, size_t length) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c57077eaa..90f9cb00b 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -10,16 +10,16 @@ namespace vcpkg { - static constexpr CWStringView V_120 = L"v120"; - static constexpr CWStringView V_140 = L"v140"; - static constexpr CWStringView V_141 = L"v141"; + static constexpr CStringView V_120 = "v120"; + static constexpr CStringView V_140 = "v140"; + static constexpr CStringView V_141 = "v141"; - static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, + static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, const std::array& expected_version) { static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); - const auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd)); + const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); if (rc.exit_code != 0) { return false; @@ -46,11 +46,11 @@ namespace vcpkg } static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, - const std::wstring& version_check_arguments, + const std::string& version_check_arguments, const std::array& expected_version) { auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { - const std::wstring cmd = Strings::wformat(LR"("%s" %s)", p.native(), version_check_arguments); + const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); return exists_and_has_equal_or_greater_version(cmd, expected_version); }); @@ -63,27 +63,26 @@ namespace vcpkg } static fs::path fetch_dependency(const fs::path& scripts_folder, - const std::wstring& tool_name, + const std::string& tool_name, const fs::path& expected_downloaded_path, const std::array& version) { - const std::string tool_name_utf8 = Strings::to_utf8(tool_name); const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - tool_name_utf8, + tool_name, version_as_string, - tool_name_utf8, + tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; const auto install_cmd = - System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); + System::create_powershell_script_cmd(script, Strings::format("-Dependency %s", tool_name)); const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); if (rc.exit_code) { System::println(System::Color::error, "Launching powershell failed or was denied when trying to fetch %s version %s.\n" "(No sufficient installed version was found)", - tool_name_utf8, + tool_name, version_as_string); { auto locked_metrics = Metrics::g_metrics.lock(); @@ -107,16 +106,18 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; + static const std::string VERSION_CHECK_ARGUMENTS = "--version"; const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; - const std::vector from_path = Files::find_from_PATH(L"cmake"); + const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); +#if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); +#endif const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); @@ -125,43 +126,44 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "cmake", downloaded_copy, EXPECTED_VERSION); } fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; - static const std::wstring VERSION_CHECK_ARGUMENTS = Strings::WEMPTY; const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; - const std::vector from_path = Files::find_from_PATH(L"nuget"); + const std::vector from_path = Files::find_from_PATH("nuget"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + auto path = find_if_has_equal_or_greater_version(candidate_paths, "", EXPECTED_VERSION); if (const auto p = path.get()) { return *p; } - return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "nuget", downloaded_copy, EXPECTED_VERSION); } fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; + static const std::string VERSION_CHECK_ARGUMENTS = "--version"; const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; - const std::vector from_path = Files::find_from_PATH(L"git"); + const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); +#if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); +#endif const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); @@ -170,13 +172,13 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "git", downloaded_copy, EXPECTED_VERSION); } static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {3, 1, 81}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--framework-version"; + static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; const fs::path downloaded_copy = downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; @@ -184,11 +186,11 @@ namespace vcpkg std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); // TODO: Uncomment later - // const std::vector from_path = Files::find_from_PATH(L"installerbase"); + // const std::vector from_path = Files::find_from_PATH("installerbase"); // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); const Optional path = @@ -198,7 +200,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"installerbase", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "installerbase", downloaded_copy, EXPECTED_VERSION); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) @@ -322,7 +324,7 @@ namespace vcpkg static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::wstring cmd = System::create_powershell_script_cmd(script); + const std::string cmd = System::create_powershell_script_cmd(script); const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); @@ -370,21 +372,21 @@ namespace vcpkg // Get all supported architectures std::vector supported_architectures; if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); + supported_architectures.push_back({"amd64", CPU::X64, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) - supported_architectures.push_back({L"x86_arm64", CPU::X86, CPU::ARM64}); + supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) - supported_architectures.push_back({L"amd64_arm64", CPU::X64, CPU::ARM64}); + supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64}); // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; @@ -412,7 +414,7 @@ namespace vcpkg found_toolsets.push_back(Toolset{vs_instance.root_path, dumpbin_path, vcvarsall_bat, - {L"-vcvars_ver=14.0"}, + {"-vcvars_ver=14.0"}, V_140, supported_architectures}); } @@ -437,17 +439,17 @@ namespace vcpkg const fs::path vs2015_bin_dir = vcvarsall_bat.parent_path() / "bin"; std::vector supported_architectures; if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); + supported_architectures.push_back({"x64", CPU::X64, CPU::X64}); if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); if (fs.exists(vs2015_dumpbin_exe)) { @@ -489,15 +491,12 @@ namespace vcpkg if (tsv && vsp) { - const std::wstring w_toolset_version = Strings::to_utf16(*tsv); - const fs::path vs_root_path = *vsp; - Util::stable_keep_if(candidates, [&](const Toolset* t) { - return w_toolset_version == t->version && vs_root_path == t->visual_studio_root_path; - }); + Util::stable_keep_if( + candidates, [&](const Toolset* t) { return *tsv == t->version && *vsp == t->visual_studio_root_path; }); Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace at %s with %s toolset.", - vs_root_path.generic_string(), + vsp->u8string(), *tsv); Checks::check_exit(VCPKG_LINE_INFO, candidates.size() == 1); @@ -506,8 +505,7 @@ namespace vcpkg if (tsv) { - const std::wstring w_toolset_version = Strings::to_utf16(*tsv); - Util::stable_keep_if(candidates, [&](const Toolset* t) { return w_toolset_version == t->version; }); + Util::stable_keep_if(candidates, [&](const Toolset* t) { return *tsv == t->version; }); Checks::check_exit( VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv); } -- cgit v1.2.3 From ced047ad78734aed239669a0fd9eca9e81718966 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:50:28 -0700 Subject: Remove usages of CWStringView, except in Strings::to_utf8() --- toolsrc/include/vcpkg/base/cstringview.h | 89 +++++++++++--------------------- toolsrc/include/vcpkg/base/strings.h | 4 +- toolsrc/include/vcpkg/base/system.h | 7 +-- toolsrc/include/vcpkg/metrics.h | 2 +- toolsrc/src/vcpkg/base/strings.cpp | 4 +- toolsrc/src/vcpkg/base/system.cpp | 26 ++++++---- toolsrc/src/vcpkg/commands.edit.cpp | 13 +++-- toolsrc/src/vcpkg/metrics.cpp | 8 +-- 8 files changed, 62 insertions(+), 91 deletions(-) diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index eac204f97..342455402 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -5,94 +5,65 @@ namespace vcpkg { - template - struct BasicCStringView + struct CStringView { - constexpr BasicCStringView() : cstr(nullptr) {} - constexpr BasicCStringView(const CharType* cstr) : cstr(cstr) {} - constexpr BasicCStringView(const BasicCStringView&) = default; - BasicCStringView(const std::basic_string& str) : cstr(str.c_str()) {} + constexpr CStringView() : cstr(nullptr) {} + constexpr CStringView(const char* cstr) : cstr(cstr) {} + constexpr CStringView(const CStringView&) = default; + CStringView(const std::string& str) : cstr(str.c_str()) {} - constexpr const CharType* c_str() const { return cstr; } + constexpr const char* c_str() const { return cstr; } private: - const CharType* cstr; + const char* cstr; + }; + + struct CWStringView + { + constexpr CWStringView() : cstr(nullptr) {} + constexpr CWStringView(const wchar_t* cstr) : cstr(cstr) {} + constexpr CWStringView(const CWStringView&) = default; + CWStringView(const std::wstring& str) : cstr(str.c_str()) {} + + constexpr const wchar_t* c_str() const { return cstr; } + + private: + const wchar_t* cstr; }; namespace details { inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; } - inline bool vcpkg_strcmp(const wchar_t* l, const wchar_t* r) { return wcscmp(l, r) == 0; } } - template - bool operator==(const BasicCStringView& l, const BasicCStringView& r) + inline bool operator==(const CStringView& l, const CStringView& r) { return details::vcpkg_strcmp(l.c_str(), r.c_str()); } - template - bool operator==(const CharType* l, const BasicCStringView& r) - { - return details::vcpkg_strcmp(l, r.c_str()); - } + inline bool operator==(const char* l, const CStringView& r) { return details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator==(const BasicCStringView& r, const CharType* l) - { - return details::vcpkg_strcmp(l, r.c_str()); - } + inline bool operator==(const CStringView& r, const char* l) { return details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator==(const std::basic_string& l, const BasicCStringView& r) - { - return l == r.c_str(); - } + inline bool operator==(const std::string& l, const CStringView& r) { return l == r.c_str(); } - template - bool operator==(const BasicCStringView& r, const std::basic_string& l) - { - return l == r.c_str(); - } + inline bool operator==(const CStringView& r, const std::string& l) { return l == r.c_str(); } // notequals - template - bool operator!=(const BasicCStringView& l, const BasicCStringView& r) + inline bool operator!=(const CStringView& l, const CStringView& r) { return !details::vcpkg_strcmp(l.c_str(), r.c_str()); } - template - bool operator!=(const CharType* l, const BasicCStringView& r) - { - return !details::vcpkg_strcmp(l, r.c_str()); - } - - template - bool operator!=(const BasicCStringView& r, const CharType* l) - { - return !details::vcpkg_strcmp(l, r.c_str()); - } + inline bool operator!=(const char* l, const CStringView& r) { return !details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator!=(const BasicCStringView& r, const std::basic_string& l) - { - return l != r.c_str(); - } + inline bool operator!=(const CStringView& r, const char* l) { return !details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator!=(const std::basic_string& l, const BasicCStringView& r) - { - return l != r.c_str(); - } + inline bool operator!=(const CStringView& r, const std::string& l) { return l != r.c_str(); } - using CStringView = BasicCStringView; - using CWStringView = BasicCStringView; + inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); } inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } - inline const wchar_t* to_wprintf_arg(const CWStringView string_view) { return string_view.c_str(); } - static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); - static_assert(sizeof(CWStringView) == sizeof(void*), "CWStringView must be a simple wrapper around wchar_t*"); } diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 93b36a29d..4adcadb0d 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -47,9 +47,9 @@ namespace vcpkg::Strings return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); } - std::wstring to_utf16(const CStringView s); + std::wstring to_utf16(const CStringView& s); - std::string to_utf8(const CWStringView w); + std::string to_utf8(const CWStringView& w); std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index f2344c919..b396ef293 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -4,7 +4,6 @@ #include #include - namespace vcpkg::System { tm get_current_date_time(); @@ -64,9 +63,7 @@ namespace vcpkg::System Optional get_environment_variable(const CStringView varname) noexcept; - Optional get_registry_string(void* base_hkey, - const CWStringView subkey, - const CWStringView valuename); + Optional get_registry_string(void* base_hkey, const CStringView subkey, const CStringView valuename); enum class CPUArchitecture { @@ -76,7 +73,7 @@ namespace vcpkg::System ARM64, }; - Optional to_cpu_architecture(CStringView arch); + Optional to_cpu_architecture(const CStringView& arch); CPUArchitecture get_host_processor(); diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index 41be5002d..d570624eb 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -23,6 +23,6 @@ namespace vcpkg::Metrics extern Util::LockGuarded g_metrics; - std::wstring get_SQM_user(); + std::string get_SQM_user(); bool get_compiled_metrics_enabled(); } diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index fa04279b9..160aa98e9 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -72,7 +72,7 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { - std::wstring to_utf16(const CStringView s) + std::wstring to_utf16(const CStringView& s) { #if defined(_WIN32) const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); @@ -85,7 +85,7 @@ namespace vcpkg::Strings #endif } - std::string to_utf8(const CWStringView w) + std::string to_utf8(const CWStringView& w) { #if defined(_WIN32) const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index e92d06f6e..730b22c43 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -38,7 +38,7 @@ namespace vcpkg::System #endif } - Optional to_cpu_architecture(CStringView arch) + Optional to_cpu_architecture(const CStringView& arch) { if (Strings::case_insensitive_ascii_equals(arch, "x86")) return CPUArchitecture::X86; if (Strings::case_insensitive_ascii_equals(arch, "x64")) return CPUArchitecture::X64; @@ -153,7 +153,7 @@ namespace vcpkg::System memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); // Basically we are wrapping it in quotes - std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); + const std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); Debug::println("CreateProcessW(%s)", actual_cmd_line); bool succeeded = TRUE == CreateProcessW(nullptr, Strings::to_utf16(actual_cmd_line).data(), @@ -331,35 +331,39 @@ namespace vcpkg::System } #if defined(_WIN32) - static bool is_string_keytype(DWORD hkey_type) + static bool is_string_keytype(const DWORD hkey_type) { return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; } - Optional get_registry_string(void* base_hkey, - const CWStringView sub_key, - const CWStringView valuename) + Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) { HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(reinterpret_cast(base_hkey), sub_key.c_str(), NULL, KEY_READ, &k); + const LSTATUS ec = + RegOpenKeyExW(reinterpret_cast(base_hkey), Strings::to_utf16(sub_key).c_str(), NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; DWORD dw_buffer_size = 0; DWORD dw_type = 0; - auto rc = RegQueryValueExW(k, valuename.c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); + auto rc = + RegQueryValueExW(k, Strings::to_utf16(valuename).c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || dw_buffer_size % sizeof(wchar_t) != 0) return nullopt; std::wstring ret; ret.resize(dw_buffer_size / sizeof(wchar_t)); - rc = RegQueryValueExW( - k, valuename.c_str(), nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); + rc = RegQueryValueExW(k, + Strings::to_utf16(valuename).c_str(), + nullptr, + &dw_type, + reinterpret_cast(ret.data()), + &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) return nullopt; ret.pop_back(); // remove extra trailing null byte - return ret; + return Strings::to_utf8(ret); } #else Optional get_registry_string(void* base_hkey, diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index fe6f76bd2..668ec9b1a 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -3,25 +3,24 @@ #include #include #include -#include #include namespace vcpkg::Commands::Edit { static std::vector find_from_registry() { - static const std::array REGKEYS = { - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", + static const std::array REGKEYS = { + R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", + R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", + R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", }; std::vector output; #if defined(_WIN32) for (auto&& keypath : REGKEYS) { - const Optional code_installpath = - System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); + const Optional code_installpath = + System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, "InstallLocation"); if (const auto c = code_installpath.get()) { const fs::path install_path = fs::path(*c); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 854baa0ca..c93d47d6e 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -233,14 +233,14 @@ namespace vcpkg::Metrics bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; } - std::wstring get_SQM_user() + std::string get_SQM_user() { #if defined(_WIN32) auto hkcu_sqmclient = - System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId"); - return hkcu_sqmclient.value_or(L"{}"); + System::get_registry_string(HKEY_CURRENT_USER, R"(Software\Microsoft\SQMClient)", "UserId"); + return hkcu_sqmclient.value_or("{}"); #else - return L"{}"; + return "{}"; #endif } -- cgit v1.2.3 From c797ab4794b022f9f2a53f9a80bd6a451bd6d1ee Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:52:35 -0700 Subject: Remove Strings::wformat() --- toolsrc/include/vcpkg/base/strings.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 4adcadb0d..6a4d4ef08 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -17,18 +17,12 @@ namespace vcpkg::Strings::details inline const char* to_printf_arg(const char* s) { return s; } template::value>> - inline T to_printf_arg(T s) + T to_printf_arg(T s) { return s; } std::string format_internal(const char* fmtstr, ...); - - inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); } - - inline const wchar_t* to_wprintf_arg(const wchar_t* s) { return s; } - - std::wstring wformat_internal(const wchar_t* fmtstr, ...); } namespace vcpkg::Strings @@ -40,13 +34,6 @@ namespace vcpkg::Strings return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); } - template - std::wstring wformat(const wchar_t* fmtstr, const Args&... args) - { - using vcpkg::Strings::details::to_wprintf_arg; - return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); - } - std::wstring to_utf16(const CStringView& s); std::string to_utf8(const CWStringView& w); -- cgit v1.2.3 From 61777425db2c5f59eb3a44f4439b734c27932cba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:54:38 -0700 Subject: Remove CharType template paramter from Strings::join() --- toolsrc/include/vcpkg/base/strings.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 6a4d4ef08..d263e3b6b 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -48,18 +48,18 @@ namespace vcpkg::Strings bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); - template - std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) + template + std::string join(const char* delimiter, const Container& v, Transformer transformer) { const auto begin = v.begin(); const auto end = v.end(); if (begin == end) { - return std::basic_string(); + return std::string(); } - std::basic_string output; + std::string output; output.append(transformer(*begin)); for (auto it = std::next(begin); it != end; ++it) { @@ -69,8 +69,8 @@ namespace vcpkg::Strings return output; } - template - std::basic_string join(const CharType* delimiter, const Container& v) + template + std::string join(const char* delimiter, const Container& v) { using Element = decltype(*v.begin()); return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); -- cgit v1.2.3 From 70b458f5d97d5c189379b3d6b8913b27a2878661 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:56:05 -0700 Subject: Remove Metrics::track_property(std::wstring) --- toolsrc/include/vcpkg/metrics.h | 1 - toolsrc/src/vcpkg/metrics.cpp | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index d570624eb..f73c636cf 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -15,7 +15,6 @@ namespace vcpkg::Metrics void track_metric(const std::string& name, double value); void track_property(const std::string& name, const std::string& value); - void track_property(const std::string& name, const std::wstring& value); void upload(const std::string& payload); void flush(); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index c93d47d6e..8f2575886 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -262,17 +262,6 @@ namespace vcpkg::Metrics void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); } - void Metrics::track_property(const std::string& name, const std::wstring& value) - { - // Note: this is not valid UTF-16 -> UTF-8, it just yields a close enough approximation for our purposes. - std::string converted_value; - converted_value.resize(value.size()); - std::transform( - value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast(ch); }); - - g_metricmessage.track_property(name, converted_value); - } - void Metrics::track_property(const std::string& name, const std::string& value) { g_metricmessage.track_property(name, value); -- cgit v1.2.3 From fdc6b1ea1a59910df19962e0161b593c948abe98 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:57:07 -0700 Subject: Remove wformat_internal() --- toolsrc/src/vcpkg/base/strings.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 160aa98e9..af41eed9a 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -44,30 +44,6 @@ namespace vcpkg::Strings::details return output; } - - std::wstring wformat_internal(const wchar_t* fmtstr, ...) - { - va_list args; - va_start(args, fmtstr); - -#if defined(_WIN32) - const int sz = _vscwprintf_l(fmtstr, c_locale(), args); -#else - const int sz = vswprintf(nullptr, 0, fmtstr, args); -#endif - Checks::check_exit(VCPKG_LINE_INFO, sz > 0); - - std::wstring output(sz, L'\0'); - -#if defined(_WIN32) - _vsnwprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); -#else - vswprintf(&output.at(0), output.size() + 1, fmtstr, args); -#endif - va_end(args); - - return output; - } } namespace vcpkg::Strings -- cgit v1.2.3 From dfe1f880d4e2a7f23d3b43d42a5d6ac2d68dc135 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 14:22:20 -0700 Subject: [system.cpp] Remove usage of std::wstring. Convert at the last step --- toolsrc/src/vcpkg/base/system.cpp | 102 +++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 730b22c43..ac527f9fc 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -79,71 +79,71 @@ namespace vcpkg::System static const std::string NEW_PATH = Strings::format( R"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); - std::vector env_wstrings = { - L"ALLUSERSPROFILE", - L"APPDATA", - L"CommonProgramFiles", - L"CommonProgramFiles(x86)", - L"CommonProgramW6432", - L"COMPUTERNAME", - L"ComSpec", - L"HOMEDRIVE", - L"HOMEPATH", - L"LOCALAPPDATA", - L"LOGONSERVER", - L"NUMBER_OF_PROCESSORS", - L"OS", - L"PATHEXT", - L"PROCESSOR_ARCHITECTURE", - L"PROCESSOR_ARCHITEW6432", - L"PROCESSOR_IDENTIFIER", - L"PROCESSOR_LEVEL", - L"PROCESSOR_REVISION", - L"ProgramData", - L"ProgramFiles", - L"ProgramFiles(x86)", - L"ProgramW6432", - L"PROMPT", - L"PSModulePath", - L"PUBLIC", - L"SystemDrive", - L"SystemRoot", - L"TEMP", - L"TMP", - L"USERDNSDOMAIN", - L"USERDOMAIN", - L"USERDOMAIN_ROAMINGPROFILE", - L"USERNAME", - L"USERPROFILE", - L"windir", + std::vector env_wstrings = { + "ALLUSERSPROFILE", + "APPDATA", + "CommonProgramFiles", + "CommonProgramFiles(x86)", + "CommonProgramW6432", + "COMPUTERNAME", + "ComSpec", + "HOMEDRIVE", + "HOMEPATH", + "LOCALAPPDATA", + "LOGONSERVER", + "NUMBER_OF_PROCESSORS", + "OS", + "PATHEXT", + "PROCESSOR_ARCHITECTURE", + "PROCESSOR_ARCHITEW6432", + "PROCESSOR_IDENTIFIER", + "PROCESSOR_LEVEL", + "PROCESSOR_REVISION", + "ProgramData", + "ProgramFiles", + "ProgramFiles(x86)", + "ProgramW6432", + "PROMPT", + "PSModulePath", + "PUBLIC", + "SystemDrive", + "SystemRoot", + "TEMP", + "TMP", + "USERDNSDOMAIN", + "USERDOMAIN", + "USERDOMAIN_ROAMINGPROFILE", + "USERNAME", + "USERPROFILE", + "windir", // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe - L"HTTP_PROXY", - L"HTTPS_PROXY", + "HTTP_PROXY", + "HTTPS_PROXY", // Enables find_package(CUDA) in CMake - L"CUDA_PATH", + "CUDA_PATH", // Environmental variable generated automatically by CUDA after installation - L"NVCUDASAMPLES_ROOT", + "NVCUDASAMPLES_ROOT", }; // Flush stdout before launching external process fflush(nullptr); - std::wstring env_cstr; + std::string env_cstr; for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); + const Optional value = System::get_environment_variable(env_wstring); const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); - env_cstr.push_back(L'='); - env_cstr.append(Strings::to_utf16(*v)); - env_cstr.push_back(L'\0'); + env_cstr.push_back('='); + env_cstr.append(*v); + env_cstr.push_back('\0'); } - env_cstr.append(Strings::to_utf16(NEW_PATH)); - env_cstr.push_back(L'\0'); + env_cstr.append(NEW_PATH); + env_cstr.push_back('\0'); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); @@ -161,7 +161,7 @@ namespace vcpkg::System nullptr, FALSE, BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, - env_cstr.data(), + Strings::to_utf16(env_cstr).data(), nullptr, &startup_info, &process_info); @@ -366,9 +366,7 @@ namespace vcpkg::System return Strings::to_utf8(ret); } #else - Optional get_registry_string(void* base_hkey, - const CWStringView sub_key, - const CWStringView valuename) + Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) { return nullopt; } -- cgit v1.2.3 From 558dcb32ca4ef43c35570794bf4cc4fc46f4af6c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:09:02 -0700 Subject: Revert "[system.cpp] Remove usage of std::wstring. Convert at the last step" This reverts commit dfe1f880d4e2a7f23d3b43d42a5d6ac2d68dc135. --- toolsrc/src/vcpkg/base/system.cpp | 102 +++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index ac527f9fc..730b22c43 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -79,71 +79,71 @@ namespace vcpkg::System static const std::string NEW_PATH = Strings::format( R"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); - std::vector env_wstrings = { - "ALLUSERSPROFILE", - "APPDATA", - "CommonProgramFiles", - "CommonProgramFiles(x86)", - "CommonProgramW6432", - "COMPUTERNAME", - "ComSpec", - "HOMEDRIVE", - "HOMEPATH", - "LOCALAPPDATA", - "LOGONSERVER", - "NUMBER_OF_PROCESSORS", - "OS", - "PATHEXT", - "PROCESSOR_ARCHITECTURE", - "PROCESSOR_ARCHITEW6432", - "PROCESSOR_IDENTIFIER", - "PROCESSOR_LEVEL", - "PROCESSOR_REVISION", - "ProgramData", - "ProgramFiles", - "ProgramFiles(x86)", - "ProgramW6432", - "PROMPT", - "PSModulePath", - "PUBLIC", - "SystemDrive", - "SystemRoot", - "TEMP", - "TMP", - "USERDNSDOMAIN", - "USERDOMAIN", - "USERDOMAIN_ROAMINGPROFILE", - "USERNAME", - "USERPROFILE", - "windir", + std::vector env_wstrings = { + L"ALLUSERSPROFILE", + L"APPDATA", + L"CommonProgramFiles", + L"CommonProgramFiles(x86)", + L"CommonProgramW6432", + L"COMPUTERNAME", + L"ComSpec", + L"HOMEDRIVE", + L"HOMEPATH", + L"LOCALAPPDATA", + L"LOGONSERVER", + L"NUMBER_OF_PROCESSORS", + L"OS", + L"PATHEXT", + L"PROCESSOR_ARCHITECTURE", + L"PROCESSOR_ARCHITEW6432", + L"PROCESSOR_IDENTIFIER", + L"PROCESSOR_LEVEL", + L"PROCESSOR_REVISION", + L"ProgramData", + L"ProgramFiles", + L"ProgramFiles(x86)", + L"ProgramW6432", + L"PROMPT", + L"PSModulePath", + L"PUBLIC", + L"SystemDrive", + L"SystemRoot", + L"TEMP", + L"TMP", + L"USERDNSDOMAIN", + L"USERDOMAIN", + L"USERDOMAIN_ROAMINGPROFILE", + L"USERNAME", + L"USERPROFILE", + L"windir", // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe - "HTTP_PROXY", - "HTTPS_PROXY", + L"HTTP_PROXY", + L"HTTPS_PROXY", // Enables find_package(CUDA) in CMake - "CUDA_PATH", + L"CUDA_PATH", // Environmental variable generated automatically by CUDA after installation - "NVCUDASAMPLES_ROOT", + L"NVCUDASAMPLES_ROOT", }; // Flush stdout before launching external process fflush(nullptr); - std::string env_cstr; + std::wstring env_cstr; for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(env_wstring); + const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); - env_cstr.push_back('='); - env_cstr.append(*v); - env_cstr.push_back('\0'); + env_cstr.push_back(L'='); + env_cstr.append(Strings::to_utf16(*v)); + env_cstr.push_back(L'\0'); } - env_cstr.append(NEW_PATH); - env_cstr.push_back('\0'); + env_cstr.append(Strings::to_utf16(NEW_PATH)); + env_cstr.push_back(L'\0'); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); @@ -161,7 +161,7 @@ namespace vcpkg::System nullptr, FALSE, BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, - Strings::to_utf16(env_cstr).data(), + env_cstr.data(), nullptr, &startup_info, &process_info); @@ -366,7 +366,9 @@ namespace vcpkg::System return Strings::to_utf8(ret); } #else - Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) + Optional get_registry_string(void* base_hkey, + const CWStringView sub_key, + const CWStringView valuename) { return nullopt; } -- cgit v1.2.3 From e5867d1d63606cef5c53a764e31ce05385f36497 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:26:28 -0700 Subject: CWStringView->CStringView, std::wstring->std::string --- toolsrc/src/vcpkg/base/system.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 730b22c43..b04f79414 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -366,9 +366,7 @@ namespace vcpkg::System return Strings::to_utf8(ret); } #else - Optional get_registry_string(void* base_hkey, - const CWStringView sub_key, - const CWStringView valuename) + Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) { return nullopt; } -- cgit v1.2.3 From fb1f5f87fb0cbb666882586271581d57c5e0ef76 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:37:14 -0700 Subject: Add timer to `vcpkg build` --- toolsrc/src/vcpkg/build.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 3d3bcb5fe..cf16c8f9c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -69,7 +69,10 @@ namespace vcpkg::Build::Command const Build::BuildPackageConfig build_config{ *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + const auto build_timer = Chrono::ElapsedTime::create_started(); const auto result = Build::build_package(paths, build_config, status_db); + System::println("Elapsed time for package %s: %s", spec.to_string(), build_timer.to_string()); + if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) { System::println(System::Color::error, -- cgit v1.2.3 From 374253cb1b12a60925693130132f1a6ab6c3a83a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:39:41 -0700 Subject: [ninja] Update to 1.8.2 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 51e394bf1..b81675c13 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -101,11 +101,11 @@ function(vcpkg_find_acquire_program VAR) set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) - set(SUBDIR "ninja-1.7.2") + set(SUBDIR "ninja-1.8.2") set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) - set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip") - set(ARCHIVE "ninja-win.zip") - set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393) + set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") + set(ARCHIVE "ninja-1.8.2-win.zip") + set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) elseif(VAR MATCHES "MESON") set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) -- cgit v1.2.3 From e8f64049cf5d4b2f1b76bab49d5134bdd0dff1ea Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:02:59 -0700 Subject: Fix getWindowsSDK.ps1 error when $path is $null --- scripts/getWindowsSDK.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 8ef26a436..ed2fd11c7 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -19,6 +19,11 @@ $validInstances = New-Object System.Collections.ArrayList # Windows 10 SDK function CheckWindows10SDK($path) { + if ($path -eq $null) + { + return + } + $folder = (Join-Path $path "Include") if (!(Test-Path $folder)) { @@ -64,6 +69,11 @@ CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") # Windows 8.1 SDK function CheckWindows81SDK($path) { + if ($path -eq $null) + { + return + } + $folder = "$path\Include" if (!(Test-Path $folder)) { -- cgit v1.2.3 From 0051e7477be15c9746e9fb2babe15aaec47a7eef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:04:55 -0700 Subject: [findVS] Add detection for VS2015 Build Tools --- scripts/findVisualStudioInstallationInstances.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index b2f186478..8a2adca10 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -32,6 +32,21 @@ foreach ($instance in $asXml.instances.instance) $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null } +# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) +if ($results.Count -eq 0) +{ + $programFiles = & $scriptsDir\getProgramFiles32bit.ps1 + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + return "PreferenceWeight1::Legacy::14.0::$installationPath" + } +} + + $results.Sort() $results.Reverse() -- cgit v1.2.3 From 7ed8d4f75e903fdad4c02b4e784f2f4bcb30a3b0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:24:17 -0700 Subject: Don't warn for outdated vcpkg if command is autocomplete --- toolsrc/src/vcpkg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index e1e2240e7..b4c2d0fe2 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -106,7 +106,11 @@ static void inner(const VcpkgCmdArguments& args) const int exit_code = chdir(paths.root.c_str()); #endif Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); - Commands::Version::warn_if_vcpkg_version_mismatch(paths); + + if (args.command != "autocomplete") + { + Commands::Version::warn_if_vcpkg_version_mismatch(paths); + } if (const auto command_function = find_command(Commands::get_available_commands_type_b())) { -- cgit v1.2.3 From dd56066e291545e6885cecb06ef29d6474824fc3 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 19:31:06 -0500 Subject: FIX: pthreads: also install "pthreads.lib" --- ports/pthreads/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index cabf8a39b..5d7daa792 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -32,3 +32,8 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) +file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME pthreads.lib +) -- cgit v1.2.3 From ea30f9a378a6b9fd04bb03aa298ef80d6bff9b65 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 19:33:14 -0500 Subject: FIX: typo --- ports/pthreads/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 5d7daa792..0ed6f672a 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -32,7 +32,7 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) -file(RENAME +file(COPY ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pthreads.lib -- cgit v1.2.3 From 9153ac76be6654aae436ec0b35942ebb84c6d4e3 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 13 Oct 2017 17:19:31 +0300 Subject: [folly] Update to version v2017.10.02.00 --- ports/folly/CONTROL | 2 +- ports/folly/fix-MSG_ERRQUEUE.diff | 22 ++++++++++++++++++++++ ports/folly/fix-histogram.diff | 11 +++++++++++ ports/folly/fix-malloc.diff | 12 ++++++++++++ ports/folly/portfile.cmake | 17 +++++++++++++++-- 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 ports/folly/fix-MSG_ERRQUEUE.diff create mode 100644 ports/folly/fix-histogram.diff create mode 100644 ports/folly/fix-malloc.diff diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index d8652e657..3bff7ba88 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.07.17.01-1 +Version: v2017.10.02.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/folly/fix-MSG_ERRQUEUE.diff b/ports/folly/fix-MSG_ERRQUEUE.diff new file mode 100644 index 000000000..ee3a1215a --- /dev/null +++ b/ports/folly/fix-MSG_ERRQUEUE.diff @@ -0,0 +1,22 @@ +diff --git a/folly/io/async/AsyncSocket.cpp b/folly/io/async/AsyncSocket.cpp +index 7f8c5f13..f77adbc0 100644 +--- a/folly/io/async/AsyncSocket.cpp ++++ b/folly/io/async/AsyncSocket.cpp +@@ -41,7 +41,7 @@ namespace fsp = folly::portability::sockets; + namespace folly { + + static constexpr bool msgErrQueueSupported = +-#ifdef MSG_ERRQUEUE ++#if defined(MSG_ERRQUEUE) && !defined(_WIN32) + true; + #else + false; +@@ -1551,7 +1551,7 @@ void AsyncSocket::handleErrMessages() noexcept { + return; + } + +-#ifdef MSG_ERRQUEUE ++#if defined(MSG_ERRQUEUE) && !defined(_WIN32) + uint8_t ctrl[1024]; + unsigned char data; + struct msghdr msg; diff --git a/ports/folly/fix-histogram.diff b/ports/folly/fix-histogram.diff new file mode 100644 index 000000000..ca92a891e --- /dev/null +++ b/ports/folly/fix-histogram.diff @@ -0,0 +1,11 @@ +--- a/folly/stats/Histogram.h ++++ b/folly/stats/Histogram.h +@@ -485,7 +485,7 @@ + // with /permissive- (the default for the CMake build), so we directly include + // the -defs as if it were -inl, and don't provide the explicit instantiations. + // https://developercommunity.visualstudio.com/content/problem/81223/incorrect-error-c5037-with-permissive.html +-#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER < 191125542 ++#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER <= 191125547 + #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 1 + #else + #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 0 diff --git a/ports/folly/fix-malloc.diff b/ports/folly/fix-malloc.diff new file mode 100644 index 000000000..db7a23063 --- /dev/null +++ b/ports/folly/fix-malloc.diff @@ -0,0 +1,12 @@ +--- a/folly/Malloc.h Mon Oct 09 04:35:09 2017 ++++ b/folly/Malloc.h Fri Oct 13 15:31:36 2017 +@@ -189,9 +189,6 @@ + return false; + } + +- /* Avoid optimizing away the malloc. */ +- asm volatile("" ::"m"(ptr) : "memory"); +- + return (origAllocated != *counter); + }(); + diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 1b30ad86c..ba6fcf240 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -2,6 +2,10 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) message(FATAL_ERROR "Folly only supports the x64 architecture.") endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Folly can't link with static libraries.") +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -17,11 +21,20 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2017.07.17.01 - SHA512 1529941ebcc9ee3502e4ab07463bb5bc6a397259cbbf1817ac64fd186fd4cd964ffe8b473fe6a432e80632ffa553106a0d3fe2962e860eb409e3391029ed5584 + REF v2017.10.02.00 + SHA512 4fc7840c7a6c528c8ba6a21817bc75f15f5cd5f781d104a1f0622fe1085a6cb26ff9749616b164afff0ea46be6d16877457a98f417e6dbe1044db7605650a6d3 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH + ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-malloc.diff + ${CMAKE_CURRENT_LIST_DIR}/fix-MSG_ERRQUEUE.diff + ${CMAKE_CURRENT_LIST_DIR}/fix-histogram.diff +) + if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() -- cgit v1.2.3 From c9d3512088240ab7f8ce15eb89f9e1ea8808e207 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 17 Oct 2017 03:56:14 +0300 Subject: [folly] Fix static linking gflags and glog --- ports/folly/fix-static-linking.diff | 98 +++++++++++++++++++++++++++++++++++++ ports/folly/portfile.cmake | 5 +- 2 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 ports/folly/fix-static-linking.diff diff --git a/ports/folly/fix-static-linking.diff b/ports/folly/fix-static-linking.diff new file mode 100644 index 000000000..80434faca --- /dev/null +++ b/ports/folly/fix-static-linking.diff @@ -0,0 +1,98 @@ +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index 211c6fbf..fbcbddf0 100755 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -10,9 +10,26 @@ find_package(Boost 1.55.0 MODULE + thread + REQUIRED + ) ++ + find_package(DoubleConversion MODULE REQUIRED) +-find_package(GFlags MODULE REQUIRED) +-find_package(GLog MODULE REQUIRED) +-find_package(LibEvent MODULE REQUIRED) ++ ++find_package(gflags CONFIG) ++if(NOT TARGET gflags) ++ message(STATUS "MODULE: GFlags") ++ find_package(GFlags MODULE REQUIRED) ++endif() ++ ++find_package(glog CONFIG) ++if(NOT TARGET glog::glog) ++ message(STATUS "MODULE: GLog") ++ find_package(GLog MODULE REQUIRED) ++endif() ++ ++find_package(Libevent CONFIG) ++if(NOT TARGET event) ++ message(STATUS "MODULE: Libevent") ++ find_package(LibEvent MODULE REQUIRED) ++endif() ++ + find_package(OpenSSL MODULE REQUIRED) + find_package(PThread MODULE) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cdc992a8..c0231402 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,9 +141,38 @@ set(FOLLY_SHINY_DEPENDENCIES + + set(FOLLY_LINK_LIBRARIES + ${DOUBLE_CONVERSION_LIBRARY} +- ${LIBEVENT_LIB} +- ${LIBGFLAGS_LIBRARY} +- ${LIBGLOG_LIBRARY} ++) ++ ++set(FOLLY_INCLUDE_DIRECTORIES ++ ${DOUBLE_CONVERSION_INCLUDE_DIR} ++) ++ ++if(TARGET gflags_static) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags_static) ++elseif(TARGET gflags) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags) ++else() ++ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBGFLAGS_LIBRARY}) ++ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBGFLAGS_INCLUDE_DIR}) ++endif() ++ ++if(TARGET glog::glog) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} glog::glog) ++else() ++ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBGLOG_LIBRARY}) ++ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBGLOG_INCLUDE_DIR}) ++endif() ++ ++if(TARGET event) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} event) ++else() ++ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBEVENT_LIB}) ++ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBEVENT_INCLUDE_DIR}) ++endif() ++ ++ ++set(FOLLY_LINK_LIBRARIES ++ ${FOLLY_LINK_LIBRARIES} + Iphlpapi.lib + Ws2_32.lib + +@@ -152,15 +181,12 @@ set(FOLLY_LINK_LIBRARIES + + target_include_directories(folly_base + PUBLIC +- ${DOUBLE_CONVERSION_INCLUDE_DIR} +- ${LIBGFLAGS_INCLUDE_DIR} +- ${LIBGLOG_INCLUDE_DIR} +- ${LIBEVENT_INCLUDE_DIR} +- $ ++ ${FOLLY_INCLUDE_DIRECTORIES} + ) + + foreach (LIB ${FOLLY_SHINY_DEPENDENCIES}) + target_include_directories(folly_base PUBLIC $) ++ target_compile_definitions(folly_base PUBLIC $) + endforeach() + + if (FOLLY_HAVE_PTHREAD) diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index ba6fcf240..8a48ee85d 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -2,10 +2,6 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) message(FATAL_ERROR "Folly only supports the x64 architecture.") endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Folly can't link with static libraries.") -endif() - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -30,6 +26,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.diff ${CMAKE_CURRENT_LIST_DIR}/fix-malloc.diff ${CMAKE_CURRENT_LIST_DIR}/fix-MSG_ERRQUEUE.diff ${CMAKE_CURRENT_LIST_DIR}/fix-histogram.diff -- cgit v1.2.3 From bc959ccd8b8277acdbad869a753f074f8f8a0a4d Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 20:44:37 -0500 Subject: FIX: switch to install --- ports/pthreads/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 0ed6f672a..d07e23ef4 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -32,7 +32,7 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) -file(COPY +file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pthreads.lib -- cgit v1.2.3 From 4259fc14849d5671c56d0ecb030d69feee1cee70 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 20:49:13 -0500 Subject: FIX: also install the debug library --- ports/pthreads/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index d07e23ef4..cda6efb32 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -37,3 +37,8 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pthreads.lib ) +file(INSTALL + ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadsVC2d.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME pthreads.lib +) -- cgit v1.2.3 From 947c6cac332cabb58452178d563a2a0c26def35e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 02:30:27 -0700 Subject: `autocomplete` Consider private commands if no public commands match --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index addb9edaf..fcbe73835 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -39,7 +39,8 @@ namespace vcpkg::Commands::Autocomplete { const std::string requested_command = match[1].str(); - std::vector valid_commands = { + // First try public commands + std::vector public_commands = { "install", "search", "remove", @@ -57,11 +58,31 @@ namespace vcpkg::Commands::Autocomplete "contact", }; - Util::unstable_keep_if(valid_commands, [&](const std::string& s) { + Util::unstable_keep_if(public_commands, [&](const std::string& s) { return Strings::case_insensitive_ascii_starts_with(s, requested_command); }); - output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands)); + if (!public_commands.empty()) + { + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(public_commands)); + } + + // If no public commands match, try private commands + std::vector private_commands = { + "build", + "buildexternal", + "ci", + "depend-info", + "env", + "import", + "portsdiff", + }; + + Util::unstable_keep_if(private_commands, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, requested_command); + }); + + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(private_commands)); } // Handles vcpkg install package: -- cgit v1.2.3 From 3c4f620dbc7ef0005c694ab758c6c7d5e42dbe93 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 02:59:55 -0700 Subject: `autocomplete` Add autocompletion for `vcpkg integrate` --- toolsrc/include/vcpkg/commands.h | 1 + toolsrc/src/vcpkg/commands.autocomplete.cpp | 1 + toolsrc/src/vcpkg/commands.integrate.cpp | 33 ++++++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index e00812c98..d9ebad2c4 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -75,6 +75,7 @@ namespace vcpkg::Commands namespace Integrate { extern const char* const INTEGRATE_COMMAND_HELPSTRING; + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index fcbe73835..e36bf8430 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -124,6 +124,7 @@ namespace vcpkg::Commands::Autocomplete CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + CommandEntry{"integrate", R"###(^integrate(\s+)(\S*)$)###", Integrate::COMMAND_STRUCTURE}, }; for (auto&& command : COMMANDS) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 0d185476e..c8fa275ab 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -326,6 +326,33 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console " vcpkg integrate remove Remove user-wide integration\n" " vcpkg integrate project Generate a referencing nuget package for individual VS project use\n"; + namespace Subcommand + { + static const std::string INSTALL = "install"; + static const std::string REMOVE = "remove"; + static const std::string PROJECT = "project"; + } + + static const std::array INSTALL_SWITCHES; + + static const std::array INSTALL_SETTINGS; + + static std::vector valid_arguments(const VcpkgPaths&) + { + return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT}; + } + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("Commands:\n" + "%s", + INTEGRATE_COMMAND_HELPSTRING), + 1, + 1, + INSTALL_SWITCHES, + INSTALL_SETTINGS, + &valid_arguments, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const std::string EXAMPLE = Strings::format("Commands:\n" @@ -335,15 +362,15 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console args.check_and_get_optional_command_arguments({}); #if defined(_WIN32) - if (args.command_arguments[0] == "install") + if (args.command_arguments[0] == Subcommand::INSTALL) { return integrate_install(paths); } - if (args.command_arguments[0] == "remove") + if (args.command_arguments[0] == Subcommand::REMOVE) { return integrate_remove(paths.get_filesystem()); } - if (args.command_arguments[0] == "project") + if (args.command_arguments[0] == Subcommand::PROJECT) { return integrate_project(paths); } -- cgit v1.2.3 From a536a4630261684370cd1b43b88e8121fe50f9ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 03:07:39 -0700 Subject: `remove`: Consistency renames --- toolsrc/src/vcpkg/remove.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 2ec32855a..6f555b9b8 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -169,14 +169,14 @@ namespace vcpkg::Remove static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_OUTDATED = "--outdated"; - static const std::array REMOVE_SWITCHES = { + static const std::array SWITCHES = { OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED, }; - static const std::array REMOVE_SETTINGS; + static const std::array SETTINGS; static std::vector valid_arguments(const VcpkgPaths& paths) { @@ -190,8 +190,8 @@ namespace vcpkg::Remove "remove zlib zlib:x64-windows curl boost", 1, SIZE_MAX, - REMOVE_SWITCHES, - REMOVE_SETTINGS, + SWITCHES, + SETTINGS, &valid_arguments, }; -- cgit v1.2.3 From f30df21cd9191009d8761e5bde4ddb5363e0fd2c Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 17 Oct 2017 15:24:49 +0300 Subject: Fix extra whitespace in version --- ports/ogre/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index a3a2460c4..588c6413b 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,4 +1,4 @@ Source: ogre -Version: 1.9.0 -1 +Version: 1.9.0-1 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine -- cgit v1.2.3 From 48e380f3ea2a5fab62c2a4e1f012e007541a2c86 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 17 Oct 2017 15:28:18 +0300 Subject: Fill Description for minizip --- ports/minizip/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index 135303129..cc37b5f8c 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,4 +1,4 @@ Source: minizip Version: 1.2.11-2 -Description: +Description: Zip compression library Build-Depends: bzip2, zlib -- cgit v1.2.3 From 3c0feb549c6cfa062254c5a691a8cad445a8bcf7 Mon Sep 17 00:00:00 2001 From: bjornpiltz Date: Tue, 17 Oct 2017 16:15:37 +0200 Subject: Enable building openssl with custom triplet. --- ports/openssl/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 8ad0ff197..9763f740e 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -37,14 +37,14 @@ set(CONFIGURE_COMMAND ${PERL} Configure no-ssl2 ) -if(TARGET_TRIPLET MATCHES "x86-windows") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(OPENSSL_ARCH VC-WIN32) set(OPENSSL_DO "ms\\do_nasm.bat") -elseif(TARGET_TRIPLET MATCHES "x64-windows") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(OPENSSL_ARCH VC-WIN64A) set(OPENSSL_DO "ms\\do_win64a.bat") else() - message(FATAL_ERROR "Unsupported target triplet: ${TARGET_TRIPLET}") + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From 14b08e1a8d423e327c24e4271f1aeba51fbb01a5 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 17 Oct 2017 17:26:12 +0300 Subject: Fix Version, "v" is not part of it. --- ports/jansson/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index 0cf311912..15a18d7e2 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,3 +1,3 @@ Source: jansson -Version: v2.10-1 +Version: 2.10-1 Description: Jansson is a C library for encoding, decoding and manipulating JSON data -- cgit v1.2.3 From 6fb6abba22faf36bca31fcfdb05d84c08cfc9a58 Mon Sep 17 00:00:00 2001 From: alex85k Date: Tue, 17 Oct 2017 22:29:34 +0500 Subject: [lua] fix static build --- ports/lua/CMakeLists.txt | 2 +- ports/lua/CONTROL | 2 +- ports/lua/portfile.cmake | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index fc2e27e08..a96718953 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -59,7 +59,7 @@ IF (NOT DEFINED SKIP_INSTALL_TOOLS) ADD_EXECUTABLE ( luai src/lua.c ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - INSTALL ( TARGETS luai luac lua RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) ENDIF () IF (NOT DEFINED SKIP_INSTALL_HEADERS) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index cf49dafe5..fa26bb00b 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.4-2 +Version: 5.3.4-3 Description: a powerful, fast, lightweight, embeddable scripting language diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index beda8362e..3b7e8779c 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -33,6 +33,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) string(REPLACE "defined(LUA_BUILD_AS_DLL)" "1" LUA_CONF_H "${LUA_CONF_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}") + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools) endif() # Handle copyright -- cgit v1.2.3 From 87296823ac9cc939c233caf7c02585b5fe6d3df7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 12:41:34 -0700 Subject: [cmake] Update to 3.9.4 (was 3.9.3) --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6b4deaff5..e2c076977 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.9.1* +- *Optional: CMake 3.9.4* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 773ebeac4..b43fd0cb5 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -107,12 +107,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.3" - $downloadVersion = "3.9.3" - $url = "https://cmake.org/files/v3.9/cmake-3.9.3-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.3-win32-x86.zip" - $expectedDownloadedFileHash = "47870e3d4c9a5aa019e71020cd85cc60b6f2d2569fb239eaec204cd991e512f1" - $executableFromDownload = "$downloadsDir\cmake-3.9.3-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.4" + $downloadVersion = "3.9.4" + $url = "https://cmake.org/files/v3.9/cmake-3.9.4-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.4-win32-x86.zip" + $expectedDownloadedFileHash = "8214df1ff51f9a6a1f0e27f9bd18f402b1749c5b645fbf6e401bcb00047171cd" + $executableFromDownload = "$downloadsDir\cmake-3.9.4-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 90f9cb00b..486fff40e 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -105,10 +105,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; + static constexpr std::array EXPECTED_VERSION = {3, 9, 4}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.4-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; -- cgit v1.2.3 From edb718e21b56ab62a6544a26c1bba450d952b32d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:19:14 -0700 Subject: [fetchDependency] Introduce Test-Command function --- scripts/fetchDependency.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b43fd0cb5..ac4ab5f46 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -14,6 +14,11 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" +function Test-Command($commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, -- cgit v1.2.3 From 147cde8bfda4e7283e4d47cd8a55c5bd0c689081 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:19:42 -0700 Subject: [fetchDependency] Use Expand-Archive if it exists, otherwise fallback to cmd --- ports/winpcap/wpcap.patch | 414 ++++++++++++++++++++++++++++++++++++++++++++ scripts/fetchDependency.ps1 | 17 +- 2 files changed, 426 insertions(+), 5 deletions(-) create mode 100644 ports/winpcap/wpcap.patch diff --git a/ports/winpcap/wpcap.patch b/ports/winpcap/wpcap.patch new file mode 100644 index 000000000..6296bbd39 --- /dev/null +++ b/ports/winpcap/wpcap.patch @@ -0,0 +1,414 @@ +diff --git a/wpcap/PRJ/wpcap.dsp b/wpcap/PRJ/wpcap.dsp +index e53a865..0e4ed19 100644 +--- a/wpcap/PRJ/wpcap.dsp ++++ b/wpcap/PRJ/wpcap.dsp +@@ -48,8 +48,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -75,8 +75,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -103,8 +103,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -138,8 +138,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +diff --git a/wpcap/PRJ/wpcap.vcproj b/wpcap/PRJ/wpcap.vcproj +index c1d56b4..40a8ce1 100644 +--- a/wpcap/PRJ/wpcap.vcproj ++++ b/wpcap/PRJ/wpcap.vcproj +@@ -22,7 +22,7 @@ + Name="Debug|Win32" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86" +- ConfigurationType="2" ++ ConfigurationType="2" + CharacterSet="2" + > + + +@@ -205,7 +205,7 @@ + +@@ -285,7 +285,7 @@ + + + +@@ -525,7 +525,7 @@ + +@@ -605,7 +605,7 @@ + + + #if !defined(HAVE_SNPRINTF) +-#define snprintf pcap_snprintf +-extern int snprintf (char *, size_t, const char *, ...); ++#define snprintf _snprintf ++//#define snprintf pcap_snprintf ++//extern int snprintf (char *, size_t, const char *, ...); + #endif + + #if !defined(HAVE_VSNPRINTF) +diff --git a/wpcap/libpcap/rpcapd/rpcapd.dsp b/wpcap/libpcap/rpcapd/rpcapd.dsp +index f7c00af..1cd823e 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.dsp ++++ b/wpcap/libpcap/rpcapd/rpcapd.dsp +@@ -44,8 +44,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -69,8 +69,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -94,8 +94,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +@@ -120,8 +120,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +diff --git a/wpcap/libpcap/rpcapd/rpcapd.vcproj b/wpcap/libpcap/rpcapd/rpcapd.vcproj +index 882fbac..b89f1f9 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.vcproj ++++ b/wpcap/libpcap/rpcapd/rpcapd.vcproj +@@ -41,7 +41,7 @@ + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\;..\Win32\include;..\..\..\Common;.\Win32-pthreads;..\..\Win32-Extensions" +- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" ++ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" +@@ -119,7 +119,7 @@ + Date: Tue, 17 Oct 2017 13:40:01 -0700 Subject: [fetchDependency] Add Test-Module function --- scripts/fetchDependency.ps1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6024895ae..2ba98ab23 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -3,6 +3,16 @@ param( [string]$Dependency ) +function Test-Command($commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + +function Test-Module($moduleName) +{ + return [bool](Get-Module -ListAvailable -Name $moduleName) +} + if ($PSVersionTable.PSEdition -ne "Core") { Import-Module BitsTransfer -Verbose:$false } @@ -14,11 +24,6 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -function Test-Command($commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, -- cgit v1.2.3 From 451c1c96be2407da0e590344c655a8df838d3f99 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:42:58 -0700 Subject: [fetchDependency] Use Test-Module for BitsTransfer module check --- scripts/fetchDependency.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 2ba98ab23..58f64b626 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -13,7 +13,8 @@ function Test-Module($moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } -if ($PSVersionTable.PSEdition -ne "Core") { +if (Test-Module -moduleName 'BitsTransfer') +{ Import-Module BitsTransfer -Verbose:$false } -- cgit v1.2.3 From d6d5540cc54c5d3dcbb43bdc6d0fd5b2d6271d21 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:45:41 -0700 Subject: [fetchDependency] Call Start-BitsTransfer if available, otherwise fallback --- scripts/fetchDependency.ps1 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 58f64b626..d2e2b89fd 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -57,12 +57,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $WC.Proxy.Credentials=$ProxyCred } - if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS + # git and installerbase fail with Start-BitsTransfer + if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) { - try { + try + { Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + return } - catch [System.Exception] { + catch [System.Exception] + { # If BITS fails for any reason, delete any potentially partially downloaded files and continue if (Test-Path $downloadPath) { @@ -70,11 +74,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } } } - if (!(Test-Path $downloadPath)) - { - Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $downloadPath) - } + + Write-Verbose("Downloading $Dependency...") + $WC.DownloadFile($url, $downloadPath) } # Enums (without resorting to C#) are only available on powershell 5+. -- cgit v1.2.3 From ffd91c0c1d071378d383ad94ba915e2c10dff06b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:58:36 -0700 Subject: [fetchDependency] Call Get-FileHash if available, otherwise fallback --- scripts/fetchDependency.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index d2e2b89fd..e8c66c84d 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -194,17 +194,17 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - if ($PSVersionTable.PSEdition -ne "Core") + if (Test-Command -commandName 'Get-FileHash') + { + $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash + } + else { $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } - else - { - $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash - } if ($expectedDownloadedFileHash -ne $downloadedFileHash) { -- cgit v1.2.3 From fa4e54a37356ad0200ce6387541ef78997b8a87e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:05:55 -0700 Subject: [git] Update to 2.14.2.3 (was 2.14.1) --- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index e8c66c84d..86bf103a8 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -158,16 +158,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.1" - $downloadVersion = "2.14.1" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/MinGit-2.14.1-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.14.1-32-bit.zip" - $expectedDownloadedFileHash = "77b468e0ead1e7da4cb3a1cf35dabab5210bf10457b4142f5e9430318217cdef" + $requiredVersion = "2.14.2" + $downloadVersion = "2.14.2" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.3/MinGit-2.14.2.3-32-bit.zip" # We choose the 32-bit version + $downloadPath = "$downloadsDir\MinGit-2.14.2.3-32-bit.zip" + $expectedDownloadedFileHash = "7cc1f27e1cfe79381e1a504a5fc7bc33951ac9031cd14c3bf478769d21a26cce" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.1-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.2.3-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.2.3-32-bit" } elseif($Dependency -eq "installerbase") { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 486fff40e..8da718e87 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -151,10 +151,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; + static constexpr std::array EXPECTED_VERSION = {2, 14, 2}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.2.3-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; -- cgit v1.2.3 From 508c21a6f8dece3c2793b302a926d1e663eb8526 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:08:30 -0700 Subject: [vswhere] Update to 2.2.7 (was 2.2.3) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 86bf103a8..1677cb869 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -148,11 +148,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.3" - $downloadVersion = "2.2.3" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe" + $requiredVersion = "2.2.7" + $downloadVersion = "2.2.7" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.7/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8" + $expectedDownloadedFileHash = "f50303881da706132516d9decfd5314d524a0044daf49c0cfd21dc39c1261ec3" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From e9ba8b0ecbe5c49cda2710acaae0983dfe2552f9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:19:48 -0700 Subject: [nuget] Update to 4.4.0 (was 4.3.0) --- scripts/fetchDependency.ps1 | 8 ++++---- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 1677cb869..df03878eb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -138,11 +138,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "nuget") { - $requiredVersion = "4.3.0" - $downloadVersion = "4.3.0" - $url = "https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe" + $requiredVersion = "4.4.0" + $downloadVersion = "4.4.0" + $url = "https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe" $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe" - $expectedDownloadedFileHash = "386da77a8cf2b63d1260b7020feeedabfe3b65ab31d20e6a313a530865972f3a" + $expectedDownloadedFileHash = "2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 8da718e87..34c661afd 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -131,9 +131,9 @@ namespace vcpkg fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; + static constexpr std::array EXPECTED_VERSION = {4, 4, 0}; - const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; + const fs::path downloaded_copy = downloads_folder / "nuget-4.4.0" / "nuget.exe"; const std::vector from_path = Files::find_from_PATH("nuget"); std::vector candidate_paths; -- cgit v1.2.3 From ae3fe7cd16c82b794d5074104cf078afc1a12c7d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 14:42:05 -0700 Subject: [boost] Add feature packages for regex-icu, locale-icu, and python --- ports/boost/CONTROL | 20 ++++++++++++++------ ports/boost/portfile.cmake | 31 ++++++++++++++++++++++++------- toolsrc/src/vcpkg/install.cpp | 3 ++- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 7001c968a..a5da89a5a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,8 +1,16 @@ Source: boost -<<<<<<< HEAD -Version: 1.65-2 -======= -Version: 1.65.1 ->>>>>>> master +Version: 1.65.1-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows], python3 [windows] +Build-Depends: zlib, bzip2 + +Feature: locale-icu +Description: ICU backend for Boost.Locale +Build-Depends: icu + +Feature: regex-icu +Description: ICU support for Boost.Regex +Build-Depends: icu + +Feature: python +Description: a C++ library which enables seamless interoperability between C++ and the Python programming language. +Build-Depends: python3 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 4d2d06aae..b0699eaa2 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -119,6 +119,30 @@ if(TRIPLET_SYSTEM_ARCH MATCHES "x64") list(APPEND B2_OPTIONS address-model=64) endif() +if("python" IN_LIST FEATURES) + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) + list(APPEND B2_OPTIONS_DBG python-debugging=on) +else() + list(APPEND B2_OPTIONS --without-python) +endif() + +if("locale-icu" IN_LIST FEATURES) + list(APPEND B2_OPTIONS boost.locale.icu=on) +else() + list(APPEND B2_OPTIONS boost.locale.icu=off) +endif() + +if("regex-icu" IN_LIST FEATURES) + list(APPEND B2_OPTIONS --enable-icu) +else() + list(APPEND B2_OPTIONS --disable-icu) +endif() + + if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") list(APPEND B2_OPTIONS windows-api=store @@ -173,15 +197,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() - # Find Python. Can't use find_package here, but we already know where everything is - file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") - set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") - set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") - string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) - list(APPEND B2_OPTIONS_DBG - python-debugging=on) endif() if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index adbd8c943..70757ff38 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -591,11 +591,12 @@ namespace vcpkg::Install const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), Build::to_allow_downloads(!no_downloads)}; + // Note: action_plan will hold raw pointers to SourceControlFiles from this map + std::unordered_map scf_map; std::vector action_plan; if (GlobalState::feature_packages) { - std::unordered_map scf_map; auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); for (auto&& port : all_ports) { -- cgit v1.2.3 From 1211c777663c4716caa0e3a58f3ea84dab1ab714 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 15:08:30 -0700 Subject: [lua] Move tools to /tools/lua --- ports/lua/CMakeLists.txt | 6 +++--- ports/lua/CONTROL | 2 +- ports/lua/portfile.cmake | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index a96718953..3fa62fe2c 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -45,7 +45,7 @@ ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS ) ADD_LIBRARY ( lua ${SRC_LIBLUA} ) IF (BUILD_SHARED_LIBS) - TARGET_COMPILE_DEFINITIONS (lua PRIVATE -DLUA_BUILD_AS_DLL ) + TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_BUILD_AS_DLL ) ENDIF () INSTALL ( TARGETS lua @@ -55,11 +55,11 @@ INSTALL ( TARGETS lua ) IF (NOT DEFINED SKIP_INSTALL_TOOLS) - ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler + ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. ADD_EXECUTABLE ( luai src/lua.c ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) ENDIF () IF (NOT DEFINED SKIP_INSTALL_HEADERS) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index fa26bb00b..836ae345a 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.4-3 +Version: 5.3.4-4 Description: a powerful, fast, lightweight, embeddable scripting language diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index 3b7e8779c..a1dcbd379 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -33,9 +33,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) string(REPLACE "defined(LUA_BUILD_AS_DLL)" "1" LUA_CONF_H "${LUA_CONF_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}") - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools) endif() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lua) + # Handle copyright file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lua) vcpkg_copy_pdbs() -- cgit v1.2.3 From 50402e91cb46a619b06a2c63d23c693a7b4f563c Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 17:31:24 -0500 Subject: FIX: use alias folder --- ports/pthreads/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index cda6efb32..cddb3f411 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -34,11 +34,11 @@ endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link RENAME pthreads.lib ) file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadsVC2d.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link RENAME pthreads.lib ) -- cgit v1.2.3 From d7f6a7e4a8e09ce54c18f16dea9f6d3fe9d0ac77 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 16:12:35 -0700 Subject: Update CHANGELOG and bump version to v0.0.92 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a2b0e336..10e1d531a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,47 @@ +vcpkg (0.0.92) +-------------- + * Add ports: + - cctz v2.1 + - celero 2.1.0-1 + - eastl 3.05.08 + - imgui 1.51-1 + - libidn2 2.0.4 + - mozjpeg 3.2-1 + - spatialite-tools 4.3.0 + - string-theory 1.6 + - tiny-dnn 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e + - wincrypt 0.0 + - winsock2 0.0 + * Update ports: + - abseil 2017-09-28 -> 2017-10-14 + - boost 1.65.1 -> 1.65.1-1 + - cpprestsdk 2.9.0-3 -> 2.9.0-4 + - gdal 1.11.3-5 -> 2.2.2 + - jansson v2.10-1 -> 2.10-1 + - lua 5.3.4-2 -> 5.3.4-4 + - mpfr 3.1.5-1 -> 3.1.6 + - ogre 1.9.0 -1 -> 1.9.0-1 + - openni2 2.2.0.33-2 -> 2.2.0.33-4 + - pcl 1.8.1-1 -> 1.8.1-2 + - sciter 4.0.3 -> 4.0.4 + - vtk 8.0.0-2 -> 8.0.0-3 + - websocketpp 0.7.0 -> 0.7.0-1 + * Initial support for autocomplete/tab-completion for powershell (still experimental) + * Add `VCPKG_CHAINLOAD_TOOLCHAIN_FILE variable`. As the name suggests, you can chainload your own toolchain file along with the `vcpkg` toolchain file. + * Fix issues with the new Visual Studio detection ([`vswhere.exe`](https://github.com/Microsoft/vswhere)). Notably: + - Detect VS2015 BuildTools, VS2017 BuildTools and VS Express Edition + * Fix issues with Windows SDK detection + * Rework acquisition of `vcpkg` dependencies (e.g. `cmake`, `git`). It is now more robust and should be faster on modern Operating Systems while still having fallback functions for older ones. + * Bump required version & auto-downloaded version of `cmake` to 3.9.4 + * Bump required version & auto-downloaded version of `nuget` to 4.4.0 + * Bump required version & auto-downloaded version of `vswhere` to 2.2.7 + * Bump required version & auto-downloaded version of `git` to 2.4.2(.3) + * Bump ninja to version 1.8.0 + + +-- vcpkg team TUE, 17 Oct 2017 16:00:00 -0800 + + vcpkg (0.0.91) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 04ab0d2c9..af0276f0b 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.91" \ No newline at end of file +"0.0.92" \ No newline at end of file -- cgit v1.2.3 From 4451a745a0f3beb6e8e034422185ef86df098a77 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:15:52 -0500 Subject: ENH: sodium: add control --- ports/libsodium/CONTROL | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ports/libsodium/CONTROL diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL new file mode 100644 index 000000000..185718572 --- /dev/null +++ b/ports/libsodium/CONTROL @@ -0,0 +1,3 @@ +Source: libsodium +Version: 1.0.15 +Description: A modern and easy-to-use crypto library -- cgit v1.2.3 From b3f123fdd0acd3eff443a5d709c6a223d380ea36 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:25:58 -0500 Subject: ENH: add portfile --- ports/libsodium/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ports/libsodium/portfile.cmake diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake new file mode 100644 index 000000000..593c173e9 --- /dev/null +++ b/ports/libsodium/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +set(LIBSODIUM_VERSION 1.0.15) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsodium-${LIBSODIUM_VERSION}) + +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO jedisct1/libsodium + REF ${LIBSODIUM_VERSION} + SHA512 ec497cb0007597efaeae0aecaa7484d6dcc53367607ec3fd28a98c6209f0cdecd5a6f560c15badd3a69b8da7d63676b11fb395ef4ed4da9b80467dbdc5f65a72 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + RELEASE_CONFIGURATION ReleaseDLL + DEBUG_CONFIGURATION DebugDLL + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + ) +endif() + + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium + RENAME copyright +) -- cgit v1.2.3 From 9642423f1df8f071678c4c78f10175b1b450e87d Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:43:54 -0500 Subject: ENH: libsodium: Copy necessary files --- ports/libsodium/portfile.cmake | 55 +++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 593c173e9..731d63e9b 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -12,20 +12,53 @@ vcpkg_from_github( ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj - RELEASE_CONFIGURATION ReleaseDLL - DEBUG_CONFIGURATION DebugDLL - ) + set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL) + set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL) else() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj - ) + set(LIBSODIUM_RELEASE_CONFIGURATION Release) + set(LIBSODIUM_DEBUG_CONFIGURATION Debug) endif() +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION} +) + +IF(VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + + +file(GLOB LIBSODIUM_HEADERS "${SOURCE_PATH}/src/libsodium/include/sodium/*.h") +file(INSTALL + ${LIBSODIUM_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium +) + +file(INSTALL + Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file(INSTALL + Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug +) +file(INSTALL + Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug +) + +vcpkg_copy_pdbs() file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium - RENAME copyright + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium + RENAME copyright ) -- cgit v1.2.3 From 1af22993871d64089b2e96a82c61f9d8c86c2bb4 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:47:20 -0500 Subject: FIX: use forward slashes --- ports/libsodium/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 731d63e9b..2c3f1e0f6 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -39,19 +39,19 @@ file(INSTALL ) file(INSTALL - Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug ) file(INSTALL - Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug ) -- cgit v1.2.3 From 62f665010d80fefbbe9655506943f72a73b7a2b9 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:49:05 -0500 Subject: FIX: use correct source path --- ports/libsodium/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 2c3f1e0f6..5909ef871 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -39,19 +39,19 @@ file(INSTALL ) file(INSTALL - Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug ) file(INSTALL - Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug ) -- cgit v1.2.3 From ab2dc2cae3dfaf10cde197e2bd5cf711c718033b Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:53:18 -0500 Subject: FIX: use the correct paths --- ports/libsodium/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 5909ef871..b2329d248 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -48,11 +48,11 @@ file(INSTALL ) file(INSTALL ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) file(INSTALL ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) vcpkg_copy_pdbs() -- cgit v1.2.3 From 8bac6ea3bf3e6621be7936bce509223ce1478bd8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 17:38:38 -0700 Subject: [pthreads] Version bump for PR #1990 --- ports/pthreads/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL index ee9b7b5fa..ab02fb415 100644 --- a/ports/pthreads/CONTROL +++ b/ports/pthreads/CONTROL @@ -1,3 +1,3 @@ Source: pthreads -Version: 2.9.1-1 +Version: 2.9.1-2 Description: pthreads for windows -- cgit v1.2.3 From 71d516b6dd26c633dbb790591ddcc3a37786934a Mon Sep 17 00:00:00 2001 From: kypp Date: Wed, 18 Oct 2017 09:39:08 +0200 Subject: [assimp] fix static linkage --- ports/assimp/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 14564e65a..ee0d192b3 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -19,6 +19,7 @@ vcpkg_configure_cmake( -DASSIMP_BUILD_ASSIMP_VIEW=False -DASSIMP_BUILD_ZLIB=False -DASSIMP_BUILD_ASSIMP_TOOLS=False + -DASSIMP_INSTALL_PDB=False ) vcpkg_install_cmake() -- cgit v1.2.3 From bef18205d74d78b831ceb629c71b61836a012bf9 Mon Sep 17 00:00:00 2001 From: kypp Date: Wed, 18 Oct 2017 09:39:38 +0200 Subject: [assimp] update to version 4.0.1 --- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index f13d2ee20..170d727a8 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.0-2 +Version: 4.0.1 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index ee0d192b3..0642fb701 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO assimp/assimp - REF v4.0.0 - SHA512 ab2b376c6323fc8579fe3a4b3dbe92c44d753747464a14d6e2be70d2a855c208df882ad84487a7b96f364afb175938b5f6a1111d767450b01e0b8b7f0f36ba62 + REF v4.0.1 + SHA512 260b4c7e738f857d8364c4878ea4e789ca676180821943f6d9bff8f56e5f9377ea29660dca4e130c681a8aa12fc32f155adb1d78ca260ba242e68b8afa6cc1bb HEAD_REF master ) -- cgit v1.2.3 From fc80d72089e1a12b1f8447dc91bbb0018437b141 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Wed, 18 Oct 2017 21:18:08 +1100 Subject: Port (cmake) for secp256k1 crypto project. --- ports/secp256k1/CMakeLists.txt | 26 ++++++++++++++++++++++++++ ports/secp256k1/CONTROL | 3 +++ ports/secp256k1/libsecp256k1-config.h | 29 +++++++++++++++++++++++++++++ ports/secp256k1/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 ports/secp256k1/CMakeLists.txt create mode 100644 ports/secp256k1/CONTROL create mode 100644 ports/secp256k1/libsecp256k1-config.h create mode 100644 ports/secp256k1/portfile.cmake diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt new file mode 100644 index 000000000..708ff68fa --- /dev/null +++ b/ports/secp256k1/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.8) +project(secp256k1 C) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DENABLE_MODULE_ECDH + -DENABLE_MODULE_RECOVERY + -DHAVE_CONFIG_H +) + +file(GLOB SOURCES src/secp256k1.c) +add_library(secp256k1 ${SOURCES}) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +install(TARGETS secp256k1 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS include/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() \ No newline at end of file diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL new file mode 100644 index 000000000..0198cf1b8 --- /dev/null +++ b/ports/secp256k1/CONTROL @@ -0,0 +1,3 @@ +Source: secp256k1 +Version: +Description: Optimized C library for EC operations on curve diff --git a/ports/secp256k1/libsecp256k1-config.h b/ports/secp256k1/libsecp256k1-config.h new file mode 100644 index 000000000..693d3ed25 --- /dev/null +++ b/ports/secp256k1/libsecp256k1-config.h @@ -0,0 +1,29 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_BASIC_CONFIG_H +#define SECP256K1_BASIC_CONFIG_H + +#undef USE_ASM_X86_64 +#undef USE_ENDOMORPHISM +#undef USE_FIELD_10X26 +#undef USE_FIELD_5X52 +#undef USE_FIELD_INV_BUILTIN +#undef USE_FIELD_INV_NUM +#undef USE_NUM_GMP +#undef USE_NUM_NONE +#undef USE_SCALAR_4X64 +#undef USE_SCALAR_8X32 +#undef USE_SCALAR_INV_BUILTIN +#undef USE_SCALAR_INV_NUM + +#define USE_NUM_NONE 1 +#define USE_FIELD_INV_BUILTIN 1 +#define USE_SCALAR_INV_BUILTIN 1 +#define USE_FIELD_10X26 1 +#define USE_SCALAR_8X32 1 + +#endif /* SECP256K1_BASIC_CONFIG_H */ diff --git a/ports/secp256k1/portfile.cmake b/ports/secp256k1/portfile.cmake new file mode 100644 index 000000000..9ff3fff8f --- /dev/null +++ b/ports/secp256k1/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/secp256k1-0b7024185045a49a1a6a4c5615bf31c94f63d9c4/) + +vcpkg_from_github( + OUT_SOURCE_PATH "secp256k1" + REPO "bitcoin-core/secp256k1" + REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" + SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc +) + +message("Copying config header to " ${SOURCE_PATH}) + +file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) + +message(STATUS "Building") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + OPTIONS_DEBUG +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) -- cgit v1.2.3 From 11fdd415dd21f85292260a64fa9d52d872697e7c Mon Sep 17 00:00:00 2001 From: bahaki386 Date: Wed, 18 Oct 2017 19:38:25 +0900 Subject: Update Meson to 0.43.0 Upedate Meson to 0.43.0. It will fix Issue #2006. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b81675c13..fdee0cb1f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -110,10 +110,10 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) set(SCRIPTNAME meson.py) - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.40.1) - set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") - set(ARCHIVE "meson-0.40.1.zip") - set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.43.0) + set(URL "https://github.com/mesonbuild/meson/archive/0.43.0.zip") + set(ARCHIVE "meson-0.43.0.zip") + set(HASH dde4de72eff37046731224f32aa5f4618d45bdf148cec2d1af6e25e7522ebc2b04aedc9eceed483dfa93823a0ea7ea472d0c0c9380061bf3ee2f16b87dd1425e) elseif(VAR MATCHES "FLEX") set(PROGNAME win_flex) set(PATHS ${DOWNLOADS}/tools/win_flex) -- cgit v1.2.3 From c51f82bb6d29e59b430b088b5ad9c9da78da9d6c Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 18 Oct 2017 14:18:52 +0300 Subject: Strip 'v' prefixes which are not really version parts --- ports/cctz/CONTROL | 2 +- ports/folly/CONTROL | 2 +- ports/openblas/CONTROL | 2 +- ports/spirv-tools/CONTROL | 2 +- ports/thor/CONTROL | 2 +- ports/tinyexr/CONTROL | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL index fb125fa13..6ed9a0ce1 100644 --- a/ports/cctz/CONTROL +++ b/ports/cctz/CONTROL @@ -1,3 +1,3 @@ Source: cctz -Version: v2.1 +Version: 2.1 Description: two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner. diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 3bff7ba88..027979146 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.10.02.00 +Version: 2017.10.02.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index 808d52ac9..78617d700 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: v0.2.20-2 +Version: 0.2.20-2 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index da2e2f29b..33c43d628 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,3 +1,3 @@ Source: spirv-tools -Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 +Version: 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 Description: API and commands for processing SPIR-V modules diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index 9ad978099..cdb393f38 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor -Version: v2.0-1 +Version: 2.0-1 Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml, aurora diff --git a/ports/tinyexr/CONTROL b/ports/tinyexr/CONTROL index 8ac085f68..54b459b49 100644 --- a/ports/tinyexr/CONTROL +++ b/ports/tinyexr/CONTROL @@ -1,3 +1,3 @@ Source: tinyexr -Version: v0.9.5-d16ea6 +Version: 0.9.5-d16ea6 Description: Library to load and save OpenEXR(.exr) images -- cgit v1.2.3 From 7a4023f1dcb3686d7d8deaf9e40cc0283e508b08 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Oct 2017 14:47:04 -0700 Subject: [autocomplete] Don't try to autocomplete triplets to --options --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index e36bf8430..410bfcd0d 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -134,7 +134,8 @@ namespace vcpkg::Commands::Autocomplete const auto prefix = match[2].str(); std::vector results; - if (Strings::case_insensitive_ascii_starts_with(prefix, "-")) + const bool is_option = Strings::case_insensitive_ascii_starts_with(prefix, "-"); + if (is_option) { results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); } @@ -147,7 +148,7 @@ namespace vcpkg::Commands::Autocomplete return Strings::case_insensitive_ascii_starts_with(s, prefix); }); - if (command.name == "install" && results.size() == 1) + if (command.name == "install" && results.size() == 1 && !is_option) { const auto port_at_each_triplet = combine_port_with_triplets(results[0], paths.get_available_triplets()); -- cgit v1.2.3 From ecdfd3c8e3a4b924bfad5b70f6557dd9f337bd1c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Oct 2017 19:04:14 -0700 Subject: ci now accepts multiple triplets. Refactoring to accomodate --- toolsrc/include/vcpkg/install.h | 28 +++++++----- toolsrc/src/vcpkg/commands.ci.cpp | 49 +++++++++++++++++---- toolsrc/src/vcpkg/install.cpp | 93 +++++++++++++++++++++------------------ 3 files changed, 108 insertions(+), 62 deletions(-) diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index db6055f4f..809befb16 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -17,13 +17,22 @@ namespace vcpkg::Install inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } - enum class PrintSummary + struct SpecSummary { - NO = 0, - YES + explicit SpecSummary(const PackageSpec& spec); + + PackageSpec spec; + Build::BuildResult result; + std::string timing; }; - inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; } + struct InstallSummary + { + std::vector results; + std::string total_elapsed_time; + + void print() const; + }; struct InstallDir { @@ -58,12 +67,11 @@ namespace vcpkg::Install const BinaryControlFile& binary_paragraph, StatusParagraphs* status_db); - void perform_and_exit_ex(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, - const KeepGoing keep_going, - const PrintSummary print_summary, - const VcpkgPaths& paths, - StatusParagraphs& status_db); + InstallSummary perform(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const VcpkgPaths& paths, + StatusParagraphs& status_db); extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 1c98d1d83..ffeaad790 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -30,15 +30,10 @@ namespace vcpkg::Commands::CI }); } - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); - args.check_max_arg_count(1, EXAMPLE); - const Triplet triplet = args.command_arguments.size() == 1 - ? Triplet::from_canonical_name(args.command_arguments.at(0)) - : default_triplet; Input::check_triplet(triplet, paths); - args.check_and_get_optional_command_arguments({}); + const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); StatusParagraphs status_db = database_load_check(paths); @@ -54,8 +49,44 @@ namespace vcpkg::Commands::CI return Dependencies::AnyAction(std::move(install_action)); }); - Install::perform_and_exit_ex( - action_plan, install_plan_options, Install::KeepGoing::YES, Install::PrintSummary::YES, paths, status_db); + return Install::perform(action_plan, install_plan_options, Install::KeepGoing::YES, paths, status_db); + } + + struct TripletAndSummary + { + Triplet triplet; + Install::InstallSummary summary; + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); + args.check_and_get_optional_command_arguments({}); + + std::vector triplets; + for (const std::string& triplet : args.command_arguments) + { + triplets.push_back(Triplet::from_canonical_name(triplet)); + } + + if (triplets.empty()) + { + triplets.push_back(default_triplet); + } + + std::vector results; + for (const Triplet& triplet : triplets) + { + Install::InstallSummary summary = run_ci_on_triplet(triplet, paths); + results.push_back({triplet, std::move(summary)}); + } + + for (auto&& result : results) + { + System::println("\nTriplet: %s", result.triplet); + System::println("Total elapsed time: %s", result.summary.total_elapsed_time); + result.summary.print(); + } Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 70757ff38..bd924fcba 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -444,15 +444,41 @@ namespace vcpkg::Install } } - void perform_and_exit_ex(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, - const KeepGoing keep_going, - const PrintSummary print_summary, - const VcpkgPaths& paths, - StatusParagraphs& status_db) + void InstallSummary::print() const { - std::vector results; - std::vector timing; + System::println("RESULTS"); + + for (const SpecSummary& result : this->results) + { + System::println(" %s: %s: %s", result.spec, Build::to_string(result.result), result.timing); + } + + std::map summary; + for (const BuildResult& v : Build::BUILD_RESULT_VALUES) + { + summary[v] = 0; + } + + for (const SpecSummary& r : this->results) + { + summary[r.result]++; + } + + System::println("\nSUMMARY"); + for (const std::pair& entry : summary) + { + System::println(" %s: %d", Build::to_string(entry.first), entry.second); + } + } + + InstallSummary perform(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const VcpkgPaths& paths, + StatusParagraphs& status_db) + { + std::vector results; + const auto timer = Chrono::ElapsedTime::create_started(); size_t counter = 0; const size_t package_count = action_plan.size(); @@ -462,11 +488,11 @@ namespace vcpkg::Install const auto build_timer = Chrono::ElapsedTime::create_started(); counter++; - const std::string display_name = action.spec().to_string(); + const PackageSpec& spec = action.spec(); + const std::string display_name = spec.to_string(); System::println("Starting package %d/%d: %s", counter, package_count, display_name); - timing.push_back("0"); - results.push_back(BuildResult::NULLVALUE); + results.push_back(SpecSummary{spec}); if (const auto install_action = action.install_plan.get()) { @@ -478,7 +504,7 @@ namespace vcpkg::Install Checks::exit_fail(VCPKG_LINE_INFO); } - results.back() = result; + results.back().result = result; } else if (const auto remove_action = action.remove_plan.get()) { @@ -490,38 +516,11 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - timing.back() = build_timer.to_string(); + results.back().timing = build_timer.to_string(); System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); } - System::println("Total time taken: %s", timer.to_string()); - - if (print_summary == PrintSummary::YES) - { - for (size_t i = 0; i < results.size(); i++) - { - System::println("%s: %s: %s", action_plan[i].spec(), Build::to_string(results[i]), timing[i]); - } - - std::map summary; - for (const BuildResult& v : Build::BUILD_RESULT_VALUES) - { - summary[v] = 0; - } - - for (const BuildResult& r : results) - { - summary[r]++; - } - - System::println("\n\nSUMMARY"); - for (const std::pair& entry : summary) - { - System::println(" %s: %d", Build::to_string(entry.first), entry.second); - } - } - - Checks::exit_success(VCPKG_LINE_INFO); + return InstallSummary{results, timer.to_string()}; } static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -583,7 +582,6 @@ namespace vcpkg::Install const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); - const PrintSummary print_summary = to_print_summary(keep_going == KeepGoing::YES); // create the plan StatusParagraphs status_db = database_load_check(paths); @@ -635,8 +633,17 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - perform_and_exit_ex(action_plan, install_plan_options, keep_going, print_summary, paths, status_db); + const InstallSummary summary = perform(action_plan, install_plan_options, keep_going, paths, status_db); + + System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); + + if (keep_going == KeepGoing::YES) + { + summary.print(); + } Checks::exit_success(VCPKG_LINE_INFO); } + + SpecSummary::SpecSummary(const PackageSpec& spec) : spec(spec), result(BuildResult::NULLVALUE), timing("0") {} } -- cgit v1.2.3 From 9964d84b53442ef4f555cfe090ed22503b90d213 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Oct 2017 19:20:11 -0700 Subject: Add extra checks on the return Visual Studio instances --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 34c661afd..2f2dd877e 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -330,10 +330,19 @@ namespace vcpkg VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); + Checks::check_exit( + VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances"); + std::vector output; for (const std::string& instance_as_string : instances_as_strings) { const std::vector split = Strings::split(instance_as_string, "::"); + Checks::check_exit(VCPKG_LINE_INFO, + split.size() == 4, + "Invalid Visual Studio instance format.\n" + "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" + "Actual : %s", + instance_as_string); output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } -- cgit v1.2.3 From a127ba1f2f27300a085e446e99fc1714da648416 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Thu, 19 Oct 2017 14:25:25 +1100 Subject: Port for Berkeley DB v4.8.30 --- ports/berkeleydb/CMakeLists.txt | 276 ++++++++++++++++++++++++++++++++++++++++ ports/berkeleydb/CONTROL | 3 + ports/berkeleydb/portfile.cmake | 29 +++++ 3 files changed, 308 insertions(+) create mode 100644 ports/berkeleydb/CMakeLists.txt create mode 100644 ports/berkeleydb/CONTROL create mode 100644 ports/berkeleydb/portfile.cmake diff --git a/ports/berkeleydb/CMakeLists.txt b/ports/berkeleydb/CMakeLists.txt new file mode 100644 index 000000000..1eb130c3e --- /dev/null +++ b/ports/berkeleydb/CMakeLists.txt @@ -0,0 +1,276 @@ +cmake_minimum_required(VERSION 3.8) +project(berkeleydb C CXX) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DWIN32 + -D_WINDOWS + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_LIB +) + +if (BUILD_SHARED_LIBS) + add_definitions( + -D_LIB + ) +else() + add_definitions( + -DDB_CREATE_DLL + -D_USRDLL + ) +endif() + +add_library(libdb48 + btree/bt_compact.c + btree/bt_compare.c + btree/bt_compress.c + btree/bt_conv.c + btree/bt_curadj.c + btree/bt_cursor.c + btree/bt_delete.c + btree/bt_method.c + btree/bt_open.c + btree/bt_put.c + btree/bt_rec.c + btree/bt_reclaim.c + btree/bt_recno.c + btree/bt_rsearch.c + btree/bt_search.c + btree/bt_split.c + btree/bt_stat.c + btree/bt_upgrade.c + btree/bt_verify.c + btree/btree_auto.c + db/crdel_auto.c + db/crdel_rec.c + common/crypto_stub.c + cxx/cxx_db.cpp + cxx/cxx_dbc.cpp + cxx/cxx_dbt.cpp + cxx/cxx_env.cpp + cxx/cxx_except.cpp + cxx/cxx_lock.cpp + cxx/cxx_logc.cpp + cxx/cxx_mpool.cpp + cxx/cxx_multi.cpp + cxx/cxx_seq.cpp + cxx/cxx_txn.cpp + db/db.c + db/db_am.c + db/db_auto.c + common/db_byteorder.c + db/db_cam.c + db/db_cds.c + db/db_conv.c + db/db_dispatch.c + db/db_dup.c + common/db_err.c + common/db_getlong.c + common/db_idspace.c + common/db_compint.c + db/db_iface.c + db/db_join.c + common/db_log2.c + db/db_meta.c + db/db_method.c + db/db_open.c + db/db_overflow.c + db/db_ovfl_vrfy.c + db/db_pr.c + db/db_rec.c + db/db_reclaim.c + db/db_remove.c + db/db_rename.c + db/db_ret.c + db/db_setid.c + db/db_setlsn.c + common/db_shash.c + db/db_sort_multiple.c + db/db_stati.c + db/db_truncate.c + db/db_upg.c + db/db_upg_opd.c + db/db_vrfy.c + db/db_vrfyutil.c + db/partition.c + dbm/dbm.c + dbreg/dbreg.c + dbreg/dbreg_auto.c + dbreg/dbreg_rec.c + dbreg/dbreg_stat.c + dbreg/dbreg_util.c + common/dbt.c + env/env_alloc.c + env/env_config.c + env/env_failchk.c + env/env_file.c + env/env_globals.c + env/env_method.c + env/env_name.c + env/env_open.c + env/env_recover.c + env/env_region.c + env/env_register.c + env/env_sig.c + env/env_stat.c + fileops/fileops_auto.c + fileops/fop_basic.c + fileops/fop_rec.c + fileops/fop_util.c + hash/hash.c + hash/hash_auto.c + hash/hash_conv.c + hash/hash_dup.c + hash/hash_func.c + hash/hash_meta.c + hash/hash_method.c + hash/hash_open.c + hash/hash_page.c + hash/hash_rec.c + hash/hash_reclaim.c + hash/hash_stat.c + hash/hash_upgrade.c + hash/hash_verify.c + hmac/hmac.c + hsearch/hsearch.c + build_windows/libdb.def + lock/lock.c + lock/lock_deadlock.c + lock/lock_failchk.c + lock/lock_id.c + lock/lock_list.c + lock/lock_method.c + lock/lock_region.c + lock/lock_stat.c + lock/lock_timer.c + lock/lock_util.c + log/log.c + log/log_archive.c + log/log_compare.c + log/log_debug.c + log/log_get.c + log/log_method.c + log/log_put.c + log/log_stat.c + common/mkpath.c + mp/mp_alloc.c + mp/mp_bh.c + mp/mp_fget.c + mp/mp_fmethod.c + mp/mp_fopen.c + mp/mp_fput.c + mp/mp_fset.c + mp/mp_method.c + mp/mp_mvcc.c + mp/mp_region.c + mp/mp_register.c + mp/mp_resize.c + mp/mp_stat.c + mp/mp_sync.c + mp/mp_trickle.c + mutex/mut_alloc.c + mutex/mut_failchk.c + mutex/mut_method.c + mutex/mut_region.c + mutex/mut_stat.c + mutex/mut_win32.c + common/openflags.c + os/os_abort.c + os/os_addrinfo.c + os_windows/os_abs.c + os/os_alloc.c + os_windows/os_clock.c + os_windows/os_config.c + os_windows/os_cpu.c + os/os_ctime.c + os_windows/os_dir.c + os_windows/os_errno.c + os_windows/os_fid.c + os_windows/os_flock.c + os_windows/os_fsync.c + os_windows/os_getenv.c + os_windows/os_handle.c + os_windows/os_map.c + os_windows/os_mkdir.c + os_windows/os_open.c + os/os_pid.c + os_windows/os_rename.c + os/os_root.c + os/os_rpath.c + os_windows/os_rw.c + os_windows/os_seek.c + os/os_stack.c + os_windows/os_stat.c + os/os_tmpdir.c + os_windows/os_truncate.c + os/os_uid.c + os_windows/os_unlink.c + os_windows/os_yield.c + qam/qam.c + qam/qam_auto.c + qam/qam_conv.c + qam/qam_files.c + qam/qam_method.c + qam/qam_open.c + qam/qam_rec.c + qam/qam_stat.c + qam/qam_upgrade.c + qam/qam_verify.c + rep/rep_auto.c + rep/rep_backup.c + rep/rep_elect.c + rep/rep_lease.c + rep/rep_log.c + rep/rep_method.c + rep/rep_record.c + rep/rep_region.c + rep/rep_stat.c + rep/rep_util.c + rep/rep_verify.c + repmgr/repmgr_auto.c + repmgr/repmgr_elect.c + repmgr/repmgr_method.c + repmgr/repmgr_msg.c + repmgr/repmgr_net.c + repmgr/repmgr_queue.c + repmgr/repmgr_sel.c + repmgr/repmgr_stat.c + repmgr/repmgr_util.c + repmgr/repmgr_windows.c + sequence/seq_stat.c + sequence/sequence.c + hmac/sha1.c + clib/strsep.c + txn/txn.c + txn/txn_auto.c + txn/txn_chkpt.c + txn/txn_failchk.c + txn/txn_method.c + txn/txn_rec.c + txn/txn_recover.c + txn/txn_region.c + txn/txn_stat.c + txn/txn_util.c + common/os_method.c + common/util_cache.c + common/util_log.c + common/util_sig.c + common/zerofill.c +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} build_windows dbinc) + +target_link_libraries(libdb48 PUBLIC ws2_32.lib) + +install(TARGETS libdb48 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS build_windows/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() \ No newline at end of file diff --git a/ports/berkeleydb/CONTROL b/ports/berkeleydb/CONTROL new file mode 100644 index 000000000..a0ac528b7 --- /dev/null +++ b/ports/berkeleydb/CONTROL @@ -0,0 +1,3 @@ +Source: berkeleydb +Version: 4.8.30 +Description: A high-performance embedded database for key/value data. diff --git a/ports/berkeleydb/portfile.cmake b/ports/berkeleydb/portfile.cmake new file mode 100644 index 000000000..614b89409 --- /dev/null +++ b/ports/berkeleydb/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" + FILENAME "db-4.8.30.NC.zip" + SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab +) +vcpkg_extract_source_archive(${ARCHIVE}) + +#message("CURRENT_PORT_DIR=${CURRENT_PORT_DIR}") + +message(STATUS "Building") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + OPTIONS_DEBUG +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) -- cgit v1.2.3 From 2f02ebd8209abe011d91e9ad5dac66f88aca70de Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 18 Oct 2017 20:44:46 -0700 Subject: [berkeleydb] Remove debugging messages, use LF endings --- ports/berkeleydb/portfile.cmake | 52 ++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/ports/berkeleydb/portfile.cmake b/ports/berkeleydb/portfile.cmake index 614b89409..6a7e30a05 100644 --- a/ports/berkeleydb/portfile.cmake +++ b/ports/berkeleydb/portfile.cmake @@ -1,29 +1,23 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) - -vcpkg_download_distfile(ARCHIVE - URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" - FILENAME "db-4.8.30.NC.zip" - SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab -) -vcpkg_extract_source_archive(${ARCHIVE}) - -#message("CURRENT_PORT_DIR=${CURRENT_PORT_DIR}") - -message(STATUS "Building") - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DINSTALL_HEADERS=OFF - OPTIONS_DEBUG -) - -vcpkg_install_cmake() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" + FILENAME "db-4.8.30.NC.zip" + SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) -- cgit v1.2.3 From 405d34b4a0af89ccb87000015656572cff19b7da Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 19 Oct 2017 15:19:29 +0300 Subject: [GMime] Initial port. --- ports/gmime/CMakeLists.txt | 179 ++++++++++++++ ports/gmime/CONTROL | 4 + ports/gmime/config.h | 184 ++++++++++++++ ports/gmime/gmime.def | 589 +++++++++++++++++++++++++++++++++++++++++++++ ports/gmime/idna.h | 3 + ports/gmime/portfile.cmake | 36 +++ 6 files changed, 995 insertions(+) create mode 100644 ports/gmime/CMakeLists.txt create mode 100644 ports/gmime/CONTROL create mode 100644 ports/gmime/config.h create mode 100644 ports/gmime/gmime.def create mode 100644 ports/gmime/idna.h create mode 100644 ports/gmime/portfile.cmake diff --git a/ports/gmime/CMakeLists.txt b/ports/gmime/CMakeLists.txt new file mode 100644 index 000000000..18ec89518 --- /dev/null +++ b/ports/gmime/CMakeLists.txt @@ -0,0 +1,179 @@ +cmake_minimum_required(VERSION 3.8) + +project(gmime C) + +set(GLIB_LIB_SUFFIX 2.0) +set(GMIME_DLL_SUFFIX 3) +set(GMIME_LIB_SUFFIX 3.0) + +# Find glib +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GIO_LIBRARY gio-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_SUFFIX}) +set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GIO_LIBRARY} ${GLIB_GOBJECT_LIBRARY}) + +# Find other deps +find_path(ICONV_INCLUDE_DIR iconv.h) +find_library(ICONV_LIBRARY NAMES iconv libiconv) + +find_library(IDN_LIBRARY NAMES libidn2 libidn) + +find_package(zlib REQUIRED) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_definitions(-DHAVE_CONFIG_H) +add_definitions(-DG_LOG_DOMAIN="GMime") + +# List the source files +set(LIB_SRC gmime/gmime.c + gmime/gmime-application-pkcs7-mime.c + gmime/gmime-certificate.c + gmime/gmime-charset.c + gmime/gmime-common.c + gmime/gmime-content-type.c + gmime/gmime-crypto-context.c + gmime/gmime-data-wrapper.c + gmime/gmime-disposition.c + gmime/gmime-encodings.c + gmime/gmime-events.c + gmime/gmime-filter.c + gmime/gmime-filter-basic.c + gmime/gmime-filter-best.c + gmime/gmime-filter-charset.c + gmime/gmime-filter-checksum.c + gmime/gmime-filter-dos2unix.c + gmime/gmime-filter-enriched.c + gmime/gmime-filter-from.c + gmime/gmime-filter-gzip.c + gmime/gmime-filter-html.c + gmime/gmime-filter-smtp-data.c + gmime/gmime-filter-strip.c + gmime/gmime-filter-unix2dos.c + gmime/gmime-filter-windows.c + gmime/gmime-filter-yenc.c + gmime/gmime-format-options.c + gmime/gmime-gpg-context.c + gmime/gmime-gpgme-utils.c + gmime/gmime-header.c + gmime/gmime-iconv.c + gmime/gmime-iconv-utils.c + gmime/gmime-message.c + gmime/gmime-message-part.c + gmime/gmime-message-partial.c + gmime/gmime-multipart.c + gmime/gmime-multipart-encrypted.c + gmime/gmime-multipart-signed.c + gmime/gmime-object.c + gmime/gmime-param.c + gmime/gmime-parse-utils.c + gmime/gmime-parser.c + gmime/gmime-parser-options.c + gmime/gmime-part.c + gmime/gmime-part-iter.c + gmime/gmime-pkcs7-context.c + gmime/gmime-references.c + gmime/gmime-signature.c + gmime/gmime-stream.c + gmime/gmime-stream-buffer.c + gmime/gmime-stream-cat.c + gmime/gmime-stream-file.c + gmime/gmime-stream-filter.c + gmime/gmime-stream-fs.c + gmime/gmime-stream-gio.c + gmime/gmime-stream-mem.c + gmime/gmime-stream-mmap.c + gmime/gmime-stream-null.c + gmime/gmime-stream-pipe.c + gmime/gmime-text-part.c + gmime/gmime-utils.c + gmime/internet-address.c + util/packed.c + util/url-scanner.c + util/gtrie.c +) + +set (LIB_HEADERS gmime/gmime.h + gmime/gmime-version.h + gmime/gmime-error.h + gmime/gmime-charset.h + gmime/gmime-iconv.h + gmime/gmime-iconv-utils.h + gmime/gmime-param.h + gmime/gmime-content-type.h + gmime/gmime-disposition.h + gmime/gmime-data-wrapper.h + gmime/gmime-object.h + gmime/gmime-part.h + gmime/gmime-text-part.h + gmime/gmime-part-iter.h + gmime/gmime-application-pkcs7-mime.h + gmime/gmime-multipart.h + gmime/gmime-multipart-encrypted.h + gmime/gmime-multipart-signed.h + gmime/gmime-message.h + gmime/gmime-message-part.h + gmime/gmime-message-partial.h + gmime/internet-address.h + gmime/gmime-encodings.h + gmime/gmime-format-options.h + gmime/gmime-parser-options.h + gmime/gmime-parser.h + gmime/gmime-utils.h + gmime/gmime-references.h + gmime/gmime-stream.h + gmime/gmime-stream-buffer.h + gmime/gmime-stream-cat.h + gmime/gmime-stream-file.h + gmime/gmime-stream-filter.h + gmime/gmime-stream-fs.h + gmime/gmime-stream-gio.h + gmime/gmime-stream-mem.h + gmime/gmime-stream-mmap.h + gmime/gmime-stream-null.h + gmime/gmime-stream-pipe.h + gmime/gmime-filter.h + gmime/gmime-filter-basic.h + gmime/gmime-filter-best.h + gmime/gmime-filter-charset.h + gmime/gmime-filter-checksum.h + gmime/gmime-filter-dos2unix.h + gmime/gmime-filter-enriched.h + gmime/gmime-filter-from.h + gmime/gmime-filter-gzip.h + gmime/gmime-filter-html.h + gmime/gmime-filter-smtp-data.h + gmime/gmime-filter-strip.h + gmime/gmime-filter-unix2dos.h + gmime/gmime-filter-windows.h + gmime/gmime-filter-yenc.h + gmime/gmime-crypto-context.h + gmime/gmime-pkcs7-context.h + gmime/gmime-gpg-context.h +) + +if(MSVC AND BUILD_SHARED_LIBS) + set(MSVC_SRC gmime.def) +endif() + +add_library(${PROJECT_NAME} ${LIB_SRC} ${MSVC_SRC}) + +set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME ${PROJECT_NAME}-${GMIME_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME ${PROJECT_NAME}-${GMIME_LIB_SUFFIX} +) + +target_include_directories(${PROJECT_NAME} PRIVATE . ./util ${GLIB_INCLUDE_DIR} ${ICONV_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) +target_link_libraries(${PROJECT_NAME} PRIVATE ${GLIB_LIBRARIES} ${ICONV_LIBRARY} ${ZLIB_LIBRARIES} ${IDN_LIBRARY}) +target_link_libraries(${PROJECT_NAME} PRIVATE Ws2_32.lib) + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES ${LIB_HEADERS} DESTINATION include/gmime) diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL new file mode 100644 index 000000000..215df5995 --- /dev/null +++ b/ports/gmime/CONTROL @@ -0,0 +1,4 @@ +Source: gmime +Version: 3.0.2 +Build-Depends: zlib, glib, libiconv, libidn2 +Description: GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME). diff --git a/ports/gmime/config.h b/ports/gmime/config.h new file mode 100644 index 000000000..578223e20 --- /dev/null +++ b/ports/gmime/config.h @@ -0,0 +1,184 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if GMime should enable GpgME PGP and S/MIME support. */ +/* #undef ENABLE_CRYPTO */ + +/* Define if GMime should enable warning output. */ +/* #undef ENABLE_WARNINGS */ + +/* Define to the GMime version */ +#define GMIME_VERSION "3.0.2" + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `fsync' function. */ +/* #undef HAVE_FSYNC */ + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getdomainname' function. */ +/* #undef HAVE_GETDOMAINNAME */ + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the header with the GNU `getopt_long' + function. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 to use auto-detected iconv-friendly charset names. */ +/* #undef HAVE_ICONV_DETECT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the `msync' function. */ +/* #undef HAVE_MSYNC */ + +/* Define to 1 if you have the `munmap' function. */ +/* #undef HAVE_MUNMAP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETDB_H */ + +/* Define to 1 if you have the `poll' function. */ +/* #undef HAVE_POLL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_POLL_H */ + +/* Define to 1 if you have the `select' function. */ +/* #undef HAVE_SELECT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if struct utsname has a domainname member */ +/* #undef HAVE_UTSNAME_DOMAINNAME */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK2_H 1 + +/* Define to 1 if GNU Libidn should be used. */ +#define LIBIDN 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define with a value if your does not define MAXHOSTNAMELEN */ +/* #undef MAXHOSTNAMELEN */ + +/* Define to 0 if your system does not have the O_LARGEFILE flag */ +/* #undef O_LARGEFILE */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/jstedfast/gmime/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gmime" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gmime 3.0.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gmime" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.0.2" + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* The size of `ssize_t', as computed by sizeof. */ +#define SIZEOF_SSIZE_T 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Using GNU libiconv */ +/* #undef USE_LIBICONV_GNU */ + +/* Using a native implementation of iconv in a separate library */ +#define USE_LIBICONV_NATIVE 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline __inline +#endif + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `unsigned long int' if does not define. */ +/* #undef nfds_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to `int' if does not define. */ +#define ssize_t intptr_t + +#ifdef _MSC_VER +#pragma warning(disable: 4018) +#pragma warning(disable: 4101) +#endif diff --git a/ports/gmime/gmime.def b/ports/gmime/gmime.def new file mode 100644 index 000000000..463dda27e --- /dev/null +++ b/ports/gmime/gmime.def @@ -0,0 +1,589 @@ +EXPORTS + +g_mime_application_pkcs7_mime_decrypt +g_mime_application_pkcs7_mime_encrypt +g_mime_application_pkcs7_mime_get_smime_type +g_mime_application_pkcs7_mime_get_type +g_mime_application_pkcs7_mime_new +g_mime_application_pkcs7_mime_sign +g_mime_application_pkcs7_mime_verify +g_mime_certificate_get_created +g_mime_certificate_get_digest_algo +g_mime_certificate_get_email +g_mime_certificate_get_expires +g_mime_certificate_get_fingerprint +g_mime_certificate_get_issuer_name +g_mime_certificate_get_issuer_serial +g_mime_certificate_get_key_id +g_mime_certificate_get_name +g_mime_certificate_get_pubkey_algo +g_mime_certificate_get_trust +g_mime_certificate_get_type +g_mime_certificate_list_add +g_mime_certificate_list_clear +g_mime_certificate_list_contains +g_mime_certificate_list_get_certificate +g_mime_certificate_list_get_type +g_mime_certificate_list_index_of +g_mime_certificate_list_insert +g_mime_certificate_list_length +g_mime_certificate_list_new +g_mime_certificate_list_remove +g_mime_certificate_list_remove_at +g_mime_certificate_list_set_certificate +g_mime_certificate_new +g_mime_certificate_set_created +g_mime_certificate_set_digest_algo +g_mime_certificate_set_email +g_mime_certificate_set_expires +g_mime_certificate_set_fingerprint +g_mime_certificate_set_issuer_name +g_mime_certificate_set_issuer_serial +g_mime_certificate_set_key_id +g_mime_certificate_set_name +g_mime_certificate_set_pubkey_algo +g_mime_certificate_set_trust +g_mime_charset_best +g_mime_charset_best_name +g_mime_charset_can_encode +g_mime_charset_canon_name +g_mime_charset_iconv_name +g_mime_charset_init +g_mime_charset_iso_to_windows +g_mime_charset_language +g_mime_charset_locale_name +g_mime_charset_map_init +g_mime_charset_map_shutdown +g_mime_charset_name +g_mime_charset_step +g_mime_check_version +g_mime_content_disposition_encode +g_mime_content_disposition_get_disposition +g_mime_content_disposition_get_parameter +g_mime_content_disposition_get_parameters +g_mime_content_disposition_get_type +g_mime_content_disposition_is_attachment +g_mime_content_disposition_new +g_mime_content_disposition_parse +g_mime_content_disposition_set_disposition +g_mime_content_disposition_set_parameter +g_mime_content_encoding_from_string +g_mime_content_encoding_to_string +g_mime_content_type_encode +g_mime_content_type_get_media_subtype +g_mime_content_type_get_media_type +g_mime_content_type_get_mime_type +g_mime_content_type_get_parameter +g_mime_content_type_get_parameters +g_mime_content_type_get_type +g_mime_content_type_is_type +g_mime_content_type_new +g_mime_content_type_parse +g_mime_content_type_set_media_subtype +g_mime_content_type_set_media_type +g_mime_content_type_set_parameter +g_mime_crypto_context_decrypt +g_mime_crypto_context_digest_id +g_mime_crypto_context_digest_name +g_mime_crypto_context_encrypt +g_mime_crypto_context_export_keys +g_mime_crypto_context_get_encryption_protocol +g_mime_crypto_context_get_key_exchange_protocol +g_mime_crypto_context_get_request_password +g_mime_crypto_context_get_signature_protocol +g_mime_crypto_context_get_type +g_mime_crypto_context_import_keys +g_mime_crypto_context_new +g_mime_crypto_context_register +g_mime_crypto_context_set_request_password +g_mime_crypto_context_shutdown +g_mime_crypto_context_sign +g_mime_crypto_context_verify +g_mime_data_wrapper_get_encoding +g_mime_data_wrapper_get_stream +g_mime_data_wrapper_get_type +g_mime_data_wrapper_new +g_mime_data_wrapper_new_with_stream +g_mime_data_wrapper_set_encoding +g_mime_data_wrapper_set_stream +g_mime_data_wrapper_write_to_stream +g_mime_decrypt_result_get_cipher +g_mime_decrypt_result_get_mdc +g_mime_decrypt_result_get_recipients +g_mime_decrypt_result_get_session_key +g_mime_decrypt_result_get_signatures +g_mime_decrypt_result_get_type +g_mime_decrypt_result_new +g_mime_decrypt_result_set_cipher +g_mime_decrypt_result_set_mdc +g_mime_decrypt_result_set_recipients +g_mime_decrypt_result_set_session_key +g_mime_decrypt_result_set_signatures +g_mime_encoding_base64_decode_step +g_mime_encoding_base64_encode_close +g_mime_encoding_base64_encode_step +g_mime_encoding_flush +g_mime_encoding_init_decode +g_mime_encoding_init_encode +g_mime_encoding_outlen +g_mime_encoding_quoted_decode_step +g_mime_encoding_quoted_encode_close +g_mime_encoding_quoted_encode_step +g_mime_encoding_reset +g_mime_encoding_step +g_mime_encoding_uudecode_step +g_mime_encoding_uuencode_close +g_mime_encoding_uuencode_step +g_mime_filter_backup +g_mime_filter_basic_get_type +g_mime_filter_basic_new +g_mime_filter_best_charset +g_mime_filter_best_encoding +g_mime_filter_best_get_type +g_mime_filter_best_new +g_mime_filter_charset_get_type +g_mime_filter_charset_new +g_mime_filter_checksum_get_digest +g_mime_filter_checksum_get_type +g_mime_filter_checksum_new +g_mime_filter_complete +g_mime_filter_copy +g_mime_filter_dos2unix_get_type +g_mime_filter_dos2unix_new +g_mime_filter_enriched_get_type +g_mime_filter_enriched_new +g_mime_filter_filter +g_mime_filter_from_get_type +g_mime_filter_from_new +g_mime_filter_get_type +g_mime_filter_gzip_get_type +g_mime_filter_gzip_new +g_mime_filter_html_get_type +g_mime_filter_html_new +g_mime_filter_reset +g_mime_filter_set_size +g_mime_filter_smtp_data_get_type +g_mime_filter_smtp_data_new +g_mime_filter_strip_get_type +g_mime_filter_strip_new +g_mime_filter_unix2dos_get_type +g_mime_filter_unix2dos_new +g_mime_filter_windows_get_type +g_mime_filter_windows_is_windows_charset +g_mime_filter_windows_new +g_mime_filter_windows_real_charset +g_mime_filter_yenc_get_crc +g_mime_filter_yenc_get_pcrc +g_mime_filter_yenc_get_type +g_mime_filter_yenc_new +g_mime_filter_yenc_set_crc +g_mime_filter_yenc_set_state +g_mime_format_options_add_hidden_header +g_mime_format_options_clear_hidden_headers +g_mime_format_options_clone +g_mime_format_options_create_newline_filter +g_mime_format_options_free +g_mime_format_options_get_default +g_mime_format_options_get_newline +g_mime_format_options_get_newline_format +g_mime_format_options_get_param_encoding_method +g_mime_format_options_get_type +g_mime_format_options_is_hidden_header +g_mime_format_options_new +g_mime_format_options_remove_hidden_header +g_mime_format_options_set_newline_format +g_mime_format_options_set_param_encoding_method +g_mime_gpg_context_get_type +g_mime_gpg_context_new +g_mime_header_format_addrlist +g_mime_header_format_content_disposition +g_mime_header_format_content_type +g_mime_header_format_default +g_mime_header_format_message_id +g_mime_header_format_received +g_mime_header_format_references +g_mime_header_get_name +g_mime_header_get_offset +g_mime_header_get_raw_name +g_mime_header_get_raw_value +g_mime_header_get_type +g_mime_header_get_value +g_mime_header_list_append +g_mime_header_list_clear +g_mime_header_list_contains +g_mime_header_list_get_count +g_mime_header_list_get_header +g_mime_header_list_get_header_at +g_mime_header_list_get_type +g_mime_header_list_new +g_mime_header_list_prepend +g_mime_header_list_remove +g_mime_header_list_remove_at +g_mime_header_list_set +g_mime_header_list_to_string +g_mime_header_list_write_to_stream +g_mime_header_set_raw_value +g_mime_header_set_value +g_mime_header_write_to_stream +g_mime_iconv_close +g_mime_iconv_locale_to_utf8 +g_mime_iconv_locale_to_utf8_length +g_mime_iconv_open +g_mime_iconv_strdup +g_mime_iconv_strndup +g_mime_iconv_utf8_to_locale +g_mime_iconv_utf8_to_locale_length +g_mime_init +g_mime_locale_charset +g_mime_locale_language +g_mime_message_add_mailbox +g_mime_message_foreach +g_mime_message_get_addresses +g_mime_message_get_all_recipients +g_mime_message_get_bcc +g_mime_message_get_body +g_mime_message_get_cc +g_mime_message_get_date +g_mime_message_get_from +g_mime_message_get_message_id +g_mime_message_get_mime_part +g_mime_message_get_reply_to +g_mime_message_get_sender +g_mime_message_get_subject +g_mime_message_get_to +g_mime_message_get_type +g_mime_message_new +g_mime_message_part_get_message +g_mime_message_part_get_type +g_mime_message_part_new +g_mime_message_part_new_with_message +g_mime_message_part_set_message +g_mime_message_partial_get_id +g_mime_message_partial_get_number +g_mime_message_partial_get_total +g_mime_message_partial_get_type +g_mime_message_partial_new +g_mime_message_partial_reconstruct_message +g_mime_message_partial_split_message +g_mime_message_set_date +g_mime_message_set_message_id +g_mime_message_set_mime_part +g_mime_message_set_subject +g_mime_multipart_add +g_mime_multipart_clear +g_mime_multipart_contains +g_mime_multipart_encrypted_decrypt +g_mime_multipart_encrypted_encrypt +g_mime_multipart_encrypted_get_type +g_mime_multipart_encrypted_new +g_mime_multipart_foreach +g_mime_multipart_get_boundary +g_mime_multipart_get_count +g_mime_multipart_get_epilogue +g_mime_multipart_get_part +g_mime_multipart_get_prologue +g_mime_multipart_get_subpart_from_content_id +g_mime_multipart_get_type +g_mime_multipart_index_of +g_mime_multipart_insert +g_mime_multipart_new +g_mime_multipart_new_with_subtype +g_mime_multipart_remove +g_mime_multipart_remove_at +g_mime_multipart_replace +g_mime_multipart_set_boundary +g_mime_multipart_set_epilogue +g_mime_multipart_set_prologue +g_mime_multipart_signed_get_type +g_mime_multipart_signed_new +g_mime_multipart_signed_sign +g_mime_multipart_signed_verify +g_mime_object_append_header +g_mime_object_encode +g_mime_object_get_content_disposition +g_mime_object_get_content_disposition_parameter +g_mime_object_get_content_id +g_mime_object_get_content_type +g_mime_object_get_content_type_parameter +g_mime_object_get_disposition +g_mime_object_get_header +g_mime_object_get_header_list +g_mime_object_get_headers +g_mime_object_get_type +g_mime_object_new +g_mime_object_new_type +g_mime_object_prepend_header +g_mime_object_register_type +g_mime_object_remove_header +g_mime_object_set_content_disposition +g_mime_object_set_content_disposition_parameter +g_mime_object_set_content_id +g_mime_object_set_content_type +g_mime_object_set_content_type_parameter +g_mime_object_set_disposition +g_mime_object_set_header +g_mime_object_to_string +g_mime_object_write_to_stream +g_mime_param_get_charset +g_mime_param_get_encoding_method +g_mime_param_get_lang +g_mime_param_get_name +g_mime_param_get_type +g_mime_param_get_value +g_mime_param_list_clear +g_mime_param_list_encode +g_mime_param_list_get_parameter +g_mime_param_list_get_parameter_at +g_mime_param_list_get_type +g_mime_param_list_length +g_mime_param_list_new +g_mime_param_list_parse +g_mime_param_list_remove +g_mime_param_list_remove_at +g_mime_param_list_set_parameter +g_mime_param_set_charset +g_mime_param_set_encoding_method +g_mime_param_set_lang +g_mime_param_set_value +g_mime_parser_construct_message +g_mime_parser_construct_part +g_mime_parser_eos +g_mime_parser_get_format +g_mime_parser_get_headers_begin +g_mime_parser_get_headers_end +g_mime_parser_get_mbox_marker +g_mime_parser_get_mbox_marker_offset +g_mime_parser_get_persist_stream +g_mime_parser_get_respect_content_length +g_mime_parser_get_type +g_mime_parser_init_with_stream +g_mime_parser_new +g_mime_parser_new_with_stream +g_mime_parser_options_clone +g_mime_parser_options_free +g_mime_parser_options_get_address_compliance_mode +g_mime_parser_options_get_allow_addresses_without_domain +g_mime_parser_options_get_default +g_mime_parser_options_get_fallback_charsets +g_mime_parser_options_get_parameter_compliance_mode +g_mime_parser_options_get_rfc2047_compliance_mode +g_mime_parser_options_get_type +g_mime_parser_options_new +g_mime_parser_options_set_address_compliance_mode +g_mime_parser_options_set_allow_addresses_without_domain +g_mime_parser_options_set_fallback_charsets +g_mime_parser_options_set_parameter_compliance_mode +g_mime_parser_options_set_rfc2047_compliance_mode +g_mime_parser_set_format +g_mime_parser_set_header_regex +g_mime_parser_set_persist_stream +g_mime_parser_set_respect_content_length +g_mime_parser_tell +g_mime_part_get_best_content_encoding +g_mime_part_get_content +g_mime_part_get_content_description +g_mime_part_get_content_encoding +g_mime_part_get_content_id +g_mime_part_get_content_location +g_mime_part_get_content_md5 +g_mime_part_get_filename +g_mime_part_get_openpgp_data +g_mime_part_get_type +g_mime_part_is_attachment +g_mime_part_iter_clone +g_mime_part_iter_free +g_mime_part_iter_get_current +g_mime_part_iter_get_parent +g_mime_part_iter_get_path +g_mime_part_iter_get_toplevel +g_mime_part_iter_get_type +g_mime_part_iter_is_valid +g_mime_part_iter_jump_to +g_mime_part_iter_new +g_mime_part_iter_next +g_mime_part_iter_prev +g_mime_part_iter_remove +g_mime_part_iter_replace +g_mime_part_iter_reset +g_mime_part_new +g_mime_part_new_with_type +g_mime_part_openpgp_decrypt +g_mime_part_openpgp_encrypt +g_mime_part_openpgp_sign +g_mime_part_openpgp_verify +g_mime_part_set_content +g_mime_part_set_content_description +g_mime_part_set_content_encoding +g_mime_part_set_content_id +g_mime_part_set_content_location +g_mime_part_set_content_md5 +g_mime_part_set_filename +g_mime_part_set_openpgp_data +g_mime_part_verify_content_md5 +g_mime_pkcs7_context_get_type +g_mime_pkcs7_context_new +g_mime_references_append +g_mime_references_clear +g_mime_references_copy +g_mime_references_free +g_mime_references_get_message_id +g_mime_references_get_type +g_mime_references_length +g_mime_references_new +g_mime_references_parse +g_mime_references_set_message_id +g_mime_shutdown +g_mime_signature_get_certificate +g_mime_signature_get_created +g_mime_signature_get_expires +g_mime_signature_get_status +g_mime_signature_get_type +g_mime_signature_list_add +g_mime_signature_list_clear +g_mime_signature_list_contains +g_mime_signature_list_get_signature +g_mime_signature_list_get_type +g_mime_signature_list_index_of +g_mime_signature_list_insert +g_mime_signature_list_length +g_mime_signature_list_new +g_mime_signature_list_remove +g_mime_signature_list_remove_at +g_mime_signature_list_set_signature +g_mime_signature_new +g_mime_signature_set_certificate +g_mime_signature_set_created +g_mime_signature_set_expires +g_mime_signature_set_status +g_mime_stream_buffer_get_type +g_mime_stream_buffer_gets +g_mime_stream_buffer_new +g_mime_stream_buffer_readln +g_mime_stream_cat_add_source +g_mime_stream_cat_get_type +g_mime_stream_cat_new +g_mime_stream_close +g_mime_stream_construct +g_mime_stream_eos +g_mime_stream_file_get_owner +g_mime_stream_file_get_type +g_mime_stream_file_new +g_mime_stream_file_new_with_bounds +g_mime_stream_file_open +g_mime_stream_file_set_owner +g_mime_stream_filter_add +g_mime_stream_filter_get_owner +g_mime_stream_filter_get_type +g_mime_stream_filter_new +g_mime_stream_filter_remove +g_mime_stream_filter_set_owner +g_mime_stream_flush +g_mime_stream_fs_get_owner +g_mime_stream_fs_get_type +g_mime_stream_fs_new +g_mime_stream_fs_new_with_bounds +g_mime_stream_fs_open +g_mime_stream_fs_set_owner +g_mime_stream_get_type +g_mime_stream_gio_get_owner +g_mime_stream_gio_get_type +g_mime_stream_gio_new +g_mime_stream_gio_new_with_bounds +g_mime_stream_gio_set_owner +g_mime_stream_length +g_mime_stream_mem_get_byte_array +g_mime_stream_mem_get_owner +g_mime_stream_mem_get_type +g_mime_stream_mem_new +g_mime_stream_mem_new_with_buffer +g_mime_stream_mem_new_with_byte_array +g_mime_stream_mem_set_byte_array +g_mime_stream_mem_set_owner +g_mime_stream_mmap_get_type +g_mime_stream_mmap_new +g_mime_stream_mmap_new_with_bounds +g_mime_stream_null_count_newlines +g_mime_stream_null_get_count_newlines +g_mime_stream_null_get_type +g_mime_stream_null_new +g_mime_stream_pipe_get_owner +g_mime_stream_pipe_get_type +g_mime_stream_pipe_new +g_mime_stream_pipe_set_owner +g_mime_stream_printf +g_mime_stream_read +g_mime_stream_reset +g_mime_stream_seek +g_mime_stream_set_bounds +g_mime_stream_substream +g_mime_stream_tell +g_mime_stream_write +g_mime_stream_write_string +g_mime_stream_write_to_stream +g_mime_stream_writev +g_mime_text_part_get_charset +g_mime_text_part_get_text +g_mime_text_part_get_type +g_mime_text_part_new +g_mime_text_part_new_with_subtype +g_mime_text_part_set_charset +g_mime_text_part_set_text +g_mime_utils_best_encoding +g_mime_utils_decode_8bit +g_mime_utils_decode_message_id +g_mime_utils_generate_message_id +g_mime_utils_header_decode_date +g_mime_utils_header_decode_phrase +g_mime_utils_header_decode_text +g_mime_utils_header_encode_phrase +g_mime_utils_header_encode_text +g_mime_utils_header_format_date +g_mime_utils_header_printf +g_mime_utils_quote_string +g_mime_utils_structured_header_fold +g_mime_utils_text_is_8bit +g_mime_utils_unquote_string +g_mime_utils_unstructured_header_fold +g_mime_ydecode_step +g_mime_yencode_close +g_mime_yencode_step +gmime_binary_age +gmime_error_quark +gmime_gpgme_error_quark +gmime_interface_age +gmime_major_version +gmime_micro_version +gmime_minor_version +internet_address_get_charset +internet_address_get_name +internet_address_get_type +internet_address_group_add_member +internet_address_group_get_members +internet_address_group_get_type +internet_address_group_new +internet_address_group_set_members +internet_address_list_add +internet_address_list_append +internet_address_list_clear +internet_address_list_contains +internet_address_list_encode +internet_address_list_get_address +internet_address_list_get_type +internet_address_list_index_of +internet_address_list_insert +internet_address_list_length +internet_address_list_new +internet_address_list_parse +internet_address_list_prepend +internet_address_list_remove +internet_address_list_remove_at +internet_address_list_set_address +internet_address_list_to_string +internet_address_mailbox_get_addr +internet_address_mailbox_get_idn_addr +internet_address_mailbox_get_type +internet_address_mailbox_new +internet_address_mailbox_set_addr +internet_address_set_charset +internet_address_set_name +internet_address_to_string diff --git a/ports/gmime/idna.h b/ports/gmime/idna.h new file mode 100644 index 000000000..3313cdbc7 --- /dev/null +++ b/ports/gmime/idna.h @@ -0,0 +1,3 @@ +// Redirects header from libidn to libidn2 +// Created to avoid sources patching +#include diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake new file mode 100644 index 000000000..98b3a104f --- /dev/null +++ b/ports/gmime/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +set(LIB_NAME gmime) +set(LIB_VERSION 3.0.2) + +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/gmime/3.0/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 246f489c168ce7e04fab664b7e9ae7772ae52f0063fb0eac9153460d84fa5d9712457d81fbd1bdcdadb7e03007cf71ed3bad5287f1639214f54167427c9209ca +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +# We can use file supplied with original sources +configure_file(${SOURCE_PATH}/build/vs2010/unistd.h ${SOURCE_PATH} COPYONLY) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH} COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/idna.h ${SOURCE_PATH} COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 039e795567edd2fc6a2c8597f150e68d71920f5b Mon Sep 17 00:00:00 2001 From: Albert Bezzina Date: Thu, 19 Oct 2017 15:52:59 +0200 Subject: FIX: Project did not build successfully when building as static. --- ports/pugixml/CONTROL | 2 +- ports/pugixml/portfile.cmake | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL index 5fc5f1e4e..01679ea6e 100644 --- a/ports/pugixml/CONTROL +++ b/ports/pugixml/CONTROL @@ -1,3 +1,3 @@ Source: pugixml -Version: 1.8.1-1 +Version: 1.8.1-2 Description: C++ XML processing library diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake index 4fcbec84b..0d5123974 100644 --- a/ports/pugixml/portfile.cmake +++ b/ports/pugixml/portfile.cmake @@ -7,17 +7,22 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)" -) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + ) +else() + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch + ) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)" + ) +endif() vcpkg_install_cmake() vcpkg_copy_pdbs() -- cgit v1.2.3 From f527812e9e7f6436aa11c9f01b7f70e4c4893270 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 08:53:59 -0700 Subject: [grpc] Fix absolute paths in installed cmake files. --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 7 +++++-- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 449d58b6c..958ab7723 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.6.0-1 +Version: 1.6.0-2 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 49d64b909..791470bc2 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -52,14 +52,17 @@ vcpkg_configure_cmake( -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF - -DCMAKE_INSTALL_CMAKEDIR=share/grpc + -DgRPC_INSTALL_BINDIR:STRING=bin + -DgRPC_INSTALL_LIBDIR:STRING=lib + -DgRPC_INSTALL_INCLUDEDIR:STRING=include + -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc ) # gRPC runs built executables during the build, so they need access to the installed DLLs. set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/grpc") +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/grpc") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index eaf3bb966..40ed0225f 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -83,6 +83,7 @@ function(vcpkg_fixup_cmake_targets) ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) file(READ ${RELEASE_TARGET} _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() @@ -95,6 +96,7 @@ function(vcpkg_fixup_cmake_targets) get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) file(READ ${DEBUG_TARGET} _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") -- cgit v1.2.3 From b3172b1784ed15d4c310793474e285222fc669a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 18:01:33 -0700 Subject: [azure-storage-cpp] Support latest HEAD of cpprestsdk --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 1 + .../support-cpprest-findpackage.patch | 32 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ports/azure-storage-cpp/support-cpprest-findpackage.patch diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 1917bad6d..bf4e9f9f2 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.0.0-3 +Version: 3.0.0-4 Build-Depends: cpprestsdk, atlmfc 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/ diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 150c4aafc..7359f3bc7 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch + ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch ) vcpkg_configure_cmake( diff --git a/ports/azure-storage-cpp/support-cpprest-findpackage.patch b/ports/azure-storage-cpp/support-cpprest-findpackage.patch new file mode 100644 index 000000000..5cd805208 --- /dev/null +++ b/ports/azure-storage-cpp/support-cpprest-findpackage.patch @@ -0,0 +1,32 @@ +diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +index 3b4d1c0..d8818ac 100644 +--- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt ++++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(azurestorage) + + enable_testing() +diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +index da66eb4..40e1767 100644 +--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake ++++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +@@ -23,6 +23,16 @@ find_path(CASABLANCA_INCLUDE_DIR + include + ) + ++find_package(cpprestsdk) ++ ++if(cpprestsdk_FOUND) ++ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) ++ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) ++ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) ++ libfind_process(CASABLANCA) ++ return() ++endif() ++ + # Library + find_library(CASABLANCA_LIBRARY + NAMES -- cgit v1.2.3 From deee8c1743af2d851d48d42b7ac91558c8fefb5a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 19:24:49 -0700 Subject: [sdl2-gfx][sdl2-image][sdl2-mixer][sdl2-net][sdl2-ttf] Fix accidental link of release libs in debug mode. --- ports/sdl2-gfx/CMakeLists.txt | 2 +- ports/sdl2-gfx/CONTROL | 2 +- ports/sdl2-image/CMakeLists.txt | 2 +- ports/sdl2-image/CONTROL | 2 +- ports/sdl2-mixer/CMakeLists.txt | 2 +- ports/sdl2-mixer/CONTROL | 2 +- ports/sdl2-net/CMakeLists.txt | 2 +- ports/sdl2-net/CONTROL | 2 +- ports/sdl2-ttf/CMakeLists.txt | 2 +- ports/sdl2-ttf/CONTROL | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt index d0a9f0c82..6a0ecf24e 100644 --- a/ports/sdl2-gfx/CMakeLists.txt +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_GFX C) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) # builtin formats set(SDL_GFX_DEFINES WIN32) diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index 0e0b71aec..a06c8abcb 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.3-2 +Version: 1.0.3-3 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index 8b5f7131f..d04b3f7b6 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -51,7 +51,7 @@ endforeach(FORMAT) # SDL find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDL_INCLUDE_DIR}/SDL2) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index a5c41a334..aff048d9a 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.1-2 +Version: 2.0.1-3 Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 6d1cb28c0..014923628 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_MIXER C) find_path(SDL_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR}) set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY}) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 756a7380d..f0ef29fbd 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.1-2 +Version: 2.0.1-3 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, smpeg2, libmodplug, libvorbis diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index 9b81f8d42..4127262d7 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -4,7 +4,7 @@ project(SDL2_NET C) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c) diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index e64277b39..6b2793449 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-net -Version: 2.0.1-2 +Version: 2.0.1-3 Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index 133616479..7e3a180f9 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_TTF C) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) find_package(FreeType REQUIRED) add_library(SDL2_ttf SDL_ttf.c) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index 7dbe06367..18773dd21 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-ttf -Version: 2.0.14-2 +Version: 2.0.14-3 Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype -- cgit v1.2.3 From 976195245f6336632da22df5a5682dc824c6b48c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 19:56:05 -0700 Subject: [secp256k1] Only install the single public header. Always build statically. --- ports/secp256k1/CMakeLists.txt | 10 +++---- ports/secp256k1/CONTROL | 6 ++--- ports/secp256k1/portfile.cmake | 59 ++++++++++++++++++++---------------------- 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt index 708ff68fa..d439053bc 100644 --- a/ports/secp256k1/CMakeLists.txt +++ b/ports/secp256k1/CMakeLists.txt @@ -4,9 +4,9 @@ project(secp256k1 C) option(INSTALL_HEADERS "Install header files" ON) add_definitions( - -DENABLE_MODULE_ECDH - -DENABLE_MODULE_RECOVERY - -DHAVE_CONFIG_H + -DENABLE_MODULE_ECDH + -DENABLE_MODULE_RECOVERY + -DHAVE_CONFIG_H ) file(GLOB SOURCES src/secp256k1.c) @@ -21,6 +21,6 @@ install(TARGETS secp256k1 ) if(INSTALL_HEADERS) - file(GLOB HEADERS include/*.h) - install(FILES ${HEADERS} DESTINATION include) + file(GLOB HEADERS include/secp256k1.h) + install(FILES ${HEADERS} DESTINATION include) endif() \ No newline at end of file diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL index 0198cf1b8..181a4a7e6 100644 --- a/ports/secp256k1/CONTROL +++ b/ports/secp256k1/CONTROL @@ -1,3 +1,3 @@ -Source: secp256k1 -Version: -Description: Optimized C library for EC operations on curve +Source: secp256k1 +Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 +Description: Optimized C library for EC operations on curve diff --git a/ports/secp256k1/portfile.cmake b/ports/secp256k1/portfile.cmake index 9ff3fff8f..2012c4827 100644 --- a/ports/secp256k1/portfile.cmake +++ b/ports/secp256k1/portfile.cmake @@ -1,31 +1,28 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/secp256k1-0b7024185045a49a1a6a4c5615bf31c94f63d9c4/) - -vcpkg_from_github( - OUT_SOURCE_PATH "secp256k1" - REPO "bitcoin-core/secp256k1" - REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" - SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc -) - -message("Copying config header to " ${SOURCE_PATH}) - -file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) - -message(STATUS "Building") - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DINSTALL_HEADERS=OFF - OPTIONS_DEBUG -) - -vcpkg_install_cmake() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "bitcoin-core/secp256k1" + REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" + SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc +) + +file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) -- cgit v1.2.3 From b1d5d8e8baf4bd5132de4415a0168432600ce998 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:38:23 -0700 Subject: Introduce Strings::replace_all() --- toolsrc/include/vcpkg/base/strings.h | 2 ++ toolsrc/src/vcpkg/base/strings.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index d263e3b6b..5b03286de 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -76,6 +76,8 @@ namespace vcpkg::Strings return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep); + void trim(std::string* s); std::string trimmed(const std::string& s); diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index af41eed9a..36efc3adc 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -114,6 +114,17 @@ namespace vcpkg::Strings #endif } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep) + { + size_t pos = 0; + while ((pos = s.find(search, pos)) != std::string::npos) + { + s.replace(pos, search.size(), rep); + pos += rep.size(); + } + return std::move(s); + } + void trim(std::string* s) { s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); -- cgit v1.2.3 From 8cefb25bcb7edaedd20d8aa170b2e1b945fd1762 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:48:46 -0700 Subject: Use Strings::replace_all() instead of std::regex_replace() --- toolsrc/src/vcpkg/commands.integrate.cpp | 8 ++++---- toolsrc/src/vcpkg/export.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index c8fa275ab..27e563cfa 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -93,9 +93,9 @@ namespace vcpkg::Commands::Integrate )"; - std::string content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); - content = std::regex_replace(content, std::regex("@VCPKG_DIR@"), vcpkg_root_dir.string()); - content = std::regex_replace(content, std::regex("@VERSION@"), nupkg_version); + std::string content = Strings::replace_all(CONTENT_TEMPLATE, "@NUGET_ID@", nuget_id); + content = Strings::replace_all(std::move(content), "@VCPKG_DIR@", vcpkg_root_dir.string()); + content = Strings::replace_all(std::move(content), "@VERSION@", nupkg_version); return content; } @@ -308,7 +308,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", System::println(System::Color::success, "Created nupkg: %s", nuget_package.string()); auto source_path = buildsystems_dir.u8string(); - source_path = std::regex_replace(source_path, std::regex("`"), "``"); + source_path = Strings::replace_all(std::move(source_path), "`", "``"); System::println(R"( With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 5e27d4126..f0a3b23d0 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -44,12 +44,12 @@ namespace vcpkg::Export )"; - std::string nuspec_file_content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); - nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@VERSION@"), nupkg_version); + std::string nuspec_file_content = Strings::replace_all(CONTENT_TEMPLATE, "@NUGET_ID@", nuget_id); + nuspec_file_content = Strings::replace_all(std::move(nuspec_file_content), "@VERSION@", nupkg_version); nuspec_file_content = - std::regex_replace(nuspec_file_content, std::regex("@RAW_EXPORTED_DIR@"), raw_exported_dir); + Strings::replace_all(std::move(nuspec_file_content), "@RAW_EXPORTED_DIR@", raw_exported_dir); nuspec_file_content = - std::regex_replace(nuspec_file_content, std::regex("@TARGETS_REDIRECT_PATH@"), targets_redirect_path); + Strings::replace_all(std::move(nuspec_file_content), "@TARGETS_REDIRECT_PATH@", targets_redirect_path); return nuspec_file_content; } -- cgit v1.2.3 From 50ae9eec872a0802d2450b4ae2d640475d0d7889 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:50:23 -0700 Subject: Do not depend on newlines when getting output from powershell --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 3 ++- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- toolsrc/include/vcpkg/base/system.h | 2 +- toolsrc/src/vcpkg/base/system.cpp | 16 ++++++++++++++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 14 ++++++-------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index e9fb60cb2..3269562dc 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -9,8 +9,9 @@ $explicitlyRequestedVSPath = $explicitlyRequestedVSPath -replace "\\$" # Remove $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" -foreach ($instanceCandidate in $VisualStudioInstallationInstances) +foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { + $instanceCandidate = $instanceCandidateWithEOL -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8a2adca10..566560cdb 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -29,7 +29,7 @@ foreach ($instance in $asXml.instances.instance) } # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null + $results.Add("${releaseType}::${installationVersion}::${installationPath}::") > $null } # If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) @@ -42,7 +42,7 @@ if ($results.Count -eq 0) if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - return "PreferenceWeight1::Legacy::14.0::$installationPath" + return "PreferenceWeight1::Legacy::14.0::$installationPath::" } } diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index b396ef293..e0d3264e2 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -22,7 +22,7 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args = ""); + ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args = ""); enum class Color { diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index b04f79414..a1bc9daf6 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -269,11 +269,23 @@ namespace vcpkg::System #endif } - std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args) + ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::format( + const std::string cmd = Strings::format( R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); + + auto rc = System::cmd_execute_and_capture_output(cmd); + + // Remove newline from all output. + // Powershell returns newlines when it hits the column count of the console. + // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get + // newlines in-between the data. + // To solve this, we design our interaction with powershell to not depend on newlines, + // and then strip all newlines here. + rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); + + return rc; } void println() { putchar('\n'); } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 2f2dd877e..ef9e383bc 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -74,9 +74,8 @@ namespace vcpkg tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; - const auto install_cmd = - System::create_powershell_script_cmd(script, Strings::format("-Dependency %s", tool_name)); - const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); + const System::ExitCodeAndOutput rc = + System::powershell_execute_and_capture_output(script, Strings::format("-Dependency %s", tool_name)); if (rc.exit_code) { System::println(System::Color::error, @@ -324,14 +323,13 @@ namespace vcpkg static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::string cmd = System::create_powershell_script_cmd(script); - const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); + const System::ExitCodeAndOutput ec_data = System::powershell_execute_and_capture_output(script); Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); - const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); + const std::vector instances_as_strings = Strings::split(ec_data.output, "::"); Checks::check_exit( - VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances"); + VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances.\n"); std::vector output; for (const std::string& instance_as_string : instances_as_strings) @@ -341,7 +339,7 @@ namespace vcpkg split.size() == 4, "Invalid Visual Studio instance format.\n" "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" - "Actual : %s", + "Actual : %s\n", instance_as_string); output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } -- cgit v1.2.3 From 7c0b541cfd892dd0264273dbdfea8bda48bddcd1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 21:30:12 -0700 Subject: Update CHANGELOG and bump version to v0.0.93 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10e1d531a..d612fb4f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +vcpkg (0.0.93) +-------------- + * Add ports: + - berkeleydb 4.8.30 + - libsodium 1.0.15 + - secp256k1 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 + * Update ports: + - assimp 4.0.0-2 -> 4.0.1 + - azure-storage-cpp 3.0.0-3 -> 3.0.0-4 + - cctz v2.1 -> 2.1 + - folly v2017.07.17.01-1 -> 2017.10.02.00 + - grpc 1.6.0-1 -> 1.6.0-2 + - openblas v0.2.20-2 -> 0.2.20-2 + - pthreads 2.9.1-1 -> 2.9.1-2 + - sdl2-gfx 1.0.3-2 -> 1.0.3-3 + - sdl2-image 2.0.1-2 -> 2.0.1-3 + - sdl2-mixer 2.0.1-2 -> 2.0.1-3 + - sdl2-net 2.0.1-2 -> 2.0.1-3 + - sdl2-ttf 2.0.14-2 -> 2.0.14-3 + - spirv-tools v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -> 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 + - thor v2.0-1 -> 2.0-1 + - tinyexr v0.9.5-d16ea6 -> 0.9.5-d16ea6 + * Fix issue where `vcpkg` was getting output from powershell scripts. Powershell adds newlines when the console width is reached; the extra newlines was causing `vcpkg`'s parsing to fail. + * Improve autocomplete/tab-completion for powershell (still experimental) + + +-- vcpkg team THU, 19 Oct 2017 21:30:00 -0800 + vcpkg (0.0.92) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index af0276f0b..f439c6467 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.92" \ No newline at end of file +"0.0.93" \ No newline at end of file -- cgit v1.2.3 From 7fb0342b8a16b43ce9887fcc879a2321954646be Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 21:34:58 -0700 Subject: [system.h] Naming scheme fixes --- toolsrc/include/vcpkg/base/system.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index e0d3264e2..a696bf3ae 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -38,27 +38,27 @@ namespace vcpkg::System void println(const Color c, const CStringView message); template - void print(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void print(const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::print(Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::print(Strings::format(message_template, message_arg1, message_args...)); } template - void print(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void print(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::print(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::print(c, Strings::format(message_template, message_arg1, message_args...)); } template - void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void println(const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::println(Strings::format(message_template, message_arg1, message_args...)); } template - void println(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void println(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::println(c, Strings::format(message_template, message_arg1, message_args...)); } Optional get_environment_variable(const CStringView varname) noexcept; @@ -90,17 +90,17 @@ namespace vcpkg::Debug void println(const System::Color c, const CStringView message); template - void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void println(const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return Debug::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); + return Debug::println(Strings::format(message_template, message_arg1, message_args...)); } template void println(const System::Color c, - const char* messageTemplate, - const Arg1& messageArg1, - const Args&... messageArgs) + const char* message_template, + const Arg1& message_arg1, + const Args&... message_args) { - return Debug::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + return Debug::println(c, Strings::format(message_template, message_arg1, message_args...)); } } -- cgit v1.2.3 From bc2781bb3c639cd48e50c1874ef778154129d4e5 Mon Sep 17 00:00:00 2001 From: Christophe Guebert Date: Fri, 20 Oct 2017 07:48:54 +0200 Subject: [libmariadb] Update to 3.0.2 --- ports/libmariadb/CONTROL | 2 +- ports/libmariadb/portfile.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL index 89f5647a7..b9cfcbbef 100644 --- a/ports/libmariadb/CONTROL +++ b/ports/libmariadb/CONTROL @@ -1,3 +1,3 @@ Source: libmariadb -Version: 2.3.2-1 +Version: 3.0.2 Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 3dba9c7d1..4a81792ac 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -4,17 +4,19 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-2.3.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-3.0.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v2.3.2.tar.gz" - FILENAME "mariadb-connector-c-2.3.2.tar.gz" - SHA512 f5574756ffce69e3dd15b7f7c14cfd0b4d69e3203ae4b383f05a110918916279ba7c0b9149d0dcb9ec93bbfc0927dfaf88bb40979ba1de710ce148d1fbe033af + URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v3.0.2.tar.gz" + FILENAME "mariadb-connector-c-3.0.2.tar.gz" + SHA512 a5086ff149b1ca0e1b652013475c5f3793824416a60ec35018b6dcd502bd38b50fa040271ff8d308520dadecc9601671fccf67046fcda2425f1d7c59e1c6c52f ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DWITH_UNITTEST=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 48670cbe2abf4f45e39ef1a85076647cd1423084 Mon Sep 17 00:00:00 2001 From: Christophe Guebert Date: Fri, 20 Oct 2017 08:21:18 +0200 Subject: Fix static build. --- ports/libmariadb/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 4a81792ac..3aca7afb3 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -16,7 +16,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DWITH_UNITTEST=OFF + -DWITH_UNITTEST=OFF + -DWITH_SSL=OFF + -DWITH_CURL=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From f24c1c6ccd8617246d395be1d58abf3dfffcc931 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Fri, 20 Oct 2017 21:35:29 +0200 Subject: [CppWinRT] Update to October 2017 release --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index e470b2458..aa481439e 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: spring_2017_creators_update_for_vs_15.3 +Version: Fall_2017_Creators_Update_for_VS_15.3 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index c83465efe..e093ecdfa 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,18 +1,22 @@ include(vcpkg_common_functions) -find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-fall_2017_creators_update_for_vs_15.3) + vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 779586122552e49a79aff08f4476905e00c3b4ad3dbc502240e9a7cc59ec0e4ab6304149a66505923ab84d2b334059de9e18c84a5b0ed6bde106d19119ef911f + URLS "https://github.com/Microsoft/cppwinrt/archive/fall_2017_creators_update_for_vs_15.3.tar.gz" + FILENAME "cppwinrt-fall_2017_creators_update_for_vs_15.3.tar.gz" + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 ) vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) # Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.15063.0/winrt/*) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.16299.0/winrt/*) +file( + COPY ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt + REGEX "\.(gitattributes|gitignore)$" EXCLUDE +) -- cgit v1.2.3 From 35722330be76f3d692672f83ebcc1503cff1766b Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 20 Oct 2017 21:38:25 -0700 Subject: [eigen3] use vcpkg_from_github to enable install from --head --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index 1e61ce95f..fe0641a98 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.4-1 +Version: 3.3.4-2 Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index a4922f008..1e08d5ddf 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,12 +1,12 @@ -#header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eigen-eigen-5a0156e40feb) -vcpkg_download_distfile(ARCHIVE - URLS "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2" - FILENAME "eigen-3.3.4.tar.bz2" - SHA512 d67a3fd8f7ce811af65fc1d43ec347dadf9c643a49135f7e455fc303773bad09e80a125282c7dfca7a1993b79e1f66576ac92418119fbb0fa50c1a581b957c0d + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RLovelett/eigen + REF 3.3.4 + SHA512 b9f6bc74d79aaa7c4cb0c97739ba08c9b0570386f87c4225c06326e734fc27b9a7347a257079cae7954b6dbf599acb47d65037863b01ef5b1ff4ef7a09e3e674 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From c37124be6348fafae5fb0722702bbb47ef20f252 Mon Sep 17 00:00:00 2001 From: Shinya Onogi Date: Sat, 21 Oct 2017 19:28:27 +0900 Subject: Update GDCM --- ports/gdcm2/CONTROL | 2 +- ports/gdcm2/gdcmSystem.patch | 11 ----------- ports/gdcm2/portfile.cmake | 7 +++---- ports/gdcm2/socketxx.patch | 11 +++++++++++ 4 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 ports/gdcm2/gdcmSystem.patch create mode 100644 ports/gdcm2/socketxx.patch diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index b39b3e19f..eacb3a839 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.6.8-1 +Version: 2.8.3 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/gdcmSystem.patch b/ports/gdcm2/gdcmSystem.patch deleted file mode 100644 index 63722c4f1..000000000 --- a/ports/gdcm2/gdcmSystem.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Source/Common/gdcmSystem.cxx -+++ b/Source/Common/gdcmSystem.cxx -@@ -977,7 +977,7 @@ - } - } - // We need to tell the user... -- gdcmWarningMacro( "Could not find Charset from alias: " + alias ); -+ gdcmWarningMacro( std::string("Could not find Charset from alias: ") + alias ); - return NULL; - } - #endif //_WIN32 diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index 0293ea714..7f7ba930b 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -14,15 +14,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.6.8 - SHA512 f3b571f7e00b42b444acd6d696ba1979b6ef83e84744ecddb05ad09d8d2443027145c50cb67c6bc25d6b8e009833b643e575ab988106cb981f529cf455a9b0bc - HEAD_REF master + REF v2.8.3 + SHA512 f8c3d600f067c9b60a32ff5fb7e751c06088e1e4a8e8d0f5e25d9fc7d49e8fab1f0242b10433f522d2043777cddace78c5a9c2cb25bac75a8e84fee554370f62 ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/gdcmSystem.patch + ${CMAKE_CURRENT_LIST_DIR}/socketxx.patch ) diff --git a/ports/gdcm2/socketxx.patch b/ports/gdcm2/socketxx.patch new file mode 100644 index 000000000..0142910b1 --- /dev/null +++ b/ports/gdcm2/socketxx.patch @@ -0,0 +1,11 @@ +--- a/Utilities/socketxx/socket++/CMakeLists.txt ++++ b/Utilities/socketxx/socket++/CMakeLists.txt +@@ -76,7 +76,7 @@ + endif() + set_target_properties(${SOCKETXX_LIBRARY_NAME} PROPERTIES ${SOCKETXX_LIBRARY_PROPERTIES}) + if(BUILD_SHARED_LIBS) +- set_target_properties(${SOCKETXX_LIBRARY_NAME} PROPERTIES INTERFACE_LINK_LIBRARIES "" LINK_INTERFACE_LIBRARIES "") ++ set_target_properties(${SOCKETXX_LIBRARY_NAME} PROPERTIES INTERFACE_LINK_LIBRARIES "") + endif() + + # Install library -- cgit v1.2.3 From 3c89015da2711dce5c96e39be66aa86c2c8ee6a1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 21 Oct 2017 04:04:17 -0700 Subject: [cpprestsdk] Update to 2.10.0 --- ports/cpprestsdk/0001_cmake.patch | 96 ----------------------- ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch | 13 --- ports/cpprestsdk/0003_openssl_110.patch | 14 ---- ports/cpprestsdk/CONTROL | 4 +- ports/cpprestsdk/portfile.cmake | 18 +---- 5 files changed, 5 insertions(+), 140 deletions(-) delete mode 100644 ports/cpprestsdk/0001_cmake.patch delete mode 100644 ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch delete mode 100644 ports/cpprestsdk/0003_openssl_110.patch diff --git a/ports/cpprestsdk/0001_cmake.patch b/ports/cpprestsdk/0001_cmake.patch deleted file mode 100644 index be8f2cff7..000000000 --- a/ports/cpprestsdk/0001_cmake.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt -index 1274102..fe245e6 100644 ---- a/Release/CMakeLists.txt -+++ b/Release/CMakeLists.txt -@@ -89,15 +89,6 @@ elseif(UNIX) # This includes OSX - - option(BUILD_SHARED_LIBS "Build shared Libraries." ON) - option(BUILD_SAMPLES "Build samples." ON) -- option(CASA_INSTALL_HEADERS "Install header files." ON) -- if(CASA_INSTALL_HEADERS) -- file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat) -- install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest) -- file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h) -- install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx) -- file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat) -- install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details) -- endif() - elseif(WIN32) - option(BUILD_SHARED_LIBS "Build shared Libraries." ON) - option(BUILD_SAMPLES "Build samples." ON) -@@ -113,37 +104,25 @@ elseif(WIN32) - set(Casablanca_DEFINITIONS "" CACHE INTERNAL "Definitions for consume casablanca library") - endif() - add_definitions(${Casablanca_DEFINITIONS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -DWIN32) -- -- if (NOT CPPREST_EXCLUDE_WEBSOCKETS) -- set(NUGET_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../packages") -- set(PACKAGE_PATHS) -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost.1.58.0.0/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_system-vc140.1.58.0-vs140rc/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_date_time-vc140.1.58.0-vs140rc/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_regex-vc140.1.58.0-vs140rc/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/zlib.v140.windesktop.msvcstl.static.rt-dyn.1.2.8.8/") -- -- if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) -- find_library(Boost_SYSTEM_LIBRARY libboost_system-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib) -- find_library(Boost_DATE_TIME_LIBRARY libboost_date_time-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib) -- find_library(Boost_REGEX_LIBRARY libboost_regex-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib) -- set(Boost_LIBRARIES ${Boost_REGEX_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}) -- -- find_library(OpenSSL_libeay_LIBRARY libeay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug) -- find_library(OpenSSL_ssleay_LIBRARY ssleay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug) -- find_library(ZLIB_LIBRARY zlibstaticd.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug) -- set(OPENSSL_LIBRARIES ${OpenSSL_ssleay_LIBRARY} ${OpenSSL_libeay_LIBRARY} ${ZLIB_LIBRARY}) -- -- set(OPENSSL_INCLUDE_DIR "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/build/native/include") -- endif() -- -- set(Boost_INCLUDE_DIR "${NUGET_PATH}/boost.1.58.0.0/lib/native/include") -- endif() -+ if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE) -+ find_package(ZLIB REQUIRED) -+ find_package(OpenSSL REQUIRED) -+ find_package(Boost REQUIRED COMPONENTS regex system date_time) -+ endif() - else() - message(FATAL_ERROR "-- Unsupported Build Platform.") - endif() - -+option(CASA_INSTALL_HEADERS "Install header files." ON) -+if(CASA_INSTALL_HEADERS) -+ file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat) -+ install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest) -+ file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h) -+ install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx) -+ file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat) -+ install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details) -+endif() -+ - # Compiler (not platform) specific settings - if(ANDROID) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt -index 4074905..da907e5 100644 ---- a/Release/src/CMakeLists.txt -+++ b/Release/src/CMakeLists.txt -@@ -144,10 +144,11 @@ elseif(ANDROID) - else() - set_target_properties(cpprest PROPERTIES - SOVERSION ${CPPREST_VERSION_MAJOR}.${CPPREST_VERSION_MINOR}) -- -- install( -- TARGETS cpprest -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib -- ) - endif() -+ -+install( -+ TARGETS cpprest -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+ ) -\ No newline at end of file diff --git a/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch b/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch deleted file mode 100644 index ab54baf01..000000000 --- a/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt -index fe245e6..94a5c57 100644 ---- a/release/CMakeLists.txt -+++ b/release/CMakeLists.txt -@@ -177,7 +177,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - - # These settings can be used by the test targets - set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) --if (NOT CPPREST_EXCLUDE_WEBSOCKETS) -+if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) - find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake - HINTS /usr/lib/cmake/websocketpp) - find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake diff --git a/ports/cpprestsdk/0003_openssl_110.patch b/ports/cpprestsdk/0003_openssl_110.patch deleted file mode 100644 index b2b361187..000000000 --- a/ports/cpprestsdk/0003_openssl_110.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp -index 9f91d68..4b5d506 100644 ---- a/Release/src/websockets/client/ws_client_wspp.cpp -+++ b/Release/src/websockets/client/ws_client_wspp.cpp -@@ -76,7 +76,9 @@ static struct ASIO_SSL_memory_leak_suppress - { - ~ASIO_SSL_memory_leak_suppress() - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ::SSL_COMP_free_compression_methods(); -+#endif - } - } ASIO_SSL_memory_leak_suppressor; - diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 9831af585..48b7a26e0 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.9.0-4 -Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) +Version: 2.10.0 +Build-Depends: zlib, openssl (windows), boost (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 83b38a92d..6f339c48a 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -3,19 +3,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.9.0 - SHA512 7f6af05e2aaf49fb5ba24f4fac43b7787345d46913831504925cefc60d1b62e38457e1d628d5de8b0db891b59716d2bfe63a494ca0b337d67fc9ca5447a5ba9b + REF v2.10.0 + SHA512 78e7a38c21db5b563d08cb082bfa96360ac44c66f2189a614d3d2bb71655fd82d931f138590d2dba2d6a4c0884ae37a5be34ea3b753c3517bd68ce490daf60b4 HEAD_REF master ) -if(NOT VCPKG_USE_HEAD_VERSION) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch - ${CMAKE_CURRENT_LIST_DIR}/0003_openssl_110.patch - ) -endif() set(OPTIONS) if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -35,15 +26,12 @@ vcpkg_configure_cmake( -DCPPREST_EXCLUDE_WEBSOCKETS=OFF -DCPPREST_EXPORT_DIR=share/cpprestsdk OPTIONS_DEBUG - -DCASA_INSTALL_HEADERS=OFF -DCPPREST_INSTALL_HEADERS=OFF ) vcpkg_install_cmake() -if(VCPKG_USE_HEAD_VERSION) - vcpkg_fixup_cmake_targets() -endif() +vcpkg_fixup_cmake_targets() file(INSTALL ${SOURCE_PATH}/license.txt -- cgit v1.2.3 From 0f66824fd8b8d28bf7a519e5db1e1bd3ce08f1dd Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 21 Oct 2017 08:15:05 -0700 Subject: use vcpkg_from_bitbucket --- ports/eigen3/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 1e08d5ddf..7cae703ad 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -vcpkg_from_github( +vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH - REPO RLovelett/eigen + REPO eigen/eigen REF 3.3.4 - SHA512 b9f6bc74d79aaa7c4cb0c97739ba08c9b0570386f87c4225c06326e734fc27b9a7347a257079cae7954b6dbf599acb47d65037863b01ef5b1ff4ef7a09e3e674 + SHA512 4077a5c3b95e3573774ccd3fe6c7233cb4b83db2358c19b43ea796925bd0201451d8632bddc5d68b1b57bbf67c5473a8908926eed065a745689a2acec9711d5c HEAD_REF master ) -- cgit v1.2.3 From fe842b31d411ed3c14117ca77b65997e671d3a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Sat, 21 Oct 2017 22:39:01 +0200 Subject: Minor fix --- docs/about/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/about/faq.md b/docs/about/faq.md index 88f88bad0..cb711e384 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -78,7 +78,7 @@ Vcpkg uses CMake internally as a build scripting language. This is because CMake ## Will Vcpkg support downloading compiled binaries from a public or private server? We would like to eventually support downloading precompiled binaries, similar to other system package managers. -In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. See [the `export` command](../users/integration.md#export). +In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. See the [`export`](../users/integration.md#export) command. ## What Visual C++ toolsets are supported? We support Visual Studio 2015 Update 3 and above. -- cgit v1.2.3 From 08e447439dedd6527a745df8008e7b25adbaae0c Mon Sep 17 00:00:00 2001 From: Lowell Smith Date: Sat, 21 Oct 2017 21:38:40 -0400 Subject: fix smpeg2 to use SDL2d in debug mode --- ports/smpeg2/CMakeLists.txt | 2 +- ports/smpeg2/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt index 7cda2840a..aa36bbb21 100644 --- a/ports/smpeg2/CMakeLists.txt +++ b/ports/smpeg2/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(SMPEG2 CXX) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDL_INCLUDE_DIR}/SDL2) diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL index 9d00d9429..0b0bee21e 100644 --- a/ports/smpeg2/CONTROL +++ b/ports/smpeg2/CONTROL @@ -1,4 +1,4 @@ Source: smpeg2 -Version: 2.0.0-2 +Version: 2.0.0-3 Description: SDL MPEG Player Library Build-Depends: sdl2 -- cgit v1.2.3 From 7913033b00d3067e0e8f24087737d89d177ff056 Mon Sep 17 00:00:00 2001 From: Scott Greenlay Date: Sun, 22 Oct 2017 13:12:58 -0700 Subject: Update cppwinrt to Fall Creators --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index e470b2458..89c6133bd 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: spring_2017_creators_update_for_vs_15.3 +Version: fall_2017_creators_update_for_vs_15.3 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index c83465efe..98a483ad2 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-fall_2017_creators_update_for_vs_15.3) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 779586122552e49a79aff08f4476905e00c3b4ad3dbc502240e9a7cc59ec0e4ab6304149a66505923ab84d2b334059de9e18c84a5b0ed6bde106d19119ef911f + URLS "https://github.com/Microsoft/cppwinrt/archive/fall_2017_creators_update_for_vs_15.3.tar.gz" + FILENAME "fall_2017_creators_update_for_vs_15.3.tar.gz" + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -14,5 +14,5 @@ file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwi file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) # Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.15063.0/winrt/*) +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.16299.0/winrt/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3 From 2a617103266e8cc391197126fa16c29f65f13ca5 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Mon, 23 Oct 2017 11:01:40 +1100 Subject: Remove non-numeric characters from Windows SDK version string See issue #1836, #2019 --- scripts/cmake/vcpkg_get_windows_sdk.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index 64d8838e7..a8aad64a9 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -10,7 +10,7 @@ function(vcpkg_get_windows_sdk ret) message(FATAL_ERROR "Could not find Windows SDK") endif() - # Remove trailing newline - string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}") + # Remove trailing newline and non-numeric characters + string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}") set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) endfunction() \ No newline at end of file -- cgit v1.2.3 From b6e82b55c117477095dfc16126f4c5f64937c9de Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 24 Oct 2017 00:04:00 +0800 Subject: [cppzmq] Update to 4.2.2 --- ports/cppzmq/CONTROL | 2 +- ports/cppzmq/portfile.cmake | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ports/cppzmq/CONTROL b/ports/cppzmq/CONTROL index bbf80d29a..39928046d 100644 --- a/ports/cppzmq/CONTROL +++ b/ports/cppzmq/CONTROL @@ -1,4 +1,4 @@ Source: cppzmq -Version: 4.2.1 +Version: 4.2.2 Build-Depends: zeromq Description: lightweight messaging kernel, C++ bindings diff --git a/ports/cppzmq/portfile.cmake b/ports/cppzmq/portfile.cmake index fdfc86257..4f0701c59 100644 --- a/ports/cppzmq/portfile.cmake +++ b/ports/cppzmq/portfile.cmake @@ -1,12 +1,13 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppzmq-4.2.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/zeromq/cppzmq/archive/v4.2.1.zip" - FILENAME "cppzmq-4.2.1.zip" - SHA512 ee75ce4bd28ecb5ef660d1ed6f5522654eced6ded8745dc0c61df351f4ff0ff8980d1bd848b2649fcce4aa539a457e56e55b0a59cb49f44b0a29875d0ea28dce + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/cppzmq + REF v4.2.2 + SHA512 5f61ea4a16987c1363c3029cf46b3e83ddd86d65e8d639b0332d691f8fdb5cee121b5d72a9b8c89221daf52ea5892219e0bc4ea4e761bb1e7deb1659011dd3c9 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # cppzmq is a single header library, so we just need to copy that file in the include directory file(INSTALL ${SOURCE_PATH}/zmq.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From 17baff12b3a3e91cb155a04cb3b4f513e679b436 Mon Sep 17 00:00:00 2001 From: Daniel Olivier Date: Mon, 23 Oct 2017 13:06:32 -0400 Subject: Adding Capstone port --- ports/capstone/CONTROL | 3 +++ ports/capstone/portfile.cmake | 56 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 ports/capstone/CONTROL create mode 100644 ports/capstone/portfile.cmake diff --git a/ports/capstone/CONTROL b/ports/capstone/CONTROL new file mode 100644 index 000000000..c207a5622 --- /dev/null +++ b/ports/capstone/CONTROL @@ -0,0 +1,3 @@ +Source: capstone +Version: +Description: diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake new file mode 100644 index 000000000..4e99b9077 --- /dev/null +++ b/ports/capstone/portfile.cmake @@ -0,0 +1,56 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/capstone) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REF 3.0.5-rc3 + REPO "aquynh/capstone" + SHA512 1327fc570fc2310f71c4d7329528c05e30b9ad68ea50254b9a8c4b3b113f5165c2e0474ec99bbe1e6e46f2820379f388e4c2082c156027e117d88a8f1908acfe + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + OPTIONS + -DCAPSTONE_STATIC=ON + -DCAPSTONE_BUILD_SHARED=OFF + + #-DCAPSTONE_ARCHS="x86" + -DCAPSTONE_X86_SUPPORT=ON + -DCAPSTONE_ARM_SUPPORT=OFF + -DCAPSTONE_ARM64_SUPPORT=OFF + -DCAPSTONE_MIPS_SUPPORT=OFF + -DCAPSTONE_PPC_SUPPORT=OFF + -DCAPSTONE_SPARC_SUPPORT=OFF + -DCAPSTONE_SYSZ_SUPPORT=OFF + -DCAPSTONE_XCORE_SUPPORT=OFF + + -DCAPSTONE_BUILD_TESTS=OFF + OPTIONS_RELEASE + -DCAPSTONE_BUILD_DIET=ON + -DCAPSTONE_X86_REDUCE=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone + RENAME copyright) -- cgit v1.2.3 From 7f0dcbc15dbf8e0cb202f8a197f5582c36b4b546 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 23 Oct 2017 11:43:36 -0700 Subject: [cppwinrt] Use vcpkg_from_github --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index 89c6133bd..4f160a6e0 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: fall_2017_creators_update_for_vs_15.3 +Version: fall_2017_creators_update_for_vs_15.3-1 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index 98a483ad2..703f9b6a1 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,13 +1,12 @@ include(vcpkg_common_functions) -find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-fall_2017_creators_update_for_vs_15.3) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/fall_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "fall_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/cppwinrt + REF fall_2017_creators_update_for_vs_15.3 + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) -- cgit v1.2.3 From 92d1a53215b2cc23dc090368d5218d42e195c478 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Oct 2017 16:43:05 -0700 Subject: [LineInfo] Store empty string instead of null in default construction --- toolsrc/include/vcpkg/base/lineinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/base/lineinfo.h b/toolsrc/include/vcpkg/base/lineinfo.h index 62973462a..e7e8c3031 100644 --- a/toolsrc/include/vcpkg/base/lineinfo.h +++ b/toolsrc/include/vcpkg/base/lineinfo.h @@ -9,7 +9,7 @@ namespace vcpkg int line_number; const char* file_name; - constexpr LineInfo() : line_number(0), file_name(nullptr) {} + constexpr LineInfo() : line_number(0), file_name("") {} constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {} std::string to_string() const; -- cgit v1.2.3 From 23702360ce912b1827afe5559de936cc9a24cd0c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Oct 2017 16:43:44 -0700 Subject: Merge trim() and trimmed() functions --- toolsrc/include/vcpkg/base/strings.h | 4 +--- toolsrc/src/vcpkg/base/strings.cpp | 16 +++++----------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 5b03286de..ee1b2fc28 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -78,9 +78,7 @@ namespace vcpkg::Strings std::string replace_all(std::string&& s, const std::string& search, const std::string& rep); - void trim(std::string* s); - - std::string trimmed(const std::string& s); + std::string trim(std::string&& s); void trim_all_and_remove_whitespace_strings(std::vector* strings); diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 36efc3adc..27cfcbe71 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -125,24 +125,18 @@ namespace vcpkg::Strings return std::move(s); } - void trim(std::string* s) + std::string trim(std::string&& s) { - s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); - s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); - } - - std::string trimmed(const std::string& s) - { - auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); - auto whitespace_front = std::find_if_not(s.begin(), whitespace_back, details::isspace); - return std::string(whitespace_front, whitespace_back); + 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)); + return std::move(s); } void trim_all_and_remove_whitespace_strings(std::vector* strings) { for (std::string& s : *strings) { - trim(&s); + s = trim(std::move(s)); } Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index ef9e383bc..363319767 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -91,7 +91,7 @@ namespace vcpkg Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } - const fs::path actual_downloaded_path = Strings::trimmed(rc.output); + const fs::path actual_downloaded_path = Strings::trim(std::string{rc.output}); std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, -- cgit v1.2.3 From aec9215800a42e7e4ec28aad756695a8ced8876c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Oct 2017 17:08:24 -0700 Subject: [InternalCI.ps1] Fix error when buildtrees/ does not exist --- scripts/internalCI.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 887eb7bea..16ce4fc7a 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -5,7 +5,10 @@ New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null if (-not $?) { throw $? } # Clear out any intermediate files from the previous build -Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force +if (Test-Path buildtrees) +{ + Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force +} # Purge any outdated packages ./vcpkg remove --outdated --recurse -- cgit v1.2.3 From 75746d0b1fabeb4f86a3fa69645e8e5933de3d29 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Wed, 25 Oct 2017 23:05:17 +1100 Subject: Port for leveldb --- ports/leveldb/CMakeLists.txt | 75 ++++++++++++++++++++++++++++++++++++++++ ports/leveldb/CONTROL | 3 ++ ports/leveldb/msvc_code_fix.diff | 63 +++++++++++++++++++++++++++++++++ ports/leveldb/portfile.cmake | 35 +++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 ports/leveldb/CMakeLists.txt create mode 100644 ports/leveldb/CONTROL create mode 100644 ports/leveldb/msvc_code_fix.diff create mode 100644 ports/leveldb/portfile.cmake diff --git a/ports/leveldb/CMakeLists.txt b/ports/leveldb/CMakeLists.txt new file mode 100644 index 000000000..73b082c4a --- /dev/null +++ b/ports/leveldb/CMakeLists.txt @@ -0,0 +1,75 @@ +cmake_minimum_required(VERSION 3.8) +project(leveldb C CXX) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DWIN32 + -D_CRT_NONSTDC_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_CRT_SECURE_NO_WARNINGS + -DNOMINMAX + -DLEVELDB_ATOMIC_PRESENT + -DLEVELDB_PLATFORM_WINDOWS +) + +add_library(libleveldb + db/builder.cc + db/c.cc + db/dbformat.cc + db/db_impl.cc + db/db_iter.cc + db/dumpfile.cc + db/filename.cc + db/log_reader.cc + db/log_writer.cc + db/memtable.cc + db/repair.cc + db/table_cache.cc + db/version_edit.cc + db/version_set.cc + db/write_batch.cc + helpers/memenv/memenv.cc + port/port_posix_sse.cc + port/port_win.cc + table/block.cc + table/block_builder.cc + table/filter_block.cc + table/format.cc + table/iterator.cc + table/merger.cc + table/table.cc + table/table_builder.cc + table/two_level_iterator.cc + util/arena.cc + util/bloom.cc + util/cache.cc + util/coding.cc + util/comparator.cc + util/crc32c.cc + util/env.cc + util/env_posix.cc + util/env_win.cc + util/filter_policy.cc + util/hash.cc + util/histogram.cc + util/logging.cc + util/options.cc + util/status.cc +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} include) + +target_link_libraries(libleveldb PUBLIC Iphlpapi.lib Shlwapi.lib) + +install(TARGETS libleveldb + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS include/leveldb/*.h) + install(FILES ${HEADERS} DESTINATION include/leveldb) + install(FILES helpers/memenv/memenv.h DESTINATION include) +endif() \ No newline at end of file diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL new file mode 100644 index 000000000..b953e540c --- /dev/null +++ b/ports/leveldb/CONTROL @@ -0,0 +1,3 @@ +Source: leveldb +Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 +Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. diff --git a/ports/leveldb/msvc_code_fix.diff b/ports/leveldb/msvc_code_fix.diff new file mode 100644 index 000000000..6cab006d3 --- /dev/null +++ b/ports/leveldb/msvc_code_fix.diff @@ -0,0 +1,63 @@ + db/c.cc | 2 ++ + port/port_win.h | 7 +++++++ + util/env_win.cc | 6 ++++-- + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/db/c.cc b/db/c.cc +index 08ff0ad..b23e3dc 100644 +--- a/db/c.cc ++++ b/db/c.cc +@@ -5,7 +5,9 @@ + #include "leveldb/c.h" + + #include ++#ifndef WIN32 + #include ++#endif + #include "leveldb/cache.h" + #include "leveldb/comparator.h" + #include "leveldb/db.h" +diff --git a/port/port_win.h b/port/port_win.h +index e8bf46e..989c15c 100644 +--- a/port/port_win.h ++++ b/port/port_win.h +@@ -32,9 +32,16 @@ + #define STORAGE_LEVELDB_PORT_PORT_WIN_H_ + + #ifdef _MSC_VER ++#if !(_MSC_VER >= 1900) + #define snprintf _snprintf ++#endif + #define close _close + #define fread_unlocked _fread_nolock ++#ifdef _WIN64 ++#define ssize_t int64_t ++#else ++#define ssize_t int32_t ++#endif + #endif + + #include +diff --git a/util/env_win.cc b/util/env_win.cc +index d32c4e6..3b4c92b 100644 +--- a/util/env_win.cc ++++ b/util/env_win.cc +@@ -761,14 +761,16 @@ uint64_t Win32Env::NowMicros() + static Status CreateDirInner( const std::string& dirname ) + { + Status sRet; +- DWORD attr = ::GetFileAttributes(dirname.c_str()); ++ std::wstring dirnameW; ++ ToWidePath(dirname, dirnameW); ++ DWORD attr = ::GetFileAttributesW(dirnameW.c_str()); + if (attr == INVALID_FILE_ATTRIBUTES) { // doesn't exist: + std::size_t slash = dirname.find_last_of("\\"); + if (slash != std::string::npos){ + sRet = CreateDirInner(dirname.substr(0, slash)); + if (!sRet.ok()) return sRet; + } +- BOOL result = ::CreateDirectory(dirname.c_str(), NULL); ++ BOOL result = ::CreateDirectoryW(dirnameW.c_str(), NULL); + if (result == FALSE) { + sRet = Status::IOError(dirname, "Could not create directory."); + return sRet; diff --git a/ports/leveldb/portfile.cmake b/ports/leveldb/portfile.cmake new file mode 100644 index 000000000..8a32c8392 --- /dev/null +++ b/ports/leveldb/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(FATAL_ERROR "leveldb doesn't currently support dynamic buildsas there are no export symbols defined.") +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/leveldb-8b1cd3753b184341e837b30383832645135d3d73) + +vcpkg_from_github( + OUT_SOURCE_PATH "leveldb" + BRANCH "bitcoin-fork" + REPO "bitcoin-core/leveldb" + REF "8b1cd3753b184341e837b30383832645135d3d73" + SHA512 f5ad5fd21fb28ee052a4f3873abd58dab508c71621bcd482ab9e6ef4b57eca182c81502ddfe59736f5b2a54f2d05b397dd15982b3bd5d9039cd481eae3c7b958 +) + +message(STATUS "Patching") + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/msvc_code_fix.diff) + +message(STATUS "Building") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leveldb RENAME copyright) -- cgit v1.2.3 From ae48463360d4394a9c55e91f46f6f103dd046ab3 Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 25 Oct 2017 17:32:38 +0300 Subject: [sqlite3] update to 3.21.0 --- ports/sqlite3/CONTROL | 2 +- ports/sqlite3/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index b444a953a..ccb3a3745 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,3 +1,3 @@ Source: sqlite3 -Version: 3.20.1 +Version: 3.21.0 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 4bb53ef80..fc06850e2 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3200100) -set(SQLITE_HASH 66c325fec1c13ed5360899aa3e3a7a67d2b79d24dde954df7df7179c4d07e7b20edf831cc7107df863f3f8b0f30d21b934fcd0f7ea7b74409abbc0060bc28f7b) +set(SQLITE_VERSION 3210000) +set(SQLITE_HASH 0a272b00825d07528c3842ccd483d81e5e719ab56737eec0972f7f8191dfbe92e35777ab8d1b37c95fde9320bbfa3c365a4b30253af876340f55517ea96bf665) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From d1627a0a8056453a7b777e5108756c935b0eeec0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 11:28:27 -0700 Subject: [libjpeg-turbo] Fix CRT linkage --- ports/libjpeg-turbo/CONTROL | 2 +- ports/libjpeg-turbo/portfile.cmake | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index bf642bd1b..d63d15db9 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.2-1 +Version: 1.5.2-2 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index a5d09fda2..225b23353 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -16,13 +16,9 @@ vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(ENABLE_STATIC OFF) - set(ENABLE_SHARED ON) -else() - set(ENABLE_STATIC ON) - set(ENABLE_SHARED OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) @@ -36,6 +32,7 @@ vcpkg_configure_cmake( -DENABLE_SHARED=${ENABLE_SHARED} -DENABLE_EXECUTABLES=OFF -DINSTALL_DOCS=OFF + -DWITH_CRT_DLL=${WITH_CRT_DLL} ${LIBJPEGTURBO_SIMD} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) -- cgit v1.2.3 From 2735cea57197b9b5f93faf2e586643dea952bf1e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 11:51:21 -0700 Subject: [libmysql] Disable /MT. Convert portfile tabs to spaces and CRLF to LF. --- ports/libmysql/CONTROL | 6 +- ports/libmysql/portfile.cmake | 173 +++++++++++++++++++++--------------------- 2 files changed, 90 insertions(+), 89 deletions(-) diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 0c772e04e..8350014e4 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,3 +1,3 @@ -Source: libmysql -Version: 5.7.17-2 -Description: A MySQL client library for C development. +Source: libmysql +Version: 5.7.17-3 +Description: A MySQL client library for C development. diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 81ffdfb98..707d10149 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -1,87 +1,88 @@ -if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") - message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") -endif() - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz" - FILENAME "mysql-server-mysql-5.7.17.tar.gz" - SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DWITHOUT_SERVER=ON - -DWITH_UNIT_TESTS=OFF - -DENABLED_PROFILING=OFF - -DWIX_DIR=OFF -) - -vcpkg_install_cmake() - -# delete debug headers -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include) - -# switch mysql into /mysql -file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/mysql) - -## delete useless vcruntime/scripts/bin/msg file -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/share - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/docs - ${CURRENT_PACKAGES_DIR}/debug/docs - ${CURRENT_PACKAGES_DIR}/lib/debug) - -# remove misc files -file(REMOVE - ${CURRENT_PACKAGES_DIR}/COPYING - ${CURRENT_PACKAGES_DIR}/README - ${CURRENT_PACKAGES_DIR}/debug/COPYING - ${CURRENT_PACKAGES_DIR}/debug/README) - -# remove not-related libs -file (REMOVE - ${CURRENT_PACKAGES_DIR}/lib/mysqlservices.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlservices.lib) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE - ${CURRENT_PACKAGES_DIR}/lib/libmysql.lib - ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll - ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb) -else() - file(REMOVE - ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) - - # correct the dll directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) -endif() - -# copy license -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) +if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") + message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz" + FILENAME "mysql-server-mysql-5.7.17.tar.gz" + SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DWITHOUT_SERVER=ON + -DWITH_UNIT_TESTS=OFF + -DENABLED_PROFILING=OFF + -DWIX_DIR=OFF + -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. +) + +vcpkg_install_cmake() + +# delete debug headers +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include) + +# switch mysql into /mysql +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/mysql) + +## delete useless vcruntime/scripts/bin/msg file +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/share + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/docs + ${CURRENT_PACKAGES_DIR}/debug/docs + ${CURRENT_PACKAGES_DIR}/lib/debug) + +# remove misc files +file(REMOVE + ${CURRENT_PACKAGES_DIR}/COPYING + ${CURRENT_PACKAGES_DIR}/README + ${CURRENT_PACKAGES_DIR}/debug/COPYING + ${CURRENT_PACKAGES_DIR}/debug/README) + +# remove not-related libs +file (REMOVE + ${CURRENT_PACKAGES_DIR}/lib/mysqlservices.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlservices.lib) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/libmysql.lib + ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll + ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) + + # correct the dll directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) +endif() + +# copy license +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/COPYING ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file -- cgit v1.2.3 From 0cbaaac8fc8ec97974e94a681ecf9be75238b41c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 12:44:44 -0700 Subject: [mpir] Reformat to LF+spaces. Add early error detection for UWP and /MT. --- ports/mpir/CONTROL | 6 +- ports/mpir/portfile.cmake | 170 ++++++++++++++++++++++++---------------------- 2 files changed, 92 insertions(+), 84 deletions(-) diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index fc15d9b41..e80853a7d 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ -Source: mpir -Version: 3.0.0-2 -Description: Multiple Precision Integers and Rationals. \ No newline at end of file +Source: mpir +Version: 3.0.0-2 +Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index 1595a6533..97f8898e5 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -1,81 +1,89 @@ -include(vcpkg_common_functions) - -set(MPIR_VERSION 3.0.0) -set(MPIR_HASH "c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpir-${MPIR_VERSION}) - -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" - FILENAME "mpir-${MPIR_VERSION}.tar.bz2" - SHA512 ${MPIR_HASH} -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(MSVC_VERSION 15) -else() - set(MSVC_VERSION 14) -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj - ) -else() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj - ) -endif() - -IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) -ENDIF() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmp.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmpxx.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpirxx.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) - vcpkg_copy_pdbs() -else() - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmp.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmpxx.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpirxx.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) -endif() - -message(STATUS "Installing done") +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "MPIR currently can only be built for desktop") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT") +endif() + +set(MPIR_VERSION 3.0.0) +set(MPIR_HASH "c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpir-${MPIR_VERSION}) + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" + FILENAME "mpir-${MPIR_VERSION}.tar.bz2" + SHA512 ${MPIR_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVC_VERSION 15) +else() + set(MSVC_VERSION 14) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj + ) +endif() + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmp.h + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmpxx.h + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.h + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpirxx.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +else() + file(INSTALL + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmp.h + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmpxx.h + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.h + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpirxx.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + file(INSTALL + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) +vcpkg_copy_pdbs() + +message(STATUS "Installing done") -- cgit v1.2.3 From e45fb7498d4a373669bf8aaa26dea284bc31b7a5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 13:15:41 -0700 Subject: [mpir] Improve error handling; allow dyn/dyn-rt or lib/lib-rt but not cross --- ports/mpir/portfile.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index 97f8898e5..cc5cab8b8 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -4,8 +4,10 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "MPIR currently can only be built for desktop") endif() -if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT") +if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") +elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "MPIR currently can only be built using the static CRT when building LIBs") endif() set(MPIR_VERSION 3.0.0) -- cgit v1.2.3 From 1cdcb7904084484ccfa75f32ba581d9e2dda45c8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 13:31:02 -0700 Subject: [mpir] Enable lib/md. --- ports/mpir/CONTROL | 2 +- ports/mpir/enable-runtimelibrary-toggle.patch | 26 ++++++++++++++++++++++++++ ports/mpir/portfile.cmake | 14 ++++++++++++-- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 ports/mpir/enable-runtimelibrary-toggle.patch diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index e80853a7d..b9d1b2d74 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ Source: mpir -Version: 3.0.0-2 +Version: 3.0.0-3 Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/enable-runtimelibrary-toggle.patch b/ports/mpir/enable-runtimelibrary-toggle.patch new file mode 100644 index 000000000..d0260e869 --- /dev/null +++ b/ports/mpir/enable-runtimelibrary-toggle.patch @@ -0,0 +1,26 @@ +diff --git a/build.vc/mpir_debug_lib.props b/build.vc/mpir_debug_lib.props +index b2fd57b..3937570 100644 +--- a/build.vc/mpir_debug_lib.props ++++ b/build.vc/mpir_debug_lib.props +@@ -9,7 +9,7 @@ + + + $(IntDir)dum\my\%(RelativeDir) +- MultiThreadedDebug ++ $(RuntimeLibrary) + $(TargetDir)$(TargetName).pdb + + +diff --git a/build.vc/mpir_release_lib.props b/build.vc/mpir_release_lib.props +index 6cdff3e..3937570 100644 +--- a/build.vc/mpir_release_lib.props ++++ b/build.vc/mpir_release_lib.props +@@ -9,7 +9,7 @@ + + + $(IntDir)dum\my\%(RelativeDir) +- MultiThreaded ++ $(RuntimeLibrary) + $(TargetDir)$(TargetName).pdb + + diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index cc5cab8b8..c56cfa545 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -6,8 +6,6 @@ endif() if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") -elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "MPIR currently can only be built using the static CRT when building LIBs") endif() set(MPIR_VERSION 3.0.0) @@ -21,6 +19,11 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-runtimelibrary-toggle.patch" +) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(MSVC_VERSION 15) else() @@ -32,8 +35,15 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj ) else() + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" ) endif() -- cgit v1.2.3 From e3dcfcb4031903387cd7bdf29de2832759d969ba Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 13:57:28 -0700 Subject: [boost] Fix manual-links. Fixes #2057. --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 35 +++++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index a5da89a5a..55c32a280 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,5 +1,5 @@ Source: boost -Version: 1.65.1-1 +Version: 1.65.1-2 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index b0699eaa2..57dc081da 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -303,14 +303,8 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) FILES_MATCHING PATTERN "*.dll") endif() file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*.lib) + boost_rename_libs(RELEASE_LIBS) -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/boost_test_exec_monitor-vc140-mt-${VERSION}.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/boost_test_exec_monitor-vc140-mt-${VERSION}.lib - ${CURRENT_PACKAGES_DIR}/lib/manual-link/boost_test_exec_monitor-vc140-mt-${VERSION}.lib - ) -endif() message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") @@ -324,13 +318,26 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib) boost_rename_libs(DEBUG_LIBS) -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/boost_test_exec_monitor-vc140-mt-gd-${VERSION}.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/boost_test_exec_monitor-vc140-mt-gd-${VERSION}.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/boost_test_exec_monitor-vc140-mt-gd-${VERSION}.lib - ) -endif() message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") +macro(move_to_manual_link LIBNAME) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib + ${CURRENT_PACKAGES_DIR}/lib/manual-link/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib + ) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib + ) + endif() +endmacro() + +move_to_manual_link(boost_test_exec_monitor) +move_to_manual_link(boost_prg_exec_monitor) + vcpkg_copy_pdbs() -- cgit v1.2.3 From 0245c2ac64d13ba9f5684d2d4fa82c26d2762183 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Thu, 26 Oct 2017 08:57:02 +1100 Subject: Fix for secp256k1 and missing headers --- ports/secp256k1/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt index d439053bc..2e6b46198 100644 --- a/ports/secp256k1/CMakeLists.txt +++ b/ports/secp256k1/CMakeLists.txt @@ -21,6 +21,6 @@ install(TARGETS secp256k1 ) if(INSTALL_HEADERS) - file(GLOB HEADERS include/secp256k1.h) + file(GLOB HEADERS include/*.h) install(FILES ${HEADERS} DESTINATION include) endif() \ No newline at end of file -- cgit v1.2.3 From 26ba18606f2ea46bb2b5ddd64c42ed0ee9966fb1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 16:23:09 -0700 Subject: [secp256k1] Bump version --- ports/secp256k1/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL index 181a4a7e6..be37f1693 100644 --- a/ports/secp256k1/CONTROL +++ b/ports/secp256k1/CONTROL @@ -1,3 +1,3 @@ Source: secp256k1 -Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 +Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-1 Description: Optimized C library for EC operations on curve -- cgit v1.2.3 From f1dc231bc835f30dca1838d2ffc8646cc6ba0786 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 16:51:18 -0700 Subject: [capstone] Add version. Support shared builds --- ports/capstone/CONTROL | 2 +- ports/capstone/portfile.cmake | 37 ++++++++++++++++--------------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/ports/capstone/CONTROL b/ports/capstone/CONTROL index c207a5622..b442eccd9 100644 --- a/ports/capstone/CONTROL +++ b/ports/capstone/CONTROL @@ -1,3 +1,3 @@ Source: capstone -Version: +Version: 3.0.5-rc3 Description: diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 4e99b9077..430638322 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -1,17 +1,4 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/capstone) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REF 3.0.5-rc3 @@ -20,20 +7,20 @@ vcpkg_from_github( HEAD_REF master ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CAPSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CAPSTONE_BUILD_SHARED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA OPTIONS - -DCAPSTONE_STATIC=ON - -DCAPSTONE_BUILD_SHARED=OFF + -DCAPSTONE_BUILD_STATIC=${CAPSTONE_BUILD_STATIC} + -DCAPSTONE_BUILD_SHARED=${CAPSTONE_BUILD_SHARED} #-DCAPSTONE_ARCHS="x86" -DCAPSTONE_X86_SUPPORT=ON - -DCAPSTONE_ARM_SUPPORT=OFF - -DCAPSTONE_ARM64_SUPPORT=OFF + -DCAPSTONE_ARM_SUPPORT=ON + -DCAPSTONE_ARM64_SUPPORT=ON -DCAPSTONE_MIPS_SUPPORT=OFF -DCAPSTONE_PPC_SUPPORT=OFF -DCAPSTONE_SPARC_SUPPORT=OFF @@ -47,8 +34,16 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE.txt -- cgit v1.2.3 From 29e4c5302e61c8fe927da2f79c278dd70fa03d85 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 16:57:12 -0700 Subject: [gmime] Prefer ninja --- ports/gmime/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake index 98b3a104f..1fa50063c 100644 --- a/ports/gmime/portfile.cmake +++ b/ports/gmime/portfile.cmake @@ -24,6 +24,7 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From 133099fa2c46152474cfab052d0d1bcbc83749f2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Oct 2017 18:31:00 -0700 Subject: [pangolin] Fix glew dependency and fix usage of the crt --- ports/pangolin/CONTROL | 2 +- ports/pangolin/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index a4d670b74..a515ba50e 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: 0.5-2 +Version: 0.5-3 Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Description: Lightweight GUI Library diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index 3fe7ef8b6..19763f0d6 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -8,6 +8,10 @@ vcpkg_from_github( HEAD_REF master ) +file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -16,6 +20,7 @@ vcpkg_configure_cmake( -DBUILD_EXTERN_GLEW=OFF -DBUILD_EXTERN_LIBPNG=OFF -DBUILD_EXTERN_LIBJPEG=OFF + -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT} ) vcpkg_install_cmake() -- cgit v1.2.3 From 0028cbc23fef82c3a36de771f990f0dfea407bb0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 18:16:36 -0700 Subject: [rpclib] Initial commit of 2.2.0 --- ports/rpclib/CONTROL | 3 +++ ports/rpclib/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/rpclib/CONTROL create mode 100644 ports/rpclib/portfile.cmake diff --git a/ports/rpclib/CONTROL b/ports/rpclib/CONTROL new file mode 100644 index 000000000..160f4651c --- /dev/null +++ b/ports/rpclib/CONTROL @@ -0,0 +1,3 @@ +Source: rpclib +Version: 2.2.0 +Description: a RPC library for C++, providing both a client and server implementation. It is built using modern C++14. diff --git a/ports/rpclib/portfile.cmake b/ports/rpclib/portfile.cmake new file mode 100644 index 000000000..5f4ac6a57 --- /dev/null +++ b/ports/rpclib/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rpclib/rpclib + REF v2.2.0 + SHA512 73d2344debb3a6ced6a045ba3bf8839a6f91d8f43dfac8760c65d19d1fc7960e778457a20fddbd771d7dd4b12e32d8a925f1fc008d11ccc5654dbeb08ba0f50a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rpclib) + +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/rpclib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rpclib/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/rpclib/copyright) -- cgit v1.2.3 From 286625e09eb4e2334062b65cf45fc1dee5fedb66 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 18:33:17 -0700 Subject: [rttr] Disable unit tests during build. Not bumping version because the output files are unaffected. --- ports/rttr/disable-unit-tests.patch | 14 ++++++++++++++ ports/rttr/portfile.cmake | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ports/rttr/disable-unit-tests.patch diff --git a/ports/rttr/disable-unit-tests.patch b/ports/rttr/disable-unit-tests.patch new file mode 100644 index 000000000..b27f01661 --- /dev/null +++ b/ports/rttr/disable-unit-tests.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b9fd698..bcaebfe 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,7 +31,9 @@ + ############################################# + + add_subdirectory (rttr) ++if(UNIT_TESTS) + add_subdirectory (unit_tests) ++endif() + + if (${BUILD_BENCHMARKS}) + add_subdirectory (benchmarks) diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index b590b7873..f3b3eafb9 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -14,7 +14,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" + "${CMAKE_CURRENT_LIST_DIR}/disable-unit-tests.patch" ) vcpkg_configure_cmake( -- cgit v1.2.3 From 8a952743a3a3f856f6be6b985158ea1c1ffb2c6f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Oct 2017 18:59:11 -0700 Subject: Introduce Util::Sets::contains() --- toolsrc/include/vcpkg/base/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index d5db6b6ee..7ffd027f0 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -20,6 +20,15 @@ namespace vcpkg::Util } } + namespace Sets + { + template> + bool contains(const Container& container, const T& item) + { + return container.find(item) != container.cend(); + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); -- cgit v1.2.3 From 2c9536ce4fe0ac755e188617ce61076b26646100 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Oct 2017 19:00:30 -0700 Subject: [vcpkg ci] Introduce --exclude option --- toolsrc/include/vcpkg/build.h | 8 +++++--- toolsrc/include/vcpkg/dependencies.h | 3 ++- toolsrc/include/vcpkg/install.h | 2 ++ toolsrc/include/vcpkg/packagespec.h | 2 ++ toolsrc/src/tests.installplan.cpp | 7 ++++--- toolsrc/src/vcpkg/build.cpp | 6 +++++- toolsrc/src/vcpkg/commands.ci.cpp | 39 ++++++++++++++++++++---------------- toolsrc/src/vcpkg/dependencies.cpp | 22 ++++++++------------ toolsrc/src/vcpkg/install.cpp | 21 +++++++++++++++++-- toolsrc/src/vcpkg/packagespec.cpp | 8 ++++++++ 10 files changed, 77 insertions(+), 41 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 774e25922..bf52e54b2 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -65,15 +65,17 @@ namespace vcpkg::Build BUILD_FAILED, POST_BUILD_CHECKS_FAILED, FILE_CONFLICTS, - CASCADED_DUE_TO_MISSING_DEPENDENCIES + CASCADED_DUE_TO_MISSING_DEPENDENCIES, + EXCLUDED, }; - static constexpr std::array BUILD_RESULT_VALUES = { + static constexpr std::array BUILD_RESULT_VALUES = { BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, BuildResult::POST_BUILD_CHECKS_FAILED, BuildResult::FILE_CONFLICTS, - BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES}; + BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, + BuildResult::EXCLUDED}; const std::string& to_string(const BuildResult build_result); std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 585338ae2..60c83fcca 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -38,7 +38,8 @@ namespace vcpkg::Dependencies UNKNOWN, BUILD_AND_INSTALL, INSTALL, - ALREADY_INSTALLED + ALREADY_INSTALLED, + EXCLUDED }; struct InstallPlanAction : Util::MoveOnlyBase diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 809befb16..895028865 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -62,6 +62,8 @@ namespace vcpkg::Install SUCCESS, }; + std::vector get_all_port_names(const VcpkgPaths& paths); + void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs); InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& binary_paragraph, diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 60c99782e..99aaaf0d7 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -20,6 +20,8 @@ namespace vcpkg static ExpectedT from_name_and_triplet(const std::string& name, const Triplet& triplet); + static std::vector to_package_specs(const std::vector& ports, const Triplet& triplet); + const std::string& name() const; const Triplet& triplet() const; diff --git a/toolsrc/src/tests.installplan.cpp b/toolsrc/src/tests.installplan.cpp index 120009db5..347612abd 100644 --- a/toolsrc/src/tests.installplan.cpp +++ b/toolsrc/src/tests.installplan.cpp @@ -17,8 +17,9 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; + case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; - default: return ToString((int)t); + default: return ToString(static_cast(t)); } } @@ -30,7 +31,7 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString((int)t); + default: return ToString(static_cast(t)); } } } @@ -484,4 +485,4 @@ namespace UnitTest1 features_check(&install_plan[7], "c", {"core"}); } }; -} \ No newline at end of file +} diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index cf16c8f9c..c26dcc591 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -87,6 +87,8 @@ namespace vcpkg::Build::Command Checks::exit_fail(VCPKG_LINE_INFO); } + Checks::check_exit(VCPKG_LINE_INFO, result.code != BuildResult::EXCLUDED); + if (result.code != BuildResult::SUCCEEDED) { System::println(System::Color::error, Build::create_error_message(result.code, spec)); @@ -365,6 +367,7 @@ namespace vcpkg::Build static const std::string FILE_CONFLICTS_STRING = "FILE_CONFLICTS"; static const std::string POST_BUILD_CHECKS_FAILED_STRING = "POST_BUILD_CHECKS_FAILED"; static const std::string CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING = "CASCADED_DUE_TO_MISSING_DEPENDENCIES"; + static const std::string EXCLUDED_STRING = "EXCLUDED"; switch (build_result) { @@ -372,8 +375,9 @@ namespace vcpkg::Build case BuildResult::SUCCEEDED: return SUCCEEDED_STRING; case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING; case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING; - case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; case BuildResult::FILE_CONFLICTS: return FILE_CONFLICTS_STRING; + case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; + case BuildResult::EXCLUDED: return EXCLUDED_STRING; default: Checks::unreachable(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index ffeaad790..559dc4541 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -1,6 +1,5 @@ #include "pch.h" -#include #include #include #include @@ -10,7 +9,6 @@ #include #include #include -#include #include namespace vcpkg::Commands::CI @@ -19,27 +17,28 @@ namespace vcpkg::Commands::CI using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - static std::vector load_all_package_specs(Files::Filesystem& fs, - const fs::path& ports_directory, - const Triplet& triplet) - { - auto ports = Paragraphs::load_all_ports(fs, ports_directory); - return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec { - return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet) - .value_or_exit(VCPKG_LINE_INFO); - }); - } - - static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, const VcpkgPaths& paths) + static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, + const VcpkgPaths& paths, + const std::vector& ports, + const std::set& exclusions_set) { Input::check_triplet(triplet, paths); - const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); + const std::vector specs = PackageSpec::to_package_specs(ports, triplet); StatusParagraphs status_db = database_load_check(paths); const auto& paths_port_file = Dependencies::PathsPortFile(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); + + for (InstallPlanAction& plan : install_plan) + { + if (Util::Sets::contains(exclusions_set, plan.spec.name())) + { + plan.plan_type = InstallPlanType::EXCLUDED; + } + } + Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; @@ -60,8 +59,13 @@ namespace vcpkg::Commands::CI void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { + static const std::string OPTION_EXCLUDE = "--exclude"; + static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); - args.check_and_get_optional_command_arguments({}); + + const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {OPTION_EXCLUDE}); + const std::vector exclusions = Strings::split(options.settings.at(OPTION_EXCLUDE), ","); + const std::set exclusions_set(exclusions.cbegin(), exclusions.cend()); std::vector triplets; for (const std::string& triplet : args.command_arguments) @@ -74,10 +78,11 @@ namespace vcpkg::Commands::CI triplets.push_back(default_triplet); } + const std::vector ports = Install::get_all_port_names(paths); std::vector results; for (const Triplet& triplet : triplets) { - Install::InstallSummary summary = run_ci_on_triplet(triplet, paths); + Install::InstallSummary summary = run_ci_on_triplet(triplet, paths, ports, exclusions_set); results.push_back({triplet, std::move(summary)}); } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 02b2ec785..9d264baa2 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -112,27 +112,21 @@ namespace vcpkg::Dependencies std::vector AnyParagraph::dependencies(const Triplet& triplet) const { - auto to_package_specs = [&](const std::vector& dependencies_as_string) { - return Util::fmap(dependencies_as_string, [&](const std::string s) { - return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); - }); - }; - - if (auto p = this->status_paragraph.get()) + if (const auto p = this->status_paragraph.get()) { - return to_package_specs(p->package.depends); + return PackageSpec::to_package_specs(p->package.depends, triplet); } - if (auto p = this->binary_control_file.get()) + if (const auto p = this->binary_control_file.get()) { auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); - deps.insert(deps.end(), p->core_paragraph.depends.begin(), p->core_paragraph.depends.end()); - return to_package_specs(deps); + deps.insert(deps.end(), p->core_paragraph.depends.cbegin(), p->core_paragraph.depends.cend()); + return PackageSpec::to_package_specs(deps, triplet); } - if (auto p = this->source_paragraph.get()) + if (const auto p = this->source_paragraph.get()) { - return to_package_specs(filter_dependencies(p->depends, triplet)); + return PackageSpec::to_package_specs(filter_dependencies(p->depends, triplet), triplet); } Checks::exit_with_message(VCPKG_LINE_INFO, @@ -163,7 +157,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const std::unordered_set& features, const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) + : spec(spec), plan_type(InstallPlanType::UNKNOWN), request_type(request_type), feature_list(features) { } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index bd924fcba..76e943e8c 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -342,6 +342,12 @@ namespace vcpkg::Install } } + if (plan_type == InstallPlanType::EXCLUDED) + { + System::println(System::Color::warning, "Package %s is excluded", display_name); + return BuildResult::EXCLUDED; + } + Checks::unreachable(VCPKG_LINE_INFO); } @@ -352,6 +358,7 @@ namespace vcpkg::Install std::vector only_install_plans; std::vector new_plans; std::vector already_installed_plans; + std::vector excluded; const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { if (auto iplan = package.install_plan.get()) @@ -382,6 +389,7 @@ namespace vcpkg::Install already_installed_plans.emplace_back(install_action); break; case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; default: Checks::unreachable(VCPKG_LINE_INFO); } } @@ -397,6 +405,15 @@ namespace vcpkg::Install std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(excluded.begin(), excluded.end(), &InstallPlanAction::compare_by_name); + + if (excluded.size() > 0) + { + const std::string excluded_string = Strings::join("\n", excluded, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages are excluded:\n%s", excluded_string); + } if (already_installed_plans.size() > 0) { @@ -538,7 +555,7 @@ namespace vcpkg::Install }; static const std::array INSTALL_SETTINGS; - static std::vector valid_arguments(const VcpkgPaths& paths) + std::vector get_all_port_names(const VcpkgPaths& paths) { auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); @@ -552,7 +569,7 @@ namespace vcpkg::Install SIZE_MAX, INSTALL_SWITCHES, INSTALL_SETTINGS, - &valid_arguments, + &get_all_port_names, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index 6e40d70f5..eeb9981af 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -92,6 +92,14 @@ namespace vcpkg return p; } + std::vector PackageSpec::to_package_specs(const std::vector& ports, + const Triplet& triplet) + { + return Util::fmap(ports, [&](const std::string s) { + return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); + }); + } + const std::string& PackageSpec::name() const { return this->m_name; } const Triplet& PackageSpec::triplet() const { return this->m_triplet; } -- cgit v1.2.3 From 79ebd26605e0f621f848206000a5b1c7239d5f37 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Oct 2017 19:14:32 -0700 Subject: Remove VcpkgCmdArguments.check_and_get_optional_command_arguments() overload Also, use Util::Sets::contains() where possible. --- toolsrc/include/vcpkg/build.h | 2 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 5 ----- toolsrc/src/vcpkg/build.cpp | 7 +++---- toolsrc/src/vcpkg/commands.buildexternal.cpp | 2 +- toolsrc/src/vcpkg/commands.cache.cpp | 2 +- toolsrc/src/vcpkg/commands.contact.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 2 +- toolsrc/src/vcpkg/commands.dependinfo.cpp | 2 +- toolsrc/src/vcpkg/commands.edit.cpp | 5 ++--- toolsrc/src/vcpkg/commands.env.cpp | 2 +- toolsrc/src/vcpkg/commands.hash.cpp | 2 +- toolsrc/src/vcpkg/commands.import.cpp | 2 +- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.list.cpp | 7 +++---- toolsrc/src/vcpkg/commands.owns.cpp | 4 ++-- toolsrc/src/vcpkg/commands.portsdiff.cpp | 2 +- toolsrc/src/vcpkg/commands.search.cpp | 19 +++++++++---------- toolsrc/src/vcpkg/commands.version.cpp | 2 +- toolsrc/src/vcpkg/help.cpp | 2 +- toolsrc/src/vcpkg/install.cpp | 16 ++++++++-------- toolsrc/src/vcpkg/remove.cpp | 14 +++++++------- toolsrc/src/vcpkg/update.cpp | 2 +- 22 files changed, 48 insertions(+), 57 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index bf52e54b2..94d9fddf5 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -20,7 +20,7 @@ namespace vcpkg::Build { void perform_and_exit(const FullPackageSpec& full_spec, const fs::path& port_dir, - const std::unordered_set& options, + const ParsedArguments& options, const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index d9895f4b8..e59979ad1 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -34,11 +34,6 @@ namespace vcpkg std::string command; std::vector command_arguments; - std::unordered_set check_and_get_optional_command_arguments( - const std::vector& valid_options) const - { - return std::move(check_and_get_optional_command_arguments(valid_options, {}).switches); - } ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, const std::vector& valid_settings) const; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c26dcc591..30a6a791c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -30,11 +30,11 @@ namespace vcpkg::Build::Command void perform_and_exit(const FullPackageSpec& full_spec, const fs::path& port_dir, - const std::unordered_set& options, + const ParsedArguments& options, const VcpkgPaths& paths) { const PackageSpec& spec = full_spec.package_spec; - if (options.find(OPTION_CHECKS_ONLY) != options.end()) + if (Util::Sets::contains(options.switches, OPTION_CHECKS_ONLY)) { const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet()); const auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); @@ -107,8 +107,7 @@ namespace vcpkg::Build::Command const std::string command_argument = args.command_arguments.at(0); const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}, {}); perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 3991beb62..2cc7aabde 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Commands::BuildExternal const FullPackageSpec spec = Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); - const std::unordered_set options = args.check_and_get_optional_command_arguments({}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {}); const fs::path port_dir = args.command_arguments.at(1); Build::Command::perform_and_exit(spec, port_dir, options, paths); diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 77f0a20f6..64a3169b1 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -32,7 +32,7 @@ namespace vcpkg::Commands::Cache "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", Help::create_example_string("cache png")); args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 421b8a230..5694c1fa6 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Contact void perform_and_exit(const VcpkgCmdArguments& args) { args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); System::println("Send an email to %s with any feedback.", email()); Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 85763f25e..f1acacd14 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Create R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); args.check_max_arg_count(3, EXAMPLE); args.check_min_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index 89c7e0c7f..e5554f7e2 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands::DependInfo { static const std::string EXAMPLE = Help::create_example_string(R"###(depend-info [pat])###"); args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); std::vector> source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 668ec9b1a..bf618e256 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -65,8 +65,7 @@ namespace vcpkg::Commands::Edit static const std::string EXAMPLE = Help::create_example_string("edit zlib"); args.check_exact_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}, {}); const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; @@ -95,7 +94,7 @@ namespace vcpkg::Commands::Edit } const fs::path env_editor = *it; - if (options.find(OPTION_BUILDTREES) != options.cend()) + if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) { const auto buildtrees_current_dir = paths.buildtrees / port_name; diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index 9f8ae5207..c0d26dac2 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -11,7 +11,7 @@ namespace vcpkg::Commands::Env { static const std::string EXAMPLE = Help::create_example_string(R"(env --triplet x64-windows)"); args.check_exact_arg_count(0, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 4bc58b509..51f6b9ad0 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Hash Help::create_example_string("hash boost_1_62_0.tar.bz2")); args.check_min_arg_count(1, EXAMPLE); args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); if (args.command_arguments.size() == 1) { diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp index 119aee022..5e74b6d94 100644 --- a/toolsrc/src/vcpkg/commands.import.cpp +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -97,7 +97,7 @@ namespace vcpkg::Commands::Import static const std::string EXAMPLE = Help::create_example_string( R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); args.check_exact_arg_count(3, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 27e563cfa..604bd2c6e 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -359,7 +359,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console "%s", INTEGRATE_COMMAND_HELPSTRING); args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); #if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index d0e8e00b4..145d4c931 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -30,8 +30,7 @@ namespace vcpkg::Commands::List "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", Help::create_example_string("list png")); args.check_max_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}, {}); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages = get_installed_ports(status_paragraphs); @@ -52,7 +51,7 @@ namespace vcpkg::Commands::List { for (const StatusParagraph* status_paragraph : installed_packages) { - do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(*status_paragraph, Util::Sets::contains(options.switches, OPTION_FULLDESC)); } } else @@ -66,7 +65,7 @@ namespace vcpkg::Commands::List continue; } - do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(*status_paragraph, Util::Sets::contains(options.switches, OPTION_FULLDESC)); } } diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index 69079e829..b2db966e1 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -29,9 +29,9 @@ namespace vcpkg::Commands::Owns static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", Help::create_example_string("owns zlib.dll")); args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); - StatusParagraphs status_db = database_load_check(paths); + const StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index a8c043751..5008f3e8a 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -120,7 +120,7 @@ namespace vcpkg::Commands::PortsDiff Help::create_example_string("portsdiff mybranchname")); args.check_min_arg_count(1, EXAMPLE); args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const fs::path& git_exe = paths.get_git_exe(); diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index 3ba8707de..ad3046e6d 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -85,12 +85,13 @@ namespace vcpkg::Commands::Search "The argument should be a substring to search for, or no argument to display all libraries.\n%s", Help::create_example_string("search png")); args.check_max_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); + const ParsedArguments options = + args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}, {}); + const bool full_description = Util::Sets::contains(options.switches, OPTION_FULLDESC); auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - if (options.find(OPTION_GRAPH) != options.cend()) + if (Util::Sets::contains(options.switches, OPTION_GRAPH)) { const std::string graph_as_string = create_graph_as_string(source_paragraphs); System::println(graph_as_string); @@ -101,12 +102,10 @@ namespace vcpkg::Commands::Search { for (const auto& source_control_file : source_paragraphs) { - do_print(*source_control_file->core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(*source_control_file->core_paragraph, full_description); for (auto&& feature_paragraph : source_control_file->feature_paragraphs) { - do_print(source_control_file->core_paragraph->name, - *feature_paragraph, - options.find(OPTION_FULLDESC) != options.cend()); + do_print(source_control_file->core_paragraph->name, *feature_paragraph, full_description); } } } @@ -120,10 +119,10 @@ namespace vcpkg::Commands::Search { auto&& sp = *source_control_file->core_paragraph; - bool contains_name = icontains(sp.name, args_zero); + const bool contains_name = icontains(sp.name, args_zero); if (contains_name || icontains(sp.description, args_zero)) { - do_print(sp, options.find(OPTION_FULLDESC) != options.cend()); + do_print(sp, full_description); } for (auto&& feature_paragraph : source_control_file->feature_paragraphs) @@ -131,7 +130,7 @@ namespace vcpkg::Commands::Search if (contains_name || icontains(feature_paragraph->name, args_zero) || icontains(feature_paragraph->description, args_zero)) { - do_print(sp.name, *feature_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(sp.name, *feature_paragraph, full_description); } } } diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index 403c355b5..e8756a77d 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -65,7 +65,7 @@ namespace vcpkg::Commands::Version void perform_and_exit(const VcpkgCmdArguments& args) { args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); System::println("Vcpkg package management program version %s\n" "\n" diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 2a0578211..8783833f2 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -94,7 +94,7 @@ namespace vcpkg::Help void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.check_max_arg_count(1); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); if (args.command_arguments.empty()) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 76e943e8c..7bab740be 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -351,7 +351,7 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - static void print_plan(const std::vector& action_plan, bool is_recursive) + static void print_plan(const std::vector& action_plan, const bool is_recursive) { std::vector remove_plans; std::vector rebuilt_plans; @@ -592,13 +592,13 @@ namespace vcpkg::Install } } - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}); - const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); - const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); - const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); - const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); - const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); + const ParsedArguments options = args.check_and_get_optional_command_arguments( + {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}, {}); + const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); + const bool use_head_version = Util::Sets::contains(options.switches, (OPTION_USE_HEAD_VERSION)); + const bool no_downloads = Util::Sets::contains(options.switches, (OPTION_NO_DOWNLOADS)); + const bool is_recursive = Util::Sets::contains(options.switches, (OPTION_RECURSE)); + const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); // create the plan StatusParagraphs status_db = database_load_check(paths); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 6f555b9b8..156f23003 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -198,12 +198,12 @@ namespace vcpkg::Remove void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost"); - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); + const ParsedArguments options = args.check_and_get_optional_command_arguments( + {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}, {}); StatusParagraphs status_db = database_load_check(paths); std::vector specs; - if (options.find(OPTION_OUTDATED) != options.cend()) + if (Util::Sets::contains(options.switches, OPTION_OUTDATED)) { args.check_exact_arg_count(0, EXAMPLE); specs = Util::fmap(Update::find_outdated_packages(paths, status_db), @@ -226,8 +226,8 @@ namespace vcpkg::Remove Input::check_triplet(spec.triplet(), paths); } - const bool no_purge_was_passed = options.find(OPTION_NO_PURGE) != options.end(); - const bool purge_was_passed = options.find(OPTION_PURGE) != options.end(); + const bool no_purge_was_passed = Util::Sets::contains(options.switches, OPTION_NO_PURGE); + const bool purge_was_passed = Util::Sets::contains(options.switches, OPTION_PURGE); if (purge_was_passed && no_purge_was_passed) { System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); @@ -235,8 +235,8 @@ namespace vcpkg::Remove Checks::exit_fail(VCPKG_LINE_INFO); } const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); - const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); - const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); + const bool is_recursive = Util::Sets::contains(options.switches, OPTION_RECURSE); + const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); const std::vector remove_plan = Dependencies::create_remove_plan(specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty"); diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 168949bc1..7d565251e 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -41,7 +41,7 @@ namespace vcpkg::Update void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); const StatusParagraphs status_db = database_load_check(paths); -- cgit v1.2.3 From 29f62852bda546248a2f3c8cb0f8cbbc7d6acc9f Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 27 Oct 2017 00:08:00 -0500 Subject: New port: MIT gettimeofday implementation (#2063) * [gettimeofday] create CONTROL * [gettimeofday] add source file * [gettimeofday] add header * [gettimeofday] create portfile * [gettimeofday] add cmakelists.txt * [gettimeofday/portfile] require static * [gettimeofday/portfile] set source path * [gettimeofday] create license * [gettimeofday] remove duplicate headers --- ports/gettimeofday/CMakeLists.txt | 14 ++++++++ ports/gettimeofday/CONTROL | 3 ++ ports/gettimeofday/LICENSE | 33 ++++++++++++++++++ ports/gettimeofday/gettimeofday.c | 67 +++++++++++++++++++++++++++++++++++++ ports/gettimeofday/gettimeofday.def | 2 ++ ports/gettimeofday/gettimeofday.h | 16 +++++++++ ports/gettimeofday/portfile.cmake | 11 ++++++ 7 files changed, 146 insertions(+) create mode 100644 ports/gettimeofday/CMakeLists.txt create mode 100644 ports/gettimeofday/CONTROL create mode 100644 ports/gettimeofday/LICENSE create mode 100644 ports/gettimeofday/gettimeofday.c create mode 100644 ports/gettimeofday/gettimeofday.def create mode 100644 ports/gettimeofday/gettimeofday.h create mode 100644 ports/gettimeofday/portfile.cmake diff --git a/ports/gettimeofday/CMakeLists.txt b/ports/gettimeofday/CMakeLists.txt new file mode 100644 index 000000000..4ec5b43a0 --- /dev/null +++ b/ports/gettimeofday/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.8) +project(gettimeofday C) + +add_library(gettimeofday gettimeofday.c gettimeofday.def) + +install(TARGETS gettimeofday + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + install(FILES gettimeofday.h DESTINATION include) +endif() diff --git a/ports/gettimeofday/CONTROL b/ports/gettimeofday/CONTROL new file mode 100644 index 000000000..2ec81c8a0 --- /dev/null +++ b/ports/gettimeofday/CONTROL @@ -0,0 +1,3 @@ +Source: gettimeofday +Version: 2017-10-14-1 +Description: An implementation of gettimeofday for WIN32 diff --git a/ports/gettimeofday/LICENSE b/ports/gettimeofday/LICENSE new file mode 100644 index 000000000..57c986d30 --- /dev/null +++ b/ports/gettimeofday/LICENSE @@ -0,0 +1,33 @@ +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ diff --git a/ports/gettimeofday/gettimeofday.c b/ports/gettimeofday/gettimeofday.c new file mode 100644 index 000000000..62abf344a --- /dev/null +++ b/ports/gettimeofday/gettimeofday.c @@ -0,0 +1,67 @@ +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifdef _MSC_VER + +#include + + +/* FILETIME of Jan 1 1970 00:00:00. */ +static const unsigned __int64 epoch = 116444736000000000Ui64; + +/* + * timezone information is stored outside the kernel so tzp isn't used anymore. + * + * Note: this function is not for Win32 high precision timing purpose. See + * elapsed_time(). + */ +int +gettimeofday(struct timeval * tp, struct timezone * tzp) +{ + FILETIME file_time; + SYSTEMTIME system_time; + ULARGE_INTEGER ularge; + + GetSystemTime(&system_time); + SystemTimeToFileTime(&system_time, &file_time); + ularge.LowPart = file_time.dwLowDateTime; + ularge.HighPart = file_time.dwHighDateTime; + + tp->tv_sec = (long) ((ularge.QuadPart - epoch) / 10000000L); + tp->tv_usec = (long) (system_time.wMilliseconds * 1000); + + return 0; +} + +#endif /* _MSC_VER */ diff --git a/ports/gettimeofday/gettimeofday.def b/ports/gettimeofday/gettimeofday.def new file mode 100644 index 000000000..7a46b866b --- /dev/null +++ b/ports/gettimeofday/gettimeofday.def @@ -0,0 +1,2 @@ +EXPORTS + gettimeofday diff --git a/ports/gettimeofday/gettimeofday.h b/ports/gettimeofday/gettimeofday.h new file mode 100644 index 000000000..94c58ea73 --- /dev/null +++ b/ports/gettimeofday/gettimeofday.h @@ -0,0 +1,16 @@ +#ifndef _MY_GETTIMEOFDAY_H_ +#define _MY_GETTIMEOFDAY_H_ + +#ifdef _MSC_VER + +#include +int gettimeofday(struct timeval * tp, struct timezone * tzp); + +struct timespec { + time_t tv_sec; + time_t tv_nsec; +}; + +#endif /* _MSC_VER */ + +#endif /* _MY_GETTIMEOFDAY_H_ */ diff --git a/ports/gettimeofday/portfile.cmake b/ports/gettimeofday/portfile.cmake new file mode 100644 index 000000000..51c88c989 --- /dev/null +++ b/ports/gettimeofday/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettimeofday RENAME copyright) -- cgit v1.2.3 From 4b66571c9d12cf718e3175203a867d5014208fdb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 22:34:54 -0700 Subject: [blaze] Add dependencies and install *-config.cmake files. --- ports/blaze/CONTROL | 3 ++- ports/blaze/no-absolute-paths-in-install.patch | 33 ++++++++++++++++++++++++++ ports/blaze/portfile.cmake | 22 +++++++++++++---- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 14 +++++++---- 4 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 ports/blaze/no-absolute-paths-in-install.patch diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index ca7923ffc..5161b924f 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,3 +1,4 @@ Source: blaze -Version: 3.2 +Version: 3.2-1 +Build-Depends: boost, clapack Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/no-absolute-paths-in-install.patch b/ports/blaze/no-absolute-paths-in-install.patch new file mode 100644 index 000000000..a601a37e7 --- /dev/null +++ b/ports/blaze/no-absolute-paths-in-install.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d102ab..5d918b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ cmake_minimum_required(VERSION 3.5) + add_library(blaze INTERFACE) + target_include_directories(blaze INTERFACE + $ +- $ ++ $ + ) + + target_compile_options(blaze INTERFACE +@@ -48,8 +48,8 @@ target_compile_options(blaze INTERFACE + #================================================================================================== + + find_package(LAPACK REQUIRED) +-target_link_libraries(blaze INTERFACE ${LAPACK_LIBRARIES}) +-target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) ++target_link_libraries(blaze INTERFACE $) ++target_compile_options(blaze INTERFACE $) + + + #================================================================================================== +@@ -57,7 +57,7 @@ target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) + #================================================================================================== + + find_package(Boost 1.54.0 REQUIRED) +-target_include_directories(blaze INTERFACE ${Boost_INCLUDE_DIRS}) ++target_include_directories(blaze INTERFACE $) + + + #================================================================================================== diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index a8fc5ab1e..7bbb58afc 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -1,4 +1,3 @@ -#header-only library include(vcpkg_common_functions) vcpkg_from_bitbucket( @@ -9,10 +8,23 @@ vcpkg_from_bitbucket( HEAD_REF master ) -# Copy the blaze header files -file(COPY "${SOURCE_PATH}/blaze" - DESTINATION "${CURRENT_PACKAGES_DIR}/include" - FILES_MATCHING PATTERN "*.h") +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-absolute-paths-in-install.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBLAZE_SMP_THREADS=C++11 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/blaze/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/blaze) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 40ed0225f..069672b71 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -23,7 +23,7 @@ function(vcpkg_fixup_cmake_targets) set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT}) - if(_vfct_CONFIG_PATH) + if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) @@ -31,10 +31,14 @@ function(vcpkg_fixup_cmake_targets) message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") endif() - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share) - file(RENAME ${DEBUG_CONFIG} ${DEBUG_SHARE}) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) - file(RENAME ${RELEASE_CONFIG} ${RELEASE_SHARE}) + file(MAKE_DIRECTORY ${DEBUG_SHARE}) + file(GLOB FILES ${DEBUG_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + + file(GLOB FILES ${RELEASE_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${RELEASE_SHARE}) + file(REMOVE_RECURSE ${RELEASE_CONFIG}) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) -- cgit v1.2.3 From e859751cd940c47874ddd2c75281c85b190c8368 Mon Sep 17 00:00:00 2001 From: ebraminio Date: Fri, 27 Oct 2017 01:33:15 +0330 Subject: [harfbuzz] 1.6.3 --- ports/harfbuzz/0001-fix-uwp-build.patch | 6 +++--- ports/harfbuzz/portfile.cmake | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0001-fix-uwp-build.patch index 532ce668e..8605d5a93 100644 --- a/ports/harfbuzz/0001-fix-uwp-build.patch +++ b/ports/harfbuzz/0001-fix-uwp-build.patch @@ -1,7 +1,7 @@ -diff --git "a/harfbuzz-1.4.6/src/hb-ft.cc" "b/harfbuzz-1.4.6/src/hb-ft.cc" +diff --git "a/harfbuzz-1.6.3/src/hb-ft.cc" "b/harfbuzz-1.6.3/src/hb-ft.cc" index 48d6a0ef..f4ce6608 100644 ---- "a/harfbuzz-1.4.6/src/hb-ft.cc" -+++ "b/harfbuzz-1.4.6/src/hb-ft.cc" +--- "a/harfbuzz-1.6.3/src/hb-ft.cc" ++++ "b/harfbuzz-1.6.3/src/hb-ft.cc" @@ -31,6 +31,10 @@ #include "hb-ft.h" diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 798743d45..3b951dcdf 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.4.6) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.6.3) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/behdad/harfbuzz/releases/download/1.4.6/harfbuzz-1.4.6.tar.bz2" - FILENAME "harfbuzz-1.4.6.tar.bz2" - SHA512 aade3902adadf3a8339ba1d05279e639da7cb53981adc64e2a2d32a5d49335a6a9782a62cdf80beca569ec8a639792bf0368c0b6ecad08f35bc85878678aa096 + URLS "https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2" + FILENAME "harfbuzz-1.6.3.tar.bz2" + SHA512 37d1a161d9074e9898d9ef6cca6dffffc725005828d700744553b0145373b69bcd3b08f507d49f4c2e05850d9275a54f15983356c547c86e5e3c202cc7cbfbe8 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From eb6860b193876e00dae02e4115f94e50d48a2a9d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 13:26:23 -0700 Subject: [harfbuzz] Bump version --- ports/harfbuzz/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index a99477b37..961d59291 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.4.6-2 +Version: 1.6.3 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) -- cgit v1.2.3 From 80953867e88f88ca65e0e6d4ddc69009ee11a038 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 14:00:17 -0700 Subject: [harfbuzz] Fix patch and apply it relative to SOURCE_PATH The latter is done so it doesn't have to be modified if only the version is changed --- ports/harfbuzz/0001-fix-uwp-build.patch | 10 +++++----- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0001-fix-uwp-build.patch index 8605d5a93..24b5bf894 100644 --- a/ports/harfbuzz/0001-fix-uwp-build.patch +++ b/ports/harfbuzz/0001-fix-uwp-build.patch @@ -1,7 +1,7 @@ -diff --git "a/harfbuzz-1.6.3/src/hb-ft.cc" "b/harfbuzz-1.6.3/src/hb-ft.cc" -index 48d6a0ef..f4ce6608 100644 ---- "a/harfbuzz-1.6.3/src/hb-ft.cc" -+++ "b/harfbuzz-1.6.3/src/hb-ft.cc" +diff --git a/src/hb-ft.cc b/src/hb-ft.cc +index f578e9d..f224c07 100644 +--- a/src/hb-ft.cc ++++ b/src/hb-ft.cc @@ -31,6 +31,10 @@ #include "hb-ft.h" @@ -12,4 +12,4 @@ index 48d6a0ef..f4ce6608 100644 + #include "hb-font-private.hh" - #include "hb-cache-private.hh" // Maybe use in the future? + #include FT_ADVANCES_H diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 961d59291..9dad59be5 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.6.3 +Version: 1.6.3-1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 3b951dcdf..f9fa05555 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ + SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" ) -- cgit v1.2.3 From 83c29df043ce91d37a0c463ed854e78caba53984 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 14:45:08 -0700 Subject: [fetchDependency] Fix compat with Powershell 2 --- scripts/fetchDependency.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index df03878eb..90de17717 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -8,6 +8,11 @@ function Test-Command($commandName) return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) } +function Test-CommandParameter($commandName, $parameterName) +{ + return (Get-Command $commandName).Parameters.Keys -contains $parameterName +} + function Test-Module($moduleName) { return [bool](Get-Module -ListAvailable -Name $moduleName) @@ -51,7 +56,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $ProxyAuth = !$WC.Proxy.IsBypassed($url) if ($ProxyAuth) { - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + "Enter credentials for Proxy Authentication" + $ProxyCred = Get-Credential + } + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) $WC.Proxy.Credentials=$ProxyCred -- cgit v1.2.3 From adea63389aeff0d466b77edf7d588b1342d49508 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 15:27:21 -0700 Subject: [live555] Update to 2017.09.12. Resolves #2066 --- ports/live555/CONTROL | 2 +- ports/live555/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index d2ff15211..a2354fad1 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2017.06.04-1 +Version: 2017.09.12 Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index 7e2fcf14b..e8b41371a 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live.2017.06.04.tar.gz" - FILENAME "live.2017.06.04.tar.gz" - SHA512 89eb3854c2ef7d0a1f443b4ca46c66040dfcc586ffd1e3e08c1b9e831eae6ade1c16e628c0ed0e7804c4e7430993f662e3fe8df2f09903024153d188276c3088 + URLS "http://www.live555.com/liveMedia/public/live.2017.09.12.tar.gz" + FILENAME "live.2017.09.12.tar.gz" + SHA512 09b18b5f5dce28519b6c7cd8d52eb3448711939df051f84c8d6dce0b88d05c982711059f2ce13efccd326b2dbfeb93b88c4e03fe4a88bbd8fcefcb25e51d107d ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From b7a91127b55076437934816837e53c8ff41f836a Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 27 Oct 2017 17:51:38 -0700 Subject: [alembic] update to 1.7.4 --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index b9d6ed50d..b2246c9c0 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.1-4 +Version: 1.7.4 Build-Depends: ilmbase, hdf5 Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 0d7b67dda..3c1242010 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.1 - SHA512 89e30b681a76eaf79b20ebeff62c495971b0eb64b28f249a14bbcf3bdb40df7eda93b0ede299dd5511bd4587a2cc2d4ebd851fb89bf999fdccc31fee3cffbba2 + REF 1.7.4 + SHA512 8e752d6d85bea3b6a53582d35a589fc40824456098d950974effe0a6a0e359fec1e056af1ea1379f7e23b7ffed2c05c7f5269fa4b64757631b7d57fb60ee98b0 HEAD_REF master ) -- cgit v1.2.3 From 2149fbdf596eb9aa427c4d72cf0e4185e8d64d47 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 27 Oct 2017 17:41:59 -0700 Subject: [opencv] update to 3.3.1 --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index c2814c9c2..5c931b765 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.0-4 +Version: 3.3.1 # Optional: Add in vtk to build with VTK and cuda to build with CUDA Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index d21956108..2b612d0e8 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv - REF 3.3.0 - SHA512 13dee5c1c5fec1dccdbb05879d299b93ef8ddeb87f561a6c4178e33a4cf5ae919765119068d0387a3efea0e09a625ca993cffac60a772159690fcbee4e8d70fb + REF 3.3.1 + SHA512 ee228953b621be022c203e3d60b06be524bd134ba6188c447216ee89e14dfddeac7d6aaf85c5a0b0008b010254e2aa711813bfdb691a77b0bdba33682c6ca68c HEAD_REF master ) @@ -19,8 +19,8 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libp vcpkg_from_github( OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib - REF 3.3.0 - SHA512 ebe3dbe6c754c6fbaabbf6b0d2a4209964e625fd68e593f30ce043792740c8c1d4440d7870949b5b33f488fd7e2e05f3752287b7f50dd24c29202e268776520e + REF 3.3.1 + SHA512 b5f35f68faab811a440b6af6b33c766dcdf4cc8547c0a4ed3a6a3da80ca8ae77618039d94bee6d249e96899765bdbb34c997bd7ee53d864c43427eff92f7ea34 HEAD_REF master ) -- cgit v1.2.3 From 7ed6466a9dce1d00769214ac8e9548977e835963 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 27 Oct 2017 15:22:44 -0500 Subject: [gettimeofday] use timespec from msvc --- ports/gettimeofday/gettimeofday.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ports/gettimeofday/gettimeofday.h b/ports/gettimeofday/gettimeofday.h index 94c58ea73..227317524 100644 --- a/ports/gettimeofday/gettimeofday.h +++ b/ports/gettimeofday/gettimeofday.h @@ -4,12 +4,9 @@ #ifdef _MSC_VER #include -int gettimeofday(struct timeval * tp, struct timezone * tzp); +#include -struct timespec { - time_t tv_sec; - time_t tv_nsec; -}; +int gettimeofday(struct timeval * tp, struct timezone * tzp); #endif /* _MSC_VER */ -- cgit v1.2.3 From 39830efc4f1b9c9c41f6ad9c8cfbac5f408303be Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 18:24:26 -0700 Subject: [gettimeofday] Bump version --- ports/gettimeofday/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gettimeofday/CONTROL b/ports/gettimeofday/CONTROL index 2ec81c8a0..3ae7e0682 100644 --- a/ports/gettimeofday/CONTROL +++ b/ports/gettimeofday/CONTROL @@ -1,3 +1,3 @@ Source: gettimeofday -Version: 2017-10-14-1 +Version: 2017-10-14-2 Description: An implementation of gettimeofday for WIN32 -- cgit v1.2.3 From 0796a9df0e4d171ef2c7ab4d0c16ef4dc496ee5c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 18:53:36 -0700 Subject: [git] Update to 2.14.3 (was 2.14.2.3) --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b874afd8c..4488d9b95 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -13,7 +13,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.3-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 90de17717..89e37c428 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -172,16 +172,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.2" - $downloadVersion = "2.14.2" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.3/MinGit-2.14.2.3-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.14.2.3-32-bit.zip" - $expectedDownloadedFileHash = "7cc1f27e1cfe79381e1a504a5fc7bc33951ac9031cd14c3bf478769d21a26cce" + $requiredVersion = "2.14.3" + $downloadVersion = "2.14.3" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/MinGit-2.14.3-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.14.3-32-bit.zip" + $expectedDownloadedFileHash = "a91385acb1da220612790807c41d0f304b41093c474b9d7342230ec194a3398e" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.2.3-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.3-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.2.3-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.3-32-bit" } elseif($Dependency -eq "installerbase") { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 363319767..c6a92f813 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -150,10 +150,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {2, 14, 2}; + static constexpr std::array EXPECTED_VERSION = {2, 14, 3}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.2.3-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.3-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; -- cgit v1.2.3 From a7f3ab84f024fbf3a1f0c66fd1c5915bdcb5cd2e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 19:20:33 -0700 Subject: Update CHANGELOG and bump version to v0.0.94 --- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++++-- toolsrc/VERSION.txt | 2 +- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d612fb4f3..25c0688b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +vcpkg (0.0.94) +-------------- + * Add ports: + - capstone 3.0.5-rc3 + - cgal 4.11 + - gettimeofday 2017-10-14-2 + - gmime 3.0.2 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 + - rpclib 2.2.0 + * Update ports: + - alembic 1.7.1-4 -> 1.7.4 + - blaze 3.2 -> 3.2-1 + - boost 1.65.1-1 -> 1.65.1-2 + - ceres 1.13.0-1 -> 1.13.0-2 + - cpprestsdk 2.9.0-4 -> 2.10.0 + - cppwinrt spring_2017_creators_update_for_vs_15.3 -> fall_2017_creators_update_for_vs_15.3-2 + - cppzmq 4.2.1 -> 4.2.2 + - eigen3 3.3.4-1 -> 3.3.4-2 + - gdcm2 2.6.8-1 -> 2.8.3 + - harfbuzz 1.4.6-2 -> 1.6.3-1 + - libjpeg-turbo 1.5.2-1 -> 1.5.2-2 + - libmariadb 2.3.2-1 -> 3.0.2 + - libmysql 5.7.17-2 -> 5.7.17-3 + - live555 2017.06.04-1 -> 2017.09.12 + - mpir 3.0.0-2 -> 3.0.0-3 + - opencv 3.3.0-4 -> 3.3.1 + - pangolin 0.5-2 -> 0.5-3 + - pugixml 1.8.1-1 -> 1.8.1-2 + - secp256k1 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 -> 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-1 + - smpeg2 2.0.0-2 -> 2.0.0-3 + - sqlite3 3.20.1 -> 3.21.0 + * Bump required version & auto-downloaded version of `git` to 2.4.3 + +-- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 + + vcpkg (0.0.93) -------------- * Add ports: @@ -23,9 +59,9 @@ vcpkg (0.0.93) * Fix issue where `vcpkg` was getting output from powershell scripts. Powershell adds newlines when the console width is reached; the extra newlines was causing `vcpkg`'s parsing to fail. * Improve autocomplete/tab-completion for powershell (still experimental) - -- vcpkg team THU, 19 Oct 2017 21:30:00 -0800 + vcpkg (0.0.92) -------------- * Add ports: @@ -66,7 +102,6 @@ vcpkg (0.0.92) * Bump required version & auto-downloaded version of `git` to 2.4.2(.3) * Bump ninja to version 1.8.0 - -- vcpkg team TUE, 17 Oct 2017 16:00:00 -0800 diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index f439c6467..ac2866fef 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.93" \ No newline at end of file +"0.0.94" \ No newline at end of file -- cgit v1.2.3 From da04e942f2878b360f146a2751480c3133e3b817 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 27 Oct 2017 23:55:48 -0700 Subject: [boost] Only define BOOST_ALL_NO_LIB if not already defined. Fixes #2061. --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 55c32a280..c07369e2e 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,5 +1,5 @@ Source: boost -Version: 1.65.1-2 +Version: 1.65.1-3 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 57dc081da..a14172452 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -258,7 +258,7 @@ file( # Disable Boost auto-link. file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp - "\n#define BOOST_ALL_NO_LIB\n" + "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n" ) file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n" -- cgit v1.2.3 From 5cdc61bf75a82015a67e8f2ed74578652263a4e8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 01:59:43 -0700 Subject: [libharu] Stamp output headers with shared/static build information. --- ports/libharu/CONTROL | 4 +-- ports/libharu/portfile.cmake | 68 +++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 4ca6f8c26..5919acef0 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-2 +Version: 2017-08-15-d84867ebf9f-3 Description: libharu - free PDF library -Build-Depends: zlib,libpng +Build-Depends: zlib, libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index a1ae49816..7896d7659 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -7,52 +7,50 @@ vcpkg_from_github( HEAD_REF master ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBHPDF_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "shared" LIBHPDF_SHARED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBHPDF_STATIC=${LIBHPDF_STATIC} + -DLIBHPDF_SHARED=${LIBHPDF_SHARED} ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/README + ${CURRENT_PACKAGES_DIR}/debug/CHANGES + ${CURRENT_PACKAGES_DIR}/debug/INSTALL + ${CURRENT_PACKAGES_DIR}/README + ${CURRENT_PACKAGES_DIR}/CHANGES + ${CURRENT_PACKAGES_DIR}/INSTALL ) -file(GLOB HEADERS "${SOURCE_PATH}/include/*.h" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include/*.h") -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") +else() + string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}") -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") +else() + string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) -endif() - vcpkg_copy_pdbs() -- cgit v1.2.3 From 555d030445c1e5cde349daeec3d86f4238a43a02 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 03:07:18 -0700 Subject: [opencv] Fix UWP build. --- ports/opencv/CONTROL | 2 +- ports/opencv/no-double-expand-enable-pylint.patch | 13 +++++++++++++ ports/opencv/portfile.cmake | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ports/opencv/no-double-expand-enable-pylint.patch diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 5c931b765..5d9f184b1 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1 +Version: 3.3.1-1 # Optional: Add in vtk to build with VTK and cuda to build with CUDA Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg Description: computer vision library diff --git a/ports/opencv/no-double-expand-enable-pylint.patch b/ports/opencv/no-double-expand-enable-pylint.patch new file mode 100644 index 000000000..9eb5563d8 --- /dev/null +++ b/ports/opencv/no-double-expand-enable-pylint.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c46fc17..07507b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -314,7 +314,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) + OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) + OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) + +-OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) ) ++OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) ) + + if(ENABLE_IMPL_COLLECTION) + add_definitions(-DCV_COLLECT_IMPL_DATA) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 2b612d0e8..be542e912 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/opencv-installation-options.patch" "${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch" + "${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch" ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) @@ -40,12 +41,14 @@ vcpkg_configure_cmake( -DBUILD_TIFF=OFF -DBUILD_JPEG=OFF -DBUILD_PNG=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_opencv_flann=ON -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF + -DENABLE_PYLINT=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -- cgit v1.2.3 From 32727f26bace1ee693e40f813f7a20b55ca129c4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 03:54:49 -0700 Subject: [boost] --ignore-site-config, thanks @vinniefalco and @swatanabe! --- ports/boost/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index a14172452..c15f7c312 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -80,6 +80,7 @@ set(B2_OPTIONS -sICU_PATH="${CURRENT_INSTALLED_DIR}" -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration + --ignore-site-config --hash -q -- cgit v1.2.3 From 7c3f469568c884562d74753d7640da3e723c6c43 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 08:50:58 -0700 Subject: [signalrclient] Update to handle cpprestsdk 2.10 --- ports/signalrclient/CONTROL | 2 +- ports/signalrclient/portfile.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index babcce692..ae3ae47c1 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1-1 +Version: 1.0.0-beta1-2 Build-Depends: cpprestsdk Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index ad7f4fd58..bf2669569 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -11,17 +11,17 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_9.lib - OPTIONS_RELEASE - -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_9.lib + OPTIONS_DEBUG + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_10.lib + OPTIONS_RELEASE + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_10.lib OPTIONS - -DCPPREST_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DCPPREST_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include -DDISABLE_TESTS=ON ) -- cgit v1.2.3 From eba3e2d4058afed4e2b90219209137876b1aa007 Mon Sep 17 00:00:00 2001 From: Amin Cheloh Date: Sun, 29 Oct 2017 12:25:50 +0700 Subject: [opencv] remove ffmpeg depenency OpenCV has own prebuilt ffmpeg library --- ports/opencv/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 5d9f184b1..6e0afd6c0 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-1 +Version: 3.3.1-2 # Optional: Add in vtk to build with VTK and cuda to build with CUDA -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library -- cgit v1.2.3 From 0764c7a671226529f21899449b66d653781db6b4 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 30 Oct 2017 15:24:46 +0300 Subject: Fix version, package name is not a part of it --- ports/libsndfile/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index 9d3d9b423..67e058991 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,4 +1,4 @@ Source: libsndfile -Version: libsndfile-1.0.29-6830c42-1 +Version: 1.0.29-6830c42-1 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Build-Depends: libogg, libflac, libvorbis -- cgit v1.2.3 From 2d021f6561d277f23107c3c9ce19ad3a68237201 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 30 Oct 2017 22:13:25 +0900 Subject: Add support build option to PCL port Add support build options (pcap, qt) to PCL port. --- ports/pcl/CONTROL | 12 ++++++++++-- ports/pcl/portfile.cmake | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index d8c38a363..dcaa884eb 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,12 @@ Source: pcl -Version: 1.8.1-2 -Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5, winpcap +Version: 1.8.1-3 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. +Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 + +Feature: qt +Description: Qt support for PCL +Build-Depends: vtk[qt] + +Feature: pcap +Description: PCAP support for PCL +Build-Depends: winpcap \ No newline at end of file diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index cd5c5bedc..92c554df9 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -35,6 +35,16 @@ elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(LIBRARY_LINKAGE OFF) endif() +set(WITH_QT OFF) +if("qt" IN_LIST FEATURES) + set(WITH_QT ON) +endif() + +set(WITH_PCAP OFF) +if("pcap" IN_LIST FEATURES) + set(WITH_PCAP ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -50,10 +60,10 @@ vcpkg_configure_cmake( -DWITH_CUDA=OFF -DWITH_LIBUSB=OFF -DWITH_OPENNI2=ON - -DWITH_PCAP=ON + -DWITH_PCAP=${WITH_PCAP} -DWITH_PNG=OFF -DWITH_QHULL=ON - -DWITH_QT=ON + -DWITH_QT=${WITH_QT} -DWITH_VTK=ON ) -- cgit v1.2.3 From f8a4d55053561d8ba7e82fa79c45d30ebcb24621 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 30 Oct 2017 03:37:06 +0900 Subject: Update VTK to 8.0.1 Update VTK to 8.0.1. --- ports/vtk/CONTROL | 2 +- ports/vtk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 22d1b1376..1c9095d34 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 8.0.0-3 +Version: 8.0.1 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index c5ea4c387..463ce6981 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) set(VTK_SHORT_VERSION "8.0") -set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") +set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.1") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Kitware/VTK" REF "v${VTK_LONG_VERSION}" - SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791 + SHA512 3a70fa704d791d21a1e2421e6799ccc8238da5bc1fc0ab1925fb7956ccaebb7748c452faba1e7f4a2eafbc8612ed644f46f84b0cb3fe16ce539a823165feb29f HEAD_REF "master" ) -- cgit v1.2.3 From 5f4221420701ff7d78e02b11622a00ee12a8e64a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 30 Oct 2017 23:06:04 -0700 Subject: [vcpkg] Enable pkg[*] as alias for all features. --- toolsrc/include/vcpkg/base/util.h | 16 ++++++++++++++++ toolsrc/include/vcpkg/packagespec.h | 16 ++++++++++++++++ toolsrc/include/vcpkg/triplet.h | 1 + toolsrc/src/tests.installplan.cpp | 33 +++++++++++++++++++-------------- toolsrc/src/tests.packagespec.cpp | 34 ++++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/dependencies.cpp | 36 ++++++++++++++++++++++++++++++++---- 6 files changed, 118 insertions(+), 18 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 7ffd027f0..e67d38ad8 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -117,6 +117,22 @@ namespace vcpkg::Util } } + template + void sort(Range& cont) + { + using std::begin; + using std::end; + std::sort(begin(cont), end(cont)); + } + + template + bool all_equal(const Range1& r1, const Range2& r2) + { + using std::begin; + using std::end; + return std::equal(begin(r1), end(r1), begin(r2), end(r2)); + } + template())->first)>> std::vector extract_keys(AssocContainer&& input_map) { diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 99aaaf0d7..0487ae6b8 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -50,6 +50,22 @@ namespace vcpkg static std::vector from_strings_and_triplet(const std::vector& depends, const Triplet& t); + bool operator<(const FeatureSpec& other) const + { + if (name() < other.name()) return true; + if (name() > other.name()) return false; + if (feature() < other.feature()) return true; + if (feature() > other.feature()) return false; + return triplet() < other.triplet(); + } + + bool operator==(const FeatureSpec& other) const + { + return triplet() == other.triplet() && name() == other.name() && feature() == other.feature(); + } + + bool operator!=(const FeatureSpec& other) const { return !(*this == other); } + private: PackageSpec m_spec; std::string m_feature; diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 50d731593..2cfc2d02a 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -24,6 +24,7 @@ namespace vcpkg size_t hash_code() const; bool operator==(const Triplet& other) const; + bool operator<(const Triplet& other) const { return canonical_name() < other.canonical_name(); } private: static const TripletInstance DEFAULT_INSTANCE; diff --git a/toolsrc/src/tests.installplan.cpp b/toolsrc/src/tests.installplan.cpp index 347612abd..129926317 100644 --- a/toolsrc/src/tests.installplan.cpp +++ b/toolsrc/src/tests.installplan.cpp @@ -461,20 +461,6 @@ namespace UnitTest1 FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), StatusParagraphs(std::move(status_paragraphs))); - /*Assert::AreEqual(size_t(8), install_plan.size()); - auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int { - auto it = std::find_if(install_plan.begin() + start, install_plan.end(), [&](auto& action) { - return action.spec == spec; - }); - Assert::IsTrue(it != install_plan.end()); - return (int)(it - install_plan.begin()); - }; - int a_64_1 = iterator_pos(spec_a_64.package_spec, 0), a_86_1 = iterator_pos(spec_a_86.package_spec, 0), - b_64 = iterator_pos(spec_b_64.package_spec, 0), b_86 = iterator_pos(spec_b_86.package_spec, 0), - c_64 = iterator_pos(spec_c_64.package_spec, 0), c_86 = iterator_pos(spec_c_86.package_spec, 0), - a_64_2 = iterator_pos(spec_a_64.package_spec, a_64_1 + 1), - a_86_2 = iterator_pos(spec_a_86.package_spec, a_86_1 + 1);*/ - remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); remove_plan_check(&install_plan[1], "a"); features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); @@ -484,5 +470,24 @@ namespace UnitTest1 features_check(&install_plan[6], "a", {"a1", "core"}); features_check(&install_plan[7], "c", {"core"}); } + + TEST_METHOD(install_all_features_test) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}), {"core"}}; + + auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); + Assert::IsTrue(install_specs.has_value()); + if (!install_specs.has_value()) return; + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"0", "1", "core"}, Triplet::X64_WINDOWS); + } }; } diff --git a/toolsrc/src/tests.packagespec.cpp b/toolsrc/src/tests.packagespec.cpp index cb5c41af0..25498a799 100644 --- a/toolsrc/src/tests.packagespec.cpp +++ b/toolsrc/src/tests.packagespec.cpp @@ -3,6 +3,7 @@ #include #include +#include #pragma comment(lib, "version") #pragma comment(lib, "winhttp") @@ -103,6 +104,39 @@ namespace UnitTest1 Assert::AreEqual("", spec->triplet.c_str()); } + TEST_METHOD(parsed_specifier_wildcard_feature) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[*]"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 1); + Assert::AreEqual("*", spec->features[0].c_str()); + Assert::AreEqual("", spec->triplet.c_str()); + } + + TEST_METHOD(expand_wildcards) + { + auto zlib = + vcpkg::FullPackageSpec::from_string("zlib[0,1]", Triplet::X86_UWP).value_or_exit(VCPKG_LINE_INFO); + auto openssl = + vcpkg::FullPackageSpec::from_string("openssl[*]", Triplet::X86_UWP).value_or_exit(VCPKG_LINE_INFO); + auto specs = FullPackageSpec::to_feature_specs({zlib, openssl}); + Util::sort(specs); + auto spectargets = FeatureSpec::from_strings_and_triplet( + { + "openssl", + "zlib", + "openssl[*]", + "zlib[0]", + "zlib[1]", + }, + Triplet::X86_UWP); + Util::sort(spectargets); + Assert::IsTrue(specs.size() == spectargets.size()); + Assert::IsTrue(Util::all_equal(specs, spectargets)); + } + TEST_METHOD(utf8_to_utf16) { auto str = vcpkg::Strings::to_utf16("abc"); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 9d264baa2..4c4a8a31c 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -157,7 +157,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const std::unordered_set& features, const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::UNKNOWN), request_type(request_type), feature_list(features) + : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) { } @@ -605,10 +605,38 @@ namespace vcpkg::Dependencies { Cluster& spec_cluster = graph.get(spec.spec()); spec_cluster.request_type = RequestType::USER_REQUESTED; - auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + if (spec.feature() == "*") + { + if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) + { + for (auto&& feature : p_scf->feature_paragraphs) + { + auto res = mark_plus(feature->name, spec_cluster, graph, graph_plan); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to locate feature %s", + spec); + } + + auto res = mark_plus("core", spec_cluster, graph, graph_plan); - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); + } + } + else + { + auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + } graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); } -- cgit v1.2.3 From 3457d89d41f19e933929cf4df88892f47cef297c Mon Sep 17 00:00:00 2001 From: sdcb Date: Tue, 31 Oct 2017 10:17:47 +0800 Subject: Using CP_UTF8 macro instead of magic numbers. --- 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 b4c2d0fe2..2a73c5b0f 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -245,8 +245,8 @@ int main(const int argc, const char* const* const argv) GlobalState::g_init_console_cp = GetConsoleCP(); GlobalState::g_init_console_output_cp = GetConsoleOutputCP(); - SetConsoleCP(65001); - SetConsoleOutputCP(65001); + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); #endif -- cgit v1.2.3 From 33fc44a0e3ade2c7e9369723b2ee4965ee8795e6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 02:13:49 -0700 Subject: [vcpkg] Add optional Abi field to BinaryParagraph for future use. --- toolsrc/include/vcpkg/binaryparagraph.h | 1 + toolsrc/src/tests.paragraph.cpp | 30 ++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/binaryparagraph.cpp | 4 ++++ 3 files changed, 35 insertions(+) diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index 7eb50a6d7..f59bf693a 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -30,6 +30,7 @@ namespace vcpkg std::string feature; std::vector default_features; std::vector depends; + std::string abi; }; struct BinaryControlFile diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp index d9301abd0..13052610f 100644 --- a/toolsrc/src/tests.paragraph.cpp +++ b/toolsrc/src/tests.paragraph.cpp @@ -190,6 +190,20 @@ namespace UnitTest1 Assert::AreEqual("c", pgh.depends[2].c_str()); } + TEST_METHOD(BinaryParagraph_Abi) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Abi", "abcd123"}, + }); + + Assert::AreEqual(size_t(0), pgh.depends.size()); + Assert::IsTrue(pgh.abi == "abcd123"); + } + TEST_METHOD(parse_paragraphs_empty) { const char* str = ""; @@ -385,5 +399,21 @@ namespace UnitTest1 Assert::AreEqual(size_t(1), pghs.size()); Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str()); } + + TEST_METHOD(BinaryParagraph_serialize_abi) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "a, b, c"}, + {"Abi", "123abc"}, + }); + std::string ss = Strings::serialize(pgh); + auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual("123abc", pghs[0]["Abi"].c_str()); + } }; } diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 3a493eb4c..c7136b713 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -16,6 +16,7 @@ namespace vcpkg namespace Fields { + static const std::string ABI = "Abi"; static const std::string FEATURE = "Feature"; static const std::string DESCRIPTION = "Description"; static const std::string MAINTAINER = "Maintainer"; @@ -47,6 +48,8 @@ namespace vcpkg this->description = parser.optional_field(Fields::DESCRIPTION); this->maintainer = parser.optional_field(Fields::MAINTAINER); + this->abi = parser.optional_field(Fields::ABI); + std::string multi_arch; parser.required_field(Fields::MULTI_ARCH, multi_arch); @@ -118,6 +121,7 @@ namespace vcpkg out_str.append("Multi-Arch: same\n"); if (!pgh.maintainer.empty()) out_str.append("Maintainer: ").append(pgh.maintainer).push_back('\n'); + if (!pgh.abi.empty()) out_str.append("Abi: ").append(pgh.abi).push_back('\n'); if (!pgh.description.empty()) out_str.append("Description: ").append(pgh.description).push_back('\n'); } } -- cgit v1.2.3 From 912c38d466a7edf5a9d8727e3f6143f294e2f9fc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 02:14:39 -0700 Subject: [double-conversion] Fix --head builds --- ports/double-conversion/portfile.cmake | 46 ++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 7bf2f6a63..cbb67bfb6 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -23,28 +23,30 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Rename exported target files into something vcpkg_fixup_cmake_targets expects -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake - ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) - -file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) -string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") - -# Remove hardcoded paths from config file -file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) -string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" - "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") -string(REPLACE "${CURRENT_PACKAGES_DIR}" - "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") - -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(NOT VCPKG_USE_HEAD_VERSION) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake + ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) + + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) + string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") + + # Remove hardcoded paths from config file + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) + string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" + "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") + string(REPLACE "${CURRENT_PACKAGES_DIR}" + "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") + + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) +endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 925fab565a76c23e76329193bc25158608bc9fc6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 03:04:28 -0700 Subject: [vcpkg] --head should only apply to USER_REQUESTED packages. --- toolsrc/include/vcpkg/dependencies.h | 5 +++ toolsrc/include/vcpkg/install.h | 2 -- toolsrc/src/vcpkg/commands.ci.cpp | 5 +-- toolsrc/src/vcpkg/dependencies.cpp | 14 +++++++++ toolsrc/src/vcpkg/export.cpp | 4 ++- toolsrc/src/vcpkg/install.cpp | 59 ++++++++++++++++++------------------ 6 files changed, 54 insertions(+), 35 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 60c83fcca..5411ee166 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -18,6 +19,9 @@ namespace vcpkg::Dependencies AUTO_SELECTED }; + std::string to_output_string(RequestType request_type, + const CStringView s, + const Build::BuildPackageOptions& options); std::string to_output_string(RequestType request_type, const CStringView s); struct AnyParagraph @@ -63,6 +67,7 @@ namespace vcpkg::Dependencies AnyParagraph any_paragraph; InstallPlanType plan_type; RequestType request_type; + Build::BuildPackageOptions build_options; std::unordered_set feature_list; }; diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 895028865..7bf823e99 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -53,7 +53,6 @@ namespace vcpkg::Install Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action, - const Build::BuildPackageOptions& install_plan_options, StatusParagraphs& status_db); enum class InstallResult @@ -70,7 +69,6 @@ namespace vcpkg::Install StatusParagraphs* status_db); InstallSummary perform(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, const KeepGoing keep_going, const VcpkgPaths& paths, StatusParagraphs& status_db); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 559dc4541..d012ff6dc 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -44,11 +44,12 @@ namespace vcpkg::Commands::CI const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; const std::vector action_plan = - Util::fmap(install_plan, [](InstallPlanAction& install_action) { + Util::fmap(install_plan, [&install_plan_options](InstallPlanAction& install_action) { + install_action.build_options = install_plan_options; return Dependencies::AnyAction(std::move(install_action)); }); - return Install::perform(action_plan, install_plan_options, Install::KeepGoing::YES, paths, status_db); + return Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); } struct TripletAndSummary diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 4c4a8a31c..6f599afd4 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -133,6 +133,20 @@ namespace vcpkg::Dependencies "Cannot get dependencies because there was none of: source/binary/status paragraphs"); } + std::string to_output_string(RequestType request_type, + const CStringView s, + const Build::BuildPackageOptions& options) + { + const char* const from_head = options.use_head_version == Build::UseHeadVersion::YES ? " (from HEAD)" : ""; + + switch (request_type) + { + case RequestType::AUTO_SELECTED: return Strings::format(" * %s%s", s, from_head); + case RequestType::USER_REQUESTED: return Strings::format(" %s%s", s, from_head); + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + std::string to_output_string(RequestType request_type, const CStringView s) { switch (request_type) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index f0a3b23d0..eb4f5db3c 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -68,6 +68,8 @@ namespace vcpkg::Export { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; + static constexpr Build::BuildPackageOptions build_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES}; for (const ExportPlanType plan_type : ORDER) { @@ -80,7 +82,7 @@ namespace vcpkg::Export std::vector cont = it->second; std::sort(cont.begin(), cont.end(), &ExportPlanAction::compare_by_name); const std::string as_string = Strings::join("\n", cont, [](const ExportPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->spec.to_string()); + return Dependencies::to_output_string(p->request_type, p->spec.to_string(), build_options); }); switch (plan_type) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 7bab740be..b1f722d59 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -250,7 +250,6 @@ namespace vcpkg::Install BuildResult perform_install_plan_action(const VcpkgPaths& paths, const InstallPlanAction& action, - const Build::BuildPackageOptions& build_package_options, StatusParagraphs& status_db) { const InstallPlanType& plan_type = action.plan_type; @@ -259,7 +258,7 @@ namespace vcpkg::Install GlobalState::feature_packages ? action.displayname() : display_name; const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; - const bool use_head_version = to_bool(build_package_options.use_head_version); + const bool use_head_version = to_bool(action.build_options.use_head_version); if (plan_type == InstallPlanType::ALREADY_INSTALLED) { @@ -285,7 +284,7 @@ namespace vcpkg::Install *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), action.spec.triplet(), paths.port_dir(action.spec), - build_package_options, + action.build_options, action.feature_list}; return Build::build_package(paths, build_config, status_db); } @@ -295,7 +294,7 @@ namespace vcpkg::Install action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), action.spec.triplet(), paths.port_dir(action.spec), - build_package_options}; + action.build_options}; return Build::build_package(paths, build_config, status_db); } }(); @@ -407,46 +406,38 @@ namespace vcpkg::Install std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); std::sort(excluded.begin(), excluded.end(), &InstallPlanAction::compare_by_name); + static auto actions_to_output_string = [](const std::vector& v) { + return Strings::join("\n", v, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname(), p->build_options); + }); + }; + if (excluded.size() > 0) { - const std::string excluded_string = Strings::join("\n", excluded, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages are excluded:\n%s", excluded_string); + System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); } if (already_installed_plans.size() > 0) { - const std::string already_string = - Strings::join("\n", already_installed_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages are already installed:\n%s", already_string); + System::println("The following packages are already installed:\n%s", + actions_to_output_string(already_installed_plans)); } if (rebuilt_plans.size() > 0) { - const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be rebuilt:\n%s", rebuilt_string); + System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); } if (new_plans.size() > 0) { - const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be built and installed:\n%s", new_string); + System::println("The following packages will be built and installed:\n%s", + actions_to_output_string(new_plans)); } if (only_install_plans.size() > 0) { - const std::string only_install_string = - Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be directly installed:\n%s", only_install_string); + System::println("The following packages will be directly installed:\n%s", + actions_to_output_string(only_install_plans)); } if (has_non_user_requested_packages) @@ -489,7 +480,6 @@ namespace vcpkg::Install } InstallSummary perform(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, const KeepGoing keep_going, const VcpkgPaths& paths, StatusParagraphs& status_db) @@ -513,8 +503,7 @@ namespace vcpkg::Install if (const auto install_action = action.install_plan.get()) { - const BuildResult result = - perform_install_plan_action(paths, *install_action, install_plan_options, status_db); + const BuildResult result = perform_install_plan_action(paths, *install_action, status_db); if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) { System::println(Build::create_user_troubleshooting_message(install_action->spec)); @@ -629,6 +618,16 @@ namespace vcpkg::Install install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); }); } + for (auto&& action : action_plan) + { + if (auto p_install = action.install_plan.get()) + { + p_install->build_options = install_plan_options; + if (p_install->request_type != RequestType::USER_REQUESTED) + p_install->build_options.use_head_version = Build::UseHeadVersion::NO; + } + } + // install plan will be empty if it is already installed - need to change this at status paragraph part Checks::check_exit(VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty"); @@ -650,7 +649,7 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - const InstallSummary summary = perform(action_plan, install_plan_options, keep_going, paths, status_db); + const InstallSummary summary = perform(action_plan, keep_going, paths, status_db); System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); -- cgit v1.2.3 From a705df80b0f8db81b201492b4012e23e08a53694 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 03:47:35 -0700 Subject: [vcpkg] Fix bug where packages with uninstalled features appear to be uninstalled. --- toolsrc/include/vcpkg/statusparagraphs.h | 6 +- toolsrc/src/tests.statusparagraphs.cpp | 85 +++++++++++++++++++++++++++++ toolsrc/src/vcpkg/statusparagraphs.cpp | 26 ++++----- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 1 + toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 3 + 5 files changed, 102 insertions(+), 19 deletions(-) create mode 100644 toolsrc/src/tests.statusparagraphs.cpp diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index c2f3b7b8e..747a0c1ab 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -16,10 +16,10 @@ namespace vcpkg using const_iterator = container::const_reverse_iterator; const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } - const_iterator find(const std::string& name, const Triplet& triplet) const; - iterator find(const std::string& name, const Triplet& triplet); + iterator find(const std::string& name, const Triplet& triplet, const std::string& feature = ""); + const_iterator find(const std::string& name, const Triplet& triplet, const std::string& feature = "") const; + std::vector*> find_all(const std::string& name, const Triplet& triplet); - iterator find(const std::string& name, const Triplet& triplet, const std::string& feature); const_iterator find_installed(const PackageSpec& spec) const { diff --git a/toolsrc/src/tests.statusparagraphs.cpp b/toolsrc/src/tests.statusparagraphs.cpp new file mode 100644 index 000000000..4cc1130b1 --- /dev/null +++ b/toolsrc/src/tests.statusparagraphs.cpp @@ -0,0 +1,85 @@ +#include + +#include +#include +#include +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; +using namespace vcpkg::Paragraphs; + +namespace UnitTest1 +{ + class StatusParagraphsTests : public TestClass + { + TEST_METHOD(find_installed) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: install ok installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + Assert::IsTrue(it != status_db.end()); + } + + TEST_METHOD(find_not_installed) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: purge ok not-installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + Assert::IsTrue(it == status_db.end()); + } + + TEST_METHOD(find_with_feature_packages) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: install ok installed + +Package: ffmpeg +Feature: openssl +Depends: openssl +Architecture: x64-windows +Multi-Arch: same +Description: +Status: purge ok not-installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + Assert::IsTrue(it != status_db.end()); + } + }; +} \ No newline at end of file diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index 647ed6d3f..d4afc0427 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -10,22 +10,6 @@ namespace vcpkg StatusParagraphs::StatusParagraphs(std::vector>&& ps) : paragraphs(std::move(ps)){}; - StatusParagraphs::const_iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) const - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet; - }); - } - - StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet; - }); - } - std::vector*> StatusParagraphs::find_all(const std::string& name, const Triplet& triplet) { @@ -50,6 +34,16 @@ namespace vcpkg }); } + StatusParagraphs::const_iterator StatusParagraphs::find(const std::string& name, + const Triplet& triplet, + const std::string& feature) const + { + return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { + const PackageSpec& spec = pgh->package.spec; + return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; + }); + } + StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const Triplet& triplet) const { diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index d25748124..766b4bf67 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -24,6 +24,7 @@ + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index 42691c614..b6f1ced06 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -30,5 +30,8 @@ Source Files + + Source Files + \ No newline at end of file -- cgit v1.2.3 From 161244188d91550cff07503e0fd66c884ca7a992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 31 Oct 2017 13:57:37 +0100 Subject: Update Catch to 1.11.0 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index af18c49de..1229bc936 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.10.0 +Version: 1.11.0 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 2c45604ce..e2adbe187 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.10.0) +set(CATCH_VERSION v1.11.0) vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 275ab5b5d778cc8a91b5f3e8f241a37b680c81d1b8945ff64ad16a9708c98e6535b389746bf8cacbed07f874629f456b56bafbf1879c5a6f84fa87675c1361b6 + SHA512 8ce490cfa433ec1c6b6460d76e1d9a6502966ada96fec7290fe9827a965751f3d572e97b93bbbb5e2bc97ffcf70bb547a050405b80a1a816054bd6afd1208cbe ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From eb7e1e481bbebc13d277d6a89f0a270767962286 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 30 Oct 2017 18:51:55 -0700 Subject: Fix proxy usage in Win7 (powershell 2.0) --- scripts/fetchDependency.ps1 | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 89e37c428..6cd28ad8e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -18,6 +18,19 @@ function Test-Module($moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } +function Get-Credential-Backwards-Compatible() +{ + if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + return Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + Write-Host "Enter credentials for Proxy Authentication" + return Get-Credential + } +} + if (Test-Module -moduleName 'BitsTransfer') { Import-Module BitsTransfer -Verbose:$false @@ -54,28 +67,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $WC = New-Object System.Net.WebClient $ProxyAuth = !$WC.Proxy.IsBypassed($url) - if ($ProxyAuth) - { - if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - "Enter credentials for Proxy Authentication" - $ProxyCred = Get-Credential - } - - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) - $WC.Proxy.Credentials=$ProxyCred - } # git and installerbase fail with Start-BitsTransfer if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) { try { + if ($ProxyAuth) + { + $ProxyCred = Get-Credential-Backwards-Compatible + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) + } Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop return } @@ -89,6 +92,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } } + if ($ProxyAuth) + { + $WC.Proxy.Credentials = Get-Credential-Backwards-Compatible + } + Write-Verbose("Downloading $Dependency...") $WC.DownloadFile($url, $downloadPath) } -- cgit v1.2.3 From 7d0bcceaf028f28b0bc5ae666689f26d8de743a9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:06:07 -0700 Subject: [findVSInstances] Data lines are now placed within tags. Text outside these tags is ignored This means we can print text in powershell now and it won't break vcpkg. --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 2 +- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 25 ++++++++++++++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 3269562dc..d9ffbd32a 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -11,7 +11,7 @@ $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationI Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { - $instanceCandidate = $instanceCandidateWithEOL -replace "::" + $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 566560cdb..5470b57c0 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -29,7 +29,7 @@ foreach ($instance in $asXml.instances.instance) } # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}::") > $null + $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null } # If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) @@ -42,7 +42,7 @@ if ($results.Count -eq 0) if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - return "PreferenceWeight1::Legacy::14.0::$installationPath::" + return "::PreferenceWeight1::Legacy::14.0::$installationPath::" } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c6a92f813..8b9e6c598 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -320,6 +320,23 @@ namespace vcpkg std::string major_version() const { return version.substr(0, 2); } }; + static std::vector keep_data_lines(const std::string& data_blob) + { + static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); + + std::vector data_lines; + + const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); + const std::sregex_iterator end; + for (std::sregex_iterator i = it; i != end; ++i) + { + const std::smatch match = *i; + data_lines.push_back(match[1].str()); + } + + return data_lines; + } + static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; @@ -327,9 +344,11 @@ namespace vcpkg Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); - const std::vector instances_as_strings = Strings::split(ec_data.output, "::"); - Checks::check_exit( - VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances.\n"); + const std::vector instances_as_strings = keep_data_lines(ec_data.output); + Checks::check_exit(VCPKG_LINE_INFO, + !instances_as_strings.empty(), + "Could not detect any Visual Studio instances. Powershell returned: %s\n", + ec_data.output); std::vector output; for (const std::string& instance_as_string : instances_as_strings) -- cgit v1.2.3 From 47bf4b6b5caf44adeaf582e5137377fb9d2cc5c4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:23:09 -0700 Subject: [fetchDependency] Now also returns output in the form data --- scripts/fetchDependency.ps1 | 4 +-- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- toolsrc/src/vcpkg/vcpkgpaths.cpp | 40 +++++++++++++---------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6cd28ad8e..aec05457a 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -265,6 +265,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return $executableFromDownload } -SelectProgram $Dependency - +$path = SelectProgram $Dependency Write-Verbose "Fetching dependency: $Dependency. Done." +return "::$path::" diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 5470b57c0..e3bc67ff6 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -4,7 +4,7 @@ param( ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" +$vswhereExe = (& $scriptsDir\fetchDependency.ps1 "vswhere") -replace "::" -replace "::" $output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 8b9e6c598..40f52af73 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -62,6 +62,23 @@ namespace vcpkg return nullopt; } + static std::vector keep_data_lines(const std::string& data_blob) + { + static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); + + std::vector data_lines; + + const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); + const std::sregex_iterator end; + for (std::sregex_iterator i = it; i != end; ++i) + { + const std::smatch match = *i; + data_lines.push_back(match[1].str()); + } + + return data_lines; + } + static fs::path fetch_dependency(const fs::path& scripts_folder, const std::string& tool_name, const fs::path& expected_downloaded_path, @@ -91,7 +108,11 @@ namespace vcpkg Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } - const fs::path actual_downloaded_path = Strings::trim(std::string{rc.output}); + const std::vector dependency_path = keep_data_lines(rc.output); + Checks::check_exit( + VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", rc.output); + + const fs::path actual_downloaded_path = Strings::trim(std::string{dependency_path.at(0)}); std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -320,23 +341,6 @@ namespace vcpkg std::string major_version() const { return version.substr(0, 2); } }; - static std::vector keep_data_lines(const std::string& data_blob) - { - static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); - - std::vector data_lines; - - const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); - const std::sregex_iterator end; - for (std::sregex_iterator i = it; i != end; ++i) - { - const std::smatch match = *i; - data_lines.push_back(match[1].str()); - } - - return data_lines; - } - static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; -- cgit v1.2.3 From a5b54588eca1d57366f7052ee9ab30da4ba68066 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:30:29 -0700 Subject: [git] Update to 2.15.0 (was 2.14.3) --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 4488d9b95..f44a7dea1 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -13,7 +13,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.3-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.15.0-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index aec05457a..4ef3a1f17 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -180,16 +180,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.3" - $downloadVersion = "2.14.3" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/MinGit-2.14.3-32-bit.zip" - $downloadPath = "$downloadsDir\MinGit-2.14.3-32-bit.zip" - $expectedDownloadedFileHash = "a91385acb1da220612790807c41d0f304b41093c474b9d7342230ec194a3398e" + $requiredVersion = "2.15.0" + $downloadVersion = "2.15.0" + $url = "https://github.com/git-for-windows/git/releases/download/v2.15.0.windows.1/MinGit-2.15.0-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.15.0-32-bit.zip" + $expectedDownloadedFileHash = "69c035ab7b75c42ce5dd99e8927d2624ab618fab73c5ad84c9412bd74c343537" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.3-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.15.0-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.3-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.15.0-32-bit" } elseif($Dependency -eq "installerbase") { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 40f52af73..5e43ee4c7 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -171,10 +171,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {2, 14, 3}; + static constexpr std::array EXPECTED_VERSION = {2, 15, 0}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.3-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.15.0-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; -- cgit v1.2.3 From 516c42bdc4a5443e0f78fae559c187823e6326d1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 23:41:24 -0700 Subject: [bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure. --- scripts/bootstrap.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index f44a7dea1..b14dbbe4a 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -32,7 +32,8 @@ $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath)) { - New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null + Write-Error "Unable to determine vcpkg sources directory. '$vcpkgSourcesPath' does not exist." + return } try @@ -43,6 +44,11 @@ try $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj + if ($LASTEXITCODE -ne 0) + { + Write-Error "Building vcpkg.exe failed. Please ensure you have installed the Desktop C++ workload and the Windows SDK for Desktop C++." + return + } Write-Verbose("Placing vcpkg.exe in the correct location") -- cgit v1.2.3 From 4ff90ec4309df1d5937d62c52683e1147066445a Mon Sep 17 00:00:00 2001 From: James Chang Date: Wed, 1 Nov 2017 16:27:12 +0800 Subject: [poco] build with MySQL support (#2088) * [poco] build with MySQL support Set proper variables to enable MySQL support if libmysql port is installed * [poco] Move Mysql support to a feature. Enable CMake config files. --- ports/poco/CONTROL | 6 +++++- ports/poco/portfile.cmake | 19 +++++++++++++------ scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 3 +++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 2c78b6c6e..4eb60a07d 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,4 +1,8 @@ Source: poco -Version: 1.7.8-1 +Version: 1.7.8-2 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. + +Feature: mysql +Build-Depends: libmysql +Description: Mysql support for POCO diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 3ef0af921..315eaf2e5 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -16,10 +16,13 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/foundation-public-include-pcre.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(POCO_STATIC ON) -else() - set(POCO_STATIC OFF) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) + +if("mysql" IN_LIST FEATURES) + # enabling MySQL support + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") + set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") + set(MYSQL_LIB_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") endif() vcpkg_configure_cmake( @@ -30,6 +33,11 @@ vcpkg_configure_cmake( -DENABLE_SEVENZIP=ON -DENABLE_TESTS=OFF -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... + -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} + OPTIONS_RELEASE + -DMYSQL_LIB=${MYSQL_LIB} + OPTIONS_DEBUG + -DMYSQL_LIB=${MYSQL_LIB_DEBUG} ) vcpkg_install_cmake() @@ -53,8 +61,7 @@ else() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/poco) # copy license file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poco) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 069672b71..ca228b2a4 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -116,6 +116,9 @@ function(vcpkg_fixup_cmake_targets) "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") + string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") + string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() -- cgit v1.2.3 From e663b69a1d7ebd2135d51af8176fc0eddd5f5481 Mon Sep 17 00:00:00 2001 From: Jim McGrath Date: Tue, 31 Oct 2017 10:50:23 -0500 Subject: help assimp find vcpkg's copy of zlib so it does not build its own --- ports/assimp/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 0642fb701..660c9d40e 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_configure_cmake( -DASSIMP_BUILD_ZLIB=False -DASSIMP_BUILD_ASSIMP_TOOLS=False -DASSIMP_INSTALL_PDB=False + -DZLIB_HOME=${CURRENT_INSTALLED_DIR} ) vcpkg_install_cmake() -- cgit v1.2.3 From 7435624eece6ff3e58a8c3fa6f0dc563317c7bf3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 01:47:53 -0700 Subject: [assimp] Bump revision --- ports/assimp/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 170d727a8..bae5c7fb2 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1 +Version: 4.0.1-1 Description: The Open Asset import library Build-Depends: zlib -- cgit v1.2.3 From 0a4b09d9c57954b3a55d893134cde1ab7eafcbdb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 01:54:16 -0700 Subject: [assimp] Fix assimp overwriting CMAKE_PREFIX_PATH. --- ports/assimp/CONTROL | 2 +- ports/assimp/dont-overwrite-prefix-path.patch | 12 ++++++++++++ ports/assimp/portfile.cmake | 19 ++++++++++--------- 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 ports/assimp/dont-overwrite-prefix-path.patch diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index bae5c7fb2..9666a06b3 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1-1 +Version: 4.0.1-2 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/dont-overwrite-prefix-path.patch b/ports/assimp/dont-overwrite-prefix-path.patch new file mode 100644 index 000000000..fc58a99c5 --- /dev/null +++ b/ports/assimp/dont-overwrite-prefix-path.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d781d1f..0d64d50 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,7 +92,6 @@ if (WIN32) + endif() + + IF(MSVC) +- set (CMAKE_PREFIX_PATH "D:\\libs\\devil") + OPTION( ASSIMP_INSTALL_PDB + "Install MSVC debug files." + ON diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 660c9d40e..496300240 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -10,17 +10,20 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch" + "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch" ) +file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DASSIMP_BUILD_TESTS=False - -DASSIMP_BUILD_ASSIMP_VIEW=False - -DASSIMP_BUILD_ZLIB=False - -DASSIMP_BUILD_ASSIMP_TOOLS=False - -DASSIMP_INSTALL_PDB=False - -DZLIB_HOME=${CURRENT_INSTALLED_DIR} + OPTIONS -DASSIMP_BUILD_TESTS=OFF + -DASSIMP_BUILD_ASSIMP_VIEW=OFF + -DASSIMP_BUILD_ZLIB=OFF + -DASSIMP_BUILD_ASSIMP_TOOLS=OFF + -DASSIMP_INSTALL_PDB=OFF ) vcpkg_install_cmake() @@ -30,8 +33,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.0") vcpkg_copy_pdbs() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG) -- cgit v1.2.3 From ec4eec1f714d6bc64c4c3b2534e34b86249c873a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 05:04:44 -0700 Subject: [boost] Handle spaces in vcpkg path. --- ports/boost/desktop/user-config.jam | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 83206c098..311cc8951 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -6,33 +6,33 @@ using msvc : 14.1 : cl.exe : echo ; -using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; -using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; +using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; +using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; project user-config ; lib advapi32 ; -lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : - @LIB_RUNTIME_LINK@ +lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" advapi32 ; - -lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib + +lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib" debug icuucd : : - @LIB_RUNTIME_LINK@ + "@LIB_RUNTIME_LINK@" advapi32 ; - -lib icuin : : @CURRENT_INSTALLED_DIR@/lib : : - @LIB_RUNTIME_LINK@ ; - -lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib + +lib icuin : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" ; + +lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib" debug icuind : : - @LIB_RUNTIME_LINK@ ; - -lib icudt : : @CURRENT_INSTALLED_DIR@/lib : : - @LIB_RUNTIME_LINK@ ; - -lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib + "@LIB_RUNTIME_LINK@" ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib" debug - icudtd : : - @LIB_RUNTIME_LINK@ ; \ No newline at end of file + icudtd : : + "@LIB_RUNTIME_LINK@" ; \ No newline at end of file -- cgit v1.2.3 From 47090e68b8deeb5a38b638934b59fe3ddef0fa9f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 06:03:10 -0700 Subject: [vcpkg] Fix use of features in undocumented build command --- toolsrc/src/vcpkg/build.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 30a6a791c..c59b6f7d1 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -52,22 +52,20 @@ namespace vcpkg::Build::Command Checks::exit_fail(VCPKG_LINE_INFO); } - for (const std::string& str : full_spec.features) - { - System::println("%s \n", str); - } const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, spec.name() == scf->core_paragraph->name, - "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", + "The Source field inside the CONTROL file does not match the port directory: '%s' != '%s'", scf->core_paragraph->name, spec.name()); const StatusParagraphs status_db = database_load_check(paths); const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); + const Build::BuildPackageConfig build_config{ - *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + *scf, spec.triplet(), fs::path{port_dir}, build_package_options, features_as_set}; const auto build_timer = Chrono::ElapsedTime::create_started(); const auto result = Build::build_package(paths, build_config, status_db); @@ -107,6 +105,11 @@ namespace vcpkg::Build::Command const std::string command_argument = args.command_arguments.at(0); const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); + if (!spec.features.empty() && !GlobalState::feature_packages) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); + } const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}, {}); perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); } -- cgit v1.2.3 From 13e2621d02fa8405582ab74b8e1cbc7eaf809a5a Mon Sep 17 00:00:00 2001 From: Steve Jemens Date: Wed, 1 Nov 2017 12:03:33 +0200 Subject: Update to v1.2.0. Remove man pages --- ports/xlnt/CONTROL | 2 +- ports/xlnt/portfile.cmake | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 907b66b16..25b4ce010 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,3 +1,3 @@ Source: xlnt -Version: 1.1.0-1 +Version: 1.2.0-1 Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index e514cf8eb..f0cb9425d 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(XLNT_VERSION 1.1.0) -set(XLNT_HASH f0c59a2b241c6b219fbd8bb39705847e2b31332e413bc4aff7e0a8d4d4b9ef6750c03ecc49a196f647fdf60c3bec9f06c800bdb53b56648d2ba9fab359623f95) +set(XLNT_VERSION 1.2.0) +set(XLNT_HASH 359ff1e99531513d7b1228ff07f137531be99d7a95bbc5b399168a6c609f56dba2e030464f8203db92db137ab80dbe10f71de71a62b0bcb96eaafc0f09256339) set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION}) vcpkg_download_distfile(ARCHIVE @@ -26,6 +26,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) file(INSTALL ${XLNT_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 5bfb7dd74cda07046372e8d5f1778ad9f34e1fd8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 07:08:10 -0700 Subject: [opencv] Remove ffmpeg from dependencies -- it is not currently possible to use an external ffmpeg with opencv. Add features for cuda and vtk. --- ports/opencv/CONTROL | 18 ++++++++++++++++-- ports/opencv/portfile.cmake | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 6e0afd6c0..d6718f080 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,19 @@ Source: opencv -Version: 3.3.1-2 -# Optional: Add in vtk to build with VTK and cuda to build with CUDA +Version: 3.3.1-3 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library + +Feature: ffmpeg +Description: prebuilt ffmpeg support for opencv + +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv + +Feature: cuda +Build-Depends: cuda +Description: CUDA support for opencv + +Feature: sfm +Build-Depends: eigen3, glog, gflags +Description: opencv_sfm module diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index be542e912..f3da28948 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -32,6 +32,26 @@ vcpkg_apply_patches( string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) +set(WITH_FFMPEG OFF) +if("ffmpeg" IN_LIST FEATURES) + set(WITH_FFMPEG ON) +endif() + +set(WITH_CUDA OFF) +if("cuda" IN_LIST FEATURES) + set(WITH_CUDA ON) +endif() + +set(WITH_VTK OFF) +if("vtk" IN_LIST FEATURES) + set(WITH_VTK ON) +endif() + +set(BUILD_opencv_sfm OFF) +if("sfm" IN_LIST FEATURES) + set(BUILD_opencv_sfm ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -42,10 +62,6 @@ vcpkg_configure_cmake( -DBUILD_JPEG=OFF -DBUILD_PNG=OFF -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON - -DBUILD_opencv_python2=OFF - -DBUILD_opencv_python3=OFF - -DBUILD_opencv_flann=ON - -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DENABLE_PYLINT=OFF @@ -54,23 +70,28 @@ vcpkg_configure_cmake( -DBUILD_TESTS=OFF -DBUILD_WITH_DEBUG_INFO=ON -DOpenCV_DISABLE_ARCH_PATH=ON - -DWITH_FFMPEG=ON -DINSTALL_FORCE_UNIX_PATHS=ON -DOPENCV_CONFIG_INSTALL_PATH=share/opencv -DOPENCV_OTHER_INSTALL_PATH=share/opencv -DINSTALL_LICENSE=OFF - # Optional: change to ON to build with CUDA - -DWITH_CUDA=OFF -DWITH_CUBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_LAPACK=OFF - -DBUILD_opencv_dnn=ON -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules -DBUILD_PROTOBUF=OFF -DUPDATE_PROTO_FILES=ON -DPROTOBUF_UPDATE_FILES=ON - # Optional: change to ON to build with VTK - -DWITH_VTK=OFF + + -DBUILD_opencv_dnn=ON + -DBUILD_opencv_python2=OFF + -DBUILD_opencv_python3=OFF + -DBUILD_opencv_flann=ON + -DBUILD_opencv_apps=OFF + -DBUILD_opencv_sfm=${BUILD_opencv_sfm} + + -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_CUDA=${WITH_CUDA} + -DWITH_VTK=${WITH_VTK} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF -- cgit v1.2.3 From 51661ed675177530a4ab27756fedb20a22c71358 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 01:03:34 +0900 Subject: Enable OpenGL support for GUI Enable OpenGL support for GUI. --- ports/opencv/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f3da28948..470cac005 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -91,6 +91,7 @@ vcpkg_configure_cmake( -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_CUDA=${WITH_CUDA} + -DWITH_OPENGL=ON -DWITH_VTK=${WITH_VTK} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -- cgit v1.2.3 From 2b60cb12c9dec496c96a725b4ce3e0fcf9a956d8 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Wed, 1 Nov 2017 21:04:18 +0300 Subject: [protobuf] Add feature packages for zlib ZLib based features like Gzip streams. --- ports/protobuf/CONTROL | 7 +++++-- ports/protobuf/portfile.cmake | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index b9d8b5b9e..88904f315 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,7 @@ Source: protobuf -Version: 3.4.1-1 -Build-Depends: zlib +Version: 3.4.1-2 Description: Protocol Buffers - Google's data interchange format + +Feature: zlib +Description: ZLib based features like Gzip streams +Build-Depends: zlib diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index e7f45c36c..3a5ac2c17 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -47,12 +47,18 @@ else() set(protobuf_MSVC_STATIC_RUNTIME OFF) endif() +if("zlib" IN_LIST FEATURES) + set(protobuf_WITH_ZLIB ON) +else() + set(protobuf_WITH_ZLIB OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake OPTIONS -Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} - -Dprotobuf_WITH_ZLIB=ON + -Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB} -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_COMPILER=${protobuf_BUILD_COMPILER} -DCMAKE_INSTALL_CMAKEDIR=share/protobuf -- cgit v1.2.3 From 2de9c9bea335b4b57ce29e2b02715d70bf25d445 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 05:26:47 -0700 Subject: [llvm] Require Python3 --- ports/llvm/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index b1f546f4f..55a23f802 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -16,6 +16,10 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch ) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From b54f4f26ae6c2b0944590d0de5c7fbf0d9ed38d7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 11:41:51 -0700 Subject: [blaze] Fix remaining stray _INVALID_ROOT_ --- ports/blaze/CONTROL | 2 +- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index 5161b924f..3355159f4 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,4 +1,4 @@ Source: blaze -Version: 3.2-1 +Version: 3.2-2 Build-Depends: boost, clapack Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index ca228b2a4..22c2245c8 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -119,6 +119,7 @@ function(vcpkg_fixup_cmake_targets) string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") + string(REGEX REPLACE "\"_INVALID_ROOT_/[^\";]*\"" "\"\"" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() -- cgit v1.2.3 From 5a9662c2bedae2e67b528aec616b2644c07051b1 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 01:07:26 +0900 Subject: Add option to enable Qt GUI support Add option to enable Qt GUI support. --- ports/opencv/CONTROL | 4 ++++ ports/opencv/portfile.cmake | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index d6718f080..dbe13b238 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -14,6 +14,10 @@ Feature: cuda Build-Depends: cuda Description: CUDA support for opencv +Feature: qt +Build-Depends: qt5 +Description: Qt GUI support for opencv + Feature: sfm Build-Depends: eigen3, glog, gflags Description: opencv_sfm module diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 470cac005..64f644c35 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -42,6 +42,11 @@ if("cuda" IN_LIST FEATURES) set(WITH_CUDA ON) endif() +set(WITH_QT OFF) +if("qt" IN_LIST FEATURES) + set(WITH_QT ON) +endif() + set(WITH_VTK OFF) if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) @@ -92,6 +97,7 @@ vcpkg_configure_cmake( -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_CUDA=${WITH_CUDA} -DWITH_OPENGL=ON + -DWITH_QT=${WITH_QT} -DWITH_VTK=${WITH_VTK} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -- cgit v1.2.3 From 726ed9738d3731f77b0b180ae02645908ea1f3dc Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 01:30:07 +0900 Subject: Sorting CMake options for maintainability Sorting CMake options based on grouped of CMake-GUI for maintainability. --- ports/opencv/CONTROL | 20 ++++++------- ports/opencv/portfile.cmake | 71 ++++++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 43 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index dbe13b238..f442e0cca 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,23 +1,23 @@ Source: opencv -Version: 3.3.1-3 +Version: 3.3.1-4 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library -Feature: ffmpeg -Description: prebuilt ffmpeg support for opencv - -Feature: vtk -Build-Depends: vtk -Description: vtk support for opencv +Feature: sfm +Build-Depends: eigen3, glog, gflags +Description: opencv_sfm module Feature: cuda Build-Depends: cuda Description: CUDA support for opencv +Feature: ffmpeg +Description: prebuilt ffmpeg support for opencv + Feature: qt Build-Depends: qt5 Description: Qt GUI support for opencv -Feature: sfm -Build-Depends: eigen3, glog, gflags -Description: opencv_sfm module +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 64f644c35..d712ce65e 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -32,9 +32,9 @@ vcpkg_apply_patches( string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) -set(WITH_FFMPEG OFF) -if("ffmpeg" IN_LIST FEATURES) - set(WITH_FFMPEG ON) +set(BUILD_opencv_sfm OFF) +if("sfm" IN_LIST FEATURES) + set(BUILD_opencv_sfm ON) endif() set(WITH_CUDA OFF) @@ -42,6 +42,11 @@ if("cuda" IN_LIST FEATURES) set(WITH_CUDA ON) endif() +set(WITH_FFMPEG OFF) +if("ffmpeg" IN_LIST FEATURES) + set(WITH_FFMPEG ON) +endif() + set(WITH_QT OFF) if("qt" IN_LIST FEATURES) set(WITH_QT ON) @@ -52,50 +57,50 @@ if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) endif() -set(BUILD_opencv_sfm OFF) -if("sfm" IN_LIST FEATURES) - set(BUILD_opencv_sfm ON) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" - -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} - -DBUILD_ZLIB=OFF - -DBUILD_TIFF=OFF - -DBUILD_JPEG=OFF - -DBUILD_PNG=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + # Ungrouped Entries + -DOpenCV_DISABLE_ARCH_PATH=ON + -DPROTOBUF_UPDATE_FILES=ON + -DUPDATE_PROTO_FILES=ON + # BUILD -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF - -DENABLE_PYLINT=OFF + -DBUILD_JPEG=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF + -DBUILD_PNG=OFF + -DBUILD_PROTOBUF=OFF -DBUILD_TESTS=OFF + -DBUILD_TIFF=OFF -DBUILD_WITH_DEBUG_INFO=ON - -DOpenCV_DISABLE_ARCH_PATH=ON - -DINSTALL_FORCE_UNIX_PATHS=ON - -DOPENCV_CONFIG_INSTALL_PATH=share/opencv - -DOPENCV_OTHER_INSTALL_PATH=share/opencv - -DINSTALL_LICENSE=OFF - -DWITH_CUBLAS=OFF - -DWITH_OPENCLAMDBLAS=OFF - -DWITH_LAPACK=OFF - -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules - -DBUILD_PROTOBUF=OFF - -DUPDATE_PROTO_FILES=ON - -DPROTOBUF_UPDATE_FILES=ON - + -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} + -DBUILD_ZLIB=OFF + -DBUILD_opencv_apps=OFF -DBUILD_opencv_dnn=ON + -DBUILD_opencv_flann=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF - -DBUILD_opencv_flann=ON - -DBUILD_opencv_apps=OFF -DBUILD_opencv_sfm=${BUILD_opencv_sfm} - - -DWITH_FFMPEG=${WITH_FFMPEG} + # CMAKE + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + # ENABLE + -DENABLE_PYLINT=OFF + # INSTALL + -DINSTALL_FORCE_UNIX_PATHS=ON + -DINSTALL_LICENSE=OFF + # OPENCV + -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" + -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules + -DOPENCV_OTHER_INSTALL_PATH=share/opencv + # WITH + -DWITH_CUBLAS=OFF -DWITH_CUDA=${WITH_CUDA} + -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_LAPACK=OFF + -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -DWITH_VTK=${WITH_VTK} -- cgit v1.2.3 From 7ac8622265cf1154daac61ed4165365701e9e848 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 1 Nov 2017 15:20:00 -0500 Subject: VTK: implement features (#2071) * [vtk/portfile] add OpenVR option * [vtk/control] add OpenVR feature * [vtk/portfile] Add OpenVR feature to portfile * [vtk/CONTROL] add features * [vtk/portfile] implement features * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix case * [vtk/portfile] fix case * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix syntax * [vtk/portfile] fix module name * [vtk] Bump version --- ports/vtk/CONTROL | 20 ++++++++++++++++++-- ports/vtk/portfile.cmake | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 1c9095d34..d30e61506 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,20 @@ Source: vtk -Version: 8.0.1 +Version: 8.0.1-1 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, libharu + +Feature: openvr +Description: OpenVR functionality for VTK +Build-Depends: sdl2, openvr + +Feature: qt +Description: Qt functionality for VTK +Build-Depends: qt5 + +Feature: mpi +Description: MPI functionality for VTK +Build-Depends: msmpi + +Feature: python +Description: Python functionality for VTK +Build-Depends: python3 diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 463ce6981..0a407e9ae 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -13,12 +13,32 @@ vcpkg_from_github( # ============================================================================= # Options: These should be set by feature-packages when they become available -set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file -set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file -set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file + +if ("qt" IN_LIST FEATURES) + set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_QT OFF ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +endif() + +if ("mpi" IN_LIST FEATURES) + set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_MPI OFF ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +endif() + +if ("python" IN_LIST FEATURES) + set(VTK_WITH_PYTHON ON) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +endif() +if("openvr" IN_LIST FEATURES) + set(VTK_WITH_OPENVR ON) # IMPORTANT: if ON make sure `OpenVR` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_OPENVR OFF) +endif() + set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file - # ============================================================================= # Apply patches to the source code vcpkg_apply_patches( @@ -78,6 +98,12 @@ if(VTK_WITH_PYTHON) ) endif() +if(VTK_WITH_OPENVR) + list(APPEND ADDITIONAL_OPTIONS + -DModule_vtkRenderingOpenVR=ON + ) +endif() + if(VTK_WITH_ALL_MODULES) list(APPEND ADDITIONAL_OPTIONS -DVTK_BUILD_ALL_MODULES=ON -- cgit v1.2.3 From fec804f2361284bed911bfc373207c4d28fcaaf1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 13:24:54 -0700 Subject: [uwebsockets] Remove boost from dependency list to follow upstream's official README --- ports/uwebsockets/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 3e202f42b..13aa16cc5 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets Version: 0.14.4-1 -Build-Depends: libuv, openssl, zlib, boost +Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js -- cgit v1.2.3 From 807a39c07888ac33ba3fc351c592b78307310e79 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 14:47:34 -0700 Subject: [libharu] Fix DLLIMPORT macro replacement --- ports/libharu/CONTROL | 2 +- ports/libharu/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 5919acef0..623628ab8 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-3 +Version: 2017-08-15-d84867ebf9f-4 Description: libharu - free PDF library Build-Depends: zlib, libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index 7896d7659..c8e9250b9 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -37,17 +37,17 @@ file(REMOVE_RECURSE file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}") else() - string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}") endif() file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}") file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}") else() - string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}") endif() file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") -- cgit v1.2.3 From 2e48ccb8a4db43f63dc25748732b529a9972bbfc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 15:28:51 -0700 Subject: Update CHANGELOG and bump version to v0.0.95 --- CHANGELOG.md | 23 +++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c0688b6..88d1cb726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +vcpkg (0.0.95) +-------------- + * Update ports: + - assimp 4.0.1 -> 4.0.1-2 + - blaze 3.2-1 -> 3.2-2 + - boost 1.65.1-2 -> 1.65.1-3 + - catch 1.10.0 -> 1.11.0 + - libharu 2017-08-15-d84867ebf9f-2 -> 2017-08-15-d84867ebf9f-4 + - libsndfile libsndfile-1.0.29-6830c42-1 -> 1.0.29-6830c42-1 + - opencv 3.3.1 -> 3.3.1-4 + - pcl 1.8.1-2 -> 1.8.1-3 + - poco 1.7.8-1 -> 1.7.8-2 + - signalrclient 1.0.0-beta1-1 -> 1.0.0-beta1-2 + - vtk 8.0.0-3 -> 8.0.1-1 + - xlnt 1.1.0-1 -> 1.2.0-1 + * Various improvements in `vcpkg` when obtaining data from `PowerShell` scripts. It should now be more robust + * Fix Windows 7 (i.e. `PowerShell 2.0`) issues in `PowerShell` scripts + * Fix an issue with `feature packages` where an installed package would appear to be uninstalled if a feature of the package was installed and then uninstalled + * Bump required version & auto-downloaded version of `git` to 2.5.0 + +-- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 + + vcpkg (0.0.94) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index ac2866fef..e5fce74a7 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.94" \ No newline at end of file +"0.0.95" \ No newline at end of file -- cgit v1.2.3 From 305a9ae7f2b5754f1afa62670f8f53ab10e5c06c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 15:34:02 -0700 Subject: Fix date in CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88d1cb726..b2f3c720f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ vcpkg (0.0.95) * Fix an issue with `feature packages` where an installed package would appear to be uninstalled if a feature of the package was installed and then uninstalled * Bump required version & auto-downloaded version of `git` to 2.5.0 --- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 +-- vcpkg team WED, 01 Nov 2017 15:30:00 -0800 vcpkg (0.0.94) -- cgit v1.2.3 From fae64c544e86bfe327404b341b50d9e01dedea68 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 16:35:07 -0700 Subject: [apr] Update to 1.6.3 --- ports/apr/CONTROL | 2 +- ports/apr/portfile.cmake | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index 94581eab0..1f771a0ed 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.6.2-1 +Version: 1.6.3 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 414ca1dda..64ad02b81 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -7,11 +7,14 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.6.2) + +set(VERSION 1.6.3) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-${VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://www.apache.org/dist/apr/apr-1.6.2.tar.bz2" - FILENAME "apr-1.6.2.tar.bz2" - SHA512 20f449fde522f186b919b64ce6f90073b267557e17438607d31af917eca7941222dd7a7379d66f1430ff68f7e28fbccd140d24f3ca7aae8a876a550b19de284a + URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2" + FILENAME "apr-${VERSION}.tar.bz2" + SHA512 f6b8679ae7fafff793c825c78775c84a646267c441710a50664589850e13148719b4eab48ab6e7c95b7aed085cff831115687434a7b160dcc2faa0eae63ac996 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 82db1b3a2a446514e3c39d6c44dcbabf2efd9568 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 23:08:25 +0900 Subject: Enable C++11 features Enable C++11 features. --- ports/opencv/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index d712ce65e..48698a522 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -86,6 +86,7 @@ vcpkg_configure_cmake( # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON # ENABLE + -DENABLE_CXX11=ON -DENABLE_PYLINT=OFF # INSTALL -DINSTALL_FORCE_UNIX_PATHS=ON -- cgit v1.2.3 From ee2452f066e96b717c88471892872f3e8a09b2ad Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 23:11:12 +0900 Subject: Enable Microsoft Media Foundation support for Video I/O Enable Microsoft Media Foundation support for Video I/O. --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index f442e0cca..c5896a516 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-4 +Version: 3.3.1-5 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 48698a522..8e68379fa 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -101,6 +101,7 @@ vcpkg_configure_cmake( -DWITH_CUDA=${WITH_CUDA} -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_LAPACK=OFF + -DWITH_MSMF=ON -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -- cgit v1.2.3 From 38136a2d05435dc1ef4d9604b1336509a6d667f8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Nov 2017 11:42:32 -0700 Subject: [double-conversion] Fix regression introduced in vcpkg_fixup_cmake_targets. --- ports/double-conversion/CONTROL | 2 +- ports/double-conversion/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index 8ef2de918..fb0afdb9a 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 3.0.0-1 +Version: 3.0.0-2 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index cbb67bfb6..ee4881e88 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -44,6 +44,7 @@ if(NOT VCPKG_USE_HEAD_VERSION) file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) else() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) endif() -- cgit v1.2.3 From 6a91d1ece10ce0aeda89c44611d5335a07b8e40d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Nov 2017 15:20:42 -0700 Subject: [vcpkg] Refactor argument parsing to use common code paths. --- toolsrc/include/vcpkg/base/span.h | 12 +++ toolsrc/include/vcpkg/base/util.h | 2 +- toolsrc/include/vcpkg/build.h | 8 +- toolsrc/include/vcpkg/commands.h | 7 ++ toolsrc/include/vcpkg/vcpkgcmdarguments.h | 65 +++++++----- toolsrc/src/tests.arguments.cpp | 11 +- toolsrc/src/vcpkg/build.cpp | 29 ++++-- toolsrc/src/vcpkg/commands.autocomplete.cpp | 10 +- toolsrc/src/vcpkg/commands.buildexternal.cpp | 20 ++-- toolsrc/src/vcpkg/commands.cache.cpp | 16 ++- toolsrc/src/vcpkg/commands.ci.cpp | 20 +++- toolsrc/src/vcpkg/commands.contact.cpp | 12 ++- toolsrc/src/vcpkg/commands.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 15 ++- toolsrc/src/vcpkg/commands.dependinfo.cpp | 12 ++- toolsrc/src/vcpkg/commands.edit.cpp | 18 ++-- toolsrc/src/vcpkg/commands.env.cpp | 12 ++- toolsrc/src/vcpkg/commands.hash.cpp | 15 ++- toolsrc/src/vcpkg/commands.import.cpp | 14 ++- toolsrc/src/vcpkg/commands.integrate.cpp | 13 +-- toolsrc/src/vcpkg/commands.list.cpp | 20 +++- toolsrc/src/vcpkg/commands.owns.cpp | 13 ++- toolsrc/src/vcpkg/commands.portsdiff.cpp | 15 ++- toolsrc/src/vcpkg/commands.search.cpp | 22 ++-- toolsrc/src/vcpkg/commands.version.cpp | 11 +- toolsrc/src/vcpkg/export.cpp | 80 ++++++++------- toolsrc/src/vcpkg/help.cpp | 11 +- toolsrc/src/vcpkg/install.cpp | 26 ++--- toolsrc/src/vcpkg/remove.cpp | 42 ++++---- toolsrc/src/vcpkg/update.cpp | 11 +- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 147 ++++++++++++--------------- 31 files changed, 424 insertions(+), 287 deletions(-) diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h index 6be546351..158f1ac74 100644 --- a/toolsrc/include/vcpkg/base/span.h +++ b/toolsrc/include/vcpkg/base/span.h @@ -57,4 +57,16 @@ namespace vcpkg { return {v.data(), v.size()}; } + + template + constexpr T* begin(Span sp) + { + return sp.begin(); + } + + template + constexpr T* end(Span sp) + { + return sp.end(); + } } \ No newline at end of file diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index e67d38ad8..155b16cf7 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -30,7 +30,7 @@ namespace vcpkg::Util } template - using FmapOut = decltype(std::declval()(*begin(std::declval()))); + using FmapOut = decltype(std::declval()(*begin(std::declval()))); template> std::vector fmap(Cont&& xs, Func&& f) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 94d9fddf5..824f3ccaf 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -18,10 +18,10 @@ namespace vcpkg::Build { namespace Command { - void perform_and_exit(const FullPackageSpec& full_spec, - const fs::path& port_dir, - const ParsedArguments& options, - const VcpkgPaths& paths); + void perform_and_exit_ex(const FullPackageSpec& full_spec, + const fs::path& port_dir, + const ParsedArguments& options, + const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index d9ebad2c4..74fd80c03 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -23,16 +23,19 @@ namespace vcpkg::Commands namespace CI { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } namespace Env { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } namespace Create { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } @@ -49,16 +52,19 @@ namespace vcpkg::Commands namespace Search { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace List { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace Owns { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } @@ -99,6 +105,7 @@ namespace vcpkg::Commands namespace Contact { + extern const CommandStructure COMMAND_STRUCTURE; const std::string& email(); void perform_and_exit(const VcpkgCmdArguments& args); } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index e59979ad1..a832caf04 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -17,13 +17,47 @@ namespace vcpkg std::unordered_map settings; }; - struct VcpkgCmdArguments + struct VcpkgPaths; + + struct CommandSwitch + { + std::string name; + CStringView short_help_text; + }; + + struct CommandSetting { + std::string name; + CStringView short_help_text; + }; + + struct CommandOptionsStructure + { + Span switches; + Span settings; + }; + + struct CommandStructure + { + std::string example_text; + + size_t minimum_arity; + size_t maximum_arity; + + CommandOptionsStructure options; + + std::vector (*valid_arguments)(const VcpkgPaths& paths); + }; + #if defined(_WIN32) - static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); + using CommandLineCharType = wchar_t; #else - static VcpkgCmdArguments create_from_command_line(const int argc, const char* const* const argv); + using CommandLineCharType = char; #endif + + struct VcpkgCmdArguments + { + static VcpkgCmdArguments create_from_command_line(const int argc, const CommandLineCharType* const* const argv); static VcpkgCmdArguments create_from_arg_sequence(const std::string* arg_begin, const std::string* arg_end); std::unique_ptr vcpkg_root_dir; @@ -35,32 +69,9 @@ namespace vcpkg std::string command; std::vector command_arguments; - ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, - const std::vector& valid_settings) 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 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 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 std::string& example_text) const; + ParsedArguments parse_arguments(const CommandStructure& command_structure) const; private: std::unordered_map> optional_command_arguments; }; - - struct VcpkgPaths; - - struct CommandStructure - { - CStringView example_text; - - size_t minimum_arity; - size_t maximum_arity; - - Span switches; - Span settings; - - std::vector (*valid_arguments)(const VcpkgPaths& paths); - }; } diff --git a/toolsrc/src/tests.arguments.cpp b/toolsrc/src/tests.arguments.cpp index 25bf0f085..0f082222d 100644 --- a/toolsrc/src/tests.arguments.cpp +++ b/toolsrc/src/tests.arguments.cpp @@ -34,9 +34,12 @@ namespace UnitTest1 TEST_METHOD(create_from_arg_sequence_valued_options) { + std::array settings = { {{"--a", ""}} }; + CommandStructure cmdstruct = { "", 0, SIZE_MAX, {{}, settings }, nullptr }; + std::vector t = {"--a=b", "command", "argument"}; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); - auto opts = v.check_and_get_optional_command_arguments({}, {"--a"}); + auto opts = v.parse_arguments(cmdstruct); Assert::AreEqual("b", opts.settings["--a"].c_str()); Assert::AreEqual(size_t{1}, v.command_arguments.size()); Assert::AreEqual("argument", v.command_arguments[0].c_str()); @@ -45,9 +48,13 @@ namespace UnitTest1 TEST_METHOD(create_from_arg_sequence_valued_options2) { + std::array switches = { {{"--a", ""}, {"--c", ""}} }; + std::array settings = { { {"--b", ""}, {"--d", ""}} }; + CommandStructure cmdstruct = {"", 0, SIZE_MAX, {switches, settings}, nullptr}; + std::vector t = {"--a", "--b=c"}; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); - auto opts = v.check_and_get_optional_command_arguments({"--a", "--c"}, {"--b", "--d"}); + auto opts = v.parse_arguments(cmdstruct); Assert::AreEqual("c", opts.settings["--b"].c_str()); Assert::IsTrue(opts.settings.find("--d") == opts.settings.end()); Assert::IsTrue(opts.switches.find("--a") != opts.switches.end()); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c59b6f7d1..8b4654aa8 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -28,10 +28,10 @@ namespace vcpkg::Build::Command static const std::string OPTION_CHECKS_ONLY = "--checks-only"; - void perform_and_exit(const FullPackageSpec& full_spec, - const fs::path& port_dir, - const ParsedArguments& options, - const VcpkgPaths& paths) + void perform_and_exit_ex(const FullPackageSpec& full_spec, + const fs::path& port_dir, + const ParsedArguments& options, + const VcpkgPaths& paths) { const PackageSpec& spec = full_spec.package_spec; if (Util::Sets::contains(options.switches, OPTION_CHECKS_ONLY)) @@ -97,21 +97,32 @@ namespace vcpkg::Build::Command Checks::exit_success(VCPKG_LINE_INFO); } + static const std::array BUILD_SWITCHES = {{ + {OPTION_CHECKS_ONLY, "Only run checks, do not rebuild package"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("build zlib:x64-windows"), + 1, + 1, + {BUILD_SWITCHES, {}}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = Help::create_example_string("build zlib:x64-windows"); // Build only takes a single package and all dependencies must already be installed - args.check_exact_arg_count(1, EXAMPLE); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::string command_argument = args.command_arguments.at(0); - const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); + const FullPackageSpec spec = + Input::check_and_get_full_package_spec(command_argument, default_triplet, COMMAND_STRUCTURE.example_text); Input::check_triplet(spec.package_spec.triplet(), paths); if (!spec.features.empty() && !GlobalState::feature_packages) { Checks::exit_with_message( VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); } - const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}, {}); - perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); + perform_and_exit_ex(spec, paths.port_dir(spec.package_spec), options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 410bfcd0d..0df7ec5eb 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -120,7 +120,6 @@ namespace vcpkg::Commands::Autocomplete }; static constexpr CommandEntry COMMANDS[] = { - CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, @@ -137,11 +136,16 @@ namespace vcpkg::Commands::Autocomplete const bool is_option = Strings::case_insensitive_ascii_starts_with(prefix, "-"); if (is_option) { - results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); + results = + Util::fmap(command.structure.options.switches, [](const CommandSwitch& s) { return s.name; }); + + auto settings = Util::fmap(command.structure.options.settings, [](auto&& s) { return s.name; }); + results.insert(results.end(), settings.begin(), settings.end()); } else { - results = command.structure.valid_arguments(paths); + if (command.structure.valid_arguments != nullptr) + results = command.structure.valid_arguments(paths); } Util::unstable_keep_if(results, [&](const std::string& s) { diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 2cc7aabde..82d03db48 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -7,17 +7,23 @@ namespace vcpkg::Commands::BuildExternal { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"), + 2, + 2, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = - Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); - args.check_exact_arg_count(2, EXAMPLE); - const FullPackageSpec spec = - Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); + + const FullPackageSpec spec = Input::check_and_get_full_package_spec( + args.command_arguments.at(0), default_triplet, COMMAND_STRUCTURE.example_text); Input::check_triplet(spec.package_spec.triplet(), paths); - const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {}); const fs::path port_dir = args.command_arguments.at(1); - Build::Command::perform_and_exit(spec, port_dir, options, paths); + Build::Command::perform_and_exit_ex(spec, port_dir, options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 64a3169b1..6fd123b7c 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -26,13 +26,19 @@ namespace vcpkg::Commands::Cache return output; } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format( + "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", + Help::create_example_string("cache png")), + 0, + 1, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - 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", - Help::create_example_string("cache png")); - args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index d012ff6dc..dce294004 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -58,13 +58,23 @@ namespace vcpkg::Commands::CI Install::InstallSummary summary; }; + static const std::string OPTION_EXCLUDE = "--exclude"; + + static const std::array CI_SETTINGS = {{ + {OPTION_EXCLUDE, "Comma separated list of ports to skip"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("ci x64-windows"), + 0, + SIZE_MAX, + {{}, CI_SETTINGS}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string OPTION_EXCLUDE = "--exclude"; - - static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); - - const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {OPTION_EXCLUDE}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::vector exclusions = Strings::split(options.settings.at(OPTION_EXCLUDE), ","); const std::set exclusions_set(exclusions.cbegin(), exclusions.cend()); diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 5694c1fa6..5d62faeea 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -2,6 +2,7 @@ #include #include +#include namespace vcpkg::Commands::Contact { @@ -11,10 +12,17 @@ namespace vcpkg::Commands::Contact return S_EMAIL; } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("contact"), + 0, + 0, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args) { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); System::println("Send an email to %s with any feedback.", email()); Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 9d969ea28..15b10c7ea 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands Span> get_available_commands_type_a() { static std::vector> t = { - {"install", &Install::perform_and_exit}, + PackageNameAndFunction{"install", &Install::perform_and_exit}, {"ci", &CI::perform_and_exit}, {"remove", &Remove::perform_and_exit}, {"build", &Build::Command::perform_and_exit}, diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index f1acacd14..c7183d257 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -8,13 +8,18 @@ namespace vcpkg::Commands::Create { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string( + R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"), + 2, + 3, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string( - R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); - args.check_max_arg_count(3, EXAMPLE); - args.check_min_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index e5554f7e2..bb300d96e 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -9,11 +9,17 @@ namespace vcpkg::Commands::DependInfo { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string(R"###(depend-info [pat])###"), + 0, + 1, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string(R"###(depend-info [pat])###"); - args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); std::vector> source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index bf618e256..e40e394fb 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -34,11 +34,6 @@ namespace vcpkg::Commands::Edit static const std::string OPTION_BUILDTREES = "--buildtrees"; - static const std::array SWITCHES = { - OPTION_BUILDTREES, - }; - static const std::array SETTINGS; - static std::vector valid_arguments(const VcpkgPaths& paths) { auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); @@ -47,12 +42,15 @@ namespace vcpkg::Commands::Edit [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); } + static const std::array EDIT_SWITCHES = {{ + {OPTION_BUILDTREES, "Open editor into the port-specific buildtree subfolder"}, + }}; + const CommandStructure COMMAND_STRUCTURE = { - "edit zlib", + Help::create_example_string("edit zlib"), 1, 1, - SWITCHES, - SETTINGS, + {EDIT_SWITCHES, {}}, &valid_arguments, }; @@ -63,9 +61,7 @@ namespace vcpkg::Commands::Edit auto& fs = paths.get_filesystem(); - static const std::string EXAMPLE = Help::create_example_string("edit zlib"); - args.check_exact_arg_count(1, EXAMPLE); - const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index c0d26dac2..98b5aced9 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -7,11 +7,17 @@ namespace vcpkg::Commands::Env { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("env --triplet x64-windows"), + 0, + 0, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = Help::create_example_string(R"(env --triplet x64-windows)"); - args.check_exact_arg_count(0, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 51f6b9ad0..a5940ea1e 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -28,13 +28,18 @@ namespace vcpkg::Commands::Hash System::println(hash); } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a file path\n%s", + Help::create_example_string("hash boost_1_62_0.tar.bz2")), + 1, + 2, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args) { - static const std::string EXAMPLE = Strings::format("The argument should be a file path\n%s", - Help::create_example_string("hash boost_1_62_0.tar.bz2")); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); if (args.command_arguments.size() == 1) { diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp index 5e74b6d94..24394207b 100644 --- a/toolsrc/src/vcpkg/commands.import.cpp +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -92,12 +92,18 @@ namespace vcpkg::Commands::Import fs.write_contents(control_file_path, Strings::serialize(control_file_data)); } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string( + R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"), + 3, + 3, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string( - R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); - args.check_exact_arg_count(3, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 604bd2c6e..31b9ec722 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -333,10 +333,6 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console static const std::string PROJECT = "project"; } - static const std::array INSTALL_SWITCHES; - - static const std::array INSTALL_SETTINGS; - static std::vector valid_arguments(const VcpkgPaths&) { return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT}; @@ -348,18 +344,13 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console INTEGRATE_COMMAND_HELPSTRING), 1, 1, - INSTALL_SWITCHES, - INSTALL_SETTINGS, + {}, &valid_arguments, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format("Commands:\n" - "%s", - INTEGRATE_COMMAND_HELPSTRING); - args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); #if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 145d4c931..1f2387843 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -24,13 +24,23 @@ namespace vcpkg::Commands::List } } + static const std::array LIST_SWITCHES = {{ + {OPTION_FULLDESC, "Do not truncate long text"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format( + "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", + Help::create_example_string("list png")), + 0, + 1, + {LIST_SWITCHES, {}}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - 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", - Help::create_example_string("list png")); - args.check_max_arg_count(1, EXAMPLE); - const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages = get_installed_ports(status_paragraphs); diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index b2db966e1..52249187b 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -23,13 +23,18 @@ namespace vcpkg::Commands::Owns } } } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a pattern to search for. %s", + Help::create_example_string("owns zlib.dll")), + 1, + 1, + {}, + nullptr, + }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", - Help::create_example_string("owns zlib.dll")); - args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 5008f3e8a..0277c8bdb 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -114,13 +114,18 @@ namespace vcpkg::Commands::PortsDiff VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", git_commit_id); } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", + Help::create_example_string("portsdiff mybranchname")), + 1, + 2, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", - Help::create_example_string("portsdiff mybranchname")); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const fs::path& git_exe = paths.get_git_exe(); diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index ad3046e6d..01291ddfb 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -79,14 +79,24 @@ namespace vcpkg::Commands::Search } } + static std::array SEARCH_SWITCHES = {{ + {OPTION_GRAPH, "Open editor into the port-specific buildtree subfolder"}, + {OPTION_FULLDESC, "Do not truncate long text"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format( + "The argument should be a substring to search for, or no argument to display all libraries.\n%s", + Help::create_example_string("search png")), + 0, + 1, + {SEARCH_SWITCHES, {}}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& 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", - Help::create_example_string("search png")); - args.check_max_arg_count(1, EXAMPLE); - const ParsedArguments options = - args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const bool full_description = Util::Sets::contains(options.switches, OPTION_FULLDESC); auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index e8756a77d..3f44cf1a2 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #define STRINGIFY(...) #__VA_ARGS__ @@ -61,11 +62,17 @@ namespace vcpkg::Commands::Version } } } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("version"), + 0, + 0, + {}, + nullptr, + }; void perform_and_exit(const VcpkgCmdArguments& args) { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); System::println("Vcpkg package management program version %s\n" "\n" diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index eb4f5db3c..bbeecefed 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -257,51 +257,57 @@ namespace vcpkg::Export std::vector specs; }; + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_RAW = "--raw"; + static const std::string OPTION_NUGET = "--nuget"; + static const std::string OPTION_IFW = "--ifw"; + static const std::string OPTION_ZIP = "--zip"; + static const std::string OPTION_SEVEN_ZIP = "--7zip"; + static const std::string OPTION_NUGET_ID = "--nuget-id"; + static const std::string OPTION_NUGET_VERSION = "--nuget-version"; + static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; + static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; + static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; + static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; + + static const std::array EXPORT_SWITCHES = {{ + {OPTION_DRY_RUN, "Do not actually export"}, + {OPTION_RAW, "Export to an uncompressed directory"}, + {OPTION_NUGET, "Export a NuGet package"}, + {OPTION_IFW, "Export to an IFW-based installer"}, + {OPTION_ZIP, "Export to a zip file"}, + {OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"}, + }}; + static const std::array EXPORT_SETTINGS = {{ + {OPTION_NUGET_ID, "Specify the id for the exported NuGet package"}, + {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, + {OPTION_IFW_REPOSITORY_URL, ""}, + {OPTION_IFW_PACKAGES_DIR_PATH, ""}, + {OPTION_IFW_REPOSITORY_DIR_PATH, ""}, + {OPTION_IFW_CONFIG_FILE_PATH, ""}, + {OPTION_IFW_INSTALLER_FILE_PATH, ""}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("export zlib zlib:x64-windows boost --nuget"), + 0, + SIZE_MAX, + {EXPORT_SWITCHES, EXPORT_SETTINGS}, + nullptr, + }; + static ExportArguments handle_export_command_arguments(const VcpkgCmdArguments& args, const Triplet& default_triplet) { ExportArguments ret; - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_RAW = "--raw"; - static const std::string OPTION_NUGET = "--nuget"; - static const std::string OPTION_IFW = "--ifw"; - static const std::string OPTION_ZIP = "--zip"; - static const std::string OPTION_SEVEN_ZIP = "--7zip"; - static const std::string OPTION_NUGET_ID = "--nuget-id"; - static const std::string OPTION_NUGET_VERSION = "--nuget-version"; - static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; - static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; - static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; - static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; - static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; + const auto options = args.parse_arguments(COMMAND_STRUCTURE); // input sanitization - static const std::string EXAMPLE = Help::create_example_string("export zlib zlib:x64-windows boost --nuget"); - args.check_min_arg_count(1, EXAMPLE); - ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); }); - - const auto options = args.check_and_get_optional_command_arguments( - { - OPTION_DRY_RUN, - OPTION_RAW, - OPTION_NUGET, - OPTION_IFW, - OPTION_ZIP, - OPTION_SEVEN_ZIP, - }, - { - OPTION_NUGET_ID, - OPTION_NUGET_VERSION, - OPTION_IFW_REPOSITORY_URL, - OPTION_IFW_PACKAGES_DIR_PATH, - OPTION_IFW_REPOSITORY_DIR_PATH, - OPTION_IFW_CONFIG_FILE_PATH, - OPTION_IFW_INSTALLER_FILE_PATH, - }); ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend(); ret.nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); @@ -313,7 +319,7 @@ namespace vcpkg::Export { System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); - System::print(EXAMPLE); + System::print(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 8783833f2..5d4cf99a4 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -91,10 +91,17 @@ namespace vcpkg::Help System::println(create_example_string(command_and_arguments)); } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("help"), + 0, + 1, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.check_max_arg_count(1); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); if (args.command_arguments.empty()) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index b1f722d59..20ffd3164 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -535,13 +535,13 @@ namespace vcpkg::Install static const std::string OPTION_RECURSE = "--recurse"; static const std::string OPTION_KEEP_GOING = "--keep-going"; - static const std::array INSTALL_SWITCHES = { - OPTION_DRY_RUN, - OPTION_USE_HEAD_VERSION, - OPTION_NO_DOWNLOADS, - OPTION_RECURSE, - OPTION_KEEP_GOING, - }; + static const std::array INSTALL_SWITCHES = {{ + {OPTION_DRY_RUN, "Do not actually build or install"}, + {OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"}, + {OPTION_NO_DOWNLOADS, "Do not download new sources"}, + {OPTION_RECURSE, "Allow removal of packages as part of installation"}, + {OPTION_KEEP_GOING, "Continue installing packages on failure"}, + }}; static const std::array INSTALL_SETTINGS; std::vector get_all_port_names(const VcpkgPaths& paths) @@ -553,22 +553,20 @@ namespace vcpkg::Install } const CommandStructure COMMAND_STRUCTURE = { - "install zlib zlib:x64-windows curl boost", + Help::create_example_string("install zlib zlib:x64-windows curl boost"), 1, SIZE_MAX, - INSTALL_SWITCHES, - INSTALL_SETTINGS, + {INSTALL_SWITCHES, {}}, &get_all_port_names, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { // input sanitization - static const std::string EXAMPLE = Help::create_example_string("install zlib zlib:x64-windows curl boost"); - args.check_min_arg_count(1, EXAMPLE); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE); + return Input::check_and_get_full_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -581,8 +579,6 @@ namespace vcpkg::Install } } - const ParsedArguments options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}, {}); const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); const bool use_head_version = Util::Sets::contains(options.switches, (OPTION_USE_HEAD_VERSION)); const bool no_downloads = Util::Sets::contains(options.switches, (OPTION_NO_DOWNLOADS)); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 156f23003..7f40fb16e 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -169,14 +169,13 @@ namespace vcpkg::Remove static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_OUTDATED = "--outdated"; - static const std::array SWITCHES = { - OPTION_PURGE, - OPTION_NO_PURGE, - OPTION_RECURSE, - OPTION_DRY_RUN, - OPTION_OUTDATED, - }; - static const std::array SETTINGS; + static const std::array SWITCHES = {{ + {OPTION_PURGE, "Remove the cached copy of the package (default)"}, + {OPTION_NO_PURGE, "Do not remove the cached copy of the package"}, + {OPTION_RECURSE, "Allow removal of packages not explicitly specified on the command line"}, + {OPTION_DRY_RUN, "Print the packages to be removed, but do not remove them"}, + {OPTION_OUTDATED, "Select all packages with versions that do not match the portfiles"}, + }}; static std::vector valid_arguments(const VcpkgPaths& paths) { @@ -187,25 +186,26 @@ namespace vcpkg::Remove } const CommandStructure COMMAND_STRUCTURE = { - "remove zlib zlib:x64-windows curl boost", - 1, + Help::create_example_string("remove zlib zlib:x64-windows curl boost"), + 0, SIZE_MAX, - SWITCHES, - SETTINGS, + {SWITCHES, {}}, &valid_arguments, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost"); - const ParsedArguments options = args.check_and_get_optional_command_arguments( - {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); StatusParagraphs status_db = database_load_check(paths); std::vector specs; if (Util::Sets::contains(options.switches, OPTION_OUTDATED)) { - args.check_exact_arg_count(0, EXAMPLE); + if (args.command_arguments.size() != 0) + { + System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); + Checks::exit_fail(VCPKG_LINE_INFO); + } specs = Util::fmap(Update::find_outdated_packages(paths, status_db), [](auto&& outdated) { return outdated.spec; }); @@ -217,9 +217,13 @@ namespace vcpkg::Remove } else { - args.check_min_arg_count(1, EXAMPLE); + if (args.command_arguments.size() < 1) + { + System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); + Checks::exit_fail(VCPKG_LINE_INFO); + } specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -231,7 +235,7 @@ namespace vcpkg::Remove if (purge_was_passed && no_purge_was_passed) { System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(EXAMPLE); + System::print(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 7d565251e..61a3f89c5 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -38,10 +38,17 @@ namespace vcpkg::Update return output; } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("update"), + 0, + 0, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); const StatusParagraphs status_db = database_load_check(paths); diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 209f6a3f2..35cdbc12e 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -45,11 +45,8 @@ namespace vcpkg option_field = new_setting; } -#if defined(_WIN32) - VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv) -#else - VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const char* const* const argv) -#endif + VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, + const CommandLineCharType* const* const argv) { std::vector v; for (int i = 1; i < argc; ++i) @@ -158,46 +155,83 @@ namespace vcpkg return args; } - ParsedArguments VcpkgCmdArguments::check_and_get_optional_command_arguments( - const std::vector& valid_switches, const std::vector& valid_settings) const + ParsedArguments VcpkgCmdArguments::parse_arguments(const CommandStructure& command_structure) const { bool failed = false; ParsedArguments output; + const size_t actual_arg_count = command_arguments.size(); + + if (command_structure.minimum_arity == command_structure.maximum_arity) + { + if (actual_arg_count != command_structure.minimum_arity) + { + System::println(System::Color::error, + "Error: '%s' requires %u arguments, but %u were provided.", + this->command, + command_structure.minimum_arity, + actual_arg_count); + failed = true; + } + } + else + { + if (actual_arg_count < command_structure.minimum_arity) + { + System::println(System::Color::error, + "Error: '%s' requires at least %u arguments, but %u were provided", + this->command, + command_structure.minimum_arity, + actual_arg_count); + failed = true; + } + if (actual_arg_count > command_structure.maximum_arity) + { + System::println(System::Color::error, + "Error: '%s' requires at most %u arguments, but %u were provided", + this->command, + command_structure.maximum_arity, + actual_arg_count); + failed = true; + } + } + auto options_copy = this->optional_command_arguments; - for (const std::string& option : valid_switches) + for (auto&& option : command_structure.options.switches) { - const auto it = options_copy.find(option); + const auto it = options_copy.find(option.name); if (it != options_copy.end()) { if (it->second.has_value()) { // Having a string value indicates it was passed like '--a=xyz' - System::println(System::Color::error, "The option '%s' does not accept an argument.", option); + System::println( + System::Color::error, "Error: The option '%s' does not accept an argument.", option.name); failed = true; } else { - output.switches.insert(option); + output.switches.insert(option.name); options_copy.erase(it); } } } - for (const std::string& option : valid_settings) + for (auto&& option : command_structure.options.settings) { - const auto it = options_copy.find(option); + const auto it = options_copy.find(option.name); if (it != options_copy.end()) { if (!it->second.has_value()) { // Not having a string value indicates it was passed like '--a' - System::println(System::Color::error, "The option '%s' must be passed an argument.", option); + System::println( + System::Color::error, "Error: The option '%s' must be passed an argument.", option.name); failed = true; } else { - output.settings.emplace(option, it->second.value_or_exit(VCPKG_LINE_INFO)); + output.settings.emplace(option.name, it->second.value_or_exit(VCPKG_LINE_INFO)); options_copy.erase(it); } } @@ -210,83 +244,32 @@ namespace vcpkg { System::println(" %s", option.first); } - System::println("\nValid options are:", this->command); - for (auto&& option : valid_switches) + System::println(); + failed = true; + } + + if (failed) + { + if (!command_structure.example_text.empty()) { - System::println(" %s", option); + System::println("%s", command_structure.example_text); } - for (auto&& option : valid_settings) + + System::println("Options:", this->command); + for (auto&& option : command_structure.options.switches) { - System::println(" %s=...", option); + System::println(" %-40s %s", option.name, option.short_help_text); + } + for (auto&& option : command_structure.options.settings) + { + System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); } System::println(" --triplet "); System::println(" --vcpkg-root "); Checks::exit_fail(VCPKG_LINE_INFO); } - if (failed) Checks::exit_fail(VCPKG_LINE_INFO); return output; } - - void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const - { - return check_max_arg_count(expected_arg_count, ""); - } - - void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const - { - return check_min_arg_count(expected_arg_count, ""); - } - - void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const - { - return check_exact_arg_count(expected_arg_count, ""); - } - - void VcpkgCmdArguments::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) - { - System::println(System::Color::error, - "Error: `%s` requires at most %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void VcpkgCmdArguments::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) - { - System::println(System::Color::error, - "Error: `%s` requires at least %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void VcpkgCmdArguments::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) - { - System::println(System::Color::error, - "Error: `%s` requires %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } } -- cgit v1.2.3 From 2feea0828ba94d2a365e8825fe799ed12acc6e6c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Nov 2017 18:17:21 -0700 Subject: [vcpkg] Improve `vcpkg help` -- now has per-command help! --- toolsrc/include/vcpkg/base/cstringview.h | 2 + toolsrc/include/vcpkg/export.h | 2 + toolsrc/include/vcpkg/help.h | 4 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 2 + toolsrc/src/vcpkg/export.cpp | 3 +- toolsrc/src/vcpkg/help.cpp | 116 +++++++++++++++++------------- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 40 ++++++----- 7 files changed, 99 insertions(+), 70 deletions(-) diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index 342455402..0441bc573 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -63,6 +63,8 @@ namespace vcpkg inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); } + inline std::string operator+(std::string&& l, const CStringView& r) { return std::move(l) + r.c_str(); } + inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); diff --git a/toolsrc/include/vcpkg/export.h b/toolsrc/include/vcpkg/export.h index f3285e187..eb99b4fb1 100644 --- a/toolsrc/include/vcpkg/export.h +++ b/toolsrc/include/vcpkg/export.h @@ -4,6 +4,8 @@ namespace vcpkg::Export { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h index 39ad6912d..73549efd7 100644 --- a/toolsrc/include/vcpkg/help.h +++ b/toolsrc/include/vcpkg/help.h @@ -7,13 +7,13 @@ namespace vcpkg::Help { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); void help_topic_valid_triplet(const VcpkgPaths& paths); void print_usage(); - void print_example(const std::string& command_and_arguments); - std::string create_example_string(const std::string& command_and_arguments); } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index a832caf04..93eeb6ef5 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -49,6 +49,8 @@ namespace vcpkg std::vector (*valid_arguments)(const VcpkgPaths& paths); }; + void display_usage(const CommandStructure& command_structure); + #if defined(_WIN32) using CommandLineCharType = wchar_t; #else diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index bbeecefed..625dff8b1 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -289,7 +290,7 @@ namespace vcpkg::Export {OPTION_IFW_INSTALLER_FILE_PATH, ""}, }}; - const CommandStructure COMMAND_STRUCTURE = { + const CommandStructure vcpkg::Export::COMMAND_STRUCTURE = { Help::create_example_string("export zlib zlib:x64-windows boost --nuget"), 0, SIZE_MAX, diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 5d4cf99a4..c83f0277b 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -2,15 +2,68 @@ #include #include +#include +#include +#include +#include namespace vcpkg::Help { - void help_topics() + struct Topic + { + using topic_function = void (*)(const VcpkgPaths& paths); + + constexpr Topic(CStringView n, topic_function fn) : name(n), print(fn) {} + + CStringView name; + topic_function print; + }; + + template + static void command_topic_fn(const VcpkgPaths&) + { + display_usage(S); + } + + static void integrate_topic_fn(const VcpkgPaths&) + { + System::print("Commands:\n" + "%s", + Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); + } + + static void help_topics(const VcpkgPaths&); + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("help"), + 0, + 1, + {}, + nullptr, + }; + + static constexpr std::array topics = {{ + {"create", command_topic_fn}, + {"edit", command_topic_fn}, + {"env", command_topic_fn}, + {"export", command_topic_fn}, + {"help", command_topic_fn}, + {"install", command_topic_fn}, + {"integrate", integrate_topic_fn}, + {"list", command_topic_fn}, + {"owns", command_topic_fn}, + {"remove", command_topic_fn}, + {"search", command_topic_fn}, + {"topics", help_topics}, + }}; + + static void help_topics(const VcpkgPaths&) { System::println("Available help topics:\n" " triplet\n" - " integrate\n" - " export"); + " integrate" + "%s", + Strings::join("", topics, [](const Topic& topic) { return std::string("\n ") + topic.name; })); } void help_topic_valid_triplet(const VcpkgPaths& paths) @@ -22,21 +75,6 @@ namespace vcpkg::Help } } - void help_topic_export() - { - System::println("Summary:\n" - " vcpkg export [options] ...\n" - "\n" - "Options:\n" - " --7zip Export to a 7zip (.7z) file\n" - " --dry-run Do not actually export\n" - " --nuget Export a NuGet package\n" - " --nuget-id= Specify the id for the exported NuGet package\n" - " --nuget-version= Specify the version for the exported NuGet package\n" - " --raw Export to an uncompressed directory\n" - " --zip Export to a zip file"); - } - void print_usage() { System::println( @@ -86,19 +124,6 @@ namespace vcpkg::Help return cs; } - void print_example(const std::string& command_and_arguments) - { - System::println(create_example_string(command_and_arguments)); - } - - const CommandStructure COMMAND_STRUCTURE = { - Help::create_example_string("help"), - 0, - 1, - {}, - nullptr, - }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.parse_arguments(COMMAND_STRUCTURE); @@ -112,27 +137,18 @@ namespace vcpkg::Help if (topic == "triplet" || topic == "triplets" || topic == "triple") { help_topic_valid_triplet(paths); + Checks::exit_success(VCPKG_LINE_INFO); } - else if (topic == "export") - { - help_topic_export(); - } - else if (topic == "integrate") - { - System::print("Commands:\n" - "%s", - Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); - } - else if (topic == "topics") - { - help_topics(); - } - else + + auto it_topic = Util::find_if(topics, [&](const Topic& t) { return t.name == topic; }); + if (it_topic != topics.end()) { - System::println(System::Color::error, "Error: unknown topic %s", topic); - help_topics(); - Checks::exit_fail(VCPKG_LINE_INFO); + it_topic->print(paths); + Checks::exit_success(VCPKG_LINE_INFO); } - Checks::exit_success(VCPKG_LINE_INFO); + + System::println(System::Color::error, "Error: unknown topic %s", topic); + help_topics(paths); + Checks::exit_fail(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 35cdbc12e..671a89892 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -250,26 +250,32 @@ namespace vcpkg if (failed) { - if (!command_structure.example_text.empty()) - { - System::println("%s", command_structure.example_text); - } - - System::println("Options:", this->command); - for (auto&& option : command_structure.options.switches) - { - System::println(" %-40s %s", option.name, option.short_help_text); - } - for (auto&& option : command_structure.options.settings) - { - System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); - } - System::println(" --triplet "); - System::println(" --vcpkg-root "); - + display_usage(command_structure); Checks::exit_fail(VCPKG_LINE_INFO); } return output; } + + void display_usage(const CommandStructure& command_structure) + { + if (!command_structure.example_text.empty()) + { + System::println("%s", command_structure.example_text); + } + + System::println("Options:"); + for (auto&& option : command_structure.options.switches) + { + System::println(" %-40s %s", option.name, option.short_help_text); + } + for (auto&& option : command_structure.options.settings) + { + System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); + } + System::println(" %-40s %s", "--triplet ", "Set the default triplet for unqualified packages"); + System::println(" %-40s %s", + "--vcpkg-root ", + "Specify the vcpkg directory to use instead of current directory or tool directory"); + } } -- cgit v1.2.3 From 115cd5f69f1060d3662355a3276948cd77b7fa31 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 3 Nov 2017 20:31:13 +0300 Subject: [vcpkg-help-export-ifw] Add settings description --- toolsrc/src/vcpkg/export.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 625dff8b1..9b86863eb 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -283,11 +283,11 @@ namespace vcpkg::Export static const std::array EXPORT_SETTINGS = {{ {OPTION_NUGET_ID, "Specify the id for the exported NuGet package"}, {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, - {OPTION_IFW_REPOSITORY_URL, ""}, - {OPTION_IFW_PACKAGES_DIR_PATH, ""}, - {OPTION_IFW_REPOSITORY_DIR_PATH, ""}, - {OPTION_IFW_CONFIG_FILE_PATH, ""}, - {OPTION_IFW_INSTALLER_FILE_PATH, ""}, + {OPTION_IFW_REPOSITORY_URL, "Specify the remote repository URL for the online installer"}, + {OPTION_IFW_PACKAGES_DIR_PATH, "Specify the temporary directory path for the repacked packages"}, + {OPTION_IFW_REPOSITORY_DIR_PATH, "Specify the directory path for the exported repository"}, + {OPTION_IFW_CONFIG_FILE_PATH, "Specify the temporary file path for the installer configuration"}, + {OPTION_IFW_INSTALLER_FILE_PATH, "Specify the file path for the exported installer"}, }}; const CommandStructure vcpkg::Export::COMMAND_STRUCTURE = { -- cgit v1.2.3 From 66ad158be46e09b2db4fe8be90841fc01d271c68 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 3 Nov 2017 14:44:11 -0700 Subject: [opencv] Disable MSMF in UWP due to an upstream bug --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index c5896a516..47d8b2443 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-5 +Version: 3.3.1-6 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 8e68379fa..f201ea706 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -57,6 +57,11 @@ if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) endif() +set(WITH_MSMF ON) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WITH_MSMF OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -101,7 +106,7 @@ vcpkg_configure_cmake( -DWITH_CUDA=${WITH_CUDA} -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_LAPACK=OFF - -DWITH_MSMF=ON + -DWITH_MSMF=${WITH_MSMF} -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -- cgit v1.2.3 From 24c3f87bf45838aeeb74c513d40ac175994d0b7f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 18:54:10 -0700 Subject: [vcpkg_download_distfile] Now downloads in a temp dir and rename to the target location --- scripts/cmake/vcpkg_download_distfile.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index b8acfc823..ff32f1aed 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -38,7 +38,12 @@ function(vcpkg_download_distfile VAR) set(oneValueArgs FILENAME SHA512) set(multipleValuesArgs URLS) cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) + set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") + + file(REMOVE_RECURSE "${DOWNLOADS}/temp") + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) message(STATUS "Testing integrity of ${FILE_KIND}...") @@ -65,13 +70,13 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} ${downloaded_file_path} STATUS download_status) + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status SHOW_PROGRESS) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") - file(REMOVE ${downloaded_file_path}) set(download_success 0) else() + file(RENAME ${download_file_path_part} ${downloaded_file_path}) message(STATUS "Downloading ${url}... OK") set(download_success 1) break() -- cgit v1.2.3 From 9150cb8a906c99ff1881fe0d88811ad967658cde Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 18:54:34 -0700 Subject: [vcpkg_find_acquire_program] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_find_acquire_program.cmake | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index fdee0cb1f..e6a37e328 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -164,18 +164,20 @@ function(vcpkg_find_acquire_program VAR) do_find() if("${${VAR}}" MATCHES "-NOTFOUND") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} - EXPECTED_HASH SHA512=${HASH} - SHOW_PROGRESS + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + SHA512 ${HASH} + FILENAME ${ARCHIVE} ) + file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) if(DEFINED NOEXTRACT) - file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) if(ARCHIVE_EXTENSION STREQUAL ".msi") - file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) + file(TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} @@ -183,7 +185,7 @@ function(vcpkg_find_acquire_program VAR) ) else() execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} ) endif() -- cgit v1.2.3 From ebb52b8cb19e049cf998bd6742cb9f6a07e947cd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:08:13 -0700 Subject: Remove vcpkg_acquire_depot_tools --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 48 --------------------------- scripts/cmake/vcpkg_common_functions.cmake | 1 - 2 files changed, 49 deletions(-) delete mode 100644 scripts/cmake/vcpkg_acquire_depot_tools.cmake diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake deleted file mode 100644 index 009ba40f1..000000000 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ /dev/null @@ -1,48 +0,0 @@ -function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) - set(TOOLPATH ${DOWNLOADS}/tools/depot_tools) - set(URL "https://storage.googleapis.com/chrome-infra/depot_tools.zip") - set(ARCHIVE "depot_tools.zip") - set(STAMP "initialized-depot-tools.stamp") - set(downloaded_file_path ${DOWNLOADS}/${ARCHIVE}) - - if(NOT EXISTS "${TOOLPATH}/${STAMP}") - - message(STATUS "Acquiring Depot Tools...") - - if(EXISTS ${downloaded_file_path}) - message(STATUS "Using cached ${downloaded_file_path}") - else() - if(_VCPKG_NO_DOWNLOADS) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - message(STATUS "Downloading ${URL}... Failed. Status: ${download_status}") - file(REMOVE ${downloaded_file_path}) - set(download_success 0) - else() - message(STATUS "Downloading ${URL}... OK") - set(download_success 1) - endif() - - if (NOT download_success) - message(FATAL_ERROR - "\n" - " Failed to download file.\n" - " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") - endif() - endif() - - - file(REMOVE_RECURSE ${TOOLPATH}) - file(MAKE_DIRECTORY ${TOOLPATH}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${TOOLPATH} - ) - file(WRITE "${TOOLPATH}/${STAMP}" "0") - message(STATUS "Acquiring Depot Tools... OK") - endif() - set(${PATH_TO_ROOT_OUT} ${TOOLPATH} PARENT_SCOPE) -endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 81e8e5813..7ef87f2ea 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -21,4 +21,3 @@ include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) -include(vcpkg_acquire_depot_tools) -- cgit v1.2.3 From dc7db2571399a97d6dacc4f12f81ee1fa204987d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:08:53 -0700 Subject: [downloads] Don't show progress by default --- scripts/cmake/vcpkg_download_distfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index ff32f1aed..0141e9811 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -70,7 +70,7 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status SHOW_PROGRESS) + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") -- cgit v1.2.3 From 76d4666f12cbce4a52123cc41d489dfa4ce4bbba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:14:10 -0700 Subject: [vcpkg_acquire_msys] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_acquire_msys.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 830022906..80a30bf2b 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -70,14 +70,18 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH}) if(NOT EXISTS "${TOOLPATH}/${STAMP}") + message(STATUS "Acquiring MSYS2...") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} - EXPECTED_HASH SHA512=${HASH} + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + FILENAME ${ARCHIVE} + SHA512 ${HASH} ) + file(REMOVE_RECURSE ${TOOLPATH}/${TOOLSUBPATH}) file(MAKE_DIRECTORY ${TOOLPATH}) execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} WORKING_DIRECTORY ${TOOLPATH} ) execute_process( -- cgit v1.2.3 From 8bbd043beac822c20c54e6f2ee686777c9a20ac9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:34:08 -0700 Subject: vcpkg_from_github] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_download_distfile.cmake | 4 ++++ scripts/cmake/vcpkg_from_github.cmake | 33 ++++++++++++----------------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 0141e9811..b22d82a16 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -46,6 +46,10 @@ function(vcpkg_download_distfile VAR) file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) + if (_VCPKG_INTERNAL_NO_HASH_CHECK) + return() + endif() + message(STATUS "Testing integrity of ${FILE_KIND}...") file(SHA512 ${downloaded_file_path} FILE_HASH) if(NOT "${FILE_HASH}" STREQUAL "${vcpkg_download_distfile_SHA512}") diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index d14077410..1ede43fd8 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -113,7 +113,8 @@ function(vcpkg_from_github) # The following is for --head scenarios set(URL "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") if(_VCPKG_NO_DOWNLOADS) if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) @@ -133,35 +134,27 @@ function(vcpkg_from_github) endif() # Try to download the file and version information from github. - message(STATUS "Downloading ${URL}...") - file(DOWNLOAD "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" - ${downloaded_file_path}.version - STATUS download_status + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version ) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}) - message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") - else() - message(STATUS "Downloading ${URL}... OK") - endif() + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( - ARCHIVE "${downloaded_file_path}" + ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" ) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) + file(READ "${ARCHIVE_VERSION}" _contents) string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) -- cgit v1.2.3 From a523aacff8a642d4380e5f53b87404118b5d2a03 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:50:16 -0700 Subject: [vcpkg_from_bitbucket] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_from_bitbucket.cmake | 38 +++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake index 227de5141..26600f013 100644 --- a/scripts/cmake/vcpkg_from_bitbucket.cmake +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -92,13 +92,13 @@ function(vcpkg_from_bitbucket) message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") set(VCPKG_USE_HEAD_VERSION OFF) endif() - + # Handle --no-head scenarios if(NOT VCPKG_USE_HEAD_VERSION) if(NOT _vdud_REF) message(FATAL_ERROR "Package does not specify REF. It must built using --head.") endif() - + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz") set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz") @@ -117,7 +117,7 @@ function(vcpkg_from_bitbucket) else() set(_version ${_vdud_REF}) endif() - + vcpkg_download_distfile(ARCHIVE URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz" SHA512 "${_vdud_SHA512}" @@ -150,39 +150,31 @@ function(vcpkg_from_bitbucket) endif() # Try to download the file and version information from bitbucket. - message(STATUS "Downloading ${URL}...") - file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" - ${downloaded_file_path}.version - STATUS download_status + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version ) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}) - message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") - else() - message(STATUS "Downloading ${URL}... OK") - endif() + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( - ARCHIVE "${downloaded_file_path}" + ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" ) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) + file(READ "${ARCHIVE_VERSION}" _contents) string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash - + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) -- cgit v1.2.3 From 0fb0191f3cb9ba4ea0f0e0675f929e1e599e1461 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:52:02 -0700 Subject: [ports.cmake] Use vcpkg_download_distfile() --- scripts/ports.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 8b4d17d80..ef06a4d65 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -108,10 +108,12 @@ elseif(CMD MATCHES "^CREATE$") message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}") else() include(vcpkg_download_distfile) - file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code) - if(NOT error_code MATCHES "0;") - message(FATAL_ERROR "Error downloading file: ${error_code}") - endif() + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${FILENAME} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512) -- cgit v1.2.3 From bd91824bca86387a436785d1b757d23a06593677 Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 3 Nov 2017 11:51:24 +0800 Subject: [antlr] upgrade to antlr4.7 --- ports/antlr4/portfile.cmake | 6 +++--- ports/antlr4/static.patch | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index 868efcdbe..d344e9d06 100644 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 4.6) +set(VERSION 4.7) 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" + URLS "http://www.antlr.org/download/antlr4-cpp-runtime-4.7-source.zip" FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip" - SHA512 e123c2227e41ce80da5a3758725a018690ed70a4e10c23da26c966259e6bdafa192f4363f5a7e1181ef9a47bf3cc50d6b0ca7b26c8dd2b19222a7edf54de8de2 + SHA512 a14fd3320537075a8d4c1cfa81d416bad6257d238608e2428f4930495072cce984c707126e3777ffd3849dd6b6cdf1bf43624bd6d318b1fa5dd6749a7304f808 ) # license not exist in antlr folder. diff --git a/ports/antlr4/static.patch b/ports/antlr4/static.patch index fb54c5ae4..e66787233 100644 --- a/ports/antlr4/static.patch +++ b/ports/antlr4/static.patch @@ -1,12 +1,12 @@ diff --git a/antlr4-common.h b/antlr4-common.h -index 197fd6d..34a62c8 100644 +index ce45e9e..3162795 100644 --- a/antlr4-common.h +++ b/antlr4-common.h -@@ -34,6 +34,7 @@ - #include - #include +@@ -48,6 +48,7 @@ + #endif -+#define ANTLR4CPP_STATIC - // Defines for the Guid class and other platform dependent stuff. - #ifdef _WIN32 - #pragma warning (disable: 4250) // Class inherits by dominance. + #define GUID_WINDOWS ++ #define ANTLR4CPP_STATIC + + #ifdef _WIN64 + typedef __int64 ssize_t; -- cgit v1.2.3 From 7af697e6e8c257546e44b8788588c1f1ef52fafd Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 3 Nov 2017 12:32:03 +0800 Subject: [antlr4] bump version to 4.7 --- ports/antlr4/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL index 03877e495..bf4df8d1c 100644 --- a/ports/antlr4/CONTROL +++ b/ports/antlr4/CONTROL @@ -1,3 +1,3 @@ Source: antlr4 -Version: 4.6-1 +Version: 4.7 Description: ANother Tool for Language Recognition \ No newline at end of file -- cgit v1.2.3 From 82ce87cfd0854907a270ef2f8de80670bd8428b3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 15:48:21 -0700 Subject: Use download-at-temp-and-rename pattern in powershell too --- scripts/fetchDependency.ps1 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 4ef3a1f17..9d3f76386 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -65,6 +65,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } + $downloadsTemp = "$downloadDir/temp" + if (Test-Path $downloadsTemp) # Delete temp dir if it exists + { + Remove-Item $downloadsTemp -Recurse -Force + } + if (!(Test-Path $downloadsTemp)) # Recreate temp dir. It may still be there the dir was in use + { + New-Item -ItemType directory -Path $downloadsTemp | Out-Null + } + + $tempDownloadName = "$downloadsTemp/$Dependency-$downloadVersion.temp" + $WC = New-Object System.Net.WebClient $ProxyAuth = !$WC.Proxy.IsBypassed($url) @@ -79,15 +91,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) } - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + Start-BitsTransfer -Source $url -Destination $tempDownloadName -ErrorAction Stop + Move-Item -Path $tempDownloadName -Destination $downloadPath return } catch [System.Exception] { # If BITS fails for any reason, delete any potentially partially downloaded files and continue - if (Test-Path $downloadPath) + if (Test-Path $tempDownloadName) { - Remove-Item $downloadPath + Remove-Item $tempDownloadName } } } @@ -98,7 +111,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $downloadPath) + $WC.DownloadFile($url, $tempDownloadName) + Move-Item -Path $tempDownloadName -Destination $downloadPath } # Enums (without resorting to C#) are only available on powershell 5+. -- cgit v1.2.3 From 57934e5bbe485e904b47d49b3609d4000a4ca952 Mon Sep 17 00:00:00 2001 From: bjornpiltz Date: Thu, 2 Nov 2017 10:48:52 +0100 Subject: Print error message when there is a syntax error in triplet file As it is now vcpkg fails silently (actually, it outputs two empty lines). --- toolsrc/src/vcpkg/build.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 8b4654aa8..ca0712a06 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -489,7 +489,7 @@ namespace vcpkg::Build {"CMAKE_TRIPLET_FILE", triplet_file_path}, }); const auto ec_data = System::cmd_execute_and_capture_output(cmd_launch_cmake); - Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, ec_data.output); const std::vector lines = Strings::split(ec_data.output, "\n"); -- cgit v1.2.3 From 98b2654c77149099cc84cb710fe0608060bdc4a3 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 10:33:48 -0700 Subject: [fdk-aac] init --- ports/fdk-aac/CMakeLists.txt | 206 +++++++++++++++++++++++++++++++++++++++++++ ports/fdk-aac/CONTROL | 3 + ports/fdk-aac/fdk-aac.def | 19 ++++ ports/fdk-aac/portfile.cmake | 22 +++++ 4 files changed, 250 insertions(+) create mode 100644 ports/fdk-aac/CMakeLists.txt create mode 100644 ports/fdk-aac/CONTROL create mode 100644 ports/fdk-aac/fdk-aac.def create mode 100644 ports/fdk-aac/portfile.cmake diff --git a/ports/fdk-aac/CMakeLists.txt b/ports/fdk-aac/CMakeLists.txt new file mode 100644 index 000000000..869703c19 --- /dev/null +++ b/ports/fdk-aac/CMakeLists.txt @@ -0,0 +1,206 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(fdk-aac) + +set(AACDEC_SRC + libAACdec/src/aacdec_drc.cpp + libAACdec/src/aacdec_hcr.cpp + libAACdec/src/aacdecoder.cpp + libAACdec/src/aacdec_pns.cpp + libAACdec/src/aac_ram.cpp + libAACdec/src/block.cpp + libAACdec/src/channelinfo.cpp + libAACdec/src/ldfiltbank.cpp + libAACdec/src/rvlcbit.cpp + libAACdec/src/rvlc.cpp + libAACdec/src/aacdec_hcr_bit.cpp + libAACdec/src/aacdec_hcrs.cpp + libAACdec/src/aacdecoder_lib.cpp + libAACdec/src/aacdec_tns.cpp + libAACdec/src/aac_rom.cpp + libAACdec/src/channel.cpp + libAACdec/src/conceal.cpp + libAACdec/src/pulsedata.cpp + libAACdec/src/rvlcconceal.cpp + libAACdec/src/stereo.cpp +) + +set(AACENC_SRC + libAACenc/src/aacenc.cpp + libAACenc/src/aacEnc_ram.cpp + libAACenc/src/band_nrg.cpp + libAACenc/src/block_switch.cpp + libAACenc/src/grp_data.cpp + libAACenc/src/metadata_main.cpp + libAACenc/src/pre_echo_control.cpp + libAACenc/src/quantize.cpp + libAACenc/src/tonality.cpp + libAACenc/src/aacEnc_rom.cpp + libAACenc/src/bandwidth.cpp + libAACenc/src/channel_map.cpp + libAACenc/src/intensity.cpp + libAACenc/src/ms_stereo.cpp + libAACenc/src/psy_configuration.cpp + libAACenc/src/sf_estim.cpp + libAACenc/src/transform.cpp + libAACenc/src/aacenc_lib.cpp + libAACenc/src/aacenc_tns.cpp + libAACenc/src/bit_cnt.cpp + libAACenc/src/chaosmeasure.cpp + libAACenc/src/line_pe.cpp + libAACenc/src/noisedet.cpp + libAACenc/src/psy_main.cpp + libAACenc/src/spreading.cpp + libAACenc/src/aacenc_pns.cpp + libAACenc/src/adj_thr.cpp + libAACenc/src/bitenc.cpp + libAACenc/src/dyn_bits.cpp + libAACenc/src/metadata_compressor.cpp + libAACenc/src/pnsparam.cpp + libAACenc/src/qc_main.cpp +) + +set(FDK_SRC + libFDK/src/autocorr2nd.cpp + libFDK/src/dct.cpp + libFDK/src/FDK_bitbuffer.cpp + libFDK/src/FDK_core.cpp + libFDK/src/FDK_crc.cpp + libFDK/src/FDK_hybrid.cpp + libFDK/src/FDK_tools_rom.cpp + libFDK/src/FDK_trigFcts.cpp + libFDK/src/fft.cpp + libFDK/src/fft_rad2.cpp + libFDK/src/fixpoint_math.cpp + libFDK/src/mdct.cpp + libFDK/src/qmf.cpp + libFDK/src/scale.cpp +) + +set(MPEGTPDEC_SRC + libMpegTPDec/src/tpdec_adif.cpp + libMpegTPDec/src/tpdec_adts.cpp + libMpegTPDec/src/tpdec_asc.cpp + libMpegTPDec/src/tpdec_drm.cpp + libMpegTPDec/src/tpdec_latm.cpp + libMpegTPDec/src/tpdec_lib.cpp +) + +set( MPEGTPENC_SRC + libMpegTPEnc/src/tpenc_adif.cpp + libMpegTPEnc/src/tpenc_adts.cpp + libMpegTPEnc/src/tpenc_asc.cpp + libMpegTPEnc/src/tpenc_latm.cpp + libMpegTPEnc/src/tpenc_lib.cpp +) + +set( PCMUTILS_SRC + libPCMutils/src/limiter.cpp + libPCMutils/src/pcmutils_lib.cpp +) + +set(SBRDEC_SRC + libSBRdec/src/env_calc.cpp + libSBRdec/src/env_dec.cpp + libSBRdec/src/env_extr.cpp + libSBRdec/src/huff_dec.cpp + libSBRdec/src/lpp_tran.cpp + libSBRdec/src/psbitdec.cpp + libSBRdec/src/psdec.cpp + libSBRdec/src/psdec_hybrid.cpp + libSBRdec/src/sbr_crc.cpp + libSBRdec/src/sbr_deb.cpp + libSBRdec/src/sbr_dec.cpp + libSBRdec/src/sbrdec_drc.cpp + libSBRdec/src/sbrdec_freq_sca.cpp + libSBRdec/src/sbrdecoder.cpp + libSBRdec/src/sbr_ram.cpp + libSBRdec/src/sbr_rom.cpp +) + +set(SBRENC_SRC + libSBRenc/src/bit_sbr.cpp + libSBRenc/src/env_bit.cpp + libSBRenc/src/fram_gen.cpp + libSBRenc/src/mh_det.cpp + libSBRenc/src/ps_bitenc.cpp + libSBRenc/src/ps_encode.cpp + libSBRenc/src/resampler.cpp + libSBRenc/src/sbr_encoder.cpp + libSBRenc/src/sbr_ram.cpp + libSBRenc/src/ton_corr.cpp + libSBRenc/src/code_env.cpp + libSBRenc/src/env_est.cpp + libSBRenc/src/invf_est.cpp + libSBRenc/src/nf_est.cpp + libSBRenc/src/ps_main.cpp + libSBRenc/src/sbrenc_freq_sca.cpp + libSBRenc/src/sbr_misc.cpp + libSBRenc/src/sbr_rom.cpp + libSBRenc/src/tran_det.cpp +) + +set(SYS_SRC + libSYS/src/cmdl_parser.cpp + libSYS/src/conv_string.cpp + libSYS/src/genericStds.cpp + libSYS/src/wav_file.cpp +) + +set( + libfdk_aac_SOURCES + ${AACDEC_SRC} ${AACENC_SRC} + ${MPEGTPDEC_SRC} ${MPEGTPENC_SRC} + ${SBRDEC_SRC} ${SBRENC_SRC} + ${PCMUTILS_SRC} ${FDK_SRC} ${SYS_SRC} + fdk-aac.def +) + +include_directories( + . + win32 + libAACdec/include + libAACenc/include + libSBRdec/include + libSBRenc/include + libMpegTPDec/include + libMpegTPEnc/include + libSYS/include + libFDK/include + libPCMutils/include +) +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_library(fdk-aac ${libfdk_aac_SOURCES}) + +add_executable(aac-enc aac-enc.c wavreader.c) + +target_link_libraries(aac-enc fdk-aac) + +install( + TARGETS fdk-aac + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS aac-enc + RUNTIME DESTINATION tools/fdk-aac + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + libAACdec/include/aacdecoder_lib.h + libAACenc/include/aacenc_lib.h + libSYS/include/FDK_audio.h + libSYS/include/genericStds.h + libSYS/include/machine_type.h + DESTINATION include + ) +endif() diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL new file mode 100644 index 000000000..126a2f5a1 --- /dev/null +++ b/ports/fdk-aac/CONTROL @@ -0,0 +1,3 @@ +Source: fdk-aac +Version: 2017-11-02-1e351 +Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/fdk-aac.def b/ports/fdk-aac/fdk-aac.def new file mode 100644 index 000000000..8690b69b6 --- /dev/null +++ b/ports/fdk-aac/fdk-aac.def @@ -0,0 +1,19 @@ +EXPORTS +aacDecoder_AncDataGet +aacDecoder_AncDataInit +aacDecoder_Close +aacDecoder_ConfigRaw +aacDecoder_DecodeFrame +aacDecoder_Fill +aacDecoder_GetFreeBytes +aacDecoder_GetLibInfo +aacDecoder_GetStreamInfo +aacDecoder_Open +aacDecoder_SetParam +aacEncClose +aacEncEncode +aacEncGetLibInfo +aacEncInfo +aacEncOpen +aacEncoder_GetParam +aacEncoder_SetParam diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake new file mode 100644 index 000000000..7142ca795 --- /dev/null +++ b/ports/fdk-aac/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mstorsjo/fdk-aac + REF 1e3515e03e2dbdbd48dacc31ef75d25c201a4c51 + SHA512 4bb0cb75fac46b30f64f5588a528f3c97d66b456fb866524018596dc79eb8b01735eb7e2bc56489127091924117a8a5f4a722dd9cc90c4caa8ad5c55e58faa40 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/fdk-aac.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fdk-aac) +file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fdk-aac RENAME copyright) -- cgit v1.2.3 From 9dc02f48b65618ab7f89c5a004a3d81fc882af32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:35:15 -0700 Subject: [fetchDependendy.ps1] Remove obsolete comment --- scripts/fetchDependency.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 9d3f76386..6788b5e7e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -57,9 +57,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return } - # Can't print because vcpkg captures the output and expects only the path that is returned at the end of this script file - # Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." - if (!(Test-Path $downloadDir)) { New-Item -ItemType directory -Path $downloadDir | Out-Null -- cgit v1.2.3 From a4dc2d2ef29654df9587d60f586c2eea16dedaaf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:39:43 -0700 Subject: [fetchDependency.ps1] Improve error message on hash mismatch --- scripts/fetchDependency.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6788b5e7e..593cba2a6 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -239,9 +239,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } + $downloadedFileHash = $downloadedFileHash.ToLower() if ($expectedDownloadedFileHash -ne $downloadedFileHash) { - throw [System.IO.FileNotFoundException] ("Mismatching hash of the downloaded " + $Dependency) + Write-Host ("`nFile does not have expected hash:`n" + + " File path: [ $downloadPath ]`n" + + " Expected hash: [ $expectedDownloadedFileHash ]`n" + + " Actual hash: [ $downloadedFileHash ]`n") + throw "Invalid Hash" } if ($extractionType -eq $ExtractionType_NO_EXTRACTION_REQUIRED) @@ -270,7 +275,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (-not (Test-Path $executableFromDownload)) { - throw [System.IO.FileNotFoundException] ("Could not detect or download " + $Dependency) + throw ("Could not detect or download " + $Dependency) } return $executableFromDownload -- cgit v1.2.3 From ad884fc2966c0d8fdff6835d481fd301bfc438ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:40:28 -0700 Subject: [vswhere] Update to 2.2.11 (was 2.2.7) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 593cba2a6..f78d159d0 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -181,11 +181,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.7" - $downloadVersion = "2.2.7" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.7/vswhere.exe" + $requiredVersion = "2.2.11" + $downloadVersion = "2.2.11" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "f50303881da706132516d9decfd5314d524a0044daf49c0cfd21dc39c1261ec3" + $expectedDownloadedFileHash = "0235c2cb6341978abdf32e27fcf1d7af5cb5514c035e529c4cd9283e6f1a261f" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 3cb9769d7b1a0f87dbb5be0dce2386f569fbbe95 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 09:59:44 -0700 Subject: libaiff --- ports/libaiff/CMakeLists.txt | 32 +++++ ports/libaiff/CONTROL | 3 + ports/libaiff/allow_utf_16_filename.patch | 214 ++++++++++++++++++++++++++++++ ports/libaiff/config.h | 12 ++ ports/libaiff/portfile.cmake | 40 ++++++ 5 files changed, 301 insertions(+) create mode 100644 ports/libaiff/CMakeLists.txt create mode 100644 ports/libaiff/CONTROL create mode 100644 ports/libaiff/allow_utf_16_filename.patch create mode 100644 ports/libaiff/config.h create mode 100644 ports/libaiff/portfile.cmake diff --git a/ports/libaiff/CMakeLists.txt b/ports/libaiff/CMakeLists.txt new file mode 100644 index 000000000..9dcfd46d2 --- /dev/null +++ b/ports/libaiff/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required (VERSION 3.9) +project (libaiff) +set(SRC + iff.c aifx.c lpcm.c g711.c + float32.c libaiff.c + extended.c pascal.c +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DHAVE_STRING_H -DHAVE_STDLIB_H) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(.) + +add_library(libaiff ${SRC}) + + +install( + TARGETS libaiff + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES libaiff/libaiff.h libaiff/config.h libaiff/endian.h DESTINATION include/libaiff) +endif() diff --git a/ports/libaiff/CONTROL b/ports/libaiff/CONTROL new file mode 100644 index 000000000..21078bfe8 --- /dev/null +++ b/ports/libaiff/CONTROL @@ -0,0 +1,3 @@ +Source: libaiff +Version: 5.0 +Description: LibAiff is an open-source library, providing C applications transparent read & write operations for Audio Interchange File Format (AIFF) files, with the goal of supporting all of its features diff --git a/ports/libaiff/allow_utf_16_filename.patch b/ports/libaiff/allow_utf_16_filename.patch new file mode 100644 index 000000000..fb927763f --- /dev/null +++ b/ports/libaiff/allow_utf_16_filename.patch @@ -0,0 +1,214 @@ +diff --git a/libaiff.c b/libaiff.c +index d0ad40d..e266802 100644 +--- a/libaiff.c ++++ b/libaiff.c +@@ -44,6 +44,8 @@ static struct decoder* decoders[] = { + + static AIFF_Ref AIFF_ReadOpen (const char *, int); + static AIFF_Ref AIFF_WriteOpen (const char *, int); ++static AIFF_Ref AIFF_ReadOpenW (const wchar_t*, int); ++static AIFF_Ref AIFF_WriteOpenW (const wchar_t*, int); + static void AIFF_ReadClose (AIFF_Ref); + static int AIFF_WriteClose (AIFF_Ref); + static void* InitBuffer (AIFF_Ref, size_t); +@@ -53,6 +55,21 @@ static int Prepare (AIFF_Ref); + static void Unprepare (AIFF_Ref); + static struct decoder* FindDecoder (IFFType); + ++#ifdef _WIN32 ++AIFF_Ref ++AIFF_OpenFileW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref ref = NULL; ++ ++ if (flags & F_RDONLY) { ++ ref = AIFF_ReadOpenW(file, flags); ++ } else if (flags & F_WRONLY) { ++ ref = AIFF_WriteOpenW(file, flags); ++ } ++ ++ return ref; ++} ++#endif + AIFF_Ref + AIFF_OpenFile(const char *file, int flags) + { +@@ -86,6 +103,76 @@ AIFF_CloseFile(AIFF_Ref ref) + return r; + } + ++#ifdef _WIN32 ++static AIFF_Ref ++AIFF_ReadOpenW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref r; ++ IFFHeader hdr; ++ ++ r = malloc(kAIFFRefSize); ++ if (!r) { ++ return NULL; ++ } ++ r->fd = _wfopen(file, L"rb"); ++ if (r->fd == NULL) { ++ free(r); ++ return NULL; ++ } ++ r->flags = F_RDONLY | flags; ++ if (fread(&hdr, 1, 4, r->fd) < 4) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ switch (hdr.hid) { ++ case AIFF_TYPE_IFF: ++ /* Continue reading the IFF header */ ++ if (fread(&(hdr.len), 1, 8, r->fd) < 8) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ if (hdr.len == 0) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ /* ++ * Check the format type (AIFF or AIFC) ++ */ ++ r->format = hdr.fid; ++ switch (r->format) { ++ case AIFF_TYPE_AIFF: ++ case AIFF_TYPE_AIFC: ++ break; ++ default: ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ ++ if (init_aifx(r) < 1) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ break; ++ default: ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ ++ r->stat = 0; ++ r->buffer = NULL; ++ r->buflen = 0; ++ ++ return r; ++} ++ ++#endif ++ + static AIFF_Ref + AIFF_ReadOpen(const char *file, int flags) + { +@@ -450,6 +537,89 @@ AIFF_ReadClose(AIFF_Ref r) + return; + } + ++#ifdef WIN32 ++static AIFF_Ref ++AIFF_WriteOpenW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref w; ++ IFFHeader hdr; ++ ASSERT(sizeof(IFFHeader) == 12); ++ ++ w = malloc(kAIFFRefSize); ++ if (!w) { ++err0: ++ return NULL; ++ } ++ ++ /* ++ * Simultaneous open for reading & writing ++ */ ++ w->fd = _wfopen(file, L"w+b"); ++ if (w->fd == NULL) { ++err1: ++ free(w); ++ goto err0; ++ } ++ hdr.hid = ARRANGE_BE32(AIFF_FORM); ++ w->len = 4; ++ hdr.len = ARRANGE_BE32(4); ++ if (flags & F_AIFC) ++ hdr.fid = ARRANGE_BE32(AIFF_AIFC); ++ else ++ hdr.fid = ARRANGE_BE32(AIFF_AIFF); ++ ++ if (fwrite(&hdr, 1, 12, w->fd) < 12) { ++err2: ++ fclose(w->fd); ++ goto err1; ++ } ++ w->stat = 0; ++ w->segmentSize = 0; ++ w->buffer = NULL; ++ w->buflen = 0; ++ w->tics = 0; ++ ++ /* ++ * If writing AIFF-C, write the required FVER chunk ++ */ ++ if (flags & F_AIFC) { ++ IFFChunk chk; ++ uint32_t vers; ++ ASSERT(sizeof(IFFChunk) == 8); ++ ++ chk.id = ARRANGE_BE32(AIFF_FVER); ++ chk.len = ARRANGE_BE32(4); ++ vers = ARRANGE_BE32(AIFC_STD_DRAFT_082691); ++ ++ if (fwrite(&chk, 1, 8, w->fd) < 8 || ++ fwrite(&vers, 1, 4, w->fd) < 4) { ++ goto err2; ++ } ++ ++ w->len += 12; ++ ++ /* ++ * If no endianness specified for AIFF-C, ++ * default to big endian ++ */ ++ if (!(flags & (LPCM_LTE_ENDIAN | LPCM_BIG_ENDIAN))) { ++ flags |= LPCM_BIG_ENDIAN; ++ } ++ } else { ++ /* ++ * If writing regular AIFF, make sure we ++ * write big-endian data ++ */ ++ flags &= ~LPCM_LTE_ENDIAN; ++ flags |= LPCM_BIG_ENDIAN; ++ } ++ ++ w->flags = F_WRONLY | flags; ++ ++ return w; ++} ++#endif ++ + static AIFF_Ref + AIFF_WriteOpen(const char *file, int flags) + { +diff --git a/libaiff/libaiff.h b/libaiff/libaiff.h +index 56fc77f..e1940a5 100644 +--- a/libaiff/libaiff.h ++++ b/libaiff/libaiff.h +@@ -165,6 +165,7 @@ typedef struct s_Instrument Instrument ; + + /* == Function prototypes == */ + AIFF_Ref AIFF_OpenFile(const char *, int) ; ++AIFF_Ref AIFF_OpenFile(const wchar_t *, int) ; + int AIFF_CloseFile(AIFF_Ref) ; + char* AIFF_GetAttribute(AIFF_Ref,IFFType) ; + int AIFF_GetInstrumentData(AIFF_Ref,Instrument*) ; diff --git a/ports/libaiff/config.h b/ports/libaiff/config.h new file mode 100644 index 000000000..f7c04eebf --- /dev/null +++ b/ports/libaiff/config.h @@ -0,0 +1,12 @@ +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "marcotrillo@gmail.com" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "LibAiff (MSVC)" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "LibAiff (MSVC) $Revision: 1.1 $" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "$Revision: 1.1 $" + diff --git a/ports/libaiff/portfile.cmake b/ports/libaiff/portfile.cmake new file mode 100644 index 000000000..146d24c7f --- /dev/null +++ b/ports/libaiff/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" + FILENAME "libaiff-5.0-release.tar.gz" + SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 +) +vcpkg_extract_source_archive(${ARCHIVE}) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") +foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) -- cgit v1.2.3 From 669e7a981eaabe7df1734aab3d79a4a5cbb19109 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 11:08:37 -0700 Subject: Append W --- ports/libaiff/allow_utf_16_filename.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libaiff/allow_utf_16_filename.patch b/ports/libaiff/allow_utf_16_filename.patch index fb927763f..773b492fd 100644 --- a/ports/libaiff/allow_utf_16_filename.patch +++ b/ports/libaiff/allow_utf_16_filename.patch @@ -208,7 +208,7 @@ index 56fc77f..e1940a5 100644 /* == Function prototypes == */ AIFF_Ref AIFF_OpenFile(const char *, int) ; -+AIFF_Ref AIFF_OpenFile(const wchar_t *, int) ; ++AIFF_Ref AIFF_OpenFileW(const wchar_t *, int) ; int AIFF_CloseFile(AIFF_Ref) ; char* AIFF_GetAttribute(AIFF_Ref,IFFType) ; int AIFF_GetInstrumentData(AIFF_Ref,Instrument*) ; -- cgit v1.2.3 From 79067748292b613b2d3bcabf8d5cdd71a8100cef Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 12:58:17 -0700 Subject: [libaiff] fix uninitialized buffer --- ports/libaiff/buffer_uninitialized.patch | 42 +++++++++++++++++ ports/libaiff/portfile.cmake | 81 ++++++++++++++++---------------- 2 files changed, 83 insertions(+), 40 deletions(-) create mode 100644 ports/libaiff/buffer_uninitialized.patch diff --git a/ports/libaiff/buffer_uninitialized.patch b/ports/libaiff/buffer_uninitialized.patch new file mode 100644 index 000000000..855d11a36 --- /dev/null +++ b/ports/libaiff/buffer_uninitialized.patch @@ -0,0 +1,42 @@ +diff --git "a/libaiff.c" "b/libaiff.c" +index e266802..21179f9 100644 +--- "a/libaiff.c" ++++ "b/libaiff.c" +@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -577,6 +583,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* +@@ -659,6 +667,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* diff --git a/ports/libaiff/portfile.cmake b/ports/libaiff/portfile.cmake index 146d24c7f..17277159e 100644 --- a/ports/libaiff/portfile.cmake +++ b/ports/libaiff/portfile.cmake @@ -1,40 +1,41 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" - FILENAME "libaiff-5.0-release.tar.gz" - SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 -) -vcpkg_extract_source_archive(${ARCHIVE}) - - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) - - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") -foreach(HEADER ${HEADERS}) - file(READ "${HEADER}" _contents) - string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") - string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") - string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") - string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") - file(WRITE "${HEADER}" "${_contents}") -endforeach() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" + FILENAME "libaiff-5.0-release.tar.gz" + SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 +) +vcpkg_extract_source_archive(${ARCHIVE}) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" + "${CMAKE_CURRENT_LIST_DIR}/buffer_uninitialized.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") +foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) -- cgit v1.2.3 From 244d6e894f575601835f7b3ae308a648d227188a Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 3 Nov 2017 18:54:44 -0500 Subject: Add the flint2 library (#1988) * Add the "flint2" library. * FIX: update library name * FIX: only set MSVC version to VC14 * FIX: use static linkage * DOC: display notification to the user * [flint/CONTROL] add gettimeofday dependency * [flint/portfile] move up linkage * [flint/portfile] attempt to override the CRT linkage --- ports/flint/CONTROL | 4 ++ ports/flint/dll_flint.patch | 76 ++++++++++++++++++++++++++++ ports/flint/lib_flint.patch | 40 +++++++++++++++ ports/flint/portfile.cmake | 117 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 237 insertions(+) create mode 100644 ports/flint/CONTROL create mode 100644 ports/flint/dll_flint.patch create mode 100644 ports/flint/lib_flint.patch create mode 100644 ports/flint/portfile.cmake diff --git a/ports/flint/CONTROL b/ports/flint/CONTROL new file mode 100644 index 000000000..ee495fc0c --- /dev/null +++ b/ports/flint/CONTROL @@ -0,0 +1,4 @@ +Source: flint +Version: 2.5.2 +Description: Fast Library for Number Theory +Build-Depends: mpir, mpfr, pthreads, gettimeofday diff --git a/ports/flint/dll_flint.patch b/ports/flint/dll_flint.patch new file mode 100644 index 000000000..29e1fa77a --- /dev/null +++ b/ports/flint/dll_flint.patch @@ -0,0 +1,76 @@ +diff --git a/build.vc14/dll_flint/dll_flint.vcxproj b/build.vc14/dll_flint/dll_flint.vcxproj +index 3c8edd3c..947b4e38 100644 +--- a/build.vc14/dll_flint/dll_flint.vcxproj ++++ b/build.vc14/dll_flint/dll_flint.vcxproj +@@ -81,7 +81,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDLL + $(TargetDir)$(TargetName).pdb +@@ -90,7 +90,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -105,7 +105,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + $(TargetDir)$(TargetName).pdb +@@ -114,7 +114,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -129,7 +129,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDLL + $(TargetDir)$(TargetName).pdb +@@ -138,7 +138,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -153,7 +153,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + $(TargetDir)$(TargetName).pdb +@@ -162,7 +162,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL diff --git a/ports/flint/lib_flint.patch b/ports/flint/lib_flint.patch new file mode 100644 index 000000000..3d0a4caea --- /dev/null +++ b/ports/flint/lib_flint.patch @@ -0,0 +1,40 @@ +diff --git a/build.vc14/lib_flint/lib_flint.vcxproj b/build.vc14/lib_flint/lib_flint.vcxproj +index c6bd44c0..197d7723 100644 +--- a/build.vc14/lib_flint/lib_flint.vcxproj ++++ b/build.vc14/lib_flint/lib_flint.vcxproj +@@ -81,7 +81,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreaded + $(TargetDir)$(TargetName).pdb +@@ -100,7 +100,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDebug + $(TargetDir)$(TargetName).pdb +@@ -119,7 +119,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreaded + $(TargetDir)$(TargetName).pdb +@@ -138,7 +138,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebug + $(TargetDir)$(TargetName).pdb diff --git a/ports/flint/portfile.cmake b/ports/flint/portfile.cmake new file mode 100644 index 000000000..e20ef9731 --- /dev/null +++ b/ports/flint/portfile.cmake @@ -0,0 +1,117 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_CRT_LINKAGE static) + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +set(FLINT_VERSION 2.5.2) +set(FLINT_HASH "8606b369af505d5fcedd05d95fcd04afac2a916fc5291501c56785891cfdb2f9bc98700b2d05afd1d9482fb96df2a8c8bf1cd0e5696df46775df9fa743eb900b") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flint-${FLINT_VERSION}) + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.flintlib.org/flint-${FLINT_VERSION}.zip" + FILENAME "flint-${FLINT_VERSION}.zip" + SHA512 ${FLINT_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/lib_flint.patch" + "${CMAKE_CURRENT_LIST_DIR}/dll_flint.patch" +) + +set(MSVC_VERSION 14) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME) + +# Use fresh copy of sources for building and modification +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}") + +file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR) +configure_file( + "${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj" "${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj" @ONLY +) +configure_file( + "${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj" "${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj" @ONLY +) + +file(RENAME "${SOURCE_PATH}/fmpz-conversions-gc.in" "${SOURCE_PATH}/fmpz-conversions.h") + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + file(RENAME "${SOURCE_PATH}/fft_tuning32.in" "${SOURCE_PATH}/fft_tuning.h") +ELSE() + file(RENAME "${SOURCE_PATH}/fft_tuning64.in" "${SOURCE_PATH}/fft_tuning.h") +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj + ) +endif() + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB FLINT_HEADERS "${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/*.h") + file(INSTALL + ${FLINT_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/flint + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Release/dll_flint.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Debug/dll_flint.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Release/dll_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME flint.lib + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Debug/dll_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME flint.lib + ) + vcpkg_copy_pdbs() +else() + file(GLOB FLINT_HEADERS "${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/*.h") + file(INSTALL + ${FLINT_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/flint + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/${BUILD_ARCH}/Release/lib_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME flint.lib + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/${BUILD_ARCH}/Debug/lib_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME flint.lib + ) +endif() + +file(INSTALL + ${SOURCE_PATH}/gpl-2.0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/flint + RENAME copyright +) + +message(STATUS "Installing done") -- cgit v1.2.3 From c0090ed4c98dbad3fe855f3ac3b9908e037afa03 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 3 Nov 2017 19:57:33 -0500 Subject: Add arblib (#1991) --- ports/arb/CMakeLists.txt | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ ports/arb/CONTROL | 4 +++ ports/arb/portfile.cmake | 32 +++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 ports/arb/CMakeLists.txt create mode 100644 ports/arb/CONTROL create mode 100644 ports/arb/portfile.cmake diff --git a/ports/arb/CMakeLists.txt b/ports/arb/CMakeLists.txt new file mode 100644 index 000000000..3474c9974 --- /dev/null +++ b/ports/arb/CMakeLists.txt @@ -0,0 +1,94 @@ +cmake_minimum_required(VERSION 2.8.12) + +project(arb C) + +set (DEPS mpir mpfr pthreads flint2 gettimeofday) +set (mpir_lib gmp mpir) +set (mpfr_lib mpfr) +set (pthreads_lib pthreads pthread) +set (flint2_lib ${LIBRARY_TYPE}_flint flint) +set (gettimeofday_lib gettimeofday) + +set (mpir_header gmp.h) +set (mpfr_header mpfr.h) +set (pthreads_header pthread.h) +set (flint2_header flint/flint.h) +set (gettimeofday_header gettimeofday.h) + +foreach (LIB ${DEPS}) + string (TOUPPER ${LIB} LIB_UPPER) + find_library(${LIB_UPPER}_LIBRARY NAMES ${${LIB}_lib}) + if (NOT ${LIB_UPPER}_LIBRARY) + message(FATAL_ERROR "${LIB} library not found.") + endif() + add_library(${LIB} UNKNOWN IMPORTED) + set_property(TARGET ${LIB} PROPERTY IMPORTED_LOCATION ${${LIB_UPPER}_LIBRARY}) + message("${LIB} found in ${${LIB_UPPER}_LIBRARY}") +endforeach () + +foreach (LIB ${DEPS}) + string(TOUPPER ${LIB} HEADER_PKG) + set (HEADER ${${LIB}_header}) + find_path(${HEADER_PKG}_INCLUDE_DIR NAMES ${HEADER}) + if (NOT ${HEADER_PKG}_INCLUDE_DIR) + message(FATAL_ERROR "${HEADER} header not found.") + endif() + message("${HEADER} found in ${${HEADER_PKG}_INCLUDE_DIR}") + set (DEP_INCLUDE_DIRS ${DEP_INCLUDE_DIRS} ${${HEADER_PKG}_INCLUDE_DIR}) +endforeach () + +file(GLOB TEMP "*.h") + +foreach (TEMP_H ${TEMP}) + get_filename_component(FOLDER ${TEMP_H} NAME_WE) + set(FOLDERS ${FOLDERS} ${FOLDER}) +endforeach() + +foreach (FOLDER ${FOLDERS}) + file(GLOB TEMP "${FOLDER}/*.c") + set(SRC ${SRC} ${TEMP}) +endforeach () + +include_directories(BEFORE ${arb_SOURCE_DIR}) +include_directories(BEFORE ${DEP_INCLUDE_DIRS}) + +add_library(arb ${SRC}) + +target_compile_definitions(arb PRIVATE HAVE_TLS=1 FLINT_REENTRANT=0) +if (BUILD_SHARED_LIBS) + target_compile_definitions(arb PRIVATE MSC_USE_DLL) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS yes) + MESSAGE( STATUS "Building shared libraries" ) +else () + target_compile_definitions(arb PRIVATE PTW32_STATIC_LIB) + MESSAGE( STATUS "Building static libraries" ) +endif() +target_compile_definitions(arb PRIVATE "ARB_BUILD_DLL") + +target_link_libraries(arb ${DEPS}) + +install(TARGETS arb + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + +foreach (FOLDER ${FOLDERS}) + set(HEADERS ${HEADERS} ${FOLDER}.h) +endforeach () + +install(FILES ${HEADERS} DESTINATION include) + +if (BUILD_TESTS) + enable_testing() + foreach (FOLDER ${FOLDERS}) + file(GLOB TEMP "${FOLDER}/test/*.c") + foreach (TEST_SOURCE ${TEMP}) + get_filename_component(TEST_NAME ${TEST_SOURCE} NAME_WE) + add_executable(${FOLDER}-${TEST_NAME} ${TEST_SOURCE}) + target_link_libraries(${FOLDER}-${TEST_NAME} arb) + add_test(${FOLDER}-${TEST_NAME} ${FOLDER}-${TEST_NAME}) + endforeach () + endforeach () +endif () + diff --git a/ports/arb/CONTROL b/ports/arb/CONTROL new file mode 100644 index 000000000..2166fd1e0 --- /dev/null +++ b/ports/arb/CONTROL @@ -0,0 +1,4 @@ +Source: arb +Version: 2.11.1 +Description: a C library for arbitrary-precision interval arithmetic +Build-Depends: flint diff --git a/ports/arb/portfile.cmake b/ports/arb/portfile.cmake new file mode 100644 index 000000000..234ce1778 --- /dev/null +++ b/ports/arb/portfile.cmake @@ -0,0 +1,32 @@ +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/arb-2.11.1) + +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO fredrik-johansson/arb + REF 2.11.1 + SHA512 7a014da5208b55f20c7a3cd3eb51070b09ae107b04cbbd6329925780c2ab4d7c38e1fb3619f21456fa806939818370fcae921f59eb013661b6bdd3d0971e3353 + HEAD_REF master +) + +file(REMOVE ${SOURCE_PATH}/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/arb RENAME copyright) + +# Remove duplicate headers +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 05afaff3558f0657c03a66cc87c7f54a1fec6864 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 4 Nov 2017 09:46:53 +0900 Subject: Fix rename libraries of FLANN Fix rename libraries of FLANN. --- ports/flann/CONTROL | 2 +- ports/flann/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index b70472913..850c76850 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-6 +Version: 1.9.1-7 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index f1ead2ad9..6d251caa5 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -37,9 +37,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib) -- cgit v1.2.3 From 34c25840a3aad15d44bb58c51abda9c2f6f347dc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:11:27 -0700 Subject: Fix line endings --- ports/libaiff/buffer_uninitialized.patch | 84 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/ports/libaiff/buffer_uninitialized.patch b/ports/libaiff/buffer_uninitialized.patch index 855d11a36..d87ab41c6 100644 --- a/ports/libaiff/buffer_uninitialized.patch +++ b/ports/libaiff/buffer_uninitialized.patch @@ -1,42 +1,42 @@ -diff --git "a/libaiff.c" "b/libaiff.c" -index e266802..21179f9 100644 ---- "a/libaiff.c" -+++ "b/libaiff.c" -@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) - r->buffer = NULL; - r->buflen = 0; - -+ r->buffer2 = NULL; -+ r->buflen2 = 0; -+ - return r; - } - -@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) - r->buffer = NULL; - r->buflen = 0; - -+ r->buffer2 = NULL; -+ r->buflen2 = 0; -+ - return r; - } - -@@ -577,6 +583,8 @@ err2: - w->segmentSize = 0; - w->buffer = NULL; - w->buflen = 0; -+ w->buffer2 = NULL; -+ w->buflen2 = 0; - w->tics = 0; - - /* -@@ -659,6 +667,8 @@ err2: - w->segmentSize = 0; - w->buffer = NULL; - w->buflen = 0; -+ w->buffer2 = NULL; -+ w->buflen2 = 0; - w->tics = 0; - - /* +diff --git "a/libaiff.c" "b/libaiff.c" +index e266802..21179f9 100644 +--- "a/libaiff.c" ++++ "b/libaiff.c" +@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -577,6 +583,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* +@@ -659,6 +667,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* -- cgit v1.2.3 From 3b90bc07ce6fb8639fbb0a142bdbbd458e85462a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:25:54 -0700 Subject: [cmake] Update to 3.9.5 (was 3.9.4) --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e2c076977..30d193892 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.9.4* +- *Optional: CMake 3.9.5* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index f78d159d0..16ba984e6 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -160,12 +160,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.4" - $downloadVersion = "3.9.4" - $url = "https://cmake.org/files/v3.9/cmake-3.9.4-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.4-win32-x86.zip" - $expectedDownloadedFileHash = "8214df1ff51f9a6a1f0e27f9bd18f402b1749c5b645fbf6e401bcb00047171cd" - $executableFromDownload = "$downloadsDir\cmake-3.9.4-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.5" + $downloadVersion = "3.9.5" + $url = "https://cmake.org/files/v3.9/cmake-3.9.5-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.5-win32-x86.zip" + $expectedDownloadedFileHash = "dd3e183254c12f7c338d3edfa642f1ac84a763b8b9a2feabb4ad5fccece5dff9" + $executableFromDownload = "$downloadsDir\cmake-3.9.5-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 5e43ee4c7..c17b029c0 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -125,10 +125,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {3, 9, 4}; + static constexpr std::array EXPECTED_VERSION = {3, 9, 5}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.4-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.5-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; -- cgit v1.2.3 From 868697d5bbc5c97b7dd17f0924fd7cb6b37a0082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Thu, 2 Mar 2017 17:44:43 -0500 Subject: Porting ITK --- ports/itk/CONTROL | 4 ++++ ports/itk/portfile.cmake | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 ports/itk/CONTROL create mode 100644 ports/itk/portfile.cmake diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL new file mode 100644 index 000000000..c930e9491 --- /dev/null +++ b/ports/itk/CONTROL @@ -0,0 +1,4 @@ +Source: itk +Version: 4.11.0 +Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. +Build-Depends: libjpeg-turbo, zlib, libpng, tiff, expat diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake new file mode 100644 index 000000000..24d0f5cf4 --- /dev/null +++ b/ports/itk/portfile.cmake @@ -0,0 +1,58 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/dzenanz/ITK/releases/download/v4.12rc02/ITK_VCPKG.zip" + FILENAME "ITK-Test.zip" + SHA512 6283381b2a615ca40ddd05fa4e45a3dbc32ed6dd6bc02e0bb9462ef07762507970d4b56f0fdf8098d23361e52af9afec670a41acd33adb44a7b3cb7d6501bc65 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# directory path length needs to be shorter than 50 characters +# file(RENAME ${CURRENT_BUILDTREES_DIR}/src/InsightToolkit-4.12.0 ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF + -DDO_NOT_INSTALL_ITK_TEST_DRIVER=ON + -DITK_INSTALL_DATA_DIR=share/itk/data + -DITK_INSTALL_DOC_DIR=share/itk/doc + -DITK_INSTALL_PACKAGE_DIR=share/itk + -DITK_LEGACY_REMOVE=ON + -DITK_USE_64BITS_IDS=ON + -DITK_USE_CONCEPT_CHECKING=ON + # -DITK_WRAP_PYTHON=ON + # -DITK_PYTHON_VERSION=3 + # -DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for many third party libraries which do not have vcpkg ports such as FFTW + -DITK_USE_SYSTEM_EXPAT=ON + -DITK_USE_SYSTEM_JPEG=ON + -DITK_USE_SYSTEM_PNG=ON + -DITK_USE_SYSTEM_TIFF=ON + -DITK_USE_SYSTEM_ZLIB=ON + -DITK_FORBID_DOWNLOADS=OFF + -DITK_BUILD_DEFAULT_MODULES=OFF # turns on HDF5, which is problematic + -DITKGroup_IO=OFF # turns on HDF5, which is problematic + -DModule_ITKReview=OFF # turns on HDF5, which is problematic + -DITKGroup_Filtering=ON + -DITKGroup_Registration=ON + -DITKGroup_Segmentation=ON + -DModule_ITKIOMesh=ON + -DModule_ITKIOCSV=ON + -DModule_IOSTL=ON # example how to turn on a non-default module + # -DModule_ITKVtkGlue=ON # this option requires VTK to be a dependency in CONTROL file + -DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module + -DModule_RLEImage=ON # example how to turn on a remote module + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/itk) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/itk/LICENSE ${CURRENT_PACKAGES_DIR}/share/itk/copyright) -- cgit v1.2.3 From 11d672617c19833f8eb5ab7a2291c8f274cdfc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Wed, 11 Oct 2017 15:48:41 -0400 Subject: Sourcing from GitHub, using a master version with vcpkg patch --- ports/itk/portfile.cmake | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 24d0f5cf4..79b298ae2 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -1,14 +1,16 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/dzenanz/ITK/releases/download/v4.12rc02/ITK_VCPKG.zip" - FILENAME "ITK-Test.zip" - SHA512 6283381b2a615ca40ddd05fa4e45a3dbc32ed6dd6bc02e0bb9462ef07762507970d4b56f0fdf8098d23361e52af9afec670a41acd33adb44a7b3cb7d6501bc65 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO InsightSoftwareConsortium/ITK + REF fc374c8431a8aec740e4db3a398c6e95294f34a2 + SHA512 d4a313cfba78ab309e387c213a2dd568c4d8bb628210dcb519712bbed23380b870d7224634119fad08ff157451b75f1c7fbae93841a00091b0e403315cde2943 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # directory path length needs to be shorter than 50 characters -# file(RENAME ${CURRENT_BUILDTREES_DIR}/src/InsightToolkit-4.12.0 ${SOURCE_PATH}) +file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/ITK) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/ITK") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From aec7d6d60628602fa153633f7e7e92fe66af0655 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:41:19 -0700 Subject: Update CHANGELOG and bump version to v0.0.96 --- CHANGELOG.md | 23 +++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2f3c720f..b15a24e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +vcpkg (0.0.96) +-------------- + * Add ports: + - arb 2.11.1 + - fdk-aac 2017-11-02-1e351 + - flint 2.5.2 + - itk 4.11.0 + - libaiff 5.0 + * Update ports: + - antlr4 4.6-1 -> 4.7 + - apr 1.6.2-1 -> 1.6.3 + - double-conversion 3.0.0-1 -> 3.0.0-2 + - flann 1.9.1-6 -> 1.9.1-7 + - opencv 3.3.1-4 -> 3.3.1-6 + - protobuf 3.4.1-1 -> 3.4.1-2 + * `vcpkg help`: Add help topics for commands. For example `vcpkg help install` + * `vcpkg` now downloads in a temp directory; after the download is complete, the file is moved to the destination. This avoids issues with hash mismatch on partially downloaded files. + * Update required version & auto-downloaded version of `cmake` to 3.9.5 + * Update required version & auto-downloaded version of `vswhere` to 2.2.11 + +-- vcpkg team WED, 03 Nov 2017 18:45:00 -0800 + + vcpkg (0.0.95) -------------- * Update ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index e5fce74a7..bc63ef127 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.95" \ No newline at end of file +"0.0.96" \ No newline at end of file -- cgit v1.2.3 From 65bac6d9fa8d4b49c119c84dfc6d6f13b5a94149 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 3 Nov 2017 22:33:36 -0700 Subject: [fftw] update to 3.3.7 --- ports/fftw3/CONTROL | 2 +- ports/fftw3/portfile.cmake | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index 50513df27..338c602d3 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.6-p12-1 +Version: 3.3.7 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 99ac01e2d..86e5e722b 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -1,17 +1,9 @@ -# 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/fftw-3.3.6-pl2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.7) vcpkg_download_distfile(ARCHIVE - URLS "http://www.fftw.org/fftw-3.3.6-pl2.tar.gz" - FILENAME "fftw-3.3.6-pl2.tar.gz" - SHA512 e130309856752a1555b6d151c4d0ce9eb4b2c208fff7e3e89282ca8ef6104718f865cbb5e9c4af4367b3615b69b0d50fd001a26d74fd5324ff2faabe14fe3472 + URLS "http://www.fftw.org/fftw-3.3.7.tar.gz" + FILENAME "fftw-3.3.7.tar.gz" + SHA512 a5db54293a6d711408bed5894766437eee920be015ad27023c7a91d4581e2ff5b96e3db0201e6eaccf7b064c4d32db1a2a8fab3e6813e524b4743ddd6216ba77 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From d7eefd989231810e6dd151502477ca4d5f026889 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 3 Nov 2017 22:47:41 -0700 Subject: [dlib] update to 19.7 and use vcpkg_from_github --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index ce39fcb1b..87d81875b 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,4 +1,4 @@ Source: dlib -Version: 19.4-5 +Version: 19.7 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 6c1bad0f8..74494d2cd 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -1,18 +1,13 @@ -# 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/dlib-19.4) -vcpkg_download_distfile(ARCHIVE - URLS "http://dlib.net/files/dlib-19.4.tar.bz2" - FILENAME "dlib-19.4.tar.bz2" - SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO davisking/dlib + REF v19.7 + SHA512 a3877066e04a411d96e910f4229c60a86971a9290e840aa4a5b2f0b102e9b8c37bfede259b80b71ba066d21eb0aa2565808e51d0eab6397ff5fd2bac60dcedd5 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib) @@ -63,6 +58,6 @@ string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents}) # Handle copyright -file(COPY ${CURRENT_PACKAGES_DIR}/share/doc/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) +file(COPY ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -- cgit v1.2.3 From 925bc946812a912ad93d1b2a3088e00b20da6331 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 4 Nov 2017 00:39:59 -0700 Subject: fix issue 2111 --- ports/dlib/portfile.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 74494d2cd..4234e3e4b 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -38,7 +38,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dlib) # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -48,7 +48,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_neon) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cudnn) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cuda) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) # Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. @@ -57,6 +60,13 @@ string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if !defined(NDEBUG)\n#define ENAB string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents}) +file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents) +string(REPLACE + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" + _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake "${_contents}") + # Handle copyright file(COPY ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT) -- cgit v1.2.3 From 3c85f7073b92b056dfe27a59ab0c8eaffdaf70c3 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sat, 21 Oct 2017 18:56:11 +0200 Subject: Revert "Updated libsigcpp to version 2.99.9" This reverts commit 079ef9785ad539e1484f876577913a7269021288. --- ports/libsigcpp/CMakeLists.txt | 19 ++++++------------- ports/libsigcpp/CONTROL | 2 +- ports/libsigcpp/portfile.cmake | 8 ++++---- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/ports/libsigcpp/CMakeLists.txt b/ports/libsigcpp/CMakeLists.txt index 30c3c610e..7a669a24e 100644 --- a/ports/libsigcpp/CMakeLists.txt +++ b/ports/libsigcpp/CMakeLists.txt @@ -5,14 +5,14 @@ set(SIGCPP_API_VERSION 2.0) add_definitions(-DSIGC_BUILD) -include_directories(./MSVC_Net2017) # config file for windows is there +include_directories(./MSVC_Net2013) # config file for windows is there include_directories(.) - set(SICGPP_SOURCES sigc++/connection.cc sigc++/signal_base.cc sigc++/trackable.cc + sigc++/adaptors/lambda/lambda.cc sigc++/functors/slot_base.cc) add_library(sigc ${SICGPP_SOURCES}) @@ -20,13 +20,12 @@ set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION}) install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib) if(NOT SIGCPP_SKIP_HEADERS) - install(FILES MSVC_Net2017/sigc++config.h DESTINATION include) + install(FILES MSVC_Net2013/sigc++config.h DESTINATION include) install(FILES sigc++/sigc++.h DESTINATION include/sigc++) install(FILES sigc++/bind.h DESTINATION include/sigc++) install(FILES sigc++/bind_return.h DESTINATION include/sigc++) install(FILES sigc++/connection.h DESTINATION include/sigc++) install(FILES sigc++/limit_reference.h DESTINATION include/sigc++) - install(FILES sigc++/member_method_trait.h DESTINATION include/sigc++) install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++) install(FILES sigc++/retype_return.h DESTINATION include/sigc++) install(FILES sigc++/signal.h DESTINATION include/sigc++) @@ -35,30 +34,24 @@ if(NOT SIGCPP_SKIP_HEADERS) install(FILES sigc++/trackable.h DESTINATION include/sigc++) install(FILES sigc++/type_traits.h DESTINATION include/sigc++) install(FILES sigc++/visit_each.h DESTINATION include/sigc++) - install(FILES sigc++/weak_raw_ptr.h DESTINATION include/sigc++) install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/adaptor_base.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/adapts.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/tuple_visitor_visit_each.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda) + install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda) install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors) - install(FILES sigc++/tuple-utils/tuple_cdr.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_end.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_for_each.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_start.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_transform_each.h DESTINATION include/sigc++/tuple-utils) endif() diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL index 97667dd7d..02b2e4b83 100644 --- a/ports/libsigcpp/CONTROL +++ b/ports/libsigcpp/CONTROL @@ -1,3 +1,3 @@ Source: libsigcpp -Version: 2.99-1 +Version: 2.10 Description: Typesafe callback framework for C++ diff --git a/ports/libsigcpp/portfile.cmake b/ports/libsigcpp/portfile.cmake index 7525c1aae..c98a26717 100644 --- a/ports/libsigcpp/portfile.cmake +++ b/ports/libsigcpp/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.99.9) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.10.0) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.99/libsigc++-2.99.9.tar.xz" - FILENAME "libsigc++-2.99.9.tar.xz" - SHA512 3e8f8176a4618938a16b2367466415aff8ec10d83ef84de8973373a63fc0b9708d14115ad5c039c81b570385b205944651849a68e618c37c171cd748dd5b2403) + URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz" + FILENAME "libsigc++-2.10.0.tar.xz" + SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 81c1a0efc3bacd2aecb82089ebd6651bdb2aa10d Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sun, 22 Oct 2017 14:16:33 +0200 Subject: Added glibmm and giomm. --- ports/glibmm/CONTROL | 4 + ports/glibmm/COPYING | 514 +++++++++ ports/glibmm/README | 4 + ports/glibmm/fix_properties.patch | 1721 +++++++++++++++++++++++++++++++ ports/glibmm/msvc_recommended_pragmas.h | 34 + ports/glibmm/portfile.cmake | 105 ++ 6 files changed, 2382 insertions(+) create mode 100644 ports/glibmm/CONTROL create mode 100644 ports/glibmm/COPYING create mode 100644 ports/glibmm/README create mode 100644 ports/glibmm/fix_properties.patch create mode 100644 ports/glibmm/msvc_recommended_pragmas.h create mode 100644 ports/glibmm/portfile.cmake diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL new file mode 100644 index 000000000..babaee277 --- /dev/null +++ b/ports/glibmm/CONTROL @@ -0,0 +1,4 @@ +Source: glibmm +Version: 2.52.1 +Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org. +Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib diff --git a/ports/glibmm/COPYING b/ports/glibmm/COPYING new file mode 100644 index 000000000..5e1f37e13 --- /dev/null +++ b/ports/glibmm/COPYING @@ -0,0 +1,514 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ports/glibmm/README b/ports/glibmm/README new file mode 100644 index 000000000..341c67e43 --- /dev/null +++ b/ports/glibmm/README @@ -0,0 +1,4 @@ +This is glibmm, a C++ API for parts of glib that are useful for C++. +See http://www.gtkmm.org + + diff --git a/ports/glibmm/fix_properties.patch b/ports/glibmm/fix_properties.patch new file mode 100644 index 000000000..51044a27f --- /dev/null +++ b/ports/glibmm/fix_properties.patch @@ -0,0 +1,1721 @@ +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 62dbcc8..7da2fbd 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -91,6 +91,7 @@ + + + MachineX86 ++ %(AdditionalDependencies) + + + +@@ -109,6 +110,7 @@ + + + MachineX86 ++ %(AdditionalDependencies) + + + +@@ -132,6 +134,7 @@ + + + MachineX64 ++ %(AdditionalDependencies) + + + +@@ -153,6 +156,7 @@ + + + MachineX64 ++ %(AdditionalDependencies) + + + +@@ -161,4 +165,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm.vcxproj b/MSVC_Net2013/giomm.vcxproj +index bc4fc3d..078fcb2 100644 +--- a/MSVC_Net2013/giomm.vcxproj ++++ b/MSVC_Net2013/giomm.vcxproj +@@ -69,7 +69,7 @@ + + %(AdditionalOptions) + Disabled +- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) + true + EnableFastChecks +@@ -82,7 +82,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -100,7 +100,7 @@ + + %(AdditionalOptions) + Disabled +- .;../..;../../glib;../../gio;$(SolutionDir)\glibmm;..\..\..\vs10\x64\include\gio-win32-2.0;..\..\..\vs10\x64\include\glib-2.0;..\..\..\vs10\x64\lib\glib-2.0\include;..\..\..\vs10\x64\include\sigc++-2.0;..\..\..\vs10\x64\lib\sigc++-2.0\include;..\..\..\vs10\x64\include;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) + true + EnableFastChecks +@@ -113,7 +113,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -128,7 +128,7 @@ + + + %(AdditionalOptions) +- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + $(GioMMBuildDefs);%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 +@@ -139,7 +139,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -158,7 +158,7 @@ + + + %(AdditionalOptions) +- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + $(GioMMBuildDefs);%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 +@@ -169,7 +169,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -455,4 +455,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm.vcxproj.filters b/MSVC_Net2013/giomm.vcxproj.filters +index 4f01b13..934eddc 100644 +--- a/MSVC_Net2013/giomm.vcxproj.filters ++++ b/MSVC_Net2013/giomm.vcxproj.filters +@@ -15,266 +15,780 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + +- Resource Files ++ ++ Resource Files + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm-build-defines.props b/MSVC_Net2013/glibmm-build-defines.props +index 5cbde3c..9a027c5 100644 +--- a/MSVC_Net2013/glibmm-build-defines.props ++++ b/MSVC_Net2013/glibmm-build-defines.props +@@ -6,8 +6,8 @@ + + SIZEOF_WCHAR_T=2;GLIBMM_BUILD + GIOMM_BUILD +- sigc-vc$(VSVer)0-2_0.lib +- sigc-vc$(VSVer)0-d-2_0.lib ++ sigc-2_0.lib ++ sigc-2_0.lib + + + <_PropertySheetDisplayName>glibmmbuilddefinesprops +@@ -16,28 +16,10 @@ + + + +- .\glibmm;..;..\glib;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\glibmm;..;.;..\glib;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + +- +- glib-2.0.lib;gobject-2.0.lib;gmodule-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) +- + +- +- +- $(GLibMMBuildDefs) +- +- +- $(GioMMBuildDefs) +- +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- +- +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm-install.props b/MSVC_Net2013/glibmm-install.props +index f28a0c8..9283a7b 100644 +--- a/MSVC_Net2013/glibmm-install.props ++++ b/MSVC_Net2013/glibmm-install.props +@@ -3,410 +3,4 @@ + + + +- +- $(SolutionDir)$(Configuration)\$(Platform)\bin +- $(BinDir)\glibmm$(ReleaseDllSuffix).dll;$(BinDir)\giomm$(ReleaseDllSuffix).dll +- $(BinDir)\glibmm$(DebugDllSuffix).dll;$(BinDir)\giomm$(DebugDllSuffix).dll +- +-mkdir $(CopyDir) +-mkdir $(CopyDir)\bin +-copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin +-copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin +-copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin +-copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin +- +-mkdir $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include +-mkdir $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include +-copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).lib $(CopyDir)\lib +-copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).lib $(CopyDir)\lib +- +-mkdir $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-mkdir $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\glib\glibmm.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion) +-copy ..\gio\giomm.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion) +- +-copy ..\glib\glibmm\arrayhandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\balancedtree.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\base64.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\binding.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\bytes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\bytearray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\checksum.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\class.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\containerhandle_shared.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\containers.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\convert.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\date.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\datetime.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\debug.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\enums.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\dispatcher.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\error.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\exception.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\exceptionhandler.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\fileutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\helperlist.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\i18n-lib.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\i18n.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\init.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\interface.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\iochannel.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\keyfile.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\listhandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\main.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\markup.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\miscutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\module.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\nodetree.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\object.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\objectbase.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\optioncontext.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\optionentry.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\optiongroup.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\pattern.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\priorities.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\property.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\propertyproxy.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\propertyproxy_base.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\quark.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\random.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\refptr.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\regex.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\sarray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\shell.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\signalproxy.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\signalproxy_connectionnode.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\slisthandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\spawn.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\streamiochannel.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\stringutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\threadpool.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\threads.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\timer.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\timeval.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\timezone.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\unicode.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\uriutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\ustring.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\utility.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variant.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variantdict.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variantiter.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\varianttype.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variant_basictypes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\thread.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\value.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\valuearray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\value_basictypes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\value_custom.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\vectorutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\weakref.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\wrap.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\wrap_init.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +- +-copy ..\glib\glibmm\private\balancedtree_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\binding_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\bytes_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\bytearray_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\checksum_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\convert_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\date_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\datetime_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\enums_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\fileutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\interface_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\iochannel_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\keyfile_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\markup_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\miscutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\module_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\nodetree_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\object_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\optioncontext_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\optionentry_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\optiongroup_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\regex_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\shell_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\spawn_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\threads_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\timezone_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\unicode_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\uriutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\variant_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\variantdict_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\variantiter_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\varianttype_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\thread_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\valuearray_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +- +-copy ..\gio\giomm\action.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\actiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\actionmap.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\applaunchcontext.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\appinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\application.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\applicationcommandline.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\asyncinitable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\asyncresult.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\bufferedinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\bufferedoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\cancellable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\charsetconverter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\contenttype.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\converter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\converterinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\converteroutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\credentials.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\datainputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dataoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusauthobserver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbuserror.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbuserrorutils.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusinterface.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusinterfaceskeleton.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusinterfacevtable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusintrospection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusmenumodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusmessage.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusmethodinvocation.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusobject.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusownname.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusproxy.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusserver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbussubtreevtable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusutils.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbuswatchname.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\drive.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\emblem.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\emblemedicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\enums.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\error.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\file.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileattributeinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileattributeinfolist.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileenumerator.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileiostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filemonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filenamecompleter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filterinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filteroutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\icon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\inetaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\inetsocketaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\init.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\initable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\inputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\iostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\listmodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\liststore.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\loadableicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\memoryinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\memoryoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menuattributeiter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menulinkiter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menu.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menuitem.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menumodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\mount.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\mountoperation.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\networkaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\networkmonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\networkservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\notification.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\outputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\permission.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\pollableinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\pollableoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\proxy.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\proxyaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\proxyresolver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\remoteactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\resolver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\resource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\seekable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settings.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settingsschema.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settingsschemakey.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settingsschemasource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simpleaction.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simpleactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simpleiostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simplepermission.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socket.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketaddressenumerator.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketclient.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketconnectable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketcontrolmessage.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketlistener.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketsource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\srvtarget.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tcpconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tcpwrapperconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\threadedsocketservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\themedicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlscertificate.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsclientconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsdatabase.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsinteraction.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlspassword.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsserverconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\volume.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\volumemonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\wrap_init.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\zlibdecompressor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\zlibcompressor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +- +-copy ..\gio\giomm\private\action_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\actiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\actionmap_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\appinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\applaunchcontext_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\application_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\applicationcommandline_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\asyncinitable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\asyncresult_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\bufferedinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\bufferedoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\cancellable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\charsetconverter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\converter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\converterinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\converteroutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\credentials_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\datainputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dataoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusauthobserver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbuserror_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbuserrorutils_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusinterface_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusinterfaceskeleton_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusinterfacevtable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusintrospection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusmenumodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusmessage_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusmethodinvocation_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusobject_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusownname_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusproxy_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusserver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbussubtreevtable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusutils_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbuswatchname_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\drive_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\emblem_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\emblemedicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\enums_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\error_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\file_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileattributeinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileattributeinfolist_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileenumerator_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileiostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filemonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filenamecompleter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filterinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filteroutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\icon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\inetaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\inetsocketaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\initable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\inputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\iostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\listmodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\liststore_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\loadableicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\memoryinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\memoryoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menu_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menuattributeiter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menuitem_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menulinkiter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menumodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\mount_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\mountoperation_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\networkaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\networkmonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\networkservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\notification_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\outputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\pollableinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\pollableoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\proxy_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\proxyaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\proxyresolver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\remoteactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\resolver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\resource_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\seekable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settings_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settingsschema_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settingsschemakey_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settingsschemasource_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\simpleaction_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\simpleactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\simpleiostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socket_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketaddressenumerator_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketclient_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketconnectable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketcontrolmessage_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketlistener_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\srvtarget_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tcpconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tcpwrapperconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\themedicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\threadedsocketservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlscertificate_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsclientconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsdatabase_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsinteraction_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlspassword_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsserverconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\volume_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\volumemonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\zlibcompressor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\zlibdecompressor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy .\glibmm\glibmmconfig.h $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include +-copy .\giomm\giommconfig.h $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include +- +- +- +- <_PropertySheetDisplayName>glibmminstallprops +- +- +- +- $(BinDir) +- +- +- $(InstalledReleaseDlls) +- +- +- $(InstalledDebugDlls) +- +- +- $(GLibmmDoInstall) +- +- + +diff --git a/MSVC_Net2013/glibmm-version-paths.props b/MSVC_Net2013/glibmm-version-paths.props +index 216731b..e5f0f6a 100644 +--- a/MSVC_Net2013/glibmm-version-paths.props ++++ b/MSVC_Net2013/glibmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 2 + 4 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>glibmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +diff --git a/MSVC_Net2013/glibmm.vcxproj b/MSVC_Net2013/glibmm.vcxproj +index 6594edc..c611561 100644 +--- a/MSVC_Net2013/glibmm.vcxproj ++++ b/MSVC_Net2013/glibmm.vcxproj +@@ -93,7 +93,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -125,7 +125,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -152,7 +152,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -183,7 +183,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -359,4 +359,4 @@ + + + +- ++ +\ No newline at end of file diff --git a/ports/glibmm/msvc_recommended_pragmas.h b/ports/glibmm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/glibmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake new file mode 100644 index 000000000..f5880ecf7 --- /dev/null +++ b/ports/glibmm/portfile.cmake @@ -0,0 +1,105 @@ +# Glib uses winapi functions not available in WindowsStore, so glibmm +# also +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +# Glib relies on DllMain, so glibmm also +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glibmm-2.52.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.52/glibmm-2.52.1.tar.xz" + FILENAME "glibmm-2.52.1.tar.xz" + SHA512 702158762cb28972b315ab98dc00a62e532bda08b6e76dc2a2556e8cb381c2021290891887a4af2fbff5a62bab4d50581be73037dc8e0dc47d5febd6cbeb7bda +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/glibmm.sln + TARGET giomm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/giomm/giommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gio/giomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gio/giomm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/glibmm/glibmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/glib/glibmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/glib/glibmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/giomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/giomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/glibmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/glibmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/giomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/giomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/glibmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/glibmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glibmm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/glibmm RENAME readme.txt) -- cgit v1.2.3 From 25a15b59b66148e48ca4cd7579a776b15425bdf0 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sun, 22 Oct 2017 16:16:07 +0200 Subject: Added atkmm. --- ports/atkmm/CONTROL | 4 + ports/atkmm/COPYING | 510 +++++++++++++++++++++++++++++++++ ports/atkmm/README | 2 + ports/atkmm/fix_properties.patch | 306 ++++++++++++++++++++ ports/atkmm/msvc_recommended_pragmas.h | 34 +++ ports/atkmm/portfile.cmake | 71 +++++ 6 files changed, 927 insertions(+) create mode 100644 ports/atkmm/CONTROL create mode 100644 ports/atkmm/COPYING create mode 100644 ports/atkmm/README create mode 100644 ports/atkmm/fix_properties.patch create mode 100644 ports/atkmm/msvc_recommended_pragmas.h create mode 100644 ports/atkmm/portfile.cmake diff --git a/ports/atkmm/CONTROL b/ports/atkmm/CONTROL new file mode 100644 index 000000000..3a8d55164 --- /dev/null +++ b/ports/atkmm/CONTROL @@ -0,0 +1,4 @@ +Source: atkmm +Version: 2.24.2 +Description: atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm. +Build-Depends: glib, gettext, atk, glibmm diff --git a/ports/atkmm/COPYING b/ports/atkmm/COPYING new file mode 100644 index 000000000..2d2d780e6 --- /dev/null +++ b/ports/atkmm/COPYING @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ports/atkmm/README b/ports/atkmm/README new file mode 100644 index 000000000..e3ac5c916 --- /dev/null +++ b/ports/atkmm/README @@ -0,0 +1,2 @@ +atkmm is the C++ binding for the ATK library. +This module is part of the GNOME C++ bindings effort . diff --git a/ports/atkmm/fix_properties.patch b/ports/atkmm/fix_properties.patch new file mode 100644 index 000000000..a03924386 --- /dev/null +++ b/ports/atkmm/fix_properties.patch @@ -0,0 +1,306 @@ +diff --git a/MSVC_Net2013/atkmm-build-defines.props b/MSVC_Net2013/atkmm-build-defines.props +index 421f5c3..0275e6e 100644 +--- a/MSVC_Net2013/atkmm-build-defines.props ++++ b/MSVC_Net2013/atkmm-build-defines.props +@@ -5,8 +5,6 @@ + + + ATKMM_BUILD +- glibmm-vc$(VSVer)0-2_4.lib;sigc-vc$(VSVer)0-2_0.lib +- glibmm-vc$(VSVer)0-d-2_4.lib;sigc-vc$(VSVer)0-d-2_0.lib + + + <_PropertySheetDisplayName>panogmmbuilddefinesprops +@@ -15,25 +13,19 @@ + + + +- .\atkmm;..\atk;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\atkmm;..\atk;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + +- atk-1.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + + + $(AtkMMBuildDefs) + +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/atkmm-version-paths.props b/MSVC_Net2013/atkmm-version-paths.props +index affd50f..675aa3e 100644 +--- a/MSVC_Net2013/atkmm-version-paths.props ++++ b/MSVC_Net2013/atkmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 1 + 6 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>atkmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj +index c3db50a..40f21cb 100644 +--- a/MSVC_Net2013/atkmm.vcxproj ++++ b/MSVC_Net2013/atkmm.vcxproj +@@ -41,7 +41,7 @@ + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/atkmm.vcxproj.filters b/MSVC_Net2013/atkmm.vcxproj.filters +index f0fca22..6598996 100644 +--- a/MSVC_Net2013/atkmm.vcxproj.filters ++++ b/MSVC_Net2013/atkmm.vcxproj.filters +@@ -15,55 +15,143 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + +- ++ + Resource Files + + +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 554054c..d6f2798 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -40,7 +40,7 @@ + + + Application +- MultiByte ++ Unicode + v120 + + diff --git a/ports/atkmm/msvc_recommended_pragmas.h b/ports/atkmm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/atkmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake new file mode 100644 index 000000000..84fc6e6a0 --- /dev/null +++ b/ports/atkmm/portfile.cmake @@ -0,0 +1,71 @@ +# ATK uses DllMain, so atkmm also +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/atkmm-2.24.2) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.24/atkmm-2.24.2.tar.xz" + FILENAME "atkmm-2.24.2.tar.xz" + SHA512 427714cdf3b10e3f9bc36df09c4b05608d295f5895fb1e079b9bd84afdf7bf1cfdec6794ced7f1e35bd430b76f87792df4ee63c515071a2ea6e3e51e672cdbe2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln + TARGET atkmm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/atkmm/atkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/atk/atkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/atk/atkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/atkmm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/atkmm RENAME readme.txt) -- cgit v1.2.3 From a2fd38d3c62666b953ee1ca1e798c08bbf1d4048 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sun, 22 Oct 2017 18:24:49 +0200 Subject: Added pangomm. --- ports/pangomm/CONTROL | 4 + ports/pangomm/COPYING | 515 +++++++++++++++++++++++++++++++ ports/pangomm/README | 3 + ports/pangomm/fix_properties.patch | 75 +++++ ports/pangomm/msvc_recommended_pragmas.h | 34 ++ ports/pangomm/portfile.cmake | 77 +++++ 6 files changed, 708 insertions(+) create mode 100644 ports/pangomm/CONTROL create mode 100644 ports/pangomm/COPYING create mode 100644 ports/pangomm/README create mode 100644 ports/pangomm/fix_properties.patch create mode 100644 ports/pangomm/msvc_recommended_pragmas.h create mode 100644 ports/pangomm/portfile.cmake diff --git a/ports/pangomm/CONTROL b/ports/pangomm/CONTROL new file mode 100644 index 000000000..68860b305 --- /dev/null +++ b/ports/pangomm/CONTROL @@ -0,0 +1,4 @@ +Source: pangomm +Version: 2.40.1 +Description: pangomm is the official C++ interface for the Pango font layout library. See, for instance, the Pango::Layout class. +Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz, pango, cairomm, glibmm diff --git a/ports/pangomm/COPYING b/ports/pangomm/COPYING new file mode 100644 index 000000000..c4792dd27 --- /dev/null +++ b/ports/pangomm/COPYING @@ -0,0 +1,515 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ports/pangomm/README b/ports/pangomm/README new file mode 100644 index 000000000..37c05b4ee --- /dev/null +++ b/ports/pangomm/README @@ -0,0 +1,3 @@ +This is pangomm, a C++ API for Pango. +See http://www.gtkmm.org/ + diff --git a/ports/pangomm/fix_properties.patch b/ports/pangomm/fix_properties.patch new file mode 100644 index 000000000..22ee67bf1 --- /dev/null +++ b/ports/pangomm/fix_properties.patch @@ -0,0 +1,75 @@ +diff --git a/MSVC_Net2013/pangomm-build-defines.props b/MSVC_Net2013/pangomm-build-defines.props +index 3c3108d..f30890b 100644 +--- a/MSVC_Net2013/pangomm-build-defines.props ++++ b/MSVC_Net2013/pangomm-build-defines.props +@@ -5,8 +5,6 @@ + + + PANGOMM_BUILD +- glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib +- glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib + + + <_PropertySheetDisplayName>panogmmbuilddefinesprops +@@ -15,14 +13,14 @@ + + + +- .\pangomm;..\pango;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\pangomm;..\pango;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + +- pangocairo-1.0.lib;pango-1.0.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + +diff --git a/MSVC_Net2013/pangomm-version-paths.props b/MSVC_Net2013/pangomm-version-paths.props +index b287629..01a267e 100644 +--- a/MSVC_Net2013/pangomm-version-paths.props ++++ b/MSVC_Net2013/pangomm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 1 + 4 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>pangommversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file diff --git a/ports/pangomm/msvc_recommended_pragmas.h b/ports/pangomm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/pangomm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake new file mode 100644 index 000000000..58d02f268 --- /dev/null +++ b/ports/pangomm/portfile.cmake @@ -0,0 +1,77 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pangomm-2.40.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.40/pangomm-2.40.1.tar.xz" + FILENAME "pangomm-2.40.1.tar.xz" + SHA512 bed19800b76e69cc51abeb5997bdc2f687f261ebcbe36aeee51f1fbf5010a46f4b9469033c34a912502001d9985135fd5c7f7574d3de8ba33cc5832520c6aa6f +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln + TARGET pangomm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/pangomm/pangommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/pango/pangomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/pango/pangomm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pangomm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/pangomm RENAME readme.txt) -- cgit v1.2.3 From dad3c7b87cfb6380138de9678048495271224023 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Mon, 23 Oct 2017 22:22:02 +0200 Subject: Added gtkmm --- ports/gtkmm/CONTROL | 4 + ports/gtkmm/COPYING | 502 +++++++ ports/gtkmm/README | 3 + ports/gtkmm/fix_properties.patch | 2423 ++++++++++++++++++++++++++++++++ ports/gtkmm/msvc_recommended_pragmas.h | 34 + ports/gtkmm/portfile.cmake | 117 ++ 6 files changed, 3083 insertions(+) create mode 100644 ports/gtkmm/CONTROL create mode 100644 ports/gtkmm/COPYING create mode 100644 ports/gtkmm/README create mode 100644 ports/gtkmm/fix_properties.patch create mode 100644 ports/gtkmm/msvc_recommended_pragmas.h create mode 100644 ports/gtkmm/portfile.cmake diff --git a/ports/gtkmm/CONTROL b/ports/gtkmm/CONTROL new file mode 100644 index 000000000..a0812ef67 --- /dev/null +++ b/ports/gtkmm/CONTROL @@ -0,0 +1,4 @@ +Source: gtkmm +Version: 3.22.2 +Description: gtkmm is the official C++ interface for the popular GUI library GTK+. +Build-Depends: glib, atk, gtk, gdk-pixbuf, pango, cairo, libepoxy, gettext, glibmm, atkmm, cairomm, pangomm diff --git a/ports/gtkmm/COPYING b/ports/gtkmm/COPYING new file mode 100644 index 000000000..4362b4915 --- /dev/null +++ b/ports/gtkmm/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/ports/gtkmm/README b/ports/gtkmm/README new file mode 100644 index 000000000..ea1d8e0a6 --- /dev/null +++ b/ports/gtkmm/README @@ -0,0 +1,3 @@ +This is gtkmm, the C++ API for GTK+. +See http://www.gtkmm.org/ + diff --git a/ports/gtkmm/fix_properties.patch b/ports/gtkmm/fix_properties.patch new file mode 100644 index 000000000..3db0a30e5 --- /dev/null +++ b/ports/gtkmm/fix_properties.patch @@ -0,0 +1,2423 @@ +diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj +index dd495a0..94c6396 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj ++++ b/MSVC_Net2013/gdkmm.vcxproj +@@ -93,7 +93,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -118,7 +118,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -150,7 +150,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -179,7 +179,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + false +@@ -263,4 +263,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gdkmm.vcxproj.filters b/MSVC_Net2013/gdkmm.vcxproj.filters +index 826f785..da390e5 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj.filters ++++ b/MSVC_Net2013/gdkmm.vcxproj.filters +@@ -15,71 +15,183 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + + + Resource Files + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm-build-defines.props b/MSVC_Net2013/gtkmm-build-defines.props +index 880cbf7..2cb24a3 100644 +--- a/MSVC_Net2013/gtkmm-build-defines.props ++++ b/MSVC_Net2013/gtkmm-build-defines.props +@@ -4,10 +4,8 @@ + + + +- GDKMM_BUILD +- GTKMM_BUILD +- pangomm-vc$(VSVer)0-1_4.lib;giomm-vc$(VSVer)0-2_4.lib;glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib +- pangomm-vc$(VSVer)0-d-1_4.lib;giomm-vc$(VSVer)0-d-2_4.lib;glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib ++ GDKMM_BUILD;_WINDLL ++ GTKMM_BUILD;_WINDLL + + + <_PropertySheetDisplayName>glibmmbuilddefinesprops +@@ -16,15 +14,15 @@ + + + +- .\gdkmm;..;..\gdk;$(GlibEtcInstallRoot)\include\pangomm-1.4;$(GlibEtcInstallRoot)\lib\pangomm-1.4\include;$(GlibEtcInstallRoot)\include\giomm-2.4;$(GlibEtcInstallRoot)\lib\giomm-2.4\include;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gtk-3.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\gdkmm;..;..\gdk;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + 4250;%(DisableSpecificWarnings) + true + /d2Zi+ %(AdditionalOptions) + + +- gtk-3.0.lib;gdk-3.0.lib;gdk_pixbuf-2.0.lib;gobject-2.0.lib;gio-2.0.lib;glib-2.0.lib;epoxy.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + +@@ -34,11 +32,5 @@ + + $(GtkMMBuildDefs) + +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm-version-paths.props b/MSVC_Net2013/gtkmm-version-paths.props +index f0c2834..968562a 100644 +--- a/MSVC_Net2013/gtkmm-version-paths.props ++++ b/MSVC_Net2013/gtkmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 3 + 0 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>glibmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj +index 8093886..ec56ed1 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj ++++ b/MSVC_Net2013/gtkmm.vcxproj +@@ -80,7 +80,7 @@ + %(AdditionalOptions) + Disabled + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL +@@ -95,7 +95,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -108,7 +108,7 @@ + + %(AdditionalOptions) + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- $(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + +@@ -121,7 +121,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + false +@@ -139,7 +139,7 @@ + %(AdditionalOptions) + Disabled + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) + true + EnableFastChecks + MultiThreadedDebugDLL +@@ -154,7 +154,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -171,7 +171,7 @@ + + %(AdditionalOptions) + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- $(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + +@@ -184,7 +184,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -697,4 +697,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm.vcxproj.filters b/MSVC_Net2013/gtkmm.vcxproj.filters +index 5237502..5e8bd36 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj.filters ++++ b/MSVC_Net2013/gtkmm.vcxproj.filters +@@ -14,496 +14,1459 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + + + Resource Files + + +- ++ +\ No newline at end of file diff --git a/ports/gtkmm/msvc_recommended_pragmas.h b/ports/gtkmm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/gtkmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake new file mode 100644 index 000000000..61e7b67f5 --- /dev/null +++ b/ports/gtkmm/portfile.cmake @@ -0,0 +1,117 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +# Glibmm uses winapi functions not available in WindowsStore, so gtkmm +# also +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +# Glibmm relies on DllMain, so gtkmm also +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +message(STATUS "Warning: Static building not supported. Building dynamic.") +set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtkmm-3.22.2) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.22/gtkmm-3.22.2.tar.xz" + FILENAME "gtkmm-3.22.2.tar.xz" + SHA512 6e96b543e459481145ee0f56f31a7ad2466bd8ccdd2abf3205998aecede73d235149ca6e5ba6e8d20a4fd5345e310870d81ac2a716d4f78d1460ed685badbdc2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln + TARGET gtkmm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/gdkmm/gdkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gdk/gdkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gdk/gdkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/gtkmm/gtkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gtk/gtkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gtk/gtkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME readme.txt) -- cgit v1.2.3 From 886bc2965d0f7fa5d30121cf28aef1265279494a Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Tue, 24 Oct 2017 20:57:31 +0200 Subject: Use unicode --- ports/atkmm/fix_charset.patch | 98 ++ ports/atkmm/portfile.cmake | 2 +- ports/glibmm/fix_charset.patch | 2702 +++++++++++++++++++++++++++++++++++++++ ports/glibmm/portfile.cmake | 2 +- ports/gtkmm/fix_charset.patch | 2053 +++++++++++++++++++++++++++++ ports/gtkmm/portfile.cmake | 14 +- ports/pangomm/fix_charset.patch | 110 ++ ports/pangomm/portfile.cmake | 2 +- 8 files changed, 4967 insertions(+), 16 deletions(-) create mode 100644 ports/atkmm/fix_charset.patch create mode 100644 ports/glibmm/fix_charset.patch create mode 100644 ports/gtkmm/fix_charset.patch create mode 100644 ports/pangomm/fix_charset.patch diff --git a/ports/atkmm/fix_charset.patch b/ports/atkmm/fix_charset.patch new file mode 100644 index 000000000..60cd8fbcd --- /dev/null +++ b/ports/atkmm/fix_charset.patch @@ -0,0 +1,98 @@ +diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj +index 40f21cb..e9f5c5e 100644 +--- a/MSVC_Net2013/atkmm.vcxproj ++++ b/MSVC_Net2013/atkmm.vcxproj +@@ -22,21 +22,22 @@ + atkmm + {9FE0D5A6-458C-45C7-B954-2C3C1E6196C2} + Win32Proj ++ 8.1 + + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index d6f2798..aab7023 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,21 +21,22 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 6225a66..7f61dc5 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake index 84fc6e6a0..4cbaee7ad 100644 --- a/ports/atkmm/portfile.cmake +++ b/ports/atkmm/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) diff --git a/ports/glibmm/fix_charset.patch b/ports/glibmm/fix_charset.patch new file mode 100644 index 000000000..8831fc946 --- /dev/null +++ b/ports/glibmm/fix_charset.patch @@ -0,0 +1,2702 @@ +diff --git a/MSVC_Net2013/compose.vcxproj b/MSVC_Net2013/compose.vcxproj +index 4775af3..72a7054 100644 +--- a/MSVC_Net2013/compose.vcxproj ++++ b/MSVC_Net2013/compose.vcxproj +@@ -23,26 +23,27 @@ + {D1C74410-023C-48DE-B636-E8B6D177C306} + compose + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/dispatcher.vcxproj b/MSVC_Net2013/dispatcher.vcxproj +index 6c403c0..90d254a 100644 +--- a/MSVC_Net2013/dispatcher.vcxproj ++++ b/MSVC_Net2013/dispatcher.vcxproj +@@ -23,26 +23,27 @@ + {129ECC08-6D30-4884-B824-4AF96EF0A45C} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/dispatcher2.vcxproj b/MSVC_Net2013/dispatcher2.vcxproj +index db6a5fd..9cf6b57 100644 +--- a/MSVC_Net2013/dispatcher2.vcxproj ++++ b/MSVC_Net2013/dispatcher2.vcxproj +@@ -22,26 +22,27 @@ + dispatcher2 + {18A82706-B645-4DF5-AB09-06B90128BAC5} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -188,4 +189,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 8894039..0b2cb08 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -1,168 +1,169 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- {07324745-C9BE-4D65-B08A-9C88188C0C28} +- Win32Proj +- +- +- +- Application +- MultiByte +- v120 +- +- +- Application +- MultiByte +- v120 +- +- +- Application +- MultiByte +- v120 +- +- +- Application +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- false +- true +- true +- true +- false +- true +- +- +- +- Disabled +- _DEBUG;%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebug +- Level3 +- EditAndContinue +- +- +- true +- $(OutDir)\$(TargetName).pdb +- Console +- false +- +- +- MachineX86 ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ {07324745-C9BE-4D65-B08A-9C88188C0C28} ++ Win32Proj ++ 8.1 ++ ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ false ++ true ++ true ++ true ++ false ++ true ++ ++ ++ ++ Disabled ++ _DEBUG;%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebug ++ Level3 ++ EditAndContinue ++ ++ ++ true ++ $(OutDir)\$(TargetName).pdb ++ Console ++ false ++ ++ ++ MachineX86 + %(AdditionalDependencies) +- +- +- +- +- ;%(PreprocessorDefinitions) +- MultiThreaded +- Level3 +- ProgramDatabase +- +- +- true +- Console +- true +- true +- false +- +- +- MachineX86 ++ ++ ++ ++ ++ ;%(PreprocessorDefinitions) ++ MultiThreaded ++ Level3 ++ ProgramDatabase ++ ++ ++ true ++ Console ++ true ++ true ++ false ++ ++ ++ MachineX86 + %(AdditionalDependencies) +- +- +- +- +- X64 +- +- +- Disabled +- _DEBUG;%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebug +- Level3 +- ProgramDatabase +- +- +- true +- $(OutDir)\$(TargetName).pdb +- Console +- false +- +- +- MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ Disabled ++ _DEBUG;%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebug ++ Level3 ++ ProgramDatabase ++ ++ ++ true ++ $(OutDir)\$(TargetName).pdb ++ Console ++ false ++ ++ ++ MachineX64 + %(AdditionalDependencies) +- +- +- +- +- X64 +- +- +- ;%(PreprocessorDefinitions) +- MultiThreaded +- Level3 +- ProgramDatabase +- +- +- true +- Console +- true +- true +- false +- +- +- MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ ;%(PreprocessorDefinitions) ++ MultiThreaded ++ Level3 ++ ProgramDatabase ++ ++ ++ true ++ Console ++ true ++ true ++ false ++ ++ ++ MachineX64 + %(AdditionalDependencies) +- +- +- +- +- +- +- +- +- +\ No newline at end of file ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm.vcxproj b/MSVC_Net2013/giomm.vcxproj +index df3c4f8..f9baf6b 100644 +--- a/MSVC_Net2013/giomm.vcxproj ++++ b/MSVC_Net2013/giomm.vcxproj +@@ -1,458 +1,459 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- giomm +- {EE6C0430-C2C9-425C-8EBA-963FAC3E9832} +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- %(AdditionalOptions) +- Disabled ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ giomm ++ {EE6C0430-C2C9-425C-8EBA-963FAC3E9832} ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- Level3 +- EditAndContinue +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++ _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ Level3 ++ EditAndContinue ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- Level3 +- ProgramDatabase +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++ _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- %(AdditionalOptions) ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ %(AdditionalOptions) + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- $(GioMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- Level3 +- ProgramDatabase +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ $(GioMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- false +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- true +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ true ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- $(GioMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- Level3 +- ProgramDatabase +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ $(GioMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- false +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- true +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {58b2b53c-c4ff-47fd-817b-095e45b7f7d4} +- false +- +- +- +- +- +- +\ No newline at end of file ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ true ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {58b2b53c-c4ff-47fd-817b-095e45b7f7d4} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm_simple.vcxproj b/MSVC_Net2013/giomm_simple.vcxproj +index 1eb6124..2db412e 100644 +--- a/MSVC_Net2013/giomm_simple.vcxproj ++++ b/MSVC_Net2013/giomm_simple.vcxproj +@@ -23,26 +23,27 @@ + {F4F66980-51D4-4CC2-A529-9AD2C9F7D143} + tests_giomm_simple + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm.vcxproj b/MSVC_Net2013/glibmm.vcxproj +index cf86400..e3df6a8 100644 +--- a/MSVC_Net2013/glibmm.vcxproj ++++ b/MSVC_Net2013/glibmm.vcxproj +@@ -1,362 +1,363 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- glibmm +- {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} +- glibmm +- Win32Proj +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- true +- true +- true +- true +- true +- true +- +- +- +- %(AdditionalOptions) +- Disabled +- %(AdditionalIncludeDirectories) +- _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- Level3 +- EditAndContinue +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ glibmm ++ {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} ++ glibmm ++ Win32Proj ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ true ++ true ++ true ++ true ++ true ++ true ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ %(AdditionalIncludeDirectories) ++ _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ Level3 ++ EditAndContinue ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled +- %(AdditionalIncludeDirectories) +- _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- Level3 +- ProgramDatabase +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ %(AdditionalIncludeDirectories) ++ _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- %(AdditionalOptions) +- %(AdditionalIncludeDirectories) +- $(GLibMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- Level3 +- ProgramDatabase +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ %(AdditionalOptions) ++ %(AdditionalIncludeDirectories) ++ $(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- false +- true +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- %(AdditionalIncludeDirectories) +- $(GLibMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- Level3 +- ProgramDatabase +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ false ++ true ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ %(AdditionalIncludeDirectories) ++ $(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- false +- true +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {07324745-c9be-4d65-b08a-9c88188c0c28} +- false +- +- +- +- +- +- +\ No newline at end of file ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ false ++ true ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {07324745-c9be-4d65-b08a-9c88188c0c28} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm_value.vcxproj b/MSVC_Net2013/glibmm_value.vcxproj +index 9639003..7e12415 100644 +--- a/MSVC_Net2013/glibmm_value.vcxproj ++++ b/MSVC_Net2013/glibmm_value.vcxproj +@@ -23,26 +23,27 @@ + {22277003-3228-486E-A6A8-994B8B13AF30} + tests_glibmm_value + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -186,4 +187,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 059ceec..b6f2843 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + +@@ -113,4 +114,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/keyfile.vcxproj b/MSVC_Net2013/keyfile.vcxproj +index 0993e6a..ee23bae 100644 +--- a/MSVC_Net2013/keyfile.vcxproj ++++ b/MSVC_Net2013/keyfile.vcxproj +@@ -23,26 +23,27 @@ + {569A24AB-8D81-4427-B40D-85485AA7F3CD} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/markup.vcxproj b/MSVC_Net2013/markup.vcxproj +index 03b3295..db2dfab 100644 +--- a/MSVC_Net2013/markup.vcxproj ++++ b/MSVC_Net2013/markup.vcxproj +@@ -22,26 +22,27 @@ + markup + {6300FCFA-97F1-4967-802E-E354D95DB0EB} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -188,4 +189,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/options.vcxproj b/MSVC_Net2013/options.vcxproj +index f627c4e..dda25b9 100644 +--- a/MSVC_Net2013/options.vcxproj ++++ b/MSVC_Net2013/options.vcxproj +@@ -23,26 +23,27 @@ + {46962B9A-C5E9-4863-9408-97514D63F420} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/properties.vcxproj b/MSVC_Net2013/properties.vcxproj +index 6858140..d8a95c2 100644 +--- a/MSVC_Net2013/properties.vcxproj ++++ b/MSVC_Net2013/properties.vcxproj +@@ -23,26 +23,27 @@ + {206CC821-8BE3-4455-B09E-63F93E30F20C} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/regex.vcxproj b/MSVC_Net2013/regex.vcxproj +index 84418df..c4c0cf0 100644 +--- a/MSVC_Net2013/regex.vcxproj ++++ b/MSVC_Net2013/regex.vcxproj +@@ -23,26 +23,27 @@ + {7374A5A1-4E74-44BD-918C-FDF80B97FA3F} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/resolver.vcxproj b/MSVC_Net2013/resolver.vcxproj +index 113d86a..9fa59a4 100644 +--- a/MSVC_Net2013/resolver.vcxproj ++++ b/MSVC_Net2013/resolver.vcxproj +@@ -23,26 +23,27 @@ + {E4D320F1-7D2D-43AF-874F-14524220EF92} + resolver + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -193,4 +194,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-client.vcxproj b/MSVC_Net2013/socket-client.vcxproj +index 3743708..bfb8330 100644 +--- a/MSVC_Net2013/socket-client.vcxproj ++++ b/MSVC_Net2013/socket-client.vcxproj +@@ -23,26 +23,27 @@ + {1E38D900-90AC-4E18-B34C-7B08E3383087} + socket-client + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -193,4 +194,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-client.vcxproj.filters b/MSVC_Net2013/socket-client.vcxproj.filters +index edb14c1..8d41b33 100644 +--- a/MSVC_Net2013/socket-client.vcxproj.filters ++++ b/MSVC_Net2013/socket-client.vcxproj.filters +@@ -15,6 +15,6 @@ + + + +- Source Files ++ + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-server.vcxproj b/MSVC_Net2013/socket-server.vcxproj +index 4116263..e6744af 100644 +--- a/MSVC_Net2013/socket-server.vcxproj ++++ b/MSVC_Net2013/socket-server.vcxproj +@@ -23,26 +23,27 @@ + {7A4EB8C4-4784-4E9E-96E6-CA6FF4CE1D20} + socket-server + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -193,4 +194,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-server.vcxproj.filters b/MSVC_Net2013/socket-server.vcxproj.filters +index 66a88d3..8d41b33 100644 +--- a/MSVC_Net2013/socket-server.vcxproj.filters ++++ b/MSVC_Net2013/socket-server.vcxproj.filters +@@ -15,6 +15,6 @@ + + + +- Source Files ++ + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/thread.vcxproj b/MSVC_Net2013/thread.vcxproj +index 9950bbb..d1824e8 100644 +--- a/MSVC_Net2013/thread.vcxproj ++++ b/MSVC_Net2013/thread.vcxproj +@@ -22,26 +22,27 @@ + thread + {5357AB2B-A5F9-463C-92D8-00357CCC3ECE} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -184,4 +185,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/threadpool.vcxproj b/MSVC_Net2013/threadpool.vcxproj +index 9ab9748..d0a0d15 100644 +--- a/MSVC_Net2013/threadpool.vcxproj ++++ b/MSVC_Net2013/threadpool.vcxproj +@@ -22,26 +22,27 @@ + threadpool + {962484DB-2111-48A4-BEF0-194433719D0D} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -192,4 +193,4 @@ + + + +- ++ +\ No newline at end of file diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index f5880ecf7..fd4853f55 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) diff --git a/ports/gtkmm/fix_charset.patch b/ports/gtkmm/fix_charset.patch new file mode 100644 index 000000000..027d74f99 --- /dev/null +++ b/ports/gtkmm/fix_charset.patch @@ -0,0 +1,2053 @@ +diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj +index d9d08ac..8c6b528 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj ++++ b/MSVC_Net2013/gdkmm.vcxproj +@@ -1,266 +1,267 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- gdkmm +- {976C8F9C-1A1D-4E23-B79E-EC9091BBEA0E} +- Win32Proj +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- true +- true +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- +- +- +- %(AdditionalOptions) +- Disabled +- _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- EditAndContinue +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ gdkmm ++ {976C8F9C-1A1D-4E23-B79E-EC9091BBEA0E} ++ Win32Proj ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ true ++ true ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ EditAndContinue ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- %(AdditionalOptions) +- $(GdkMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ %(AdditionalOptions) ++ $(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- true +- false +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled +- _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ true ++ false ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- $(GdkMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ $(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- false +- true +- true +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {07324745-c9be-4d65-b08a-9c88188c0c28} +- false +- +- +- +- +- +- +\ No newline at end of file ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ true ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {07324745-c9be-4d65-b08a-9c88188c0c28} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 33dfe5e..01b9271 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,26 +21,27 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj +index 2c732f8..ad9d312 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj ++++ b/MSVC_Net2013/gtkmm.vcxproj +@@ -1,700 +1,701 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- gtkmm +- {907B8D15-7E12-4136-A7E6-B6ED5E055D39} +- gtkmm +- Win32Proj +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- true +- true +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- +- +- +- %(AdditionalOptions) +- Disabled +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ gtkmm ++ {907B8D15-7E12-4136-A7E6-B6ED5E055D39} ++ gtkmm ++ Win32Proj ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ true ++ true ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- EditAndContinue +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ EditAndContinue ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- %(AdditionalOptions) +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ %(AdditionalOptions) ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- false +- true +- true +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ true ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- true +- false +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {976c8f9c-1a1d-4e23-b79e-ec9091bbea0e} +- false +- +- +- {07324745-c9be-4d65-b08a-9c88188c0c28} +- false +- +- +- +- +- +- +\ No newline at end of file ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {976c8f9c-1a1d-4e23-b79e-ec9091bbea0e} ++ false ++ ++ ++ {07324745-c9be-4d65-b08a-9c88188c0c28} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm3-demo.vcxproj b/MSVC_Net2013/gtkmm3-demo.vcxproj +index 9c33d45..84a988a 100644 +--- a/MSVC_Net2013/gtkmm3-demo.vcxproj ++++ b/MSVC_Net2013/gtkmm3-demo.vcxproj +@@ -23,26 +23,27 @@ + {5A8BBE25-E8D8-487B-AD2D-690438F09FA1} + gtkmm3-demo + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -251,4 +252,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 1df2f4b..a484bd6 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake index 61e7b67f5..c82bc597d 100644 --- a/ports/gtkmm/portfile.cmake +++ b/ports/gtkmm/portfile.cmake @@ -1,15 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - # Glibmm uses winapi functions not available in WindowsStore, so gtkmm # also if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) @@ -33,7 +21,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) diff --git a/ports/pangomm/fix_charset.patch b/ports/pangomm/fix_charset.patch new file mode 100644 index 000000000..d57063c86 --- /dev/null +++ b/ports/pangomm/fix_charset.patch @@ -0,0 +1,110 @@ +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index ceca956..c29a2a1 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,26 +21,27 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index fecde32..8f97675 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/pangomm.vcxproj b/MSVC_Net2013/pangomm.vcxproj +index aa03fad..d63becf 100644 +--- a/MSVC_Net2013/pangomm.vcxproj ++++ b/MSVC_Net2013/pangomm.vcxproj +@@ -23,26 +23,27 @@ + {A93D607A-5C37-4AEC-BA08-6A655F6DC834} + pangomm + Win32Proj ++ 8.1 + + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake index 58d02f268..ad350f638 100644 --- a/ports/pangomm/portfile.cmake +++ b/ports/pangomm/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) -- cgit v1.2.3 From fdf331e2883200e1922b8ed051dc4ab775619d60 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 4 Nov 2017 10:07:16 -0700 Subject: [glibmm] Add missing dependency: libsigcpp --- ports/glibmm/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL index babaee277..52a4e0e05 100644 --- a/ports/glibmm/CONTROL +++ b/ports/glibmm/CONTROL @@ -1,4 +1,4 @@ Source: glibmm Version: 2.52.1 Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org. -Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib +Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp -- cgit v1.2.3 From 30f74216028193e619826809897085a9f536a607 Mon Sep 17 00:00:00 2001 From: Vlad Kolesnikov Date: Sat, 4 Nov 2017 14:54:12 -0700 Subject: Adding OpenSSL support to FFMPEG, fixed Assmimp UWP build (#2018) * Enable ffmpeg to build using openssl for HTTPS/TLS support * [ffmpeg] Add contract versions to libpath * Updated FFMPEG to 3.3.3; Fixed unistd.h issue in ffmpeg build * merge fix * merge fix * fix merge * removed extra files * Assimp UWP build fix * [assimp] Bump version * [ffmpeg] Implement openssl support through features. * [opencv] remove ffmpeg depenency OpenCV has own prebuilt ffmpeg library * Fix version, package name is not a part of it * Add support build option to PCL port Add support build options (pcap, qt) to PCL port. * Update VTK to 8.0.1 Update VTK to 8.0.1. * [vcpkg] Enable pkg[*] as alias for all features. * Using CP_UTF8 macro instead of magic numbers. * [vcpkg] Add optional Abi field to BinaryParagraph for future use. * [double-conversion] Fix --head builds * [vcpkg] --head should only apply to USER_REQUESTED packages. * [vcpkg] Fix bug where packages with uninstalled features appear to be uninstalled. * Update Catch to 1.11.0 * Fix proxy usage in Win7 (powershell 2.0) * [findVSInstances] Data lines are now placed within tags. Text outside these tags is ignored This means we can print text in powershell now and it won't break vcpkg. * [fetchDependency] Now also returns output in the form data * [git] Update to 2.15.0 (was 2.14.3) * [bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure. * [poco] build with MySQL support (#2088) * [poco] build with MySQL support Set proper variables to enable MySQL support if libmysql port is installed * [poco] Move Mysql support to a feature. Enable CMake config files. * help assimp find vcpkg's copy of zlib so it does not build its own * [assimp] Bump revision * [assimp] Fix assimp overwriting CMAKE_PREFIX_PATH. * [boost] Handle spaces in vcpkg path. * [vcpkg] Fix use of features in undocumented build command * Update to v1.2.0. Remove man pages * [opencv] Remove ffmpeg from dependencies -- it is not currently possible to use an external ffmpeg with opencv. Add features for cuda and vtk. * Enable OpenGL support for GUI Enable OpenGL support for GUI. * [protobuf] Add feature packages for zlib ZLib based features like Gzip streams. * [llvm] Require Python3 * [blaze] Fix remaining stray _INVALID_ROOT_ * Add option to enable Qt GUI support Add option to enable Qt GUI support. * Sorting CMake options for maintainability Sorting CMake options based on grouped of CMake-GUI for maintainability. * VTK: implement features (#2071) * [vtk/portfile] add OpenVR option * [vtk/control] add OpenVR feature * [vtk/portfile] Add OpenVR feature to portfile * [vtk/CONTROL] add features * [vtk/portfile] implement features * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix case * [vtk/portfile] fix case * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix syntax * [vtk/portfile] fix module name * [vtk] Bump version * [uwebsockets] Remove boost from dependency list to follow upstream's official README * [libharu] Fix DLLIMPORT macro replacement * Update CHANGELOG and bump version to v0.0.95 * Fix date in CHANGELOG.md * [apr] Update to 1.6.3 * Enable C++11 features Enable C++11 features. * Enable Microsoft Media Foundation support for Video I/O Enable Microsoft Media Foundation support for Video I/O. * [double-conversion] Fix regression introduced in vcpkg_fixup_cmake_targets. * [vcpkg] Refactor argument parsing to use common code paths. * [vcpkg] Improve `vcpkg help` -- now has per-command help! * [vcpkg-help-export-ifw] Add settings description * [opencv] Disable MSMF in UWP due to an upstream bug * [vcpkg_download_distfile] Now downloads in a temp dir and rename to the target location * [vcpkg_find_acquire_program] Use vcpkg_download_distfile() * Remove vcpkg_acquire_depot_tools * [downloads] Don't show progress by default * [vcpkg_acquire_msys] Use vcpkg_download_distfile() * vcpkg_from_github] Use vcpkg_download_distfile() * [vcpkg_from_bitbucket] Use vcpkg_download_distfile() * [ports.cmake] Use vcpkg_download_distfile() * [antlr] upgrade to antlr4.7 * [antlr4] bump version to 4.7 * Use download-at-temp-and-rename pattern in powershell too * Print error message when there is a syntax error in triplet file As it is now vcpkg fails silently (actually, it outputs two empty lines). * [fdk-aac] init * [fetchDependendy.ps1] Remove obsolete comment * [fetchDependency.ps1] Improve error message on hash mismatch * [vswhere] Update to 2.2.11 (was 2.2.7) * libaiff * Append W * [libaiff] fix uninitialized buffer * Add the flint2 library (#1988) * Add the "flint2" library. * FIX: update library name * FIX: only set MSVC version to VC14 * FIX: use static linkage * DOC: display notification to the user * [flint/CONTROL] add gettimeofday dependency * [flint/portfile] move up linkage * [flint/portfile] attempt to override the CRT linkage * Add arblib (#1991) * Fix rename libraries of FLANN Fix rename libraries of FLANN. * Fix line endings * [cmake] Update to 3.9.5 (was 3.9.4) * Porting ITK * Sourcing from GitHub, using a master version with vcpkg patch * Update CHANGELOG and bump version to v0.0.96 * [fftw] update to 3.3.7 * [dlib] update to 19.7 and use vcpkg_from_github * fix issue 2111 * Revert "Updated libsigcpp to version 2.99.9" This reverts commit 079ef9785ad539e1484f876577913a7269021288. * Added glibmm and giomm. * Added atkmm. * Added pangomm. * Added gtkmm * Use unicode * [glibmm] Add missing dependency: libsigcpp --- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 2 ++ ports/ffmpeg/CONTROL | 6 +++++- ports/ffmpeg/detect-openssl.patch | 25 +++++++++++++++++++++++++ ports/ffmpeg/portfile.cmake | 14 ++++++++++++++ 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 ports/ffmpeg/detect-openssl.patch diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 9666a06b3..f6e6eaaff 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1-2 +Version: 4.0.1-3 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 496300240..583738e16 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -16,6 +16,8 @@ vcpkg_apply_patches( ) file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) +set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 658c4b1f2..0b9d22dba 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,4 +1,8 @@ Source: ffmpeg -Version: 3.3.3 +Version: 3.3.3-1 Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. + +Feature: openssl +Build-Depends: openssl +Description: openssl support in ffmpeg diff --git a/ports/ffmpeg/detect-openssl.patch b/ports/ffmpeg/detect-openssl.patch new file mode 100644 index 000000000..cb8a77e0a --- /dev/null +++ b/ports/ffmpeg/detect-openssl.patch @@ -0,0 +1,25 @@ +From 18de5c60ae0a987680681d5a0602009b428504fa Mon Sep 17 00:00:00 2001 +From: Gilles Khouzam +Date: Mon, 19 Jun 2017 16:33:38 -0700 +Subject: [PATCH] Add better detection for Openssl on Windows. + +Look for libeay32 and ssleay32 as another detection mechanism +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index a1818dc..1cf2a7c 100755 +--- a/configure ++++ b/configure +@@ -5836,6 +5836,7 @@ enabled openssl && { use_pkg_config openssl openssl/ssl.h OPENSSL_init + check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || + check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || ++ check_lib openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 || + die "ERROR: openssl not found"; } + enabled qtkit_indev && { check_header_objcc QTKit/QTKit.h || disable qtkit_indev; } + +-- +2.10.1.windows.1 + diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 8bd7abab0..0b3002c87 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -11,6 +11,10 @@ vcpkg_download_distfile(ARCHIVE SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch +) vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) @@ -18,6 +22,8 @@ set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") vcpkg_acquire_msys(MSYS_ROOT) set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) +set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") +set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}") set(_csc_PROJECT_PATH ffmpeg) @@ -25,8 +31,14 @@ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BU set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug") set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") +if("openssl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-openssl") +else() + set(OPTIONS "${OPTIONS} --disable-openssl") +endif() if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") @@ -54,6 +66,8 @@ endif() set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html set(OPTIONS_RELEASE "") +set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -- cgit v1.2.3 From 32d588aa6903277a273a4d436c2929a412d11aa3 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 5 Nov 2017 01:11:48 +0300 Subject: [opencv] add support for MSVS 2017 update 5 (#2132) --- ports/opencv/CONTROL | 2 +- ports/opencv/msvs-fix-2017-u5.patch | 39 +++++++++++++++++++++++++++++++++++++ ports/opencv/portfile.cmake | 1 + 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 ports/opencv/msvs-fix-2017-u5.patch diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 47d8b2443..2654e5a25 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-6 +Version: 3.3.1-7 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/msvs-fix-2017-u5.patch b/ports/opencv/msvs-fix-2017-u5.patch new file mode 100644 index 000000000..ab0d0d0ff --- /dev/null +++ b/ports/opencv/msvs-fix-2017-u5.patch @@ -0,0 +1,39 @@ +From 62737c777c9314ee2e4b4e595daa830ba12765e2 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sat, 4 Nov 2017 23:52:37 +0300 +Subject: [PATCH] cmake: add support for MSVS 2017 update 5 + +--- + cmake/OpenCVDetectCXXCompiler.cmake | 2 +- + cmake/templates/OpenCVConfig.root-WIN32.cmake.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake +index cfb613b..3874467 100644 +--- a/cmake/OpenCVDetectCXXCompiler.cmake ++++ b/cmake/OpenCVDetectCXXCompiler.cmake +@@ -114,7 +114,7 @@ if(MSVC) + set(OpenCV_RUNTIME vc12) + elseif(MSVC_VERSION EQUAL 1900) + set(OpenCV_RUNTIME vc14) +- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911) ++ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) + set(OpenCV_RUNTIME vc15) + else() + message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME") +diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in +index 7dc6666..846c400 100644 +--- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in ++++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in +@@ -78,7 +78,7 @@ if(MSVC) + set(OpenCV_RUNTIME vc12) + elseif(MSVC_VERSION EQUAL 1900) + set(OpenCV_RUNTIME vc14) +- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911) ++ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) + set(OpenCV_RUNTIME vc15) + endif() + elseif(MINGW) +-- +2.14.1.windows.1 + diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f201ea706..f514e189e 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch" + "${CMAKE_CURRENT_LIST_DIR}/msvs-fix-2017-u5.patch" ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) -- cgit v1.2.3 From 61c0a337842b50d4b914893030193f3a1faaedf4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 4 Nov 2017 16:40:11 -0700 Subject: Improve error messages around calling powershell scripts --- toolsrc/include/vcpkg/base/system.h | 4 +++- toolsrc/src/vcpkg/base/system.cpp | 28 ++++++++++++++++++++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 47 +++++++++++++++---------------------- 3 files changed, 48 insertions(+), 31 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index a696bf3ae..9f2d91435 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -22,7 +22,9 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args = ""); + std::string powershell_execute_and_capture_output(const std::string& title, + const fs::path& script_path, + const CStringView args = ""); enum class Color { diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index a1bc9daf6..47096ed63 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include @@ -269,7 +270,9 @@ namespace vcpkg::System #endif } - ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args) + std::string powershell_execute_and_capture_output(const std::string& title, + const fs::path& script_path, + const CStringView args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned const std::string cmd = Strings::format( @@ -277,6 +280,27 @@ namespace vcpkg::System auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code) + { + System::println(Color::error, + "%s\n" + "Could not run:\n" + " '%s'\n" + "Error message was:\n" + " %s", + title, + script_path.generic_string(), + rc.output); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell script failed"); + locked_metrics->track_property("title", title); + } + + Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); + } + // Remove newline from all output. // Powershell returns newlines when it hits the column count of the console. // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get @@ -285,7 +309,7 @@ namespace vcpkg::System // and then strip all newlines here. rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); - return rc; + return rc.output; } void println() { putchar('\n'); } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c17b029c0..a553f4199 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -91,26 +91,13 @@ namespace vcpkg tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; - const System::ExitCodeAndOutput rc = - System::powershell_execute_and_capture_output(script, Strings::format("-Dependency %s", tool_name)); - if (rc.exit_code) - { - System::println(System::Color::error, - "Launching powershell failed or was denied when trying to fetch %s version %s.\n" - "(No sufficient installed version was found)", - tool_name, - version_as_string); - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell install failed"); - locked_metrics->track_property("dependency", tool_name); - } - Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); - } + const std::string title = "Fetching %s version %s (No sufficient installed version was found)"; + const std::string output = + System::powershell_execute_and_capture_output(title, script, Strings::format("-Dependency %s", tool_name)); - const std::vector dependency_path = keep_data_lines(rc.output); + const std::vector dependency_path = keep_data_lines(output); Checks::check_exit( - VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", rc.output); + VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", output); const fs::path actual_downloaded_path = Strings::trim(std::string{dependency_path.at(0)}); std::error_code ec; @@ -344,17 +331,21 @@ namespace vcpkg static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const System::ExitCodeAndOutput ec_data = System::powershell_execute_and_capture_output(script); - Checks::check_exit( - VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); + const std::string output = + System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); - const std::vector instances_as_strings = keep_data_lines(ec_data.output); + const std::vector instances_as_strings = keep_data_lines(output); Checks::check_exit(VCPKG_LINE_INFO, !instances_as_strings.empty(), - "Could not detect any Visual Studio instances. Powershell returned: %s\n", - ec_data.output); - - std::vector output; + "Could not detect any Visual Studio instances.\n" + "Powershell script:\n" + " %s\n" + "returned:\n" + "%s", + script.generic_string(), + output); + + std::vector instances; for (const std::string& instance_as_string : instances_as_strings) { const std::vector split = Strings::split(instance_as_string, "::"); @@ -364,10 +355,10 @@ namespace vcpkg "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" "Actual : %s\n", instance_as_string); - output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); + instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } - return output; + return instances; } static std::vector find_toolset_instances(const VcpkgPaths& paths) -- cgit v1.2.3 From 9e71c1810cd6f6a56848c794d51fc4c1960e4634 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 4 Nov 2017 15:52:07 -0700 Subject: [alac] init --- ports/alac/CMakeLists.txt | 65 +++++++++++++++++++++++++++++++++++++++++++++++ ports/alac/CONTROL | 3 +++ ports/alac/portfile.cmake | 21 +++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 ports/alac/CMakeLists.txt create mode 100644 ports/alac/CONTROL create mode 100644 ports/alac/portfile.cmake diff --git a/ports/alac/CMakeLists.txt b/ports/alac/CMakeLists.txt new file mode 100644 index 000000000..843189546 --- /dev/null +++ b/ports/alac/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required (VERSION 3.9) +project (alac) + +set(HEADERS + codec/EndianPortable.h + codec/aglib.h + codec/ALACAudioTypes.h + codec/ALACBitUtilities.h + codec/ALACDecoder.h + codec/ALACEncoder.h + codec/dplib.h + codec/matrixlib.h +) + + +set (SRCS + codec/EndianPortable.c + codec/ALACBitUtilities.c + codec/ALACDecoder.cpp + codec/ALACEncoder.cpp + codec/ag_dec.c + codec/ag_enc.c + codec/dp_dec.c + codec/dp_enc.c + codec/matrix_dec.c + codec/matrix_enc.c +) + +set(EXE_SRCS + convert-utility/main.cpp + convert-utility/CAFFileALAC.cpp +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(. codec convert-utility) + +add_library(libalac ${SRCS}) + +add_executable(alacconvert ${EXE_SRCS}) +target_link_libraries(alacconvert libalac) + +install( + TARGETS libalac + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS alacconvert + RUNTIME DESTINATION tools/alac + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/alac) +endif() diff --git a/ports/alac/CONTROL b/ports/alac/CONTROL new file mode 100644 index 000000000..f50b135e9 --- /dev/null +++ b/ports/alac/CONTROL @@ -0,0 +1,3 @@ +Source: alac +Version: 2017-11-03-c38887c5 +Description: The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices. diff --git a/ports/alac/portfile.cmake b/ports/alac/portfile.cmake new file mode 100644 index 000000000..c04e3a7d1 --- /dev/null +++ b/ports/alac/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO macosforge/alac + REF c38887c5c5e64a4b31108733bd79ca9b2496d987 + SHA512 8da18df25807e76f9187f7bf30585aace303d55444f0a614ab00d98d11caca3fdc5c6f5b9fd11e5f4c92a2ab1e86fef73deeeada57e9d49951fea8b80ba383cc + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac RENAME copyright) -- cgit v1.2.3 From 330b8d8bab6a3d07165bf7c05fea09a8e0d56348 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 4 Nov 2017 20:48:06 -0700 Subject: [vcpkg-msbuild-integration] Output warning when configuration is not determinable. Add special cases for RelWithDebInfo and MinSizeRel. --- scripts/buildsystems/msbuild/vcpkg.targets | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 1cb338237..ad1dde89b 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -36,15 +36,17 @@ $(Configuration) + Debug + Release $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\ - %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib - %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib - %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link - %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link + %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib + %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib + %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link + %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link %(AdditionalIncludeDirectories);$(VcpkgRoot)include @@ -57,6 +59,7 @@ + -- cgit v1.2.3