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-toolchain/
Date: Tue,  7 May 2024 14:28:16 +0000 (UTC)	[thread overview]
Message-ID: <1715091784.ab40dd1735ded9340253a9e693dd75eac860fe3c.ionen@gentoo> (raw)

commit:     ab40dd1735ded9340253a9e693dd75eac860fe3c
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue May  7 11:12:48 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue May  7 14:23:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab40dd17

dev-util/mingw64-toolchain: add IUSE=bin-symlinks

Kept off-by-default given crossdev is still preferred for
full featured mingw toolchain usage, just for anyone that
wants it (also works out better with ccache).

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/mingw64-toolchain/metadata.xml            |  7 ++++++
 .../mingw64-toolchain-11.0.1.ebuild                | 28 +++++++++++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev-util/mingw64-toolchain/metadata.xml b/dev-util/mingw64-toolchain/metadata.xml
index 7a95ab69a652..ec66707e7ad0 100644
--- a/dev-util/mingw64-toolchain/metadata.xml
+++ b/dev-util/mingw64-toolchain/metadata.xml
@@ -5,6 +5,13 @@
 		<email>ionen@gentoo.org</email>
 		<name>Ionen Wolkens</name>
 	</maintainer>
+	<use>
+		<flag name="bin-symlinks">
+			Symlink executables to usr/bin to be in default
+			PATH (conflicts with crossdev mingw, and crossdev
+			is preferable for a fully featured toolchain)
+		</flag>
+	</use>
 	<upstream>
 		<remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
 		<remote-id type="cpe">cpe:/a:gnu:binutils</remote-id>

diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.1.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.1.ebuild
index d8d4a4846a8a..94e4af656ed4 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.1.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.1.ebuild
@@ -42,7 +42,7 @@ LICENSE="
 SLOT="0"
 # unkeyworded for testing
 #KEYWORDS="-* ~amd64 ~x86"
-IUSE="+abi_x86_32 custom-cflags debug"
+IUSE="+abi_x86_32 bin-symlinks custom-cflags debug"
 
 RDEPEND="
 	dev-libs/gmp:=
@@ -50,6 +50,16 @@ RDEPEND="
 	dev-libs/mpfr:=
 	sys-libs/zlib:=
 	virtual/libiconv
+	bin-symlinks? (
+		abi_x86_64? (
+			!cross-x86_64-w64-mingw32/binutils
+			!cross-x86_64-w64-mingw32/gcc
+		)
+		abi_x86_32? (
+			!cross-i686-w64-mingw32/binutils
+			!cross-i686-w64-mingw32/gcc
+		)
+	)
 "
 DEPEND="${RDEPEND}"
 
@@ -300,6 +310,14 @@ src_compile() {
 		popd >/dev/null || die
 	fi
 
+	if use bin-symlinks; then
+		mkdir -p -- "${MWT_D}${EPREFIX}"/usr/bin/ || die
+		local bin
+		for bin in "${sysroot}"/bin/*; do
+			ln -rs -- "${bin}" "${MWT_D}${EPREFIX}"/usr/bin/ || die
+		done
+	fi
+
 	# portage doesn't know the right strip executable to use for CTARGET
 	# and it can lead to .a mangling, notably with 32bit (breaks toolchain)
 	dostrip -x ${mwtdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}}
@@ -319,6 +337,9 @@ src_install() {
 }
 
 pkg_postinst() {
+	use bin-symlinks && has_version dev-util/shadowman && [[ ! ${ROOT} ]] &&
+		eselect compiler-shadow update all
+
 	if [[ ! ${REPLACING_VERSIONS} ]]; then
 		elog "Note that this package is primarily intended for Wine and related"
 		elog "packages to depend on without needing a manual crossdev setup."
@@ -337,3 +358,8 @@ pkg_postinst() {
 		ewarn "packages and optionally only one needs to be kept."
 	fi
 }
+
+pkg_postrm() {
+	use bin-symlinks && has_version dev-util/shadowman && [[ ! ${ROOT} ]] &&
+		eselect compiler-shadow clean all
+}


             reply	other threads:[~2024-05-07 14:28 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 14:28 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-03 12:31 [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/ Ionen Wolkens
2024-07-02 21:09 Jakov Smolić
2024-07-02 21:09 Jakov Smolić
2024-06-06 13:20 Ionen Wolkens
2024-06-02  3:54 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-10 10:12 Ionen Wolkens
2024-05-10  3:03 Ionen Wolkens
2024-05-07 17:49 Ionen Wolkens
2024-05-07 14:28 Ionen Wolkens
2024-03-24 18:39 Ionen Wolkens
2024-02-22 14:27 Ionen Wolkens
2024-01-16 17:52 Ionen Wolkens
2023-12-22 17:38 Ionen Wolkens
2023-08-27 17:18 Sam James
2023-08-27  1:28 Sam James
2023-08-04  3:25 Ionen Wolkens
2023-08-04  3:25 Ionen Wolkens
2023-07-30 16:52 Ionen Wolkens
2023-07-28  5:16 Ionen Wolkens
2023-07-03 20:55 Ionen Wolkens
2023-06-26 10:12 Ionen Wolkens
2023-05-29 17:49 Arthur Zamarin
2023-05-29 15:06 Sam James
2023-05-19  1:41 Ionen Wolkens
2023-05-11 17:01 Ionen Wolkens
2023-04-29  9:43 Ionen Wolkens
2023-04-26  8:37 Ionen Wolkens
2023-04-26  8:37 Ionen Wolkens
2023-02-01 21:04 Ionen Wolkens
2023-01-15  7:00 Ionen Wolkens
2022-11-12 11:33 Ionen Wolkens
2022-10-31  0:54 Ionen Wolkens
2022-10-23  7:20 Ionen Wolkens
2022-09-16 16:17 Ionen Wolkens
2022-09-16  7:54 Ionen Wolkens
2022-09-16  7:47 Ionen Wolkens
2022-09-14 23:11 Ionen Wolkens
2022-09-14 21:12 Ionen Wolkens
2022-09-14 19:39 Ionen Wolkens
2022-08-29  6:55 Ionen Wolkens
2022-08-29  6:55 Ionen Wolkens
2022-08-20 13:58 Ionen Wolkens
2022-08-20 13:45 Ionen Wolkens
2022-08-20 13:45 Ionen Wolkens
2022-07-16 17:03 Ionen Wolkens
2022-06-28  5:56 Ionen Wolkens
2022-05-28 19:26 Ionen Wolkens
2022-05-17  6:53 Jakov Smolić
2022-05-17  6:53 Jakov Smolić
2022-05-13  6:53 Ionen Wolkens

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=1715091784.ab40dd1735ded9340253a9e693dd75eac860fe3c.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