Gentoo Archives: gentoo-commits

From: Alon Bar-Lev <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/, dev-util/mingw64-runtime/files/
Date: Sat, 04 Nov 2017 20:51:50
Message-Id: 1509828669.8b302cd28d716132c741e6ac808c5dca48860ffc.alonbl@gentoo
1 commit: 8b302cd28d716132c741e6ac808c5dca48860ffc
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 4 20:50:25 2017 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 4 20:51:09 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b302cd2
7
8 dev-util/mingw64-runtime: version bump
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.3
11
12 dev-util/mingw64-runtime/Manifest | 1 +
13 .../files/mingw64-runtime-5.0.3-build.patch | 37 +++++++
14 .../mingw64-runtime/mingw64-runtime-5.0.3.ebuild | 112 +++++++++++++++++++++
15 3 files changed, 150 insertions(+)
16
17 diff --git a/dev-util/mingw64-runtime/Manifest b/dev-util/mingw64-runtime/Manifest
18 index fb8d7ffc014..138c9c720f3 100644
19 --- a/dev-util/mingw64-runtime/Manifest
20 +++ b/dev-util/mingw64-runtime/Manifest
21 @@ -6,3 +6,4 @@ DIST mingw-w64-v4.0.4.tar.bz2 10812375 SHA256 89356a0aa8cf9f8b9dc8d92bc8dd01a131
22 DIST mingw-w64-v4.0.6.tar.bz2 10853871 SHA256 0c407394b0d8635553f4fbca674cdfe446aac223e90b4010603d863e4bdd015c SHA512 c9ec75b10fe40d80e620b569ca8f452b1f78e9e4dd45ad087a2b69297dc661d06aa30255ea310786f28c042256c35a1d3e709ff7ea8bc19e7f4ea914c120f020 WHIRLPOOL 69015094c14f66e1102d343b220eb17cc245f24a66c1a39ffced2f155cae84315eabb9a843bd9aa8e7874a12e34297a4f7cfff06447972a17beecf070bc70b08
23 DIST mingw-w64-v5.0.1.tar.bz2 9160780 SHA256 9bb5cd7df78817377841a63555e73596dc0af4acbb71b09bd48de7cf24aeadd2 SHA512 73b746f227930597a97f117cf9f9aa19ddabb6090907cf6850864cf30089e5d6e1cd07e257b3b0b9ae0ac762cb24a6f5acf7336c9be48760c975ac038569dcfa WHIRLPOOL 26f3e52a5fb0a0332861a919d2b913dcb3e8dceb26bb174e85830282229823366918132c5db22a5d294167ba3c54c6fd461b663ff0ab92373f46519149817e98
24 DIST mingw-w64-v5.0.2.tar.bz2 9107077 SHA256 5f46e80ff1a9102a37a3453743dae9df98262cba7c45306549ef7432cfd92cfd SHA512 430065a822afb9901219b1f86ea221ae70ef7820ea298f51828bf1689a014115dade967a806388b7ee3ed1ea1d6c53970514ec64d0185b5024523093d9e96060 WHIRLPOOL fdc7b1f647679b2761cdb306f5400fdcdbcdd64de4aeb6d3d3bd4b31aab81ad5f81c7485c377fa8100da0ebe7e0b53a83674443d61c986df27a616694bb512d6
25 +DIST mingw-w64-v5.0.3.tar.bz2 9160627 SHA256 2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4 SHA512 85bc0244cd30ef38262792d61502a012348b8220ef249352b68ddfa40663ca1cae5f81bed70caa9579469fad6ad16a95f02387c280effeda7ce8287b549f3fc9 WHIRLPOOL 395cef41bfd4b8adf87b00a5603971f27709a7e7aa920ad3431707ad6a09850ca7a29eed74a7c469a1a74d6080b765f80000e8d9213985ff8a96df8c7dd49d79
26
27 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
28 new file mode 100644
29 index 00000000000..624a492338e
30 --- /dev/null
31 +++ b/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.3-build.patch
32 @@ -0,0 +1,37 @@
33 +From cb860ab6fba86f646bcd3bff6cadcc2bdd3c6964 Mon Sep 17 00:00:00 2001
34 +From: Alon Bar-Lev <alon.barlev@×××××.com>
35 +Date: Sat, 4 Nov 2017 21:58:10 +0200
36 +Subject: [PATCH] build: enable pseh only in x86
37 +
38 +pseh supports only x86, no point in enabling it when libraries are
39 +enabled. This enables downstream to enable libraries without failing.
40 +
41 +Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com>
42 +---
43 + configure.ac | 8 ++++++--
44 + 1 file changed, 6 insertions(+), 2 deletions(-)
45 +
46 +diff --git a/configure.ac b/configure.ac
47 +index 468d1b19..cfb07362 100644
48 +--- a/configure.ac
49 ++++ b/configure.ac
50 +@@ -58,10 +58,14 @@ AC_ARG_WITH([libraries],
51 + [with_libraries=no])
52 + AS_CASE([$with_libraries],
53 + [yes|all],[
54 +- with_libraries="libmangle,pseh,winpthreads"
55 ++ with_libraries="libmangle,winpthreads"
56 + with_libraries_winpthreads=yes
57 + with_libraries_mangle=yes
58 +- with_libraries_pseh=yes],
59 ++ AS_CASE([$host_cpu],
60 ++ [i?86], [
61 ++ with_libraries="$with_libraries,pseh"
62 ++ with_libraries_pseh=yes
63 ++ ])],
64 + [libmangle],[
65 + with_libraries="libmangle"
66 + with_libraries_winpthreads=no
67 +--
68 +2.13.6
69 +
70
71 diff --git a/dev-util/mingw64-runtime/mingw64-runtime-5.0.3.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-5.0.3.ebuild
72 new file mode 100644
73 index 00000000000..a21054499a0
74 --- /dev/null
75 +++ b/dev-util/mingw64-runtime/mingw64-runtime-5.0.3.ebuild
76 @@ -0,0 +1,112 @@
77 +# Copyright 1999-2017 Gentoo Foundation
78 +# Distributed under the terms of the GNU General Public License v2
79 +
80 +EAPI=6
81 +
82 +export CBUILD=${CBUILD:-${CHOST}}
83 +export CTARGET=${CTARGET:-${CHOST}}
84 +if [[ ${CTARGET} == ${CHOST} ]] ; then
85 + if [[ ${CATEGORY} == cross-* ]] ; then
86 + export CTARGET=${CATEGORY#cross-}
87 + fi
88 +fi
89 +
90 +WANT_AUTOMAKE="1.15"
91 +
92 +inherit autotools flag-o-matic eutils
93 +
94 +DESCRIPTION="Free Win64 runtime and import library definitions"
95 +HOMEPAGE="http://mingw-w64.sourceforge.net/"
96 +SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
97 +
98 +LICENSE="BSD"
99 +SLOT="0"
100 +KEYWORDS="~amd64 ~x86"
101 +IUSE="crosscompile_opts_headers-only idl libraries tools"
102 +RESTRICT="strip"
103 +
104 +S="${WORKDIR}/mingw-w64-v${PV}"
105 +
106 +PATCHES=(
107 + "${FILESDIR}/${P}-build.patch"
108 +)
109 +
110 +is_crosscompile() {
111 + [[ ${CHOST} != ${CTARGET} ]]
112 +}
113 +just_headers() {
114 + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
115 +}
116 +crt_with() {
117 + just_headers && echo --without-$1 || echo --with-$1
118 +}
119 +crt_use_enable() {
120 + just_headers && echo --without-$2 || use_enable "$@"
121 +}
122 +crt_use_with() {
123 + just_headers && echo --without-$2 || use_with "$@"
124 +}
125 +
126 +pkg_setup() {
127 + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
128 + die "Invalid configuration"
129 + fi
130 +}
131 +
132 +src_prepare() {
133 + default
134 + eautoreconf
135 +}
136 +
137 +src_configure() {
138 + CHOST=${CTARGET} strip-unsupported-flags
139 +
140 + if ! just_headers; then
141 + mkdir "${WORKDIR}/headers"
142 + pushd "${WORKDIR}/headers" > /dev/null
143 + CHOST=${CTARGET} "${S}/configure" \
144 + --prefix="${T}/tmproot" \
145 + --with-headers \
146 + --without-crt \
147 + || die
148 + popd > /dev/null
149 + append-cppflags "-I${T}/tmproot/include"
150 + fi
151 +
152 + CHOST=${CTARGET} econf \
153 + --prefix=/usr/${CTARGET} \
154 + --includedir=/usr/${CTARGET}/usr/include \
155 + --libdir=/usr/${CTARGET}/usr/lib \
156 + --with-headers \
157 + --enable-sdk \
158 + $(crt_with crt) \
159 + $(crt_use_enable idl idl) \
160 + $(crt_use_with libraries libraries) \
161 + $(crt_use_with tools tools) \
162 + $(
163 + $(tc-getCPP ${CTARGET}) ${CPPFLAGS} -dM - < /dev/null | grep -q __MINGW64__ \
164 + && echo --disable-lib32 --enable-lib64 \
165 + || echo --enable-lib32 --disable-lib64
166 + )
167 +}
168 +
169 +src_compile() {
170 + if ! just_headers; then
171 + emake -C "${WORKDIR}/headers" install
172 + fi
173 + default
174 +}
175 +
176 +src_install() {
177 + default
178 +
179 + if is_crosscompile ; then
180 + # gcc is configured to look at specific hard-coded paths for mingw #419601
181 + dosym usr /usr/${CTARGET}/mingw
182 + dosym usr /usr/${CTARGET}/${CTARGET}
183 + dosym usr/include /usr/${CTARGET}/sys-include
184 + fi
185 +
186 + env -uRESTRICT CHOST=${CTARGET} prepallstrip
187 + rm -rf "${ED}/usr/share"
188 +}