Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/
Date: Wed, 30 Sep 2020 18:28:31
Message-Id: 1601490504.9b8cbb1c9606a68d94404edc1b3686be06de3af3.slyfox@gentoo
1 commit: 9b8cbb1c9606a68d94404edc1b3686be06de3af3
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 30 18:27:34 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 30 18:28:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b8cbb1c
7
8 dev-util/mingw64-runtime: bump up to 8.0.0
9
10 Reported-by: Mark Harmstone
11 Package-Manager: Portage-3.0.8, Repoman-3.0.1
12 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
13
14 dev-util/mingw64-runtime/Manifest | 1 +
15 .../mingw64-runtime/mingw64-runtime-8.0.0.ebuild | 118 +++++++++++++++++++++
16 2 files changed, 119 insertions(+)
17
18 diff --git a/dev-util/mingw64-runtime/Manifest b/dev-util/mingw64-runtime/Manifest
19 index 2769e87b5d4..59c54d2ec96 100644
20 --- a/dev-util/mingw64-runtime/Manifest
21 +++ b/dev-util/mingw64-runtime/Manifest
22 @@ -1,2 +1,3 @@
23 DIST mingw-w64-v6.0.0.tar.bz2 9045653 BLAKE2B 8a54dca2d06c92ab968a93240996d07ab3b1ed4652555a48b7581c477856d5784ed192c578d78186e171e400bd18b4de3c6cafbdd96109367ad13c37792015c1 SHA512 e3d3663e0cb33a16f90b1a33e81b5a30d26f7e34270b14e865c10068f2a2d32da9ef8cbbb0c3fed9c71429ae11c82152ff3b87d81558929b2a4993dc99cfc11e
24 DIST mingw-w64-v7.0.0.tar.bz2 9071231 BLAKE2B da00794ec456ede5913a565248c79255407c058469cb7338cf81b8d03c1e39f4189016b01734b786c0ad8f18166a24fdb95ca72edc954f31151e5d3aa2b2a899 SHA512 30e5b2824a24eeb99ab519e3fc134cc9a7f04ee8b853bc8d66a13d1ab74144bf78b93e162bfe6de2a5e61f63c0e620a933b260b02d019cd68cc4b78bd36c67fd
25 +DIST mingw-w64-v8.0.0.tar.bz2 9370799 BLAKE2B ec65191722f6f2ddbb93488ea4c4c21e22fb5ef777ef293d65d13de1057d96c9105a4a4936999d4babbd8fdfc52ed14675f1c5fbc630524df28805e0f66b1a2b SHA512 cefcc86ac3e6337c88ed224ab4692abbd5eb543ce78fb6c5462198a85f36c9274a0a1df0a0bebd182137fd527c15831f9237c782711a85f32e77d9104b28359e
26
27 diff --git a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0.ebuild
28 new file mode 100644
29 index 00000000000..9cececad22c
30 --- /dev/null
31 +++ b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0.ebuild
32 @@ -0,0 +1,118 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +export CBUILD=${CBUILD:-${CHOST}}
39 +export CTARGET=${CTARGET:-${CHOST}}
40 +if [[ ${CTARGET} == ${CHOST} ]] ; then
41 + if [[ ${CATEGORY} == cross-* ]] ; then
42 + export CTARGET=${CATEGORY#cross-}
43 + fi
44 +fi
45 +
46 +inherit autotools flag-o-matic eutils toolchain-funcs
47 +
48 +DESCRIPTION="Free Win64 runtime and import library definitions"
49 +HOMEPAGE="http://mingw-w64.sourceforge.net/"
50 +SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
51 +
52 +LICENSE="BSD"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~x86"
55 +# USE=libraries needs working stage2 compiler: bug #665512
56 +IUSE="headers-only idl libraries tools"
57 +RESTRICT="strip"
58 +
59 +S="${WORKDIR}/mingw-w64-v${PV}"
60 +
61 +PATCHES=(
62 + "${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch
63 +)
64 +
65 +is_crosscompile() {
66 + [[ ${CHOST} != ${CTARGET} ]]
67 +}
68 +just_headers() {
69 + use headers-only
70 +}
71 +alt_prefix() {
72 + is_crosscompile && echo /usr/${CTARGET}
73 +}
74 +crt_with() {
75 + just_headers && echo --without-$1 || echo --with-$1
76 +}
77 +crt_use_enable() {
78 + just_headers && echo --without-$2 || use_enable "$@"
79 +}
80 +crt_use_with() {
81 + just_headers && echo --without-$2 || use_with "$@"
82 +}
83 +
84 +pkg_setup() {
85 + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
86 + die "Invalid configuration"
87 + fi
88 +}
89 +
90 +src_configure() {
91 + CHOST=${CTARGET} strip-unsupported-flags
92 + # Normally mingw-64 does not use dynamic linker.
93 + # But at configure time it uses $LDFLAGS.
94 + # When default -Wl,--hash-style=gnu is passed
95 + # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected
96 + # for target ld and binaries crash at shutdown.
97 + filter-ldflags '-Wl,--hash-style=*'
98 +
99 + if ! just_headers; then
100 + mkdir "${WORKDIR}/headers"
101 + pushd "${WORKDIR}/headers" > /dev/null
102 + CHOST=${CTARGET} "${S}/configure" \
103 + --prefix="${T}/tmproot" \
104 + --with-headers \
105 + --without-crt \
106 + || die
107 + popd > /dev/null
108 + append-cppflags "-I${T}/tmproot/include"
109 + fi
110 +
111 + # By default configure tries to set --sysroot=${prefix}. We disable
112 + # this behaviour with --with-sysroot=no to use gcc's sysroot default.
113 + # That way we can cross-build mingw64-runtime with cross-emerge.
114 + local prefix="${EPREFIX}"$(alt_prefix)/usr
115 + CHOST=${CTARGET} econf \
116 + --with-sysroot=no \
117 + --prefix="${prefix}" \
118 + --libdir="${prefix}"/lib \
119 + --with-headers \
120 + --enable-sdk \
121 + $(crt_with crt) \
122 + $(crt_use_enable idl idl) \
123 + $(crt_use_with libraries libraries) \
124 + $(crt_use_with tools tools) \
125 + $(
126 + $(tc-getCPP ${CTARGET}) ${CPPFLAGS} -dM - < /dev/null | grep -q __MINGW64__ \
127 + && echo --disable-lib32 --enable-lib64 \
128 + || echo --enable-lib32 --disable-lib64
129 + )
130 +}
131 +
132 +src_compile() {
133 + if ! just_headers; then
134 + emake -C "${WORKDIR}/headers" install
135 + fi
136 + default
137 +}
138 +
139 +src_install() {
140 + default
141 +
142 + if is_crosscompile ; then
143 + # gcc is configured to look at specific hard-coded paths for mingw #419601
144 + dosym usr /usr/${CTARGET}/mingw
145 + dosym usr /usr/${CTARGET}/${CTARGET}
146 + dosym usr/include /usr/${CTARGET}/sys-include
147 + fi
148 +
149 + rm -rf "${ED}/usr/share"
150 +}