dd9d4a1979
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
30 lines
1.6 KiB
Diff
30 lines
1.6 KiB
Diff
--- a/cmake/KF5AuthMacros.cmake 2018-08-26 14:57:02.703186769 +0200
|
|
+++ b/cmake/KF5AuthMacros.cmake 2018-08-26 14:58:26.469054620 +0200
|
|
@@ -63,12 +63,21 @@
|
|
set(_output ${CMAKE_CURRENT_BINARY_DIR}/${HELPER_ID}.policy)
|
|
get_filename_component(_input ${ACTIONS_FILE} ABSOLUTE)
|
|
|
|
- add_custom_command(OUTPUT ${_output}
|
|
- COMMAND KF5::kauth-policy-gen ${_input} ${_output}
|
|
- MAIN_DEPENDENCY ${_input}
|
|
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
- COMMENT "Generating ${HELPER_ID}.policy"
|
|
- DEPENDS KF5::kauth-policy-gen)
|
|
+ if(CMAKE_CROSSCOMPILING)
|
|
+ add_custom_command(OUTPUT ${_output}
|
|
+ COMMAND "/usr/lib/libexec/kauth/kauth-policy-gen" ${_input} ${_output}
|
|
+ MAIN_DEPENDENCY ${_input}
|
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
+ COMMENT "Generating ${HELPER_ID}.policy"
|
|
+ DEPENDS KF5::kauth-policy-gen)
|
|
+ else()
|
|
+ add_custom_command(OUTPUT ${_output}
|
|
+ COMMAND KF5::kauth-policy-gen ${_input} ${_output}
|
|
+ MAIN_DEPENDENCY ${_input}
|
|
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
+ COMMENT "Generating ${HELPER_ID}.policy"
|
|
+ DEPENDS KF5::kauth-policy-gen)
|
|
+ endif()
|
|
add_custom_target(${HELPER_ID}.policy-customtarget ALL COMMENT "actions for ${HELPER_ID}" DEPENDS ${_output})
|
|
|
|
install(FILES ${_output} DESTINATION ${KAUTH_POLICY_FILES_INSTALL_DIR})
|