From ff6867374598312866fecfc64736a334591ceace Mon Sep 17 00:00:00 2001 From: Alonso Schaich Date: Wed, 13 Dec 2023 11:02:35 +0000 Subject: [PATCH] [vcpkg-tool-meson] fix pkgconfig data file installation on FreeBSD (#35003) * [fontconfig] fix pkgconfig file installation (microsoft/vcpkg#35002) move pkgconfig script into the path indicated by the diagnositic emitted by vcpkg (see comment 1 of microsoft/vcpkg#35002). * [fontconfig] force installation of pc files (microsoft/vcpkg#35002) Undo the last commit and patch meson to force the pc file installation paths demanded by `vcpkg_fixup_pkgconfig` * [fontconfig] bump portrevision (microsoft/vcpkg#35002) * [fontconfig] regenerate versions (microsoft/vcpkg#35002) * Revert "[fontconfig] regenerate versions (microsoft/vcpkg#35002)" This reverts commit 8daf0e15a67c376779631442ce926236ba2ed2e4. * Revert "[fontconfig] bump portrevision (microsoft/vcpkg#35002)" This reverts commit a9727bc32325238565428e3497ae564d2d255b86. * Revert "[fontconfig] force installation of pc files (microsoft/vcpkg#35002)" This reverts commit c0c6e017c7ab255e5532428e68f9d7c6e1ae8aad. * Revert "[fontconfig] fix pkgconfig file installation (microsoft/vcpkg#35002)" This reverts commit 616d4ce83e091cd128f4d896fcff81a1de4ed1b9. * [vcpkg-tool-meson] fix pc-file installation paths on FreeBSD (microsoft#35002) * [vcpkg-tool-meson] bump portversion (microsoft/vcpkg#35002) * [vcpkg-tool-meson] regenerate versions (microsoft/vcpkg#35002) * [vcpkg-tool-meson] Use vcpkg_from_github to obtain source (microsoft/vcpkg#35002) * [vcpkg-tool-meson] Regenerate versions (microsoft/vcpkg#35002) * [vcpkg-tool-meson] Use adverticed version of meson (microsoft/vcpkg#35002) vcpkg@ce9f50f7 has bumped vcpkg-tool-meson's adverticed version to 0.63, but not updated the `ref` variable, which still points to 0.62.1. Update meson to 0.63 and use ${VERSION} to avoid similar issues in the future, and regenerate patches/hashes accordingly. * [vcpkg-tool-meson] regenerate versions (microsoft/vcpkg#35002) * Revert "[vcpkg-tool-meson] regenerate versions (microsoft/vcpkg#35002)" This reverts commit e9a424ef16d26e791e3e108e738982138084d41a. * Revert "[vcpkg-tool-meson] Use adverticed version of meson (microsoft/vcpkg#35002)" Meson 0.63 can't build gobject-introspection on a tier 1 supported target. Upgrading meson to 0.63 and handling regressions of that update is out of scope of #35002 anyways, and should be handled either on it's own PR, microsoft/vcpkg#28084 or microsoft/vcpkg#35348 . --- ports/vcpkg-tool-meson/meson-intl.patch | 6 +-- ports/vcpkg-tool-meson/portfile.cmake | 40 ++++++++----------- ...remove-freebsd-pcfile-specialization.patch | 17 ++++++++ ports/vcpkg-tool-meson/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/v-/vcpkg-tool-meson.json | 5 +++ 6 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 ports/vcpkg-tool-meson/remove-freebsd-pcfile-specialization.patch diff --git a/ports/vcpkg-tool-meson/meson-intl.patch b/ports/vcpkg-tool-meson/meson-intl.patch index 614db056d6..6e2bcc31b6 100644 --- a/ports/vcpkg-tool-meson/meson-intl.patch +++ b/ports/vcpkg-tool-meson/meson-intl.patch @@ -1,7 +1,5 @@ -diff --git a/tools/meson/mesonbuild/dependencies/misc.py b/tools/meson/mesonbuild/dependencies/misc.py -index 537af1f89..43d7febf2 100644 ---- a/tools/meson/mesonbuild/dependencies/misc.py -+++ b/tools/meson/mesonbuild/dependencies/misc.py +--- a/mesonbuild/dependencies/misc.py ++++ b/mesonbuild/dependencies/misc.py @@ -610,7 +610,8 @@ iconv_factory = DependencyFactory( intl_factory = DependencyFactory( diff --git a/ports/vcpkg-tool-meson/portfile.cmake b/ports/vcpkg-tool-meson/portfile.cmake index 680083a459..08bf2f8384 100644 --- a/ports/vcpkg-tool-meson/portfile.cmake +++ b/ports/vcpkg-tool-meson/portfile.cmake @@ -11,11 +11,7 @@ set(search_names meson meson.py) set(interpreter PYTHON3) set(apt_package_name "meson") set(brew_package_name "meson") -set(ref bb91cea0d66d8d036063dedec1f194d663399cdf) 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 e5888eb35dd4ab5fc0a16143cfbb5a7849f6d705e211a80baf0a8b753e2cf877a4587860a79cad129ec5f3474c12a73558ffe66439b1633d80b8044eceaff2da) set(supported_on_unix ON) set(version_command --version) set(extra_search_args EXACT_VERSION_MATCH) @@ -32,26 +28,22 @@ vcpkg_find_acquire_program(PYTHON3) # 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 - ) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/meson/test cases") - configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY) -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mesonbuild/meson + REF bb91cea0d66d8d036063dedec1f194d663399cdf + SHA512 e5888eb35dd4ab5fc0a16143cfbb5a7849f6d705e211a80baf0a8b753e2cf877a4587860a79cad129ec5f3474c12a73558ffe66439b1633d80b8044eceaff2da + PATCHES + meson-intl.patch + remove-freebsd-pcfile-specialization.patch +) + +file(INSTALL "${SOURCE_PATH}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools" + RENAME "meson" +) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY) z_vcpkg_find_acquire_program_find_internal("${program}" INTERPRETER "${interpreter}" diff --git a/ports/vcpkg-tool-meson/remove-freebsd-pcfile-specialization.patch b/ports/vcpkg-tool-meson/remove-freebsd-pcfile-specialization.patch new file mode 100644 index 0000000000..c5e9e0f4f6 --- /dev/null +++ b/ports/vcpkg-tool-meson/remove-freebsd-pcfile-specialization.patch @@ -0,0 +1,17 @@ +--- a/mesonbuild/modules/pkgconfig.py ++++ b/mesonbuild/modules/pkgconfig.py +@@ -583,12 +583,8 @@ class PkgConfigModule(ExtensionModule): + pcfile = filebase + '.pc' + pkgroot = pkgroot_name = kwargs.get('install_dir', default_install_dir) + if pkgroot is None: +- if mesonlib.is_freebsd(): +- pkgroot = os.path.join(state.environment.coredata.get_option(mesonlib.OptionKey('prefix')), 'libdata', 'pkgconfig') +- pkgroot_name = os.path.join('{prefix}', 'libdata', 'pkgconfig') +- else: +- pkgroot = os.path.join(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_name = os.path.join('{libdir}', 'pkgconfig') + if not isinstance(pkgroot, str): + raise mesonlib.MesonException('Install_dir must be a string.') + self._generate_pkgconfig_file(state, deps, subdirs, name, description, url, diff --git a/ports/vcpkg-tool-meson/vcpkg.json b/ports/vcpkg-tool-meson/vcpkg.json index 70c9690af8..bb24ed66b4 100644 --- a/ports/vcpkg-tool-meson/vcpkg.json +++ b/ports/vcpkg-tool-meson/vcpkg.json @@ -1,6 +1,7 @@ { "name": "vcpkg-tool-meson", "version": "0.63", + "port-version": 1, "description": "Meson build system", "homepage": "https://github.com/mesonbuild/meson", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index d339d58d6b..7ceb21b822 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8858,7 +8858,7 @@ }, "vcpkg-tool-meson": { "baseline": "0.63", - "port-version": 0 + "port-version": 1 }, "vcpkg-tool-mozbuild": { "baseline": "4.0.2", diff --git a/versions/v-/vcpkg-tool-meson.json b/versions/v-/vcpkg-tool-meson.json index 742ccaecdb..8ab8416f1e 100644 --- a/versions/v-/vcpkg-tool-meson.json +++ b/versions/v-/vcpkg-tool-meson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d4234634624fc778e5d80db63cf53bac8587ebb9", + "version": "0.63", + "port-version": 1 + }, { "git-tree": "bee0cb6c5edf45133ebc9643b86c9c775ab36cfe", "version": "0.63",