diff options
author | James Le Cuirot <chewi@gentoo.org> | 2021-09-04 23:27:46 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2021-09-04 23:35:56 +0100 |
commit | c956c19df110bd711f05cc7b4383a236a3a2a29b (patch) | |
tree | 7036bfe6ec471a7ba202071bca136a8bdfcd2bee /sys-fs/atari-fdisk | |
parent | profiles: Mask sys-fs/atari-fdisk on no-multilib amd64 (diff) | |
download | gentoo-c956c19df110bd711f05cc7b4383a236a3a2a29b.tar.gz gentoo-c956c19df110bd711f05cc7b4383a236a3a2a29b.tar.bz2 gentoo-c956c19df110bd711f05cc7b4383a236a3a2a29b.zip |
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@gentoo.org>
Diffstat (limited to 'sys-fs/atari-fdisk')
-rw-r--r-- | sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4-r1.ebuild | 20 |
1 files 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 f78d8d437895..e8df0256733d 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 } |