commit: 2f463b0a7e9a7a647cb4f0976045ba899bcb92e8
parent 86749249fd9b8923651a4324f8b5efeb6c02e201
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 20 Apr 2022 08:46:33 +0200
app-emulation/tinyemu: new pkg
Diffstat:
2 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/app-emulation/tinyemu/Manifest b/app-emulation/tinyemu/Manifest
@@ -0,0 +1 @@
+DIST tinyemu-2019-12-21.tar.gz 250826 BLAKE2B 112398ba63d0d40d1bc05f05aacd1ba3a13da6a7932acef5ba01a7201382d2186868d619502eda07dc00d708872c2bc50d76824879e382ec746133f5ae5f5e7c SHA512 21656acae4854b5893e8413390191b24e0686a6071ffbb90feb6aeb8d1a0ed1f471ff35813fabc5414318672658aacbb00108f647dee9c8d95242a6b73c4ba60
diff --git a/app-emulation/tinyemu/tinyemu-0.2019.12.21.ebuild b/app-emulation/tinyemu/tinyemu-0.2019.12.21.ebuild
@@ -0,0 +1,45 @@
+# Copyright 2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="${PN}-$(ver_rs 1- - "$(ver_cut 2-)")"
+
+DESCRIPTION="small and simple system emulator for the RISC-V and x86 architectures"
+HOMEPAGE="https://bellard.org/tinyemu/"
+SRC_URI="https://bellard.org/tinyemu/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+network +sdl"
+
+DEPEND="
+ network? (
+ net-misc/curl
+ dev-libs/openssl:=
+ )
+ sdl? ( media-libs/libsdl )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's;^bindir=.*;bindir=/usr/bin/;' \
+ -e 's;^CC=.*;CC ?= cc;' \
+ -e 's;^STRIP=.*;STRIP=true;' \
+ -e 's;^CFLAGS=-O2 -Wall -g;CFLAGS+=;' \
+ Makefile || die
+}
+
+src_configure() {
+ if use !network; then sed -i '/^CONFIG_FS_NET/s;^;#;' Makefile || die; fi
+ if use !sdl; then sed -i '/^CONFIG_SDL/s;^;#;' Makefile || die; fi
+}
+
+src_install() {
+ mkdir -p "${ED}/usr/bin/" || die
+ default
+}