summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2020-01-24 15:29:52 +0100
committerBernard Cafarelli <voyageur@gentoo.org>2020-01-24 15:29:52 +0100
commite9b13ddd0ca118db1a32742332ab21d06cdd6882 (patch)
treec0d623f60a956a91d0d843e9c196e6c558fe47c4 /x11-wm/windowmaker
parentmedia-gfx/geeqie: fix build with -fno-common/gcc10, thanks slyfox (diff)
downloadgentoo-e9b13ddd0ca118db1a32742332ab21d06cdd6882.tar.gz
gentoo-e9b13ddd0ca118db1a32742332ab21d06cdd6882.tar.bz2
gentoo-e9b13ddd0ca118db1a32742332ab21d06cdd6882.zip
x11-wm/windowmaker: fix cross-compilation
Thanks David Michael for patch and bug report Closes: https://bugs.gentoo.org/706006 Package-Manager: Portage-2.3.85, Repoman-2.3.20 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'x11-wm/windowmaker')
-rw-r--r--x11-wm/windowmaker/files/windowmaker-0.95.8-configure_default_search_paths.patch70
-rw-r--r--x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild4
2 files changed, 73 insertions, 1 deletions
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
new file mode 100644
index 000000000000..fa323b775d0a
--- /dev/null
+++ b/x11-wm/windowmaker/files/windowmaker-0.95.8-configure_default_search_paths.patch
@@ -0,0 +1,70 @@
+From: David Michael <fedo...@gmail.com>
+To: wmaker-dev@googlegroups.com
+Subject: [PATCH] configure: Allow changing default search paths
+Date: Thu, 16 Jan 2020 14:59:33 -0500
+
+This changes the behavior of the --with-{inc,lib}s-from arguments
+to replace the default paths instead of adding to them. This is
+required when cross-compiling in a sysroot, since the default paths
+will include files from the host system which can have an
+incompatible architecture.
+---
+1. What happened: could not compile
+
+2. Detailed description of what happened:
+Cross-compiling in a sysroot searches for development files on the
+host. The build fails when building between two very different
+architectures.
+
+3. How to reproduce the bug, if known:
+Cross-compile in a sysroot (from x86_64 to ppc with Gentoo in my case).
+
+6. The error occurred during: compilation
+
+8. Error messages output:
+There are about two megabytes of errors about float128 not being defined
+for the architecture, from including the x86_64 headers in /usr/include
+for the ppc compiler.
+
+9. Fix, if known:
+This commit makes it build when passing --with-{inc,lib}s-from= and it
+shouldn't be a big behavior change for most cases.
+
+10. Other Notes:
+I didn't dig into the history of those search variables, but a better
+fix might be to just remove them entirely. It doesn't seem to do any
+good to redundantly add the default search paths, or if includedir or
+libdir were changed, the usual CPPFLAGS and LDFLAGS environment
+variables could set the search paths.
+
+ configure.ac | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a19acce5..0129f4e7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -284,18 +284,14 @@ _bindir=`eval echo $_bindir`
+ _libdir=`eval echo $libdir`
+ _libdir=`eval echo $_libdir`
+
+-lib_search_path='-L${libdir}'
+-
+-inc_search_path='-I${includedir}'
+-
+ dnl ===============================================
+ dnl Specify paths to look for libraries and headers
+ dnl ===============================================
+ AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]),
+- [lib_search_path="$withval $lib_search_path"])
++ [lib_search_path="$withval"], [lib_search_path='-L${libdir}'])
+
+ AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]),
+- [inc_search_path="$withval $inc_search_path"])
++ [inc_search_path="$withval"], [inc_search_path='-I${includedir}'])
+
+
+ dnl Features Configuration
+--
+2.21.1
+
diff --git a/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild b/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild
index 18e442e79398..7fd9518848a6 100644
--- a/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild
+++ b/x11-wm/windowmaker/windowmaker-0.95.8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -33,6 +33,8 @@ RDEPEND="${DEPEND}
S=${WORKDIR}/${P/windowm/WindowM}
+PATCHES=( "${FILESDIR}"/${P}-configure_default_search_paths.patch )
+
src_prepare() {
# Fix some paths
for file in WindowMaker/*menu* util/wmgenmenu.c; do