Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 03 Sep 2016 11:06:13
Message-Id: 1472900753.9f670e5d23d09556e3b52916c896e2ea32508981.mgorny@gentoo
1 commit: 9f670e5d23d09556e3b52916c896e2ea32508981
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 21 15:17:14 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 3 11:05:53 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f670e5d
7
8 multilib.eclass: get_exeext for mingw/cygwin exe suffix, #588330
9
10 Add a get_exeext function that can be used to obtain executable program
11 suffix specific to the platform, in line with get_libname and
12 get_modname. It is necessary to correctly reference built programs on
13 non-standard platforms where executables use some suffix (like .exe).
14
15 Original author: Gerhard Bräunlich
16
17 eclass/multilib.eclass | 14 ++++++++++++++
18 1 file changed, 14 insertions(+)
19
20 diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
21 index 8c95387..a80511c 100644
22 --- a/eclass/multilib.eclass
23 +++ b/eclass/multilib.eclass
24 @@ -225,6 +225,20 @@ number_abis() {
25 echo $#
26 }
27
28 +# @FUNCTION: get_exeext
29 +# @DESCRIPTION:
30 +# Returns standard executable program suffix (null, .exe, etc.)
31 +# for the current platform identified by CHOST.
32 +#
33 +# Example:
34 +# get_exeext
35 +# Returns: null string (almost everywhere) || .exe (mingw*) || ...
36 +get_exeext() {
37 + case ${CHOST} in
38 + *-cygwin*|mingw*|*-mingw*) echo ".exe";;
39 + esac
40 +}
41 +
42 # @FUNCTION: get_libname
43 # @USAGE: [version]
44 # @DESCRIPTION: