commit:     8b302cd28d716132c741e6ac808c5dca48860ffc
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  4 20:50:25 2017 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sat Nov  4 20:51:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b302cd2

dev-util/mingw64-runtime: version bump

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-util/mingw64-runtime/Manifest                  |   1 +
 .../files/mingw64-runtime-5.0.3-build.patch        |  37 +++++++
 .../mingw64-runtime/mingw64-runtime-5.0.3.ebuild   | 112 +++++++++++++++++++++
 3 files changed, 150 insertions(+)

diff --git a/dev-util/mingw64-runtime/Manifest 
b/dev-util/mingw64-runtime/Manifest
index fb8d7ffc014..138c9c720f3 100644
--- a/dev-util/mingw64-runtime/Manifest
+++ b/dev-util/mingw64-runtime/Manifest
@@ -6,3 +6,4 @@ DIST mingw-w64-v4.0.4.tar.bz2 10812375 SHA256 
89356a0aa8cf9f8b9dc8d92bc8dd01a131
 DIST mingw-w64-v4.0.6.tar.bz2 10853871 SHA256 
0c407394b0d8635553f4fbca674cdfe446aac223e90b4010603d863e4bdd015c SHA512 
c9ec75b10fe40d80e620b569ca8f452b1f78e9e4dd45ad087a2b69297dc661d06aa30255ea310786f28c042256c35a1d3e709ff7ea8bc19e7f4ea914c120f020
 WHIRLPOOL 
69015094c14f66e1102d343b220eb17cc245f24a66c1a39ffced2f155cae84315eabb9a843bd9aa8e7874a12e34297a4f7cfff06447972a17beecf070bc70b08
 DIST mingw-w64-v5.0.1.tar.bz2 9160780 SHA256 
9bb5cd7df78817377841a63555e73596dc0af4acbb71b09bd48de7cf24aeadd2 SHA512 
73b746f227930597a97f117cf9f9aa19ddabb6090907cf6850864cf30089e5d6e1cd07e257b3b0b9ae0ac762cb24a6f5acf7336c9be48760c975ac038569dcfa
 WHIRLPOOL 
26f3e52a5fb0a0332861a919d2b913dcb3e8dceb26bb174e85830282229823366918132c5db22a5d294167ba3c54c6fd461b663ff0ab92373f46519149817e98
 DIST mingw-w64-v5.0.2.tar.bz2 9107077 SHA256 
5f46e80ff1a9102a37a3453743dae9df98262cba7c45306549ef7432cfd92cfd SHA512 
430065a822afb9901219b1f86ea221ae70ef7820ea298f51828bf1689a014115dade967a806388b7ee3ed1ea1d6c53970514ec64d0185b5024523093d9e96060
 WHIRLPOOL 
fdc7b1f647679b2761cdb306f5400fdcdbcdd64de4aeb6d3d3bd4b31aab81ad5f81c7485c377fa8100da0ebe7e0b53a83674443d61c986df27a616694bb512d6
+DIST mingw-w64-v5.0.3.tar.bz2 9160627 SHA256 
2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4 SHA512 
85bc0244cd30ef38262792d61502a012348b8220ef249352b68ddfa40663ca1cae5f81bed70caa9579469fad6ad16a95f02387c280effeda7ce8287b549f3fc9
 WHIRLPOOL 
395cef41bfd4b8adf87b00a5603971f27709a7e7aa920ad3431707ad6a09850ca7a29eed74a7c469a1a74d6080b765f80000e8d9213985ff8a96df8c7dd49d79

diff --git a/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.3-build.patch 
b/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.3-build.patch
new file mode 100644
index 00000000000..624a492338e
--- /dev/null
+++ b/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.3-build.patch
@@ -0,0 +1,37 @@
+From cb860ab6fba86f646bcd3bff6cadcc2bdd3c6964 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.bar...@gmail.com>
+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 <alon.bar...@gmail.com>
+---
+ 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
+

diff --git a/dev-util/mingw64-runtime/mingw64-runtime-5.0.3.ebuild 
b/dev-util/mingw64-runtime/mingw64-runtime-5.0.3.ebuild
new file mode 100644
index 00000000000..a21054499a0
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-5.0.3.ebuild
@@ -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"
+}

Reply via email to