diff --git a/sys-auth/polkit-qt/files/polkit-qt-0.114.0-cmake.patch b/sys-auth/polkit-qt/files/polkit-qt-0.114.0-cmake.patch new file mode 100644 index 0000000000000..232dcb5026046 --- /dev/null +++ b/sys-auth/polkit-qt/files/polkit-qt-0.114.0-cmake.patch @@ -0,0 +1,301 @@ +From 1f151d81381106c15084280f1e11209d259ae45c Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Sat, 19 Jun 2021 15:47:56 +0200 +Subject: [PATCH] Change installed .cmake and .pc files to contain realtive + paths + +The LIB_DESTINATION and INCLUDE_DESTIONATION variables do hold little +value, since one can just override the normal CMAKE variables as needed. +Furthermore using CMAKE_INSTALL_FULL_LIBDIR is harmful, since this +prevents CMake to use it's logic to install relocatable .cmake files. +Also libdir and includedir in pkgconfig files need to be prefixed by +either ${exec_prefix} or ${prefix} for the same relocation reasons. +--- + CMakeLists.txt | 27 +++++++++++---------------- + PolkitQt-1Config.cmake.in | 4 ++-- + agent/CMakeLists.txt | 6 +++--- + core/CMakeLists.txt | 6 +++--- + gui/CMakeLists.txt | 6 +++--- + polkit-qt-1.pc.cmake | 4 ++-- + polkit-qt-agent-1.pc.cmake | 4 ++-- + polkit-qt-core-1.pc.cmake | 4 ++-- + polkit-qt-gui-1.pc.cmake | 4 ++-- + polkit-qt5-1.pc.cmake | 4 ++-- + polkit-qt5-agent-1.pc.cmake | 4 ++-- + polkit-qt5-core-1.pc.cmake | 4 ++-- + polkit-qt5-gui-1.pc.cmake | 4 ++-- + 13 files changed, 38 insertions(+), 43 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 32eb737..a82f8cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,11 +21,6 @@ include(GNUInstallDirs) + + include(FeatureSummary) + +-# Set the different paths +-set(LIB_DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Library directory name") +-set(INCLUDE_DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}" CACHE PATH "The subdirectory to the header prefix") +- +- + set(REQUIRED_QT_VERSION 5.5.0) + set(CMAKE_CXX_STANDARD 11) + +@@ -103,7 +98,7 @@ install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/agent/polkitqt1-agent-export.h + + DESTINATION +- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH} COMPONENT Devel) ++ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH} COMPONENT Devel) + + install(FILES + includes/PolkitQt1/Authority +@@ -113,40 +108,40 @@ install(FILES + includes/PolkitQt1/TemporaryAuthorization + includes/PolkitQt1/ActionDescription + DESTINATION +- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1 COMPONENT Devel) ++ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1 COMPONENT Devel) + + install(FILES + includes/PolkitQt1/Gui/Action + includes/PolkitQt1/Gui/ActionButton + includes/PolkitQt1/Gui/ActionButtons + DESTINATION +- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Gui COMPONENT Devel) ++ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Gui COMPONENT Devel) + + install(FILES + includes/PolkitQt1/Agent/Listener + includes/PolkitQt1/Agent/Session + DESTINATION +- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Agent COMPONENT Devel) ++ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Agent COMPONENT Devel) + + if(NOT WIN32) + # Pkgconfig + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_PCNAME}.pc @ONLY) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig ) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_CORE_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_CORE_PCNAME}.pc + @ONLY) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_CORE_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig ) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_CORE_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_GUI_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_GUI_PCNAME}.pc @ONLY) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_GUI_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig ) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_GUI_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc + @ONLY) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig ) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + endif(NOT WIN32) + + + if(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR) +- set(_PolkitQt-1Config_INSTALL_DIR ${LIB_DESTINATION}/cmake/${POLKITQT-1_CAMEL_NAME}) ++ set(_PolkitQt-1Config_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${POLKITQT-1_CAMEL_NAME}) + else(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR) +- set(_PolkitQt-1Config_INSTALL_DIR ${LIB_DESTINATION}/${POLKITQT-1_CAMEL_NAME}/cmake) ++ set(_PolkitQt-1Config_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${POLKITQT-1_CAMEL_NAME}/cmake) + endif(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR) + + +@@ -154,7 +149,7 @@ endif(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR) + configure_package_config_file(PolkitQt-1Config.cmake.in + ${CMAKE_BINARY_DIR}/${POLKITQT-1_CAMEL_NAME}Config.cmake + INSTALL_DESTINATION ${_PolkitQt-1Config_INSTALL_DIR} +- PATH_VARS LIB_DESTINATION INCLUDE_DESTINATION ++ PATH_VARS CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR + ) + + write_basic_package_version_file(${CMAKE_BINARY_DIR}/${POLKITQT-1_CAMEL_NAME}ConfigVersion.cmake +diff --git a/PolkitQt-1Config.cmake.in b/PolkitQt-1Config.cmake.in +index f39480c..e09678c 100644 +--- a/PolkitQt-1Config.cmake.in ++++ b/PolkitQt-1Config.cmake.in +@@ -20,9 +20,9 @@ if(NOT POLKITQT-1_INSTALL_DIR) + set(POLKITQT-1_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@") + endif(NOT POLKITQT-1_INSTALL_DIR) + +-set_and_check(POLKITQT-1_INCLUDE_DIR "@PACKAGE_INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@") ++set_and_check(POLKITQT-1_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@") + set_and_check(POLKITQT-1_INCLUDE_DIRS "${POLKITQT-1_INCLUDE_DIR}") +-set_and_check(POLKITQT-1_LIB_DIR "@PACKAGE_LIB_DESTINATION@") ++set_and_check(POLKITQT-1_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") + set(POLKITQT-1_POLICY_FILES_INSTALL_DIR "${POLKITQT-1_INSTALL_DIR}/share/polkit-1/actions") + ################################## + +diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt +index ccf2711..1a86cd8 100644 +--- a/agent/CMakeLists.txt ++++ b/agent/CMakeLists.txt +@@ -29,11 +29,11 @@ set_target_properties(${POLKITQT-1_AGENT_PCNAME} PROPERTIES VERSION ${POLKITQT-1 + + target_include_directories(${POLKITQT-1_AGENT_PCNAME} + INTERFACE +- $ ++ $ + $ + $ + ) + +-install(TARGETS ${POLKITQT-1_AGENT_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${LIB_DESTINATION} +- LIBRARY DESTINATION ${LIB_DESTINATION} ++install(TARGETS ${POLKITQT-1_AGENT_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION bin) +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index 3a80adc..8225871 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -32,12 +32,12 @@ set_target_properties(${POLKITQT-1_CORE_PCNAME} PROPERTIES VERSION ${POLKITQT-1_ + + target_include_directories(${POLKITQT-1_CORE_PCNAME} + INTERFACE +- $ ++ $ + $ + $ + ) + +-install(TARGETS ${POLKITQT-1_CORE_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${LIB_DESTINATION} +- LIBRARY DESTINATION ${LIB_DESTINATION} ++install(TARGETS ${POLKITQT-1_CORE_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION bin) + +diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt +index d9d800d..c22deba 100644 +--- a/gui/CMakeLists.txt ++++ b/gui/CMakeLists.txt +@@ -28,11 +28,11 @@ set_target_properties(${POLKITQT-1_GUI_PCNAME} PROPERTIES VERSION ${POLKITQT-1_L + + target_include_directories(${POLKITQT-1_GUI_PCNAME} + INTERFACE +- $ ++ $ + $ + $ + ) + +-install(TARGETS ${POLKITQT-1_GUI_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${LIB_DESTINATION} +- LIBRARY DESTINATION ${LIB_DESTINATION} ++install(TARGETS ${POLKITQT-1_GUI_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION bin) +diff --git a/polkit-qt-1.pc.cmake b/polkit-qt-1.pc.cmake +index 7cc55a9..ba8e46e 100644 +--- a/polkit-qt-1.pc.cmake ++++ b/polkit-qt-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_PCNAME@ + Description: Convenience library for using polkit with a Qt-styled API +diff --git a/polkit-qt-agent-1.pc.cmake b/polkit-qt-agent-1.pc.cmake +index 001925d..23b2cae 100644 +--- a/polkit-qt-agent-1.pc.cmake ++++ b/polkit-qt-agent-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_AGENT_PCNAME@ + Description: Convenience library for using polkit Agent with a Qt-styled API +diff --git a/polkit-qt-core-1.pc.cmake b/polkit-qt-core-1.pc.cmake +index ca435a6..fa501f0 100644 +--- a/polkit-qt-core-1.pc.cmake ++++ b/polkit-qt-core-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_CORE_PCNAME@ + Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes +diff --git a/polkit-qt-gui-1.pc.cmake b/polkit-qt-gui-1.pc.cmake +index e7279d1..7261b0c 100644 +--- a/polkit-qt-gui-1.pc.cmake ++++ b/polkit-qt-gui-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_GUI_PCNAME@ + Description: Convenience library for using polkit with a Qt-styled API, GUI classes +diff --git a/polkit-qt5-1.pc.cmake b/polkit-qt5-1.pc.cmake +index 7cc55a9..ba8e46e 100644 +--- a/polkit-qt5-1.pc.cmake ++++ b/polkit-qt5-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_PCNAME@ + Description: Convenience library for using polkit with a Qt-styled API +diff --git a/polkit-qt5-agent-1.pc.cmake b/polkit-qt5-agent-1.pc.cmake +index fabc0db..709a24e 100644 +--- a/polkit-qt5-agent-1.pc.cmake ++++ b/polkit-qt5-agent-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_AGENT_PCNAME@ + Description: Convenience library for using polkit Agent with a Qt-styled API +diff --git a/polkit-qt5-core-1.pc.cmake b/polkit-qt5-core-1.pc.cmake +index 33687c2..588f267 100644 +--- a/polkit-qt5-core-1.pc.cmake ++++ b/polkit-qt5-core-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_CORE_PCNAME@ + Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes +diff --git a/polkit-qt5-gui-1.pc.cmake b/polkit-qt5-gui-1.pc.cmake +index 4280226..1c012dd 100644 +--- a/polkit-qt5-gui-1.pc.cmake ++++ b/polkit-qt5-gui-1.pc.cmake +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@LIB_DESTINATION@ +-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@ ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@ + + Name: @POLKITQT-1_GUI_PCNAME@ + Description: Convenience library for using polkit with a Qt-styled API, GUI classes +-- +GitLab + diff --git a/sys-auth/polkit-qt/files/polkit-qt-0.114.0-glib-2.36.patch b/sys-auth/polkit-qt/files/polkit-qt-0.114.0-glib-2.36.patch new file mode 100644 index 0000000000000..bc9da1c4dc4f0 --- /dev/null +++ b/sys-auth/polkit-qt/files/polkit-qt-0.114.0-glib-2.36.patch @@ -0,0 +1,188 @@ +From 2656bf02e19f282ee963309a48ba497873e9fa40 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Fri, 6 Aug 2021 11:57:43 +0200 +Subject: [PATCH] Require glib 2.36 and remove "do nothing" g_type_init + +g_type_init deprecated and a no-op since glib 2.36 + +glib 2.36 was released in 2013, i think it's a reasonable min dependency +nowadays +--- + CMakeLists.txt | 2 +- + agent/polkitqt1-agent-listener.cpp | 4 ---- + agent/polkitqtlistener.cpp | 1 - + core/polkitqt1-actiondescription.cpp | 2 -- + core/polkitqt1-authority.cpp | 2 -- + core/polkitqt1-details.cpp | 2 -- + core/polkitqt1-identity.cpp | 2 -- + core/polkitqt1-subject.cpp | 5 ----- + core/polkitqt1-temporaryauthorization.cpp | 1 - + examples/agent/pkagentexample.cpp | 2 -- + 10 files changed, 1 insertion(+), 22 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a82f8cb..dd0977e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,7 +40,7 @@ set(POLKITQT-1_INCLUDE_PATH "polkit-qt5-1") + + pkg_check_modules(POLKIT_GOBJECT polkit-gobject-1 REQUIRED IMPORTED_TARGET) + pkg_check_modules(POLKIT_AGENT polkit-agent-1 REQUIRED IMPORTED_TARGET) +-pkg_check_modules(GLIB2 glib-2.0 REQUIRED IMPORTED_TARGET) ++pkg_check_modules(GLIB2 glib-2.0>=2.36 REQUIRED IMPORTED_TARGET) + pkg_check_modules(GOBJECT gobject-2.0 REQUIRED IMPORTED_TARGET) + + add_definitions(-DQT_NO_KEYWORDS) +diff --git a/agent/polkitqt1-agent-listener.cpp b/agent/polkitqt1-agent-listener.cpp +index cb99299..27348b1 100644 +--- a/agent/polkitqt1-agent-listener.cpp ++++ b/agent/polkitqt1-agent-listener.cpp +@@ -34,8 +34,6 @@ public: + Listener::Listener(QObject *parent) + : QObject(parent), d(new ListenerPrivate) + { +- g_type_init(); +- + d->listener = polkit_qt_listener_new(); + + qDebug() << "New PolkitAgentListener " << d->listener; +@@ -46,8 +44,6 @@ Listener::Listener(QObject *parent) + Listener::Listener(PolkitAgentListener *listener, QObject *parent) + : QObject(parent), d(new ListenerPrivate) + { +- g_type_init(); +- + d->listener = listener; + + if (d->listener != nullptr) { +diff --git a/agent/polkitqtlistener.cpp b/agent/polkitqtlistener.cpp +index 69c4f8a..e8713b5 100644 +--- a/agent/polkitqtlistener.cpp ++++ b/agent/polkitqtlistener.cpp +@@ -49,7 +49,6 @@ G_DEFINE_TYPE(PolkitQtListener, polkit_qt_listener, POLKIT_AGENT_TYPE_LISTENER) + + static void polkit_qt_listener_init(PolkitQtListener *listener) + { +- g_type_init(); + } + + static void polkit_qt_listener_finalize(GObject *object) +diff --git a/core/polkitqt1-actiondescription.cpp b/core/polkitqt1-actiondescription.cpp +index f865c37..c08f5c4 100644 +--- a/core/polkitqt1-actiondescription.cpp ++++ b/core/polkitqt1-actiondescription.cpp +@@ -55,8 +55,6 @@ ActionDescription::ActionDescription() + ActionDescription::ActionDescription(PolkitActionDescription *polkitActionDescription) + : d(new Data) + { +- g_type_init(); +- + d->actionId = QString::fromUtf8(polkit_action_description_get_action_id(polkitActionDescription)); + d->description = QString::fromUtf8(polkit_action_description_get_description(polkitActionDescription)); + d->message = QString::fromUtf8(polkit_action_description_get_message(polkitActionDescription)); +diff --git a/core/polkitqt1-authority.cpp b/core/polkitqt1-authority.cpp +index a891b92..73dd97e 100644 +--- a/core/polkitqt1-authority.cpp ++++ b/core/polkitqt1-authority.cpp +@@ -172,8 +172,6 @@ void Authority::Private::init() + QDBusError error; + QDBusError dbus_error; + +- g_type_init(); +- + m_systemBus = new QDBusConnection(QDBusConnection::connectToBus(QDBusConnection::SystemBus, + QStringLiteral("polkit_qt_system_bus"))); + +diff --git a/core/polkitqt1-details.cpp b/core/polkitqt1-details.cpp +index b9494f0..ba107b1 100644 +--- a/core/polkitqt1-details.cpp ++++ b/core/polkitqt1-details.cpp +@@ -39,14 +39,12 @@ public: + Details::Details() + : d(new Data) + { +- g_type_init(); + d->polkitDetails = polkit_details_new(); + } + + Details::Details(PolkitDetails *pkDetails) + : d(new Data) + { +- g_type_init(); + d->polkitDetails = pkDetails; + + if (d->polkitDetails != nullptr) { +diff --git a/core/polkitqt1-identity.cpp b/core/polkitqt1-identity.cpp +index 2489c33..0924c5a 100644 +--- a/core/polkitqt1-identity.cpp ++++ b/core/polkitqt1-identity.cpp +@@ -39,13 +39,11 @@ public: + Identity::Identity() + : d(new Data) + { +- g_type_init(); + } + + Identity::Identity(PolkitIdentity *polkitIdentity) + : d(new Data) + { +- g_type_init(); + d->identity = polkitIdentity; + + if (d->identity) { +diff --git a/core/polkitqt1-subject.cpp b/core/polkitqt1-subject.cpp +index 3d86437..3dae3bd 100644 +--- a/core/polkitqt1-subject.cpp ++++ b/core/polkitqt1-subject.cpp +@@ -39,13 +39,11 @@ public: + Subject::Subject() + : d(new Data) + { +- g_type_init(); + } + + Subject::Subject(PolkitSubject *subject) + : d(new Data) + { +- g_type_init(); + d->subject = subject; + + if (d->subject != nullptr) { +@@ -95,9 +93,6 @@ QString Subject::toString() const + + Subject Subject::fromString(const QString &string) + { +- // should be in polkit library!!! but for strange reason it's necessary to have it here +- g_type_init(); +- + Subject subject; + GError *error = nullptr; + subject.d->subject = polkit_subject_from_string(string.toUtf8().data(), &error); +diff --git a/core/polkitqt1-temporaryauthorization.cpp b/core/polkitqt1-temporaryauthorization.cpp +index 64209ff..ae40f3b 100644 +--- a/core/polkitqt1-temporaryauthorization.cpp ++++ b/core/polkitqt1-temporaryauthorization.cpp +@@ -38,7 +38,6 @@ public: + TemporaryAuthorization::TemporaryAuthorization(PolkitTemporaryAuthorization *pkTemporaryAuthorization) + : d(new Data) + { +- g_type_init(); + d->id = QString::fromUtf8(polkit_temporary_authorization_get_id(pkTemporaryAuthorization)); + d->actionId = QString::fromUtf8(polkit_temporary_authorization_get_action_id(pkTemporaryAuthorization)); + d->subject = Subject::fromString(polkit_subject_to_string(polkit_temporary_authorization_get_subject(pkTemporaryAuthorization))); +diff --git a/examples/agent/pkagentexample.cpp b/examples/agent/pkagentexample.cpp +index 8b1128b..da555c7 100644 +--- a/examples/agent/pkagentexample.cpp ++++ b/examples/agent/pkagentexample.cpp +@@ -9,8 +9,6 @@ + PkAgentExample::PkAgentExample(int &argc, char **argv) + : QCoreApplication(argc, argv) + { +- g_type_init(); +- + PolkitQt1::UnixSessionSubject session(getpid()); + + m_listener.registerListener(session, "/org/kde/PolicyKit1/AuthenticationAgent"); +-- +GitLab + diff --git a/sys-auth/polkit-qt/polkit-qt-0.114.0-r1.ebuild b/sys-auth/polkit-qt/polkit-qt-0.114.0-r1.ebuild new file mode 100644 index 0000000000000..d2ed0e07d44fa --- /dev/null +++ b/sys-auth/polkit-qt/polkit-qt-0.114.0-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +KDE_ORG_CATEGORY="libraries" +KDE_ORG_NAME="polkit-qt-1" +inherit cmake kde.org + +DESCRIPTION="Qt wrapper around polkit-1 client libraries" +HOMEPAGE="https://api.kde.org/polkit-qt-1/html/" + +if [[ ${KDE_BUILD_TYPE} = release ]]; then + SRC_URI="mirror://kde/stable/${KDE_ORG_NAME}/${KDE_ORG_NAME}-${PV}.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +fi + +LICENSE="LGPL-2" +SLOT="0" +IUSE="" + +RDEPEND=" + dev-libs/glib:2 + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + >=sys-auth/polkit-0.103 +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( AUTHORS README README.porting TODO ) + +PATCHES=( + "${FILESDIR}/${P}-cmake.patch" + "${FILESDIR}/${P}-glib-2.36.patch" +) + +src_configure() { + local mycmakeargs=( + -DBUILD_EXAMPLES=OFF + ) + cmake_src_configure +}