aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorAdam Johnson <AdamJohnso@gmail.com>2020-06-12 01:23:26 -0400
committerGitHub <noreply@github.com>2020-06-11 22:23:26 -0700
commite1783c68c43bc59f545551071a2775971497c871 (patch)
treef6f4fc4e64b9e63d1717a398e11ee85702122e2c /ports
parentca52d429b63391cbf7eb228cad4c7567200bee41 (diff)
downloadvcpkg-e1783c68c43bc59f545551071a2775971497c871.tar.gz
vcpkg-e1783c68c43bc59f545551071a2775971497c871.zip
[python3] Update to Python 3.8 (#11708)
* [python3] Update to Python 3.8.3. [vtk] Update to Python 3.8 and fix improper Python3 artifact specification. * [python3] Fix static linking, broken in 121faf2. * [hyperscan] Add missing build dependency (fixes CI on macOS).
Diffstat (limited to 'ports')
-rw-r--r--ports/hyperscan/CONTROL4
-rw-r--r--ports/python3/0001-static-library.patch46
-rw-r--r--ports/python3/0002-static-crt.patch15
-rw-r--r--ports/python3/CONTROL5
-rw-r--r--ports/python3/portfile.cmake35
-rw-r--r--ports/vtk/CONTROL2
-rw-r--r--ports/vtk/portfile.cmake14
7 files changed, 90 insertions, 31 deletions
diff --git a/ports/hyperscan/CONTROL b/ports/hyperscan/CONTROL
index a060054ac..a47318f5f 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 000000000..46502130d
--- /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 @@
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+@@ -102,7 +102,7 @@
+ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
diff --git a/ports/python3/0002-static-crt.patch b/ports/python3/0002-static-crt.patch
new file mode 100644
index 000000000..82e2b36d2
--- /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 @@
+ <AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary>
++ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary>
++ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary>
++ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL
index 3c6ba8eb1..abb7bf23a 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 807b549d1..c680aeb2e 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 307d0f9af..1a3d93815 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 775736720..99d332e59 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()