Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/windowmaker/files/, x11-wm/windowmaker/
Date: Fri, 24 Jan 2020 14:30:27
Message-Id: 1579876192.e9b13ddd0ca118db1a32742332ab21d06cdd6882.voyageur@gentoo
1 commit: e9b13ddd0ca118db1a32742332ab21d06cdd6882
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 24 14:29:52 2020 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 24 14:29:52 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b13ddd
7
8 x11-wm/windowmaker: fix cross-compilation
9
10 Thanks David Michael for patch and bug report
11
12 Closes: https://bugs.gentoo.org/706006
13 Package-Manager: Portage-2.3.85, Repoman-2.3.20
14 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
15
16 ...ker-0.95.8-configure_default_search_paths.patch | 70 ++++++++++++++++++++++
17 x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild | 4 +-
18 2 files changed, 73 insertions(+), 1 deletion(-)
19
20 diff --git a/x11-wm/windowmaker/files/windowmaker-0.95.8-configure_default_search_paths.patch b/x11-wm/windowmaker/files/windowmaker-0.95.8-configure_default_search_paths.patch
21 new file mode 100644
22 index 00000000000..fa323b775d0
23 --- /dev/null
24 +++ b/x11-wm/windowmaker/files/windowmaker-0.95.8-configure_default_search_paths.patch
25 @@ -0,0 +1,70 @@
26 +From: David Michael <fedo...@×××××.com>
27 +To: wmaker-dev@××××××××××××.com
28 +Subject: [PATCH] configure: Allow changing default search paths
29 +Date: Thu, 16 Jan 2020 14:59:33 -0500
30 +
31 +This changes the behavior of the --with-{inc,lib}s-from arguments
32 +to replace the default paths instead of adding to them. This is
33 +required when cross-compiling in a sysroot, since the default paths
34 +will include files from the host system which can have an
35 +incompatible architecture.
36 +---
37 +1. What happened: could not compile
38 +
39 +2. Detailed description of what happened:
40 +Cross-compiling in a sysroot searches for development files on the
41 +host. The build fails when building between two very different
42 +architectures.
43 +
44 +3. How to reproduce the bug, if known:
45 +Cross-compile in a sysroot (from x86_64 to ppc with Gentoo in my case).
46 +
47 +6. The error occurred during: compilation
48 +
49 +8. Error messages output:
50 +There are about two megabytes of errors about float128 not being defined
51 +for the architecture, from including the x86_64 headers in /usr/include
52 +for the ppc compiler.
53 +
54 +9. Fix, if known:
55 +This commit makes it build when passing --with-{inc,lib}s-from= and it
56 +shouldn't be a big behavior change for most cases.
57 +
58 +10. Other Notes:
59 +I didn't dig into the history of those search variables, but a better
60 +fix might be to just remove them entirely. It doesn't seem to do any
61 +good to redundantly add the default search paths, or if includedir or
62 +libdir were changed, the usual CPPFLAGS and LDFLAGS environment
63 +variables could set the search paths.
64 +
65 + configure.ac | 8 ++------
66 + 1 file changed, 2 insertions(+), 6 deletions(-)
67 +
68 +diff --git a/configure.ac b/configure.ac
69 +index a19acce5..0129f4e7 100644
70 +--- a/configure.ac
71 ++++ b/configure.ac
72 +@@ -284,18 +284,14 @@ _bindir=`eval echo $_bindir`
73 + _libdir=`eval echo $libdir`
74 + _libdir=`eval echo $_libdir`
75 +
76 +-lib_search_path='-L${libdir}'
77 +-
78 +-inc_search_path='-I${includedir}'
79 +-
80 + dnl ===============================================
81 + dnl Specify paths to look for libraries and headers
82 + dnl ===============================================
83 + AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]),
84 +- [lib_search_path="$withval $lib_search_path"])
85 ++ [lib_search_path="$withval"], [lib_search_path='-L${libdir}'])
86 +
87 + AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]),
88 +- [inc_search_path="$withval $inc_search_path"])
89 ++ [inc_search_path="$withval"], [inc_search_path='-I${includedir}'])
90 +
91 +
92 + dnl Features Configuration
93 +--
94 +2.21.1
95 +
96
97 diff --git a/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild b/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild
98 index 18e442e7939..7fd9518848a 100644
99 --- a/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild
100 +++ b/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild
101 @@ -1,4 +1,4 @@
102 -# Copyright 1999-2018 Gentoo Foundation
103 +# Copyright 1999-2020 Gentoo Authors
104 # Distributed under the terms of the GNU General Public License v2
105
106 EAPI=6
107 @@ -33,6 +33,8 @@ RDEPEND="${DEPEND}
108
109 S=${WORKDIR}/${P/windowm/WindowM}
110
111 +PATCHES=( "${FILESDIR}"/${P}-configure_default_search_paths.patch )
112 +
113 src_prepare() {
114 # Fix some paths
115 for file in WindowMaker/*menu* util/wmgenmenu.c; do