Gentoo Archives: gentoo-dev

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

Attachments

File name MIME type
signature.asc application/pgp-signature