commit:     1da451458ddc4f927b16a8877b44cf4ca15d7a56
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 24 14:34:08 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Mar 24 14:34:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1da45145

dev-util/mingw64-runtime: use $(alt_prefix) when cross-building

It's one of the steps to be able to cross-build 'dev-util/mingw64-runtime'
("CBUILD != (CHOST = CTARGET)" case).

Noticed by Marty E. Plummer.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-util/mingw64-runtime/mingw64-runtime-5.0.3-r1.ebuild | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/dev-util/mingw64-runtime/mingw64-runtime-5.0.3-r1.ebuild 
b/dev-util/mingw64-runtime/mingw64-runtime-5.0.3-r1.ebuild
index 0dcbcfe06ee..68655a1ed3a 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-5.0.3-r1.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-5.0.3-r1.ebuild
@@ -35,7 +35,10 @@ is_crosscompile() {
        [[ ${CHOST} != ${CTARGET} ]]
 }
 just_headers() {
-       use headers-only && [[ ${CHOST} != ${CTARGET} ]]
+       is_crosscompile && use headers-only
+}
+alt_prefix() {
+       is_crosscompile && echo /usr/${CTARGET}
 }
 crt_with() {
        just_headers && echo --without-$1 || echo --with-$1
@@ -74,9 +77,9 @@ src_configure() {
        fi
 
        CHOST=${CTARGET} econf \
-               --prefix="${EPREFIX}"/usr/${CTARGET} \
-               --includedir="${EPREFIX}"/usr/${CTARGET}/usr/include \
-               --libdir="${EPREFIX}"/usr/${CTARGET}/usr/lib \
+               --prefix="${EPREFIX}"$(alt_prefix) \
+               --includedir="${EPREFIX}"$(alt_prefix)/usr/include \
+               --libdir="${EPREFIX}"$(alt_prefix)/usr/lib \
                --with-headers \
                --enable-sdk \
                $(crt_with crt) \

Reply via email to