public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/
Date: Sun, 17 Apr 2022 02:33:11 +0000 (UTC)	[thread overview]
Message-ID: <1650161793.1f92c65eca140afc71a52e6b4036cb41b76710a0.ionen@gentoo> (raw)

commit:     1f92c65eca140afc71a52e6b4036cb41b76710a0
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 03:03:18 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 02:16:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f92c65e

dev-util/mingw64-runtime: add 10.0.0

This version fixes building with vanilla binutils-2.38 wrt
bug #838157, and the (now keyworded) >=binutils-2.38-r2 backport
also fixed it for all versions.

Includes some ebuild cleanups/changes:
- EAPI7->8
- drop unused autotools inherit
- update HOMEPAGE to https non-sourceforge link
- update LICENSE, main license is ZPL + others, and
  tools are GPL-3+ (could probably still use revision)
- remove obsolete rdtsc patch (was bug #786549), been fixed since
  9.0.0 but the fix is different and was letting our patch apply
- namespace is_crosscompile() to avoid confusing pkgcheck,
  note that this is toolchain.eclass' version which is
  different than tc-is-cross-compiler
- inline just_headers/alt_prefix/crt_with(), left crt's
  use_with and use_enable alone given it's less jarring
  and may have additional uses in the future
- move src_configure-only functions inside src_configure
- use econf with ECONF_SOURCE over direct ${S}/configure
- add missing || die for rm / mkdir / push+popd / cpp+grep
 (for cpp, use a case statement for clarity and no tmp variables)
- drop rm's -f, haven't found a situation where it'd fail
- misc style changes like using arrays for econf

Not touching CHOST/CATEGORY/symlinks and friends given haven't
fully reviewed implications for this package + crossdev.

Closes: https://bugs.gentoo.org/838157
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/mingw64-runtime/Manifest                  |   1 +
 .../mingw64-runtime/mingw64-runtime-10.0.0.ebuild  | 120 +++++++++++++++++++++
 2 files changed, 121 insertions(+)

diff --git a/dev-util/mingw64-runtime/Manifest b/dev-util/mingw64-runtime/Manifest
index 28cfb0b7ae47..46f60d52481b 100644
--- a/dev-util/mingw64-runtime/Manifest
+++ b/dev-util/mingw64-runtime/Manifest
@@ -1,3 +1,4 @@
+DIST mingw-w64-v10.0.0.tar.bz2 9620291 BLAKE2B 451372403289c492ca939d65bb4d9f6e9fa6bdd6b32d79d6438d858e106e8cc291712ada1f3f7b951a4c6908e7d0385d485ca76920af39bcf86effa48408e330 SHA512 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516
 DIST mingw-w64-v7.0.0.tar.bz2 9071231 BLAKE2B da00794ec456ede5913a565248c79255407c058469cb7338cf81b8d03c1e39f4189016b01734b786c0ad8f18166a24fdb95ca72edc954f31151e5d3aa2b2a899 SHA512 30e5b2824a24eeb99ab519e3fc134cc9a7f04ee8b853bc8d66a13d1ab74144bf78b93e162bfe6de2a5e61f63c0e620a933b260b02d019cd68cc4b78bd36c67fd
 DIST mingw-w64-v8.0.0.tar.bz2 9370799 BLAKE2B ec65191722f6f2ddbb93488ea4c4c21e22fb5ef777ef293d65d13de1057d96c9105a4a4936999d4babbd8fdfc52ed14675f1c5fbc630524df28805e0f66b1a2b SHA512 cefcc86ac3e6337c88ed224ab4692abbd5eb543ce78fb6c5462198a85f36c9274a0a1df0a0bebd182137fd527c15831f9237c782711a85f32e77d9104b28359e
 DIST mingw-w64-v9.0.0.tar.bz2 9537758 BLAKE2B 298b97f50c7632972aee2c75e90de0776f64c1dd5aaeb52d4e4be10a8e0365efee82c93179990cc090cc7b9f83525a7abf51a5d069b7a3e39abb37fdb733a70c SHA512 6691331a2ab521d22c1d32bebe0ed049bd62a7a7722cff38e7792b4e42c6b8df4356084afff6c916b487b3ebddc4372b398ab7cd0c7f4ff6991a70fe64177386

diff --git a/dev-util/mingw64-runtime/mingw64-runtime-10.0.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0.ebuild
new file mode 100644
index 000000000000..cf08ceab0f13
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-10.0.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]]; then
+	export CTARGET=${CATEGORY#cross-}
+fi
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="https://www.mingw-w64.org/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# USE=libraries needs working stage2 compiler: bug #665512
+IUSE="headers-only idl libraries tools"
+RESTRICT="strip"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch
+)
+
+mingw-is_cross() {
+	[[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+	if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]]; then
+		die "Invalid configuration"
+	fi
+}
+
+src_configure() {
+	CHOST=${CTARGET} strip-unsupported-flags
+
+	# Normally mingw-64 does not use dynamic linker.
+	# But at configure time it uses $LDFLAGS.
+	# When default -Wl,--hash-style=gnu is passed
+	# __CTORS_LIST__ / __DTORS_LIST__ is mis-detected
+	# for target ld and binaries crash at shutdown.
+	filter-ldflags '-Wl,--hash-style=*'
+
+	if use !headers-only; then
+		mkdir "${WORKDIR}"/headers || die
+		pushd "${WORKDIR}"/headers >/dev/null || die
+
+		local econfargs=(
+			--prefix="${T}"/tmproot
+			--with-headers
+			--without-crt
+		)
+
+		CHOST=${CTARGET} ECONF_SOURCE=${S} econf "${econfargs[@]}"
+
+		popd >/dev/null || die
+
+		append-cppflags "-I${T}/tmproot/include"
+	fi
+
+	crt-use_enable() {
+		use headers-only && echo --without-${2:-${1}} || use_enable "${@}"
+	}
+	crt-use_with() {
+		use headers-only && echo --without-${2:-${1}} || use_with "${@}"
+	}
+
+	local prefix="${EPREFIX}"$(mingw-is_cross && echo /usr/${CTARGET})/usr
+	local econfargs=(
+		--prefix="${prefix}"
+		--libdir="${prefix}"/lib
+		--enable-sdk
+		--with-headers
+
+		# By default configure tries to set --sysroot=${prefix}. We disable
+		# this behaviour with --with-sysroot=no to use gcc's sysroot default.
+		# That way we can cross-build mingw64-runtime with cross-emerge.
+		--with-sysroot=no
+
+		$(use_with !headers-only crt)
+		$(crt-use_enable idl)
+		$(crt-use_with libraries)
+		$(crt-use_with tools)
+		$(
+			$(tc-getCPP ${CTARGET}) ${CPPFLAGS} -dM - </dev/null | grep -q __MINGW64__
+			case ${PIPESTATUS[*]} in
+				'0 0') echo --disable-lib32 --enable-lib64;;
+				'0 1') echo --enable-lib32 --disable-lib64;;
+				*) die "failed check for __MINGW64__";;
+			esac
+		)
+	)
+
+	CHOST=${CTARGET} econf "${econfargs[@]}"
+}
+
+src_compile() {
+	use headers-only || emake -C "${WORKDIR}"/headers install
+
+	default
+}
+
+src_install() {
+	default
+
+	if mingw-is_cross; 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
+
+	rm -r "${ED}"/usr/share || die
+}


             reply	other threads:[~2022-04-17  2:33 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-17  2:33 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-09  8:07 [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/ Ionen Wolkens
2024-09-03 12:31 Ionen Wolkens
2024-05-30  6:39 Ionen Wolkens
2024-05-22  3:32 Ionen Wolkens
2024-05-21  3:01 Ionen Wolkens
2024-05-21  3:01 Ionen Wolkens
2024-05-07 14:28 Ionen Wolkens
2024-03-24 18:39 Ionen Wolkens
2024-01-15 17:33 Ionen Wolkens
2023-12-22 17:38 Ionen Wolkens
2023-06-26 10:12 Ionen Wolkens
2023-04-29  9:43 Ionen Wolkens
2022-10-31  0:54 Ionen Wolkens
2022-10-23  7:20 Ionen Wolkens
2022-09-14 23:24 Ionen Wolkens
2022-07-16 17:03 Ionen Wolkens
2022-06-29 17:48 Ionen Wolkens
2022-06-29 17:22 Ionen Wolkens
2022-06-21  2:01 Ionen Wolkens
2022-06-21  2:01 Ionen Wolkens
2022-05-21 18:38 Ionen Wolkens
2022-05-21 18:38 Ionen Wolkens
2022-05-14  2:23 Ionen Wolkens
2022-05-13  2:48 Ionen Wolkens
2022-05-13  2:48 Ionen Wolkens
2022-05-13  2:48 Ionen Wolkens
2022-04-24 21:09 Ionen Wolkens
2022-04-22  8:02 Ionen Wolkens
2022-04-17  2:33 Ionen Wolkens
2022-04-17  2:33 Ionen Wolkens
2022-04-17  2:33 Ionen Wolkens
2021-07-05 22:50 Sergei Trofimovich
2021-04-16 10:25 David Seifert
2020-09-30 18:28 Sergei Trofimovich
2020-09-30 18:28 Sergei Trofimovich
2020-01-12 16:43 Sergei Trofimovich
2020-01-12 16:43 Sergei Trofimovich
2019-09-16 21:18 Sergei Trofimovich
2019-08-13  7:10 Sergei Trofimovich
2018-11-25 15:27 Sergei Trofimovich
2018-10-06 22:59 Sergei Trofimovich
2018-10-06 17:35 Sergei Trofimovich
2018-10-05 22:43 Sergei Trofimovich
2018-09-17 22:05 Alon Bar-Lev
2018-06-15 20:56 Alon Bar-Lev
2018-03-24 21:16 Sergei Trofimovich
2018-03-24 14:34 Sergei Trofimovich
2018-01-07 19:39 Sergei Trofimovich
2017-12-29 11:45 Sergei Trofimovich
2017-05-22  9:46 Alon Bar-Lev
2017-03-29 20:04 Alon Bar-Lev
2017-01-06 18:39 Alon Bar-Lev
2016-11-11 23:39 Alon Bar-Lev
2016-08-07 19:40 Alon Bar-Lev
2016-06-07 19:10 Alon Bar-Lev
2015-08-14  7:50 Alon Bar-Lev
2015-08-14  7:50 Alon Bar-Lev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1650161793.1f92c65eca140afc71a52e6b4036cb41b76710a0.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox