Skip to content

Commit

Permalink
[vcpkg-tool-meson] fix pkgconfig data file installation on FreeBSD (#…
Browse files Browse the repository at this point in the history
…35003)

* [fontconfig] fix pkgconfig file installation (#35002)

move pkgconfig script into the path indicated by the diagnositic emitted by
vcpkg (see comment 1 of #35002).

* [fontconfig] force installation of pc files (#35002)

Undo the last commit and patch meson to force the pc file installation paths
demanded by `vcpkg_fixup_pkgconfig`

* [fontconfig] bump portrevision (#35002)

* [fontconfig] regenerate versions (#35002)

* Revert "[fontconfig] regenerate versions (#35002)"

This reverts commit 8daf0e1.

* Revert "[fontconfig] bump portrevision (#35002)"

This reverts commit a9727bc.

* Revert "[fontconfig] force installation of pc files (#35002)"

This reverts commit c0c6e01.

* Revert "[fontconfig] fix pkgconfig file installation (#35002)"

This reverts commit 616d4ce.

* [vcpkg-tool-meson] fix pc-file installation paths on FreeBSD (#35002)

* [vcpkg-tool-meson] bump portversion (#35002)

* [vcpkg-tool-meson] regenerate versions (#35002)

* [vcpkg-tool-meson] Use vcpkg_from_github to obtain source (#35002)

* [vcpkg-tool-meson] Regenerate versions (#35002)

* [vcpkg-tool-meson] Use adverticed version of meson (#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 (#35002)

* Revert "[vcpkg-tool-meson] regenerate versions (#35002)"

This reverts commit e9a424e.

* Revert "[vcpkg-tool-meson] Use adverticed version of meson (#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,
#28084 or #35348 .
  • Loading branch information
SchaichAlonso committed Dec 13, 2023
1 parent c869686 commit ff68673
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 29 deletions.
6 changes: 2 additions & 4 deletions ports/vcpkg-tool-meson/meson-intl.patch
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
40 changes: 16 additions & 24 deletions ports/vcpkg-tool-meson/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}"
Expand Down
17 changes: 17 additions & 0 deletions ports/vcpkg-tool-meson/remove-freebsd-pcfile-specialization.patch
Original file line number Diff line number Diff line change
@@ -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,
1 change: 1 addition & 0 deletions ports/vcpkg-tool-meson/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8858,7 +8858,7 @@
},
"vcpkg-tool-meson": {
"baseline": "0.63",
"port-version": 0
"port-version": 1
},
"vcpkg-tool-mozbuild": {
"baseline": "4.0.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-tool-meson.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d4234634624fc778e5d80db63cf53bac8587ebb9",
"version": "0.63",
"port-version": 1
},
{
"git-tree": "bee0cb6c5edf45133ebc9643b86c9c775ab36cfe",
"version": "0.63",
Expand Down

0 comments on commit ff68673

Please sign in to comment.