forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-util/mingw64-runtime: version bump
Package-Manager: Portage-2.3.8, Repoman-2.3.3
- Loading branch information
Showing
3 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
dev-util/mingw64-runtime/files/mingw64-runtime-5.0.3-build.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From cb860ab6fba86f646bcd3bff6cadcc2bdd3c6964 Mon Sep 17 00:00:00 2001 | ||
From: Alon Bar-Lev <[email protected]> | ||
Date: Sat, 4 Nov 2017 21:58:10 +0200 | ||
Subject: [PATCH] build: enable pseh only in x86 | ||
|
||
pseh supports only x86, no point in enabling it when libraries are | ||
enabled. This enables downstream to enable libraries without failing. | ||
|
||
Signed-off-by: Alon Bar-Lev <[email protected]> | ||
--- | ||
configure.ac | 8 ++++++-- | ||
1 file changed, 6 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index 468d1b19..cfb07362 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -58,10 +58,14 @@ AC_ARG_WITH([libraries], | ||
[with_libraries=no]) | ||
AS_CASE([$with_libraries], | ||
[yes|all],[ | ||
- with_libraries="libmangle,pseh,winpthreads" | ||
+ with_libraries="libmangle,winpthreads" | ||
with_libraries_winpthreads=yes | ||
with_libraries_mangle=yes | ||
- with_libraries_pseh=yes], | ||
+ AS_CASE([$host_cpu], | ||
+ [i?86], [ | ||
+ with_libraries="$with_libraries,pseh" | ||
+ with_libraries_pseh=yes | ||
+ ])], | ||
[libmangle],[ | ||
with_libraries="libmangle" | ||
with_libraries_winpthreads=no | ||
-- | ||
2.13.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
export CBUILD=${CBUILD:-${CHOST}} | ||
export CTARGET=${CTARGET:-${CHOST}} | ||
if [[ ${CTARGET} == ${CHOST} ]] ; then | ||
if [[ ${CATEGORY} == cross-* ]] ; then | ||
export CTARGET=${CATEGORY#cross-} | ||
fi | ||
fi | ||
|
||
WANT_AUTOMAKE="1.15" | ||
|
||
inherit autotools flag-o-matic eutils | ||
|
||
DESCRIPTION="Free Win64 runtime and import library definitions" | ||
HOMEPAGE="http://mingw-w64.sourceforge.net/" | ||
SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2" | ||
|
||
LICENSE="BSD" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="crosscompile_opts_headers-only idl libraries tools" | ||
RESTRICT="strip" | ||
|
||
S="${WORKDIR}/mingw-w64-v${PV}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${P}-build.patch" | ||
) | ||
|
||
is_crosscompile() { | ||
[[ ${CHOST} != ${CTARGET} ]] | ||
} | ||
just_headers() { | ||
use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] | ||
} | ||
crt_with() { | ||
just_headers && echo --without-$1 || echo --with-$1 | ||
} | ||
crt_use_enable() { | ||
just_headers && echo --without-$2 || use_enable "$@" | ||
} | ||
crt_use_with() { | ||
just_headers && echo --without-$2 || use_with "$@" | ||
} | ||
|
||
pkg_setup() { | ||
if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then | ||
die "Invalid configuration" | ||
fi | ||
} | ||
|
||
src_prepare() { | ||
default | ||
eautoreconf | ||
} | ||
|
||
src_configure() { | ||
CHOST=${CTARGET} strip-unsupported-flags | ||
|
||
if ! just_headers; then | ||
mkdir "${WORKDIR}/headers" | ||
pushd "${WORKDIR}/headers" > /dev/null | ||
CHOST=${CTARGET} "${S}/configure" \ | ||
--prefix="${T}/tmproot" \ | ||
--with-headers \ | ||
--without-crt \ | ||
|| die | ||
popd > /dev/null | ||
append-cppflags "-I${T}/tmproot/include" | ||
fi | ||
|
||
CHOST=${CTARGET} econf \ | ||
--prefix=/usr/${CTARGET} \ | ||
--includedir=/usr/${CTARGET}/usr/include \ | ||
--libdir=/usr/${CTARGET}/usr/lib \ | ||
--with-headers \ | ||
--enable-sdk \ | ||
$(crt_with crt) \ | ||
$(crt_use_enable idl idl) \ | ||
$(crt_use_with libraries libraries) \ | ||
$(crt_use_with tools tools) \ | ||
$( | ||
$(tc-getCPP ${CTARGET}) ${CPPFLAGS} -dM - < /dev/null | grep -q __MINGW64__ \ | ||
&& echo --disable-lib32 --enable-lib64 \ | ||
|| echo --enable-lib32 --disable-lib64 | ||
) | ||
} | ||
|
||
src_compile() { | ||
if ! just_headers; then | ||
emake -C "${WORKDIR}/headers" install | ||
fi | ||
default | ||
} | ||
|
||
src_install() { | ||
default | ||
|
||
if is_crosscompile ; then | ||
# gcc is configured to look at specific hard-coded paths for mingw #419601 | ||
dosym usr /usr/${CTARGET}/mingw | ||
dosym usr /usr/${CTARGET}/${CTARGET} | ||
dosym usr/include /usr/${CTARGET}/sys-include | ||
fi | ||
|
||
env -uRESTRICT CHOST=${CTARGET} prepallstrip | ||
rm -rf "${ED}/usr/share" | ||
} |