dev-util/statifier: Don't compile 32-bit on amd64 no-multilib profile
authorConrad Kostecki <conrad@kostecki.com>
Sat, 24 Mar 2018 15:52:53 +0000 (16:52 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 25 Mar 2018 17:27:20 +0000 (19:27 +0200)
Closes: https://bugs.gentoo.org/651260
Closes: https://github.com/gentoo/gentoo/pull/7571

dev-util/statifier/statifier-1.7.4.ebuild

index 2e2867cd1b967ffe168444cb88580500b5910d9c..a90f4825f90ad6458b0d96d4c807219ff325bdf2 100644 (file)
@@ -3,6 +3,10 @@
 
 EAPI="6"
 
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+inherit multilib-build
+
 DESCRIPTION="Statifier is a tool for creating portable, self-containing Linux executables"
 HOMEPAGE="http://statifier.sourceforge.net"
 SRC_URI="https://sourceforge.net/projects/${PN}/files/${PN}/${PV}/${P}.tar.gz"
@@ -20,6 +24,11 @@ src_prepare() {
        # Respect users CFLAGS and LDFLAGS
        sed -i -e 's/-Wall -O2/$(CFLAGS) $(LDFLAGS)/g' src/Makefile || die
 
+       # Don't compile 32-bit on amd64 no-multilib profile
+       if ! use abi_x86_32; then
+               sed -i -e 's/ELF32 .*/ELF32 := no/g' configs/config.x86_64 || die
+       fi
+
        # Apply user patches
        eapply_user
 }