diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-08-06 00:30:53 +0200 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-08-21 15:10:11 +0200 |
| commit | 70ed594d0d6a67b486c8781e02dbab1bba92aba4 (patch) | |
| tree | b63f3a8a603337402f83e5a77356569a1336d78e /eclass/ecm.eclass | |
| parent | 4d627557db2199dc0fc5c32cce3b5ebad271bd3c (diff) | |
| download | kde-70ed594d0d6a67b486c8781e02dbab1bba92aba4.tar.gz kde-70ed594d0d6a67b486c8781e02dbab1bba92aba4.tar.bz2 kde-70ed594d0d6a67b486c8781e02dbab1bba92aba4.zip | |
ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir
Bug: https://bugs.gentoo.org/621970
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/ecm.eclass')
| -rw-r--r-- | eclass/ecm.eclass | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index 919c7514b5a..1f62d7f7af9 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.eclass @@ -30,6 +30,7 @@ if [[ -v KDE_GCC_MINIMAL ]]; then fi EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm +[[ ${EAPI} != 7 ]] && EXPORT_FUNCTIONS src_install if [[ -z ${_ECM_ECLASS} ]]; then _ECM_ECLASS=1 @@ -535,12 +536,26 @@ ecm_src_test() { # @FUNCTION: ecm_src_install # @DESCRIPTION: -# Wrapper for cmake_src_install. Currently doesn't do anything extra, but -# is included as part of the API just in case it's needed in the future. +# Wrapper for cmake_src_install. Drops executable bit from .desktop files +# installed inside /usr/share/applications. This is set by cmake when install() +# is called in PROGRAM form, as seen in many kde.org projects. ecm_src_install() { debug-print-function ${FUNCNAME} "$@" cmake_src_install + + # bug 621970 + if [[ ${EAPI} != 7 ]]; then + if [[ -d "${ED}"/usr/share/applications ]]; then + local f + for f in "${ED}"/usr/share/applications/*.desktop; do + if [[ -x ${f} ]]; then + einfo "Removing executable bit from ${f#${ED}}" + fperms a-x "${f#${ED}}" + fi + done + fi + fi } # @FUNCTION: ecm_pkg_preinst |
