--- /dev/null
+# Copyright © 2022 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or any later version.
+# This is free software: you are free to change and redistribute it.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PN=sparc-utils
+MY_P=${MY_PN}_1.9
+
+DESCRIPTION="ELF to a.out convertor for SPARC and SPARC64 bootstraps"
+SRC_URI="http://archive.debian.org/debian-archive/debian/pool/main/s/$MY_PN/$MY_P.orig.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="!sys-apps/sparc-utils"
+
+PATCHES=(
+ "$FILESDIR/$PN-build-rules.patch"
+ "$FILESDIR/$PN-lp64-fixes.patch"
+ "$FILESDIR/$PN-no-linux-elf.patch"
+)
+
+S=$WORKDIR/${MY_P/_/-}.orig
+
+src_compile () {
+ emake -C $P CC=$(tc-getCC) CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
+}
+
+src_install () {
+ dobin $P/elftoaout
+ doman $P/elftoaout.1
+}