1 |
commit: 70ed594d0d6a67b486c8781e02dbab1bba92aba4 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 5 22:30:53 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 21 13:10:11 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=70ed594d |
7 |
|
8 |
ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir |
9 |
|
10 |
Bug: https://bugs.gentoo.org/621970 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
eclass/ecm.eclass | 19 +++++++++++++++++-- |
14 |
1 file changed, 17 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass |
17 |
index 919c7514b5..1f62d7f7af 100644 |
18 |
--- a/eclass/ecm.eclass |
19 |
+++ b/eclass/ecm.eclass |
20 |
@@ -30,6 +30,7 @@ if [[ -v KDE_GCC_MINIMAL ]]; then |
21 |
fi |
22 |
|
23 |
EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm |
24 |
+[[ ${EAPI} != 7 ]] && EXPORT_FUNCTIONS src_install |
25 |
|
26 |
if [[ -z ${_ECM_ECLASS} ]]; then |
27 |
_ECM_ECLASS=1 |
28 |
@@ -535,12 +536,26 @@ ecm_src_test() { |
29 |
|
30 |
# @FUNCTION: ecm_src_install |
31 |
# @DESCRIPTION: |
32 |
-# Wrapper for cmake_src_install. Currently doesn't do anything extra, but |
33 |
-# is included as part of the API just in case it's needed in the future. |
34 |
+# Wrapper for cmake_src_install. Drops executable bit from .desktop files |
35 |
+# installed inside /usr/share/applications. This is set by cmake when install() |
36 |
+# is called in PROGRAM form, as seen in many kde.org projects. |
37 |
ecm_src_install() { |
38 |
debug-print-function ${FUNCNAME} "$@" |
39 |
|
40 |
cmake_src_install |
41 |
+ |
42 |
+ # bug 621970 |
43 |
+ if [[ ${EAPI} != 7 ]]; then |
44 |
+ if [[ -d "${ED}"/usr/share/applications ]]; then |
45 |
+ local f |
46 |
+ for f in "${ED}"/usr/share/applications/*.desktop; do |
47 |
+ if [[ -x ${f} ]]; then |
48 |
+ einfo "Removing executable bit from ${f#${ED}}" |
49 |
+ fperms a-x "${f#${ED}}" |
50 |
+ fi |
51 |
+ done |
52 |
+ fi |
53 |
+ fi |
54 |
} |
55 |
|
56 |
# @FUNCTION: ecm_pkg_preinst |