From 1da451458ddc4f927b16a8877b44cf4ca15d7a56 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 24 Mar 2018 14:34:08 +0000 Subject: [PATCH] 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 --- .../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 0dcbcfe06eea..68655a1ed3a5 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) \ -- 2.26.2