summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Michael <fedora.dm0@gmail.com>2021-03-26 21:31:36 +0100
committerDavid Seifert <soap@gentoo.org>2021-03-26 21:31:36 +0100
commit77ff3a67bee9dcefd5f0fc9eb074f4e500c8a9ef (patch)
treed6888f8179f56958f31fa2d6db7c1acd097f0187 /eclass/wxwidgets.eclass
parentapp-misc/c_rehash: EAPI 7 (diff)
downloadgentoo-77ff3a67bee9dcefd5f0fc9eb074f4e500c8a9ef.tar.gz
gentoo-77ff3a67bee9dcefd5f0fc9eb074f4e500c8a9ef.tar.bz2
gentoo-77ff3a67bee9dcefd5f0fc9eb074f4e500c8a9ef.zip
wxwidgets.eclass: fix cross-compiling
The wx-config file name is prefixed with CHOST when cross-compiling wxGTK, so test for that path's existence as well. It also needs to be used from SYSROOT. Closes: https://bugs.gentoo.org/774018 Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/wxwidgets.eclass')
-rw-r--r--eclass/wxwidgets.eclass21
1 files changed, 12 insertions, 9 deletions
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
index 9b37074d3b62..f031cdf54430 100644
--- a/eclass/wxwidgets.eclass
+++ b/eclass/wxwidgets.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: wxwidgets.eclass
@@ -22,6 +22,7 @@
# wxGTK was built with.
if [[ -z ${_WXWIDGETS_ECLASS} ]]; then
+_WXWIDGETS_ECLASS=1
inherit flag-o-matic
@@ -80,7 +81,7 @@ esac
# See: http://docs.wxwidgets.org/trunk/overview_debugging.html
setup-wxwidgets() {
- local wxtoolkit wxdebug wxconf
+ local w wxtoolkit wxdebug wxconf
[[ -z ${WX_GTK_VER} ]] \
&& die "WX_GTK_VER must be set before calling $FUNCNAME."
@@ -116,17 +117,20 @@ setup-wxwidgets() {
fi
wxconf="${wxtoolkit}-unicode-${wxdebug}${WX_GTK_VER}"
+ for w in "${CHOST:-${CBUILD}}-${wxconf}" "${wxconf}"; do
+ if [[ -f ${ESYSROOT:-${EPREFIX}}/usr/$(get_libdir)/wx/config/${w} ]]; then
+ wxconf=${w}
+ break
+ fi
+ done || die "Failed to find configuration ${wxconf}"
- [[ ! -f ${EPREFIX}/usr/$(get_libdir)/wx/config/${wxconf} ]] \
- && die "Failed to find configuration ${wxconf}"
-
- export WX_CONFIG="${EPREFIX}/usr/$(get_libdir)/wx/config/${wxconf}"
+ export WX_CONFIG="${ESYSROOT:-${EPREFIX}}/usr/$(get_libdir)/wx/config/${wxconf}"
export WX_ECLASS_CONFIG="${WX_CONFIG}"
- echo
+ einfo
einfo "Requested wxWidgets: ${WX_GTK_VER}"
einfo "Using wxWidgets: ${wxconf}"
- echo
+ einfo
}
case ${EAPI:-0} in
@@ -138,5 +142,4 @@ case ${EAPI:-0} in
;;
esac
-_WXWIDGETS_ECLASS=1
fi