mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:59:00 +08:00
[vcpkg-tool-meson] Update to 1.5.1 (#40138)
This commit is contained in:
parent
f6267570d8
commit
fde6eac0a7
@ -1,8 +1,30 @@
|
||||
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
|
||||
index 38e3d5f..6427980 100644
|
||||
index 883a29a..d9a82af 100644
|
||||
--- a/mesonbuild/dependencies/python.py
|
||||
+++ b/mesonbuild/dependencies/python.py
|
||||
@@ -208,7 +208,8 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
|
||||
@@ -232,8 +232,10 @@ class _PythonDependencyBase(_Base):
|
||||
else:
|
||||
if self.is_freethreaded:
|
||||
libpath = Path('libs') / f'python{vernum}t.lib'
|
||||
+ libpath = Path('libs') / f'..' / f'..' / f'..' / f'lib' / f'python{vernum}t.lib'
|
||||
else:
|
||||
libpath = Path('libs') / f'python{vernum}.lib'
|
||||
+ libpath = Path('libs') / f'..' / f'..' / f'..' / f'lib' / f'python{vernum}.lib'
|
||||
# For a debug build, pyconfig.h may force linking with
|
||||
# pythonX_d.lib (see meson#10776). This cannot be avoided
|
||||
# and won't work unless we also have a debug build of
|
||||
@@ -250,6 +252,8 @@ class _PythonDependencyBase(_Base):
|
||||
vscrt = self.env.coredata.optstore.get_value('b_vscrt')
|
||||
if vscrt in {'mdd', 'mtd', 'from_buildtype', 'static_from_buildtype'}:
|
||||
vscrt_debug = True
|
||||
+ if is_debug_build:
|
||||
+ libpath = Path('libs') / f'..' / f'..' / f'..' / f'debug/lib' / f'python{vernum}_d.lib'
|
||||
if is_debug_build and vscrt_debug and not self.variables.get('Py_DEBUG'):
|
||||
mlog.warning(textwrap.dedent('''\
|
||||
Using a debug build type with MSVC or an MSVC-compatible compiler
|
||||
@@ -350,9 +354,10 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
|
||||
self.is_found = True
|
||||
|
||||
# compile args
|
||||
+ verdot = self.variables.get('py_version_short')
|
||||
inc_paths = mesonlib.OrderedSet([
|
||||
@ -12,35 +34,12 @@ index 38e3d5f..6427980 100644
|
||||
self.paths.get('platinclude')])
|
||||
|
||||
self.compile_args += ['-I' + path for path in inc_paths if path]
|
||||
@@ -279,9 +279,9 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
|
||||
else:
|
||||
libpath = Path(f'python{vernum}.dll')
|
||||
else:
|
||||
if limited_api:
|
||||
vernum = vernum[0]
|
||||
- libpath = Path('libs') / f'python{vernum}.lib'
|
||||
+ libpath = Path('libs') / f'..' / f'..' / f'..' / f'lib' / f'python{vernum}.lib'
|
||||
# For a debug build, pyconfig.h may force linking with
|
||||
# pythonX_d.lib (see meson#10776). This cannot be avoided
|
||||
# and won't work unless we also have a debug build of
|
||||
@@ -296,6 +296,8 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
|
||||
vscrt = self.env.coredata.options[mesonlib.OptionKey('b_vscrt')].value
|
||||
if vscrt in {'mdd', 'mtd', 'from_buildtype', 'static_from_buildtype'}:
|
||||
vscrt_debug = True
|
||||
+ if is_debug_build:
|
||||
+ libpath = Path('libs') / f'..' / f'..' / f'..' / f'debug/lib' / f'python{vernum}_d.lib'
|
||||
if is_debug_build and vscrt_debug and not self.variables.get('Py_DEBUG'):
|
||||
mlog.warning(textwrap.dedent('''\
|
||||
Using a debug build type with MSVC or an MSVC-compatible compiler
|
||||
@@ -390,10 +390,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
|
||||
set_env('PKG_CONFIG_PATH', old_pkg_path)
|
||||
|
||||
@@ -416,7 +421,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
|
||||
candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation))
|
||||
+ candidates.append(functools.partial(PythonPkgConfigDependency, pkg_name, env, kwargs, installation))
|
||||
- # We only need to check both, if a python install has a LIBPC. It might point to the wrong location,
|
||||
- # e.g. relocated / cross compilation, but the presence of LIBPC indicates we should definitely look for something.
|
||||
# We only need to check both, if a python install has a LIBPC. It might point to the wrong location,
|
||||
# e.g. relocated / cross compilation, but the presence of LIBPC indicates we should definitely look for something.
|
||||
- if pkg_libdir is not None:
|
||||
- candidates.append(functools.partial(PythonPkgConfigDependency, pkg_name, env, kwargs, installation))
|
||||
+ if True or pkg_libdir is not None:
|
||||
candidates.append(functools.partial(PythonPkgConfigDependency, pkg_name, env, kwargs, installation))
|
||||
else:
|
||||
candidates.append(functools.partial(PkgConfigDependency, 'python3', env, kwargs))
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
|
||||
index 86bbbb1368b8..54fb50af117d 100644
|
||||
--- a/mesonbuild/environment.py
|
||||
+++ b/mesonbuild/environment.py
|
||||
@@ -188,6 +188,8 @@ def get_llvm_tool_names(tool: str) -> T.List[str]:
|
||||
# unless it becomes a stable release.
|
||||
suffixes = [
|
||||
'', # base (no suffix)
|
||||
+ '-18.1', '18.1',
|
||||
+ '-18', '18',
|
||||
'-17', '17',
|
||||
'-16', '16',
|
||||
'-15', '15',
|
@ -9,7 +9,6 @@ set(patches
|
||||
adjust-python-dep.patch
|
||||
adjust-args.patch
|
||||
remove-freebsd-pcfile-specialization.patch
|
||||
meson-1.4-llvm-18.diff
|
||||
)
|
||||
set(scripts
|
||||
vcpkg-port-config.cmake
|
||||
|
@ -1,20 +1,14 @@
|
||||
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
|
||||
index ebe0d92..904090b 100644
|
||||
--- a/mesonbuild/modules/pkgconfig.py
|
||||
+++ b/mesonbuild/modules/pkgconfig.py
|
||||
@@ -702,15 +702,8 @@ class PkgConfigModule(ExtensionModule):
|
||||
@@ -693,6 +693,9 @@ class PkgConfigModule(NewExtensionModule):
|
||||
pcfile = filebase + '.pc'
|
||||
pkgroot = pkgroot_name = kwargs['install_dir'] or default_install_dir
|
||||
if pkgroot is None:
|
||||
- if mesonlib.is_freebsd():
|
||||
- pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'libdata', 'pkgconfig')
|
||||
- pkgroot_name = os.path.join('{prefix}', 'libdata', 'pkgconfig')
|
||||
- elif mesonlib.is_haiku():
|
||||
- pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'develop', 'lib', 'pkgconfig')
|
||||
- pkgroot_name = os.path.join('{prefix}', 'develop', 'lib', 'pkgconfig')
|
||||
- else:
|
||||
- pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('libdir'))), 'pkgconfig')
|
||||
- pkgroot_name = os.path.join('{libdir}', 'pkgconfig')
|
||||
+ pkgroot = os.path.join(state.environment.coredata.get_option(mesonlib.OptionKey('libdir')), 'pkgconfig')
|
||||
+ pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('libdir'))), 'pkgconfig')
|
||||
+ pkgroot_name = os.path.join('{libdir}', 'pkgconfig')
|
||||
relocatable = state.get_option('relocatable', module='pkgconfig')
|
||||
self._generate_pkgconfig_file(state, deps, subdirs, name, description, url,
|
||||
version, pcfile, conflicts, variables,
|
||||
+ elif False:
|
||||
if mesonlib.is_freebsd():
|
||||
pkgroot = os.path.join(_as_str(state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))), 'libdata', 'pkgconfig')
|
||||
pkgroot_name = os.path.join('{prefix}', 'libdata', 'pkgconfig')
|
||||
|
@ -1,3 +1,4 @@
|
||||
include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake-get-vars/vcpkg-port-config.cmake")
|
||||
# Overwrite builtin scripts
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_configure_meson.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_install_meson.cmake")
|
||||
@ -9,11 +10,11 @@ set(program MESON)
|
||||
set(program_version @VERSION@)
|
||||
set(program_name meson)
|
||||
set(search_names meson meson.py)
|
||||
set(ref 614d436232d3a86518164cbe2b8af12db3bde009)
|
||||
set(ref "${program_version}")
|
||||
set(path_to_search "${DOWNLOADS}/tools/meson-${program_version}-${meson_short_hash}")
|
||||
set(download_urls "https://github.com/mesonbuild/meson/archive/${ref}.tar.gz")
|
||||
set(download_filename "meson-${ref}.tar.gz")
|
||||
set(download_sha512 c087da0113e76501fff66e68ac9ef7aede5e6672f1dc7201608cce9e5e1d202d3f4bf92beec1a5e4e8169f6ed1cedbb44b57ede2753437a61a13578de8d22040)
|
||||
set(download_sha512 328859712ebe33c042d66e762a1ffbc6f4a3f44d1b2d76e6c09b5a73a967873d24646bf0d6af27bd36427c7e6a37a0ec6595754fcbeef85724e176c6c1e52a8d)
|
||||
|
||||
find_program(SCRIPT_MESON NAMES ${search_names} PATHS "${path_to_search}" NO_DEFAULT_PATH) # NO_DEFAULT_PATH due top patching
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"version": "1.3.2",
|
||||
"port-version": 8,
|
||||
"version": "1.5.1",
|
||||
"description": "Meson build system",
|
||||
"homepage": "https://github.com/mesonbuild/meson",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "native"
|
||||
"supports": "native",
|
||||
"dependencies": [
|
||||
"vcpkg-cmake-get-vars"
|
||||
]
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ function(z_vcpkg_meson_set_proglist_variables config_type)
|
||||
if(meson_${prog})
|
||||
string(TOUPPER "MESON_${meson_${prog}}" var_to_set)
|
||||
set("${var_to_set}" "${meson_${prog}} = ['${VCPKG_DETECTED_CMAKE_${prog}}']" PARENT_SCOPE)
|
||||
elseif(${prog} STREQUAL AR AND VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS_${config_type})
|
||||
elseif(${prog} STREQUAL AR AND VCPKG_COMBINED_STATIC_LINKER_FLAGS_${config_type})
|
||||
# Probably need to move AR somewhere else
|
||||
string(TOLOWER "${prog}" proglower)
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(ar_flags "${VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS_${config_type}}")
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(ar_flags "${VCPKG_COMBINED_STATIC_LINKER_FLAGS_${config_type}}")
|
||||
list(PREPEND ar_flags "${VCPKG_DETECTED_CMAKE_${prog}}")
|
||||
z_vcpkg_meson_convert_list_to_python_array(ar_flags ${ar_flags})
|
||||
set("MESON_AR" "${proglower} = ${ar_flags}" PARENT_SCOPE)
|
||||
@ -34,9 +34,9 @@ function(z_vcpkg_meson_set_proglist_variables config_type)
|
||||
if(VCPKG_DETECTED_CMAKE_${prog}_COMPILER)
|
||||
string(TOUPPER "MESON_${prog}" var_to_set)
|
||||
if(meson_${prog})
|
||||
if(VCPKG_DETECTED_CMAKE_${prog}_FLAGS_${config_type})
|
||||
if(VCPKG_COMBINED_${prog}_FLAGS_${config_type})
|
||||
# Need compiler flags in prog vars for sanity check.
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(${prog}flags "${VCPKG_DETECTED_CMAKE_${prog}_FLAGS_${config_type}}")
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(${prog}flags "${VCPKG_COMBINED_${prog}_FLAGS_${config_type}}")
|
||||
endif()
|
||||
list(PREPEND ${prog}flags "${VCPKG_DETECTED_CMAKE_${prog}_COMPILER}")
|
||||
list(FILTER ${prog}flags EXCLUDE REGEX "(-|/)nologo") # Breaks compiler detection otherwise
|
||||
@ -49,9 +49,9 @@ function(z_vcpkg_meson_set_proglist_variables config_type)
|
||||
set(${var_to_set} "${meson_${prog}}_ld = ['${VCPKG_DETECTED_CMAKE_LINKER}']" PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
if(VCPKG_DETECTED_CMAKE_${prog}_FLAGS_${config_type})
|
||||
if(VCPKG_COMBINED_${prog}_FLAGS_${config_type})
|
||||
# Need compiler flags in prog vars for sanity check.
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(${prog}flags "${VCPKG_DETECTED_CMAKE_${prog}_FLAGS_${config_type}}")
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(${prog}flags "${VCPKG_COMBINED_${prog}_FLAGS_${config_type}}")
|
||||
endif()
|
||||
list(PREPEND ${prog}flags "${VCPKG_DETECTED_CMAKE_${prog}_COMPILER}")
|
||||
list(FILTER ${prog}flags EXCLUDE REGEX "(-|/)nologo") # Breaks compiler detection otherwise
|
||||
@ -99,7 +99,7 @@ function(z_vcpkg_meson_set_flags_variables config_type)
|
||||
set(libpath "${libpath_flag}${CURRENT_INSTALLED_DIR}${path_suffix}/lib")
|
||||
|
||||
foreach(lang IN LISTS arg_LANGUAGES)
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(${lang}flags "${VCPKG_DETECTED_CMAKE_${lang}_FLAGS_${config_type}}")
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(${lang}flags "${VCPKG_COMBINED_${lang}_FLAGS_${config_type}}")
|
||||
if(lang MATCHES "^(C|CXX)$")
|
||||
vcpkg_list(APPEND ${lang}flags "${includepath}")
|
||||
endif()
|
||||
@ -113,7 +113,7 @@ function(z_vcpkg_meson_set_flags_variables config_type)
|
||||
set(langlower cpp)
|
||||
endif()
|
||||
set(MESON_${lang_mapping}FLAGS "${langlower}_args = ${${lang}flags}\n")
|
||||
set(linker_flags "${VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS_${config_type}}")
|
||||
set(linker_flags "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_${config_type}}")
|
||||
z_vcpkg_meson_convert_compiler_flags_to_list(linker_flags "${linker_flags}")
|
||||
vcpkg_list(APPEND linker_flags "${libpath}")
|
||||
z_vcpkg_meson_convert_list_to_python_array(linker_flags ${linker_flags})
|
||||
@ -320,7 +320,7 @@ function(vcpkg_generate_meson_cmd_args)
|
||||
if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
|
||||
z_vcpkg_select_default_vcpkg_chainload_toolchain()
|
||||
endif()
|
||||
z_vcpkg_get_cmake_vars(cmake_vars_file)
|
||||
vcpkg_cmake_get_vars(cmake_vars_file)
|
||||
debug_message("Including cmake vars from: ${cmake_vars_file}")
|
||||
include("${cmake_vars_file}")
|
||||
|
||||
|
@ -9241,8 +9241,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"vcpkg-tool-meson": {
|
||||
"baseline": "1.3.2",
|
||||
"port-version": 8
|
||||
"baseline": "1.5.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-tool-mozbuild": {
|
||||
"baseline": "4.0.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "cdfb605662a81299245a1ea4a3659fab1ddaff70",
|
||||
"version": "1.5.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "22011ab1f929bf881c5521272ee0818cb75dee1c",
|
||||
"version": "1.3.2",
|
||||
|
Loading…
Reference in New Issue
Block a user