summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-08-06 00:30:53 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-09-02 18:46:25 +0200
commit1c3597edfe479b5e81a09380f11b6c23bbcaf723 (patch)
tree3c85aa98ffe3be384c11a0d09c341bcbf7e0058c /eclass/ecm.eclass
parentecm.eclass: Support EAPI-8, move EXPORT_FUNCTIONS below guard (diff)
downloadgentoo-1c3597edfe479b5e81a09380f11b6c23bbcaf723.tar.gz
gentoo-1c3597edfe479b5e81a09380f11b6c23bbcaf723.tar.bz2
gentoo-1c3597edfe479b5e81a09380f11b6c23bbcaf723.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.eclass22
1 files changed, 20 insertions, 2 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 2fd96b9f0aeb..10807ced53e7 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -529,12 +529,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
@@ -586,3 +600,7 @@ if [[ -v ${KDE_GCC_MINIMAL} ]]; then
fi
EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm
+
+if [[ ${EAPI} != 7 ]]; then
+ EXPORT_FUNCTIONS src_install
+fi