diff --git a/ports/hyperscan/CONTROL b/ports/hyperscan/CONTROL index a060054ac462fa..a47318f5f8fdb9 100644 --- a/ports/hyperscan/CONTROL +++ b/ports/hyperscan/CONTROL @@ -1,5 +1,5 @@ Source: hyperscan -Version: 5.2.1 +Version: 5.2.1-1 Homepage: https://www.hyperscan.io Description: A regular expression library with O(length of input) match times that takes advantage of Intel hardware to provide blazing speed. -Build-Depends: boost-array, boost-chrono, boost-config, boost-core, boost-crc, boost-detail, boost-functional, boost-regex, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-utility, boost-dynamic-bitset, boost-random, boost-graph, boost-multi-array, boost-icl, boost-ptr-container, python3, ragel +Build-Depends: boost-array, boost-chrono, boost-config, boost-core, boost-crc, boost-detail, boost-functional, boost-regex, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-utility, boost-dynamic-bitset, boost-random, boost-graph, boost-multi-array, boost-icl, boost-ptr-container, pcre, python3, ragel diff --git a/ports/python3/0001-static-library.patch b/ports/python3/0001-static-library.patch new file mode 100644 index 00000000000000..46502130db36cb --- /dev/null +++ b/ports/python3/0001-static-library.patch @@ -0,0 +1,46 @@ +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index b6b8d44586..35b329f307 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -257,6 +257,7 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#define Py_NO_ENABLE_SHARED + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +@@ -282,6 +283,11 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ + # endif /* _DEBUG */ + # endif /* _MSC_VER */ + # endif /* Py_BUILD_CORE */ ++#else ++ /* So MSVC users need not specify the .lib file in their own config */ ++# pragma comment(lib, "version.lib") ++# pragma comment(lib, "shlwapi.lib") ++# pragma comment(lib, "ws2_32.lib") + #endif /* MS_COREDLL */ + + #if defined(MS_WIN64) +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 0666b90f66..eb5ecffe71 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -73,7 +73,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -102,7 +102,7 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;%(AdditionalIncludeDirectories) + $(zlibDir);%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + diff --git a/ports/python3/0002-static-crt.patch b/ports/python3/0002-static-crt.patch new file mode 100644 index 00000000000000..82e2b36d2718e7 --- /dev/null +++ b/ports/python3/0002-static-crt.patch @@ -0,0 +1,15 @@ +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index eb5ecffe71..2a7c819533 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -104,6 +104,10 @@ + $(zlibDir);%(AdditionalIncludeDirectories) + _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) ++ MultiThreadedDebug ++ MultiThreadedDebug ++ MultiThreaded ++ MultiThreaded + + + version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL index 3c6ba8eb132e7a..abb7bf23af1b2b 100644 --- a/ports/python3/CONTROL +++ b/ports/python3/CONTROL @@ -1,9 +1,8 @@ Source: python3 -Version: 3.7.3-3 +Version: 3.8.3 Homepage: https://github.com/python/cpython Description: The Python programming language as an embeddable library -Build-Depends: libffi, openssl +Build-Depends: libffi, openssl, zlib (!uwp&!windows) Feature: enable-shared Description: Build shared libraries in addition to static ones built by default -Build-Depends: zlib (!uwp&!windows) diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 807b549d1d99ce..c680aeb2e049ef 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -4,16 +4,26 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static endif() set(PYTHON_VERSION_MAJOR 3) -set(PYTHON_VERSION_MINOR 7) +set(PYTHON_VERSION_MINOR 8) set(PYTHON_VERSION_PATCH 3) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-static-library.patch) + endif() + if (VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND PATCHES ${CMAKE_CURRENT_LIST_DIR}/0002-static-crt.patch) + endif() +endif() + vcpkg_from_github( OUT_SOURCE_PATH TEMP_SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 023960a2f570fe7178d3901df0c3c33346466906b6d55c73ef7947c19619dbab62efc42c7262a0539bc5e31543b1113eb7a088d4615ad7557a0707bdaca27940 + SHA512 eb264a858ef55f2f61b53f663454be6e99ffe9035d8fcdb3366d7a08fd3b295613e5d15e93e2e4b9b18ad297d8c17139bde5e90e396db04fe04c6f441a443fd2 HEAD_REF master + PATCHES ${PATCHES} ) if("enable-shared" IN_LIST FEATURES) @@ -33,9 +43,6 @@ if (VCPKG_TARGET_IS_WINDOWS) file(REMOVE_RECURSE ${SOURCE_PATH}) file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH}) - # We need per-triplet directories because we need to patch the project files differently based on the linkage - # Because the patches patch the same file, they have to be applied in the correct order - if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") set(OUT_DIR "win32") @@ -50,12 +57,11 @@ if (VCPKG_TARGET_IS_WINDOWS) PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj PLATFORM ${BUILD_ARCH}) - file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) file(INSTALL - ${HEADERS} + "${SOURCE_PATH}/Include/" "${SOURCE_PATH}/PC/pyconfig.h" - DESTINATION - "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" + FILES_MATCHING PATTERN *.h ) file(INSTALL "${SOURCE_PATH}/Lib" @@ -149,10 +155,9 @@ elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) ) message(STATUS "Installing ${TARGET_TRIPLET}-rel headers...") - file(GLOB HEADERS - ${OUT_PATH_RELEASE}/include/*) - file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include - PATTERN "*__pycache__*" EXCLUDE + file(INSTALL "${OUT_PATH_RELEASE}/include/" + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h ) message(STATUS "Installing ${TARGET_TRIPLET}-rel lib files...") @@ -173,7 +178,7 @@ elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) message(STATUS "Installing ${TARGET_TRIPLET}-rel Python library files...") file(GLOB LIBS - ${OUT_PATH_RELEASE}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m.*) + ${OUT_PATH_RELEASE}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.*) file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib PATTERN "*.pyc" EXCLUDE PATTERN "*__pycache__*" EXCLUDE @@ -227,7 +232,7 @@ elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) message(STATUS "Installing ${TARGET_TRIPLET}-dbg Python library files...") file(GLOB LIBS - ${OUT_PATH_DEBUG}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}dm.*) + ${OUT_PATH_DEBUG}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}d.*) file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib PATTERN "*.pyc" EXCLUDE PATTERN "*__pycache__*" EXCLUDE diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 307d0f9af741de..1a3d93815c8e3f 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 9.0-1 +Version: 9.0-2 Description: Software system for 3D computer graphics, image processing, and visualization Homepage: https://github.com/Kitware/VTK Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2 diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 775736720ac35c..99d332e59fbff5 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -36,17 +36,11 @@ if("python" IN_LIST FEATURES) ) if(VCPKG_TARGET_IS_WINDOWS) - list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/python37.lib" - "-DPython3_LIBRARY_DEBUG:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/python37_d.lib" - "-DPython3_LIBRARIES:STRING=debug\\\\\\\;${CURRENT_INSTALLED_DIR}/debug/lib/python37_d.lib\\\\\\\;optimized\\\\\\\;${CURRENT_INSTALLED_DIR}/lib/python37.lib" - "-DPYTHON_DEBUG_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/python37_d.lib" - "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.7") + list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/lib/python38.lib" + "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.8") elseif(VCPKG_TARGET_IS_LINUX) - list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/libpython37m.a" - "-DPython3_LIBRARY_DEBUG:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/libpython37md.a" - "-DPython3_LIBRARIES:STRING=debug\\\\\\\;${CURRENT_INSTALLED_DIR}/debug/lib/libpython37md.a\\\\\\\;optimized\\\\\\\;${CURRENT_INSTALLED_DIR}/lib/libpython37m.a" - "-DPYTHON_DEBUG_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/libpython37md.a" - "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.7m") + list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/lib/libpython38.a" + "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.8") elseif(VCPKG_TARGET_IS_OSX) #Need Python3 information on OSX within VCPKG endif() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index c86eee3eb562a2..9335c70c880a40 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -137,18 +137,18 @@ function(vcpkg_find_acquire_program VAR) if(CMAKE_HOST_WIN32) set(PROGNAME python) if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(SUBDIR "python-3.7.3-x86") - set(URL "https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-win32.zip") - set(ARCHIVE "python-3.7.3-embed-win32.zip") - set(HASH 2c1b1f0a29d40a91771ae21a5f733eedc10984cd182cb10c2793bbd24191a89f20612a3f23c34047f37fb06369016bfd4a52915ed1b4a56f8bd2b4ca6994eb31) + set(SUBDIR "python-3.8.3-x86") + set(URL "https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-win32.zip") + set(ARCHIVE "python-3.8.3-embed-win32.zip") + set(HASH 8c9078f55b1b5d694e0e809eee6ccf8a6e15810dd4649e8ae1209bff30e102d49546ce970a5d519349ca7759d93146f459c316dc440737171f018600255dcd0a) else() - set(SUBDIR "python-3.7.3-x64") - set(URL "https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-amd64.zip") - set(ARCHIVE "python-3.7.3-embed-amd64.zip") - set(HASH 4b3e0067b5e8d00b1cac5d556ab4fbd71df2a1852afb3354ee62363aabc8801aca84da09dbd26125527ae54b50488f808c1d82abf18969c23a51dcd57576885f) + set(SUBDIR "python-3.8.3-x64") + set(URL "https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-amd64.zip") + set(ARCHIVE "python-3.8.3-embed-amd64.zip") + set(HASH a322fc925167edb1897764297cf47e294ad3f52c109a05f8911412807eb83e104f780e9fe783b17fe0d9b18b7838797c15e9b0805dab759829f77a9bc0159424) endif() set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) - set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E remove python37._pth) + set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E remove python38._pth) else() set(PROGNAME python3) set(BREW_PACKAGE_NAME "python")