aboutsummaryrefslogtreecommitdiff
path: root/ports/python3
diff options
context:
space:
mode:
authoryurybura <yurybura@gmail.com>2018-05-11 13:34:43 +0300
committeryurybura <yurybura@gmail.com>2018-05-11 13:34:43 +0300
commit7d261fbbc39a1d36027299190920e0a7e222ebd7 (patch)
treed9b6745f2e6c670836cbbf61dbd2c4eb9ef857fe /ports/python3
parent50e5ee1e40380cf543ae804775462181984a86dc (diff)
parent9535a5631ac212b1c657a02be3ed9398df30c96c (diff)
downloadvcpkg-7d261fbbc39a1d36027299190920e0a7e222ebd7.tar.gz
vcpkg-7d261fbbc39a1d36027299190920e0a7e222ebd7.zip
Merge branch 'master' of https://github.com/yurybura/vcpkg
Diffstat (limited to 'ports/python3')
-rw-r--r--ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch12
-rw-r--r--ports/python3/CONTROL2
-rw-r--r--ports/python3/portfile.cmake36
3 files changed, 29 insertions, 21 deletions
diff --git a/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch
new file mode 100644
index 000000000..a0efc8d1c
--- /dev/null
+++ b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch
@@ -0,0 +1,12 @@
+diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
+--- a/Modules/_io/_iomodule.c
++++ b/Modules/_io/_iomodule.c
+@@ -21,7 +21,7 @@
+ #endif /* HAVE_SYS_STAT_H */
+
+ #ifdef MS_WINDOWS
+-#include <consoleapi.h>
++#include <windows.h>
+ #endif
+
+ /* Various interned strings */
diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL
index 0a730e517..c8331f8cf 100644
--- a/ports/python3/CONTROL
+++ b/ports/python3/CONTROL
@@ -1,3 +1,3 @@
Source: python3
-Version: 3.6.4
+Version: 3.6.4-1
Description: The Python programming language as an embeddable library \ No newline at end of file
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake
index 9bb50b70c..16b3a3db3 100644
--- a/ports/python3/portfile.cmake
+++ b/ports/python3/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 = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static)
- # Because the patches patch the same file, they have to be applied in the correct order
- # In this scenario, only the second patch needs to be applied, which doesn't work
message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
@@ -22,17 +9,26 @@ set(PYTHON_VERSION_PATCH 4)
set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET})
+
vcpkg_from_github(
OUT_SOURCE_PATH TEMP_SOURCE_PATH
REPO python/cpython
REF v${PYTHON_VERSION}
- SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637
+ SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637
HEAD_REF master
- )
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${TEMP_SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch
+)
+
# We need per-triplet directories because we need to patch the project files differently based on the linkage
-file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH})
-set(SOURCE_PATH ${SOURCE_PATH}/cpython-${PYTHON_VERSION})
+# Because the patches patch the same file, they have to be applied in the correct order
+set(SOURCE_PATH "${TEMP_SOURCE_PATH}-Lib-${VCPKG_LIBRARY_LINKAGE}-crt-${VCPKG_CRT_LINKAGE}")
+file(REMOVE_RECURSE ${SOURCE_PATH})
+file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH})
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_apply_patches(
@@ -62,7 +58,7 @@ endif()
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj
PLATFORM ${BUILD_ARCH})
-
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
@@ -87,4 +83,4 @@ endif()
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()