vcpkg/ports/vcpkg-tool-meson/portfile.cmake
Alexander Neumann 163065a352
Update meson to 0.60.2 (#21542)
* update meson to 0.60.1

* add port vcpkg-tool-meson for consistency deprecate usage of tool-meson

* [skip actions] make every port using meson depend on vcpkg-tool-meson
(except pkgconf for now.)

* fix subtle bugs in vcpkg_find_acquire_program
make the port install meson if the system does not provide it.

* make pkgconf depend on meson

* restore old vcpkg_find_acquire_program behavior for versioning

* Update ports/gstreamer/vcpkg.json

remove duplicated dependency

* remove invalid option in glib

* [skip actions] fix ci failures?

* remove invalid option in gstreamer

* try without cmake

* get more logs from meson configure.

* update glib to 2.70.1

* fix typo

* fix pc file of flac

* update meson to 0.60.2

* try the patch from the other pr.

* patch meson .....

* version stuff

* fix port version

* fix gstreamer version

* remove version

* format-manifest

* version stuff

* format manifest again

* revert version stuff

* remove outdated gtk options

* version stuff

* pango version stuff

* correct baseline lost in merge

* Fix fontconfig version db

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-12-02 15:48:34 -08:00

61 lines
2.3 KiB
CMake

# This port represents a dependency on the Meson build system.
# In the future, it is expected that this port acquires and installs Meson.
# Currently is used in ports that call vcpkg_find_acquire_program(MESON) in order to force rebuilds.
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
set(program MESON)
set(program_version 0.60.2)
set(program_name meson)
set(search_names meson meson.py)
set(interpreter PYTHON3)
set(apt_package_name "meson")
set(brew_package_name "meson")
set(ref 5e9b709ad0b34d8ac920dff057a5361080c0889b)
set(paths_to_search "${CURRENT_PACKAGES_DIR}/tools/meson")
set(download_urls "https://github.com/mesonbuild/meson/archive/${ref}.tar.gz")
set(download_filename "meson-${ref}.tar.gz")
set(download_sha512 5fb89c6b81f75825b6f300039db6dae9d907c81403a8ebe30c7426729d5cb3179e30b9b84d6ed756c2aa39ca34ea681afa0c5cd78835a94c43d5ab25e625abd0)
set(supported_on_unix ON)
set(version_command --version)
set(extra_search_args EXACT_VERSION_MATCH)
vcpkg_find_acquire_program(PYTHON3)
# Reenable if no patching of meson is required within vcpkg
# z_vcpkg_find_acquire_program_find_external("${program}"
# ${extra_search_args}
# PROGRAM_NAME "${program_name}"
# MIN_VERSION "${program_version}"
# INTERPRETER "${interpreter}"
# NAMES ${search_names}
# VERSION_COMMAND ${version_command}
# )
if(NOT "${program}")
vcpkg_download_distfile(archive_path
URLS ${download_urls}
SHA512 "${download_sha512}"
FILENAME "${download_filename}"
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools")
vcpkg_execute_in_download_mode(
COMMAND "${CMAKE_COMMAND}" -E tar xzf "${archive_path}"
WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools"
)
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/meson-${ref}" "${CURRENT_PACKAGES_DIR}/tools/meson")
z_vcpkg_apply_patches(
SOURCE_PATH "${CURRENT_PACKAGES_DIR}"
PATCHES meson-intl.patch
)
endif()
z_vcpkg_find_acquire_program_find_internal("${program}"
INTERPRETER "${interpreter}"
PATHS ${paths_to_search}
NAMES ${search_names}
)
#vcpkg_find_acquire_program(MESON)
message(STATUS "Using meson: ${MESON}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/meson/version.txt" "${program_version}") # For vcpkg_find_acquire_program