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