From fc87782134972af3c36e09bc4f2c1ee364e3db7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 9 Dec 2014 09:27:48 +0100 Subject: [PATCH] kauth: build of (native) kauth-policy-gen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * force backend polkit-qt-1 * align installation path Signed-off-by: Andreas Müller --- .../files/0001-Make-autotests-optional.patch | 8 +- ...auth-policy-gen-with-for-polkit-qt-1.patch | 77 +++++++++++++++++++ ...gn-installation-location-for-helpers.patch | 31 ++++++++ .../tier2/kauth/kauth-native.bb | 4 +- recipes-kde-framework/tier2/kauth/kauth.bb | 7 +- recipes-kde-framework/tier2/kauth/kauth.inc | 1 + 6 files changed, 120 insertions(+), 8 deletions(-) create mode 100644 recipes-kde-framework/tier2/kauth/files/0002-Force-building-kauth-policy-gen-with-for-polkit-qt-1.patch create mode 100644 recipes-kde-framework/tier2/kauth/files/0003-align-installation-location-for-helpers.patch diff --git a/recipes-kde-framework/tier2/kauth/files/0001-Make-autotests-optional.patch b/recipes-kde-framework/tier2/kauth/files/0001-Make-autotests-optional.patch index 23e76f12..c2d278d2 100644 --- a/recipes-kde-framework/tier2/kauth/files/0001-Make-autotests-optional.patch +++ b/recipes-kde-framework/tier2/kauth/files/0001-Make-autotests-optional.patch @@ -1,12 +1,12 @@ -From 3418e7c05012cf9cf5058132b12418e739bf62fb Mon Sep 17 00:00:00 2001 +From 65f884c12821ae487be28601a7f3b3fc25c963e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 27 Nov 2014 09:19:51 +0100 -Subject: [PATCH] Make autotests optional +Subject: [PATCH 1/3] Make autotests optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Upstream-Status: Inappropriate [config] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Andreas Müller --- @@ -14,7 +14,7 @@ Signed-off-by: Andreas Müller 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index e047a94..30edce6 100644 +index e047a94..4dc666f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,9 @@ ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KAUTH diff --git a/recipes-kde-framework/tier2/kauth/files/0002-Force-building-kauth-policy-gen-with-for-polkit-qt-1.patch b/recipes-kde-framework/tier2/kauth/files/0002-Force-building-kauth-policy-gen-with-for-polkit-qt-1.patch new file mode 100644 index 00000000..8b523eb2 --- /dev/null +++ b/recipes-kde-framework/tier2/kauth/files/0002-Force-building-kauth-policy-gen-with-for-polkit-qt-1.patch @@ -0,0 +1,77 @@ +From a6bf4b1f4596194f5ba45c5af8680e703729a256 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 9 Dec 2014 07:49:18 +0100 +Subject: [PATCH 2/3] Force building kauth-policy-gen with for polkit-qt-1 + backend +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +we need that for native build + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Andreas Müller +--- + src/CMakeLists.txt | 14 ++++++-------- + src/ConfigureChecks.cmake | 17 ++++------------- + 2 files changed, 10 insertions(+), 21 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 946d042..0f9b8c7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,16 +52,14 @@ ecm_generate_headers(KAuth_HEADERS + + # Compile only if fake backend has not been selected + +-if (NOT "${KAUTH_BACKEND_NAME}" STREQUAL "FAKE") +- # KAUTH_POLICY_GEN_SRCS has been generated from ConfigureChecks.cmake +- add_executable(kauth-policy-gen ${KAUTH_POLICY_GEN_SRCS}) +- add_executable(KF5::kauth-policy-gen ALIAS kauth-policy-gen) ++# KAUTH_POLICY_GEN_SRCS has been generated from ConfigureChecks.cmake ++add_executable(kauth-policy-gen ${KAUTH_POLICY_GEN_SRCS}) ++add_executable(KF5::kauth-policy-gen ALIAS kauth-policy-gen) + +- # KAUTH_POLICY_GEN_LIBRARIES has been generated from ConfigureChecks.cmake +- target_link_libraries( kauth-policy-gen PRIVATE ${KAUTH_POLICY_GEN_LIBRARIES} ) ++# KAUTH_POLICY_GEN_LIBRARIES has been generated from ConfigureChecks.cmake ++target_link_libraries( kauth-policy-gen PRIVATE ${KAUTH_POLICY_GEN_LIBRARIES} ) + +- install( TARGETS kauth-policy-gen EXPORT KF5AuthTargets DESTINATION ${KAUTH_HELPER_INSTALL_DIR}) +-endif () ++install( TARGETS kauth-policy-gen EXPORT KF5AuthTargets DESTINATION ${KAUTH_HELPER_INSTALL_DIR}) + + # KAuth backend plugin + +diff --git a/src/ConfigureChecks.cmake b/src/ConfigureChecks.cmake +index d46761a..48f33a2 100644 +--- a/src/ConfigureChecks.cmake ++++ b/src/ConfigureChecks.cmake +@@ -169,19 +169,10 @@ set(KAUTH_POLICY_GEN_SRCS + policy-gen/policy-gen.cpp ) + set(KAUTH_POLICY_GEN_LIBRARIES) + +-if(KAUTH_BACKEND_NAME STREQUAL "OSX") +- set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS} +- backends/mac/kauth-policy-gen-mac.cpp) +- set(KAUTH_POLICY_GEN_LIBRARIES ${KAUTH_POLICY_GEN_LIBRARIES} ${CORE_FOUNDATION_LIBRARY} ${SECURITY_LIBRARY} Qt5::Core) +-elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT") +- set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS} +- backends/policykit/kauth-policy-gen-polkit.cpp ) +-elseif(KAUTH_BACKEND_NAME STREQUAL "POLKITQT5-1") +- set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS} +- backends/polkit-1/kauth-policy-gen-polkit1.cpp ) +- set(KAUTH_POLICY_GEN_LIBRARIES ${KAUTH_POLICY_GEN_LIBRARIES} +- Qt5::Core) +-endif() ++set(KAUTH_POLICY_GEN_SRCS ${KAUTH_POLICY_GEN_SRCS} ++ backends/polkit-1/kauth-policy-gen-polkit1.cpp ) ++set(KAUTH_POLICY_GEN_LIBRARIES ${KAUTH_POLICY_GEN_LIBRARIES} ++ Qt5::Core) + + ######################## + # Helper backend probing +-- +1.8.3.1 + diff --git a/recipes-kde-framework/tier2/kauth/files/0003-align-installation-location-for-helpers.patch b/recipes-kde-framework/tier2/kauth/files/0003-align-installation-location-for-helpers.patch new file mode 100644 index 00000000..379ae207 --- /dev/null +++ b/recipes-kde-framework/tier2/kauth/files/0003-align-installation-location-for-helpers.patch @@ -0,0 +1,31 @@ +From 53e5bcaf4d30c4837ea048e99bcc627d48c40d2b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 9 Dec 2014 08:49:14 +0100 +Subject: [PATCH 3/3] align installation location for helpers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Andreas Müller +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4dc666f..0353292 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,7 @@ option(AUTOTESTS "Perform autotests" ON) + + find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED) + +-set(KAUTH_HELPER_INSTALL_DIR "${LIBEXEC_INSTALL_DIR}/kauth") ++set(KAUTH_HELPER_INSTALL_DIR "${LIBEXEC_INSTALL_DIR}") + + if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") + ecm_install_po_files_as_qm(po) +-- +1.8.3.1 + diff --git a/recipes-kde-framework/tier2/kauth/kauth-native.bb b/recipes-kde-framework/tier2/kauth/kauth-native.bb index 7b248cfb..0fe2e314 100644 --- a/recipes-kde-framework/tier2/kauth/kauth-native.bb +++ b/recipes-kde-framework/tier2/kauth/kauth-native.bb @@ -2,6 +2,6 @@ require ${BPN}.inc inherit native -# REVISIT: polkit-qt-1 backend - DEPENDS += "kcoreaddons-native" + +SRC_URI += "file://0002-Force-building-kauth-policy-gen-with-for-polkit-qt-1.patch" diff --git a/recipes-kde-framework/tier2/kauth/kauth.bb b/recipes-kde-framework/tier2/kauth/kauth.bb index 050d1746..4eaec97a 100644 --- a/recipes-kde-framework/tier2/kauth/kauth.bb +++ b/recipes-kde-framework/tier2/kauth/kauth.bb @@ -4,8 +4,11 @@ inherit cmake-lib DEPENDS += "${BPN}-native kcoreaddons polkit-qt-1" +EXTRA_OECMAKE += "-DKAUTH_BACKEND_NAME=POLKITQT5-1" + # cross libs / headers CMAKE_HIDE_ERROR[1] = "KF5Auth, -S${libdir}/lib, -S${STAGING_LIBDIR}/lib" CMAKE_HIDE_ERROR[2] = "KF5Auth, -S${includedir}, -S${STAGING_INCDIR}" -# executables: REVISIT there is no native backend -CMAKE_HIDE_ERROR[3] = "KF5Auth, -S${libexecdir}, -S${STAGING_LIBDIR}/${BPN}" + +# executables +CMAKE_HIDE_ERROR[3] = "KF5Auth, -S${libexecdir}/kauth-policy-gen, -S${STAGING_LIBDIR_NATIVE}/${BPN}/kauth-policy-gen" diff --git a/recipes-kde-framework/tier2/kauth/kauth.inc b/recipes-kde-framework/tier2/kauth/kauth.inc index 46d64566..24b1fa47 100644 --- a/recipes-kde-framework/tier2/kauth/kauth.inc +++ b/recipes-kde-framework/tier2/kauth/kauth.inc @@ -8,6 +8,7 @@ inherit kde SRC_URI += " \ file://0001-Make-autotests-optional.patch \ + file://0003-align-installation-location-for-helpers.patch \ " SRCREV = "4f6d10cdc59aca6819e4189e81ff65150559bc10" PV = "5.5.0"