[polkit] New port (#51383)

This commit is contained in:
Daniele E. Domenichelli 2026-04-29 10:25:46 +02:00 committed by GitHub
parent 9e9d930570
commit 63bb8e44c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,15 @@
diff --git a/src/meson.build b/src/meson.build
index 35ece7e..8837c5c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -3,7 +3,9 @@ src_inc = include_directories('.')
ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
subdir('polkit')
-if not get_option('libs-only')
+if get_option('libs-only')
+ subdir('polkitagent')
+else
subdir('polkitbackend')
subdir('polkitagent')
subdir('programs')

View File

@ -0,0 +1,42 @@
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org
OUT_SOURCE_PATH SOURCE_PATH
REPO polkit/polkit
REF "${VERSION}"
SHA512 3c4fe60618cf6e74467dc0efac084a38c93b0a8e4e8c02d36de5ca35634ecff624b6977b54493e9b1ad41aa87693ac3246e14fe6f6b828f57b2012b869af9105
HEAD_REF master
PATCHES
libs-only-build-polkitagent.patch
)
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Dauthfw=shadow
-Dexamples=false
-Dgtk_doc=false
-Dintrospection=false
-Dlibs-only=true
-Dman=false
-Dsession_tracking=ConsoleKit
-Dtests=false
ADDITIONAL_BINARIES
"glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'"
"glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
)
vcpkg_install_meson()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/lib/polkit-1"
"${CURRENT_PACKAGES_DIR}/lib/polkit-1"
"${CURRENT_PACKAGES_DIR}/share/dbus-1"
"${CURRENT_PACKAGES_DIR}/share/gettext"
"${CURRENT_PACKAGES_DIR}/share/polkit-1"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

32
ports/polkit/vcpkg.json Normal file
View File

@ -0,0 +1,32 @@
{
"name": "polkit",
"version": "124",
"description": "PolicyKit authorization libraries",
"homepage": "https://gitlab.freedesktop.org/polkit/polkit",
"license": "LGPL-2.0-or-later",
"supports": "linux",
"dependencies": [
"expat",
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
},
"glib",
{
"name": "glib",
"host": true
},
"libxcrypt",
{
"name": "pkgconf",
"host": true
},
{
"name": "vcpkg-tool-meson",
"host": true
}
]
}

View File

@ -7820,6 +7820,10 @@
"baseline": "2021-09-26",
"port-version": 0
},
"polkit": {
"baseline": "124",
"port-version": 0
},
"polyclipping": {
"baseline": "6.4.2",
"port-version": 13

9
versions/p-/polkit.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "00617405495bae3a7c245f7ed74877f7c05e426e",
"version": "124",
"port-version": 0
}
]
}