public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/atari-fdisk/
Date: Sat,  4 Sep 2021 22:36:15 +0000 (UTC)	[thread overview]
Message-ID: <1630794956.c956c19df110bd711f05cc7b4383a236a3a2a29b.chewi@gentoo> (raw)

commit:     c956c19df110bd711f05cc7b4383a236a3a2a29b
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  4 22:27:46 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Sep  4 22:35:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c956c19d

sys-fs/atari-fdisk: Allow package to be built on amd64 as 32-bit

Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4-r1.ebuild | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4-r1.ebuild b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4-r1.ebuild
index f78d8d43789..e8df0256733 100644
--- a/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4-r1.ebuild
+++ b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit toolchain-funcs
+inherit multilib toolchain-funcs
 
 MY_PV=$(ver_cut 1-3)
 DEB_PV=$(ver_cut 4-5)
@@ -14,10 +14,9 @@ S="${WORKDIR}"/${PN}-${MY_PV}
 
 LICENSE="GPL-2"
 SLOT="0"
-# Note: The code assumes sizeof(long) == 4 everywhere.  If you try to
-# use this on 64bit systems (where sizeof(long) == 8), then misbehavior
-# and memory corruption will ensue.
-KEYWORDS="-* ~m68k ~x86"
+# Note: The code assumes sizeof(long) == 4 everywhere. 64-bit platforms need to
+# build a 32-bit binary below to avoid memory corruption issues.
+KEYWORDS="~amd64 ~m68k ~x86"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.7.1.5.4-prompt-logic.patch
@@ -25,11 +24,20 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-0.7.1.5.4-globals.patch
 )
 
+src_configure() {
+	if use amd64; then
+		multilib_toolchain_setup x86
+	else
+		tc-export CC LD
+	fi
+}
+
 src_compile() {
 	emake \
+		CC="${CC}" \
+		LD="${LD}" \
 		CFLAGS="${CFLAGS}" \
 		LDFLAGS="${LDFLAGS}" \
-		CC="$(tc-getCC)" \
 		COMPILE_ARCH=m68k
 }
 


             reply	other threads:[~2021-09-04 22:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04 22:36 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-21 22:26 [gentoo-commits] repo/gentoo:master commit in: sys-fs/atari-fdisk/ Sam James
2021-09-04 22:36 James Le Cuirot
2017-08-22 21:41 Michał Górny
2015-12-19 17:45 Mike Frysinger
2015-12-19 17:34 Mike Frysinger
2015-12-19 17:34 Mike Frysinger
2015-12-19 17:34 Mike Frysinger
2015-12-19 17:34 Mike Frysinger

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=1630794956.c956c19df110bd711f05cc7b4383a236a3a2a29b.chewi@gentoo \
    --to=chewi@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