From 0061960cc31df78ea75498fa8587b7bb7a36f5a1 Mon Sep 17 00:00:00 2001 From: WangWeiLin-MV <156736127+WangWeiLin-MV@users.noreply.github.com> Date: Wed, 15 May 2024 15:09:00 +0800 Subject: [PATCH] [glib] debug macos python --- ports/glib/0005-debug-macos-python.diff | 29 +++++++++++++++++++++++++ ports/glib/portfile.cmake | 14 +++++++++--- ports/glib/vcpkg.json | 7 ++++-- ports/libsecret/portfile.cmake | 4 ++++ ports/libsecret/vcpkg.json | 5 +++++ versions/baseline.json | 6 ++--- versions/g-/glib.json | 5 +++++ versions/l-/libsecret.json | 7 +++++- 8 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 ports/glib/0005-debug-macos-python.diff diff --git a/ports/glib/0005-debug-macos-python.diff b/ports/glib/0005-debug-macos-python.diff new file mode 100644 index 00000000000000..b68d1130b9ca7d --- /dev/null +++ b/ports/glib/0005-debug-macos-python.diff @@ -0,0 +1,29 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 08f1ba9..81af2f4 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,6 +19,11 @@ + # + # Author: David Zeuthen + ++import sys ++print('====debug macos python') ++print(sys.executable) ++print(sys.path) ++ + import packaging.version + import os + import sys +diff --git a/meson.build b/meson.build +index a400965..576a939 100644 +--- a/meson.build ++++ b/meson.build +@@ -2420,7 +2420,7 @@ endif + + glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) + +-python = import('python').find_installation(modules: ['packaging']) ++python = import('python').find_installation() + # used for '#!/usr/bin/env ' + python_name = 'python3' + diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 529484ceda12db..27920c52be7344 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -2,7 +2,7 @@ string(REGEX MATCH "^([0-9]*[.][0-9]*)" GLIB_MAJOR_MINOR "${VERSION}") vcpkg_download_distfile(GLIB_ARCHIVE URLS "https://download.gnome.org/sources/glib/${GLIB_MAJOR_MINOR}/glib-${VERSION}.tar.xz" FILENAME "glib-${VERSION}.tar.xz" - SHA512 6f3a06e10e7373a2dbf0688512de4126472fb73cbec488b7983b5ffecff09c64d7e1ca462f892e8f215d3d277d103ca802bad7ef0bd0f91edf26fc6ce67187b6 + SHA512 1514d62aeb4c4a1a1048ae0f84f7db7f0dbf355772b2dadf6a34ec547045b163a5e28331b096e7616fe3c9c19bed98025a0202b05073f5d7ee901d0efaffe143 ) vcpkg_extract_source_archive(SOURCE_PATH @@ -10,6 +10,7 @@ vcpkg_extract_source_archive(SOURCE_PATH PATCHES use-libiconv-on-windows.patch libintl.patch + 0005-debug-macos-python.diff ) if(APPLE) @@ -39,6 +40,10 @@ if(VCPKG_HOST_IS_WINDOWS) vcpkg_list(APPEND ADDITIONAL_BINARIES "sh = ['${CMAKE_COMMAND}', '-E', 'false']") endif() +message("$ENV{PATH}") +x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES packaging) +message("$ENV{PATH}") + vcpkg_configure_meson( SOURCE_PATH "${SOURCE_PATH}" LANGUAGES C CXX OBJC OBJCXX @@ -46,10 +51,10 @@ vcpkg_configure_meson( ${ADDITIONAL_BINARIES} OPTIONS ${OPTIONS} - -Dgtk_doc=false + -Ddocumentation=false -Dinstalled_tests=false -Dlibelf=disabled - -Dman=false + -Dman-pages=disabled -Dtests=false -Dxattr=false ) @@ -72,6 +77,9 @@ endforeach() set(GLIB_TOOLS gapplication gdbus + gi-compile-repository + gi-decompile-typelib + gi-inspect-typelib gio gio-querymodules glib-compile-resources diff --git a/ports/glib/vcpkg.json b/ports/glib/vcpkg.json index 55272615e3985a..f365d7ec12ea71 100644 --- a/ports/glib/vcpkg.json +++ b/ports/glib/vcpkg.json @@ -1,7 +1,6 @@ { "name": "glib", - "version": "2.78.4", - "port-version": 1, + "version": "2.80.0", "description": "Portable, general-purpose utility library.", "homepage": "https://developer.gnome.org/glib/", "license": "LGPL-2.1-or-later", @@ -12,6 +11,10 @@ "libffi", "libiconv", "pcre2", + { + "name": "vcpkg-get-python-packages", + "host": true + }, { "name": "vcpkg-tool-meson", "host": true diff --git a/ports/libsecret/portfile.cmake b/ports/libsecret/portfile.cmake index 1a3295f8cff953..6280f4c74113a5 100644 --- a/ports/libsecret/portfile.cmake +++ b/ports/libsecret/portfile.cmake @@ -7,6 +7,10 @@ vcpkg_from_gitlab( HEAD_REF master ) +message("$ENV{PATH}") +x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES packaging) +message("$ENV{PATH}") + vcpkg_configure_meson( SOURCE_PATH "${SOURCE_PATH}" OPTIONS diff --git a/ports/libsecret/vcpkg.json b/ports/libsecret/vcpkg.json index 0b35e6701ead07..36a9d67d86256c 100644 --- a/ports/libsecret/vcpkg.json +++ b/ports/libsecret/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libsecret", "version": "0.21.4", + "port-version": 1, "description": "libsecret is a GObject-based library for accessing the Secret Service API of the freedesktop.org project, a cross-desktop effort to access passwords, tokens and other types of secrets. libsecret provides a convenient wrapper for these methods so consumers do not have to call the low-level DBus methods.", "homepage": "https://gitlab.gnome.org/GNOME/libsecret/", "license": "LGPL-2.1-or-later", @@ -12,6 +13,10 @@ "host": true }, "libgcrypt", + { + "name": "vcpkg-get-python-packages", + "host": true + }, { "name": "vcpkg-tool-meson", "host": true diff --git a/versions/baseline.json b/versions/baseline.json index cd416751769a5f..b08138e68c3d2d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3077,8 +3077,8 @@ "port-version": 2 }, "glib": { - "baseline": "2.78.4", - "port-version": 1 + "baseline": "2.80.0", + "port-version": 0 }, "glib-networking": { "baseline": "2.78.0", @@ -4926,7 +4926,7 @@ }, "libsecret": { "baseline": "0.21.4", - "port-version": 0 + "port-version": 1 }, "libsercomm": { "baseline": "1.3.2", diff --git a/versions/g-/glib.json b/versions/g-/glib.json index 6bd0221ea64b0b..133ad5f151b956 100644 --- a/versions/g-/glib.json +++ b/versions/g-/glib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "960494283ca7ad2657bb8f6471b4157ed8d5209f", + "version": "2.80.0", + "port-version": 0 + }, { "git-tree": "d73077209c5fcb5a0340baf7d8ba76d128c1ab27", "version": "2.78.4", diff --git a/versions/l-/libsecret.json b/versions/l-/libsecret.json index a6b0fc25ae3a5a..cbe39a5e8d06d8 100644 --- a/versions/l-/libsecret.json +++ b/versions/l-/libsecret.json @@ -1,7 +1,12 @@ { "versions": [ { - "git-tree": "fe57a1ceea0f28f2945dab68cca4e29358ca5e71", + "git-tree": "69de0a2f4bdf3da4d6970ae18dd331f9cc3e34cd", + "version": "0.21.4", + "port-version": 1 + }, + { + "git-tree": "c67dd815fc965b577924074fd71345ca6a9c931c", "version": "0.21.4", "port-version": 0 },