diff --git a/ports/polkit/libs-only-build-polkitagent.patch b/ports/polkit/libs-only-build-polkitagent.patch new file mode 100644 index 0000000000..808f1e49d7 --- /dev/null +++ b/ports/polkit/libs-only-build-polkitagent.patch @@ -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') diff --git a/ports/polkit/portfile.cmake b/ports/polkit/portfile.cmake new file mode 100644 index 0000000000..50ff4e2cea --- /dev/null +++ b/ports/polkit/portfile.cmake @@ -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") diff --git a/ports/polkit/vcpkg.json b/ports/polkit/vcpkg.json new file mode 100644 index 0000000000..8ae63fd560 --- /dev/null +++ b/ports/polkit/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index e770f1f1e8..938a312a62 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/p-/polkit.json b/versions/p-/polkit.json new file mode 100644 index 0000000000..d5406f35d5 --- /dev/null +++ b/versions/p-/polkit.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "00617405495bae3a7c245f7ed74877f7c05e426e", + "version": "124", + "port-version": 0 + } + ] +}