mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[vcpkg-make,ncurses,python3] Filter default options, disables curses in python (#49187)
This commit is contained in:
@@ -52,11 +52,9 @@ if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND VCPKG_DETECTED_CMAKE_
|
||||
set(ENV{CFLAGS} "$ENV{CFLAGS} -std=c17")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
vcpkg_make_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
CONFIGURE_ENVIRONMENT_VARIABLES CFLAGS
|
||||
DETERMINE_BUILD_TRIPLET
|
||||
NO_ADDITIONAL_PATHS
|
||||
DEFAULT_OPTIONS_EXCLUDE "^--docdir"
|
||||
OPTIONS
|
||||
${OPTIONS}
|
||||
--disable-db-install
|
||||
@@ -71,7 +69,7 @@ vcpkg_configure_make(
|
||||
--without-tests
|
||||
--with-pkg-config-libdir=libdir
|
||||
)
|
||||
vcpkg_install_make()
|
||||
vcpkg_make_install()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Prefer local files over search path
|
||||
@@ -80,6 +78,14 @@ foreach(file IN LISTS headers)
|
||||
vcpkg_replace_string("${file}" [[#include <ncursesw/([^>]*)>]] [[#include "\1"]] REGEX IGNORE_UNCHANGED)
|
||||
endforeach()
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/ncurses/bin/ncursesw6-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/ncurses/bin/ncursesw6-config" "\nprefix=\"\${prefix}\"" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../.. && pwd -P)]=])
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/ncurses/debug/bin/ncursesw6-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/ncurses/debug/bin/ncursesw6-config" "\nprefix=\"\${prefix}/debug\"" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../../.. && pwd -P)/debug]=])
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/ncurses/debug/bin/ncursesw6-config" "\${prefix}/share" "\${prefix}/../share")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ncurses",
|
||||
"version": "6.5",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": [
|
||||
"Free software emulation of curses in System V Release 4.0, and more.",
|
||||
"This port installs a wide character configuration (ncursesw)."
|
||||
@@ -13,6 +13,10 @@
|
||||
{
|
||||
"name": "vcpkg-cmake-get-vars",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-make",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/Modules/Setup b/Modules/Setup
|
||||
index 87c6a152f8..7ad53f5b4f 100644
|
||||
--- a/Modules/Setup
|
||||
+++ b/Modules/Setup
|
||||
@@ -375,3 +375,8 @@ xxsubtype xxsubtype.c
|
||||
#
|
||||
# _sqlite3 _tkinter _curses pyexpat
|
||||
# _codecs_jp _codecs_kr _codecs_tw unicodedata
|
||||
+
|
||||
+*disabled*
|
||||
+_curses
|
||||
+_curses_panel
|
||||
+_tkinter
|
||||
@@ -28,7 +28,6 @@ set(PATCHES
|
||||
0005-dont-copy-vcruntime.patch
|
||||
0008-python.pc.patch
|
||||
0010-dont-skip-rpath.patch
|
||||
0012-force-disable-modules.patch
|
||||
0015-dont-use-WINDOWS-def.patch
|
||||
0016-undup-ffi-symbols.patch # Required for lld-link.
|
||||
0018-fix-sysconfig-include.patch
|
||||
@@ -283,8 +282,12 @@ else()
|
||||
vcpkg_make_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTORECONF
|
||||
DEFAULT_OPTIONS_EXCLUDE "^--(disable|enable)-static"
|
||||
OPTIONS
|
||||
${OPTIONS}
|
||||
py_cv_module__curses=n/a
|
||||
py_cv_module__curses_panel=n/a
|
||||
py_cv_module__tkinter=n/a
|
||||
OPTIONS_DEBUG
|
||||
"--with-pydebug"
|
||||
"vcpkg_rpath=${CURRENT_INSTALLED_DIR}/debug/lib"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "python3",
|
||||
"version": "3.12.9",
|
||||
"port-version": 7,
|
||||
"port-version": 8,
|
||||
"description": "The Python programming language",
|
||||
"homepage": "https://github.com/python/cpython",
|
||||
"license": "Python-2.0",
|
||||
@@ -74,10 +74,6 @@
|
||||
"name": "liblzma",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "ncurses",
|
||||
"platform": "!windows | mingw"
|
||||
},
|
||||
{
|
||||
"name": "openssl",
|
||||
"default-features": false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vcpkg-make",
|
||||
"version-date": "2025-10-26",
|
||||
"version-date": "2026-01-01",
|
||||
"documentation": "https://learn.microsoft.com/vcpkg/maintainers/functions/vcpkg_make_configure",
|
||||
"license": null,
|
||||
"supports": "native",
|
||||
|
||||
@@ -180,6 +180,15 @@ function(z_vcpkg_make_prepare_compile_flags)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(library_path_flag "${VCPKG_DETECTED_CMAKE_LIBRARY_PATH_FLAG}")
|
||||
string(REPLACE " " "\\ " current_installed_dir_escaped "${CURRENT_INSTALLED_DIR}")
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}${path_suffix_${var_suffix}}/lib/manual-link")
|
||||
vcpkg_list(PREPEND LDFLAGS "${library_path_flag}${current_installed_dir_escaped}${path_suffix_${var_suffix}}/lib/manual-link")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}${path_suffix_${var_suffix}}/lib")
|
||||
vcpkg_list(PREPEND LDFLAGS "${library_path_flag}${current_installed_dir_escaped}${path_suffix_${var_suffix}}/lib")
|
||||
endif()
|
||||
|
||||
# libtool tries to filter CFLAGS passed to the link stage via a allow list.
|
||||
|
||||
# This approach is flawed since it fails to pass flags unknown to libtool
|
||||
@@ -196,7 +205,6 @@ function(z_vcpkg_make_prepare_compile_flags)
|
||||
list(TRANSFORM CXXFLAGS PREPEND "${compiler_flag_escape};")
|
||||
endif()
|
||||
|
||||
set(library_path_flag "${VCPKG_DETECTED_CMAKE_LIBRARY_PATH_FLAG}")
|
||||
set(linker_flag_escape "")
|
||||
if(arg_COMPILER_FRONTEND STREQUAL "MSVC" AND NOT arg_NO_FLAG_ESCAPING)
|
||||
# Removed by libtool
|
||||
@@ -215,13 +223,6 @@ function(z_vcpkg_make_prepare_compile_flags)
|
||||
string(REPLACE " " ";" linker_flag_escape_stripped "${linker_flag_escape_stripped};")
|
||||
list(TRANSFORM LDFLAGS PREPEND "${linker_flag_escape_stripped}")
|
||||
endif()
|
||||
string(REPLACE " " "\\ " current_installed_dir_escaped "${CURRENT_INSTALLED_DIR}")
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}${path_suffix_${var_suffix}}/lib/manual-link")
|
||||
vcpkg_list(PREPEND LDFLAGS "${linker_flag_escape}${library_path_flag}${current_installed_dir_escaped}${path_suffix_${var_suffix}}/lib/manual-link")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}${path_suffix_${var_suffix}}/lib")
|
||||
vcpkg_list(PREPEND LDFLAGS "${linker_flag_escape}${library_path_flag}${current_installed_dir_escaped}${path_suffix_${var_suffix}}/lib")
|
||||
endif()
|
||||
|
||||
if(ARFLAGS AND NOT arg_COMPILER_FRONTEND STREQUAL "MSVC")
|
||||
# ARFLAGS need to know the command for creating an archive (Maybe needs user customization?)
|
||||
@@ -575,8 +576,8 @@ endfunction()
|
||||
|
||||
function(z_vcpkg_make_default_path_and_configure_options out_var)
|
||||
cmake_parse_arguments(PARSE_ARGV 1 arg
|
||||
"AUTOMAKE"
|
||||
"CONFIG;EXCLUDE_FILTER;INCLUDE_FILTER"
|
||||
""
|
||||
"CONFIG;EXCLUDE_FILTER"
|
||||
""
|
||||
)
|
||||
z_vcpkg_unparsed_args(FATAL_ERROR)
|
||||
@@ -635,24 +636,17 @@ function(z_vcpkg_make_default_path_and_configure_options out_var)
|
||||
"--docdir=\\\${prefix}/share/${PORT}"
|
||||
"--datarootdir=\\\${prefix}/share/${PORT}")
|
||||
endif()
|
||||
# Setup common options
|
||||
if(NOT arg_AUTOMAKE)
|
||||
vcpkg_list(APPEND opts --disable-silent-rules --verbose)
|
||||
endif()
|
||||
|
||||
# Setup common options
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
vcpkg_list(APPEND opts --enable-shared --disable-static)
|
||||
else()
|
||||
vcpkg_list(APPEND opts --disable-shared --enable-static)
|
||||
endif()
|
||||
|
||||
if(DEFINED arg_EXCLUDE_FILTER)
|
||||
if(NOT arg_EXCLUDE_FILTER STREQUAL "")
|
||||
list(FILTER opts EXCLUDE REGEX "${arg_EXCLUDE_FILTER}")
|
||||
endif()
|
||||
|
||||
if(DEFINED arg_INCLUDE_FILTER)
|
||||
list(FILTER opts INCLUDE REGEX "${arg_INCLUDE_FILTER}")
|
||||
endif()
|
||||
|
||||
set("${out_var}" ${opts} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
@@ -4,12 +4,16 @@ include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_make.cmake")
|
||||
function(vcpkg_make_configure)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg
|
||||
"AUTORECONF;COPY_SOURCE;DISABLE_MSVC_WRAPPERS;DISABLE_CPPFLAGS;DISABLE_DEFAULT_OPTIONS;DISABLE_MSVC_TRANSFORMATIONS"
|
||||
"SOURCE_PATH"
|
||||
"SOURCE_PATH;DEFAULT_OPTIONS_EXCLUDE"
|
||||
"OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;PRE_CONFIGURE_CMAKE_COMMANDS;LANGUAGES"
|
||||
)
|
||||
|
||||
z_vcpkg_unparsed_args(FATAL_ERROR)
|
||||
|
||||
if(arg_DISABLE_DEFAULT_OPTIONS AND arg_DEFAULT_OPTIONS_EXCLUDE)
|
||||
message(FATAL_ERROR "DISABLE_DEFAULT_OPTIONS cannot be used together with DEFAULT_OPTIONS_EXCLUDE.")
|
||||
endif()
|
||||
|
||||
# Can be set in the triplet to append options for configure
|
||||
if(DEFINED VCPKG_MAKE_CONFIGURE_OPTIONS)
|
||||
list(APPEND arg_OPTIONS ${VCPKG_MAKE_CONFIGURE_OPTIONS})
|
||||
@@ -97,7 +101,9 @@ function(vcpkg_make_configure)
|
||||
|
||||
set(opts "")
|
||||
if(NOT arg_DISABLE_DEFAULT_OPTIONS)
|
||||
z_vcpkg_make_default_path_and_configure_options(opts AUTOMAKE CONFIG "${configup}")
|
||||
z_vcpkg_make_default_path_and_configure_options(opts CONFIG "${configup}"
|
||||
EXCLUDE_FILTER "${arg_DEFAULT_OPTIONS_EXCLUDE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(configure_path_from_wd "./${relative_build_path}/configure")
|
||||
|
||||
@@ -6766,7 +6766,7 @@
|
||||
},
|
||||
"ncurses": {
|
||||
"baseline": "6.5",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"ndis-driver-library": {
|
||||
"baseline": "1.2.0",
|
||||
@@ -7882,7 +7882,7 @@
|
||||
},
|
||||
"python3": {
|
||||
"baseline": "3.12.9",
|
||||
"port-version": 7
|
||||
"port-version": 8
|
||||
},
|
||||
"qca": {
|
||||
"baseline": "2.3.7",
|
||||
@@ -10273,7 +10273,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-make": {
|
||||
"baseline": "2025-10-26",
|
||||
"baseline": "2026-01-01",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-msbuild": {
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0394449d0ec00a5b808f2567854cf07f2190c41d",
|
||||
"version": "6.5",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "a714211f4eb04f17c6f4f5e5b3ada6ea02484b4c",
|
||||
"version": "6.5",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8d3b3ef309a4fd7c53561374aa746e6eafed6517",
|
||||
"version": "3.12.9",
|
||||
"port-version": 8
|
||||
},
|
||||
{
|
||||
"git-tree": "278873ae3425fd9c3d79e37b2b918790704c491e",
|
||||
"version": "3.12.9",
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c1c80d7a4b56ff925cb9d6691e6baa4c44f4e179",
|
||||
"version-date": "2026-01-01",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "f5115f8cfeae1176d98357dcdc29535bfe33b9ad",
|
||||
"version-date": "2025-10-26",
|
||||
|
||||
Reference in New Issue
Block a user