summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-03-24 14:34:08 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2018-03-24 14:34:08 +0000
commit1da451458ddc4f927b16a8877b44cf4ca15d7a56 (patch)
tree3b7892b1b4c05b76ca2b91899198a07b98a44621 /dev-util
parentsys-libs/slang: stable 2.3.2 for ia64, bug #651302 (diff)
downloadgentoo-1da451458ddc4f927b16a8877b44cf4ca15d7a56.tar.gz
gentoo-1da451458ddc4f927b16a8877b44cf4ca15d7a56.tar.bz2
gentoo-1da451458ddc4f927b16a8877b44cf4ca15d7a56.zip
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
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-5.0.3-r1.ebuild11
1 files 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) \