logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

tinyemu-0.2019.12.21-r1.ebuild (999B)


  1. # Copyright 2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. MY_P="${PN}-$(ver_rs 1- - "$(ver_cut 2-)")"
  5. DESCRIPTION="small and simple system emulator for the RISC-V and x86 architectures"
  6. HOMEPAGE="https://bellard.org/tinyemu/"
  7. SRC_URI="https://bellard.org/tinyemu/${MY_P}.tar.gz"
  8. S="${WORKDIR}/${MY_P}"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS="~amd64"
  12. IUSE="http +sdl"
  13. DEPEND="
  14. http? (
  15. net-misc/curl
  16. dev-libs/openssl:=
  17. )
  18. sdl? ( media-libs/libsdl )
  19. "
  20. RDEPEND="${DEPEND}"
  21. DOCS=( readme.txt )
  22. src_prepare() {
  23. default
  24. sed -i \
  25. -e 's;^bindir=.*;bindir=/usr/bin/;' \
  26. -e 's;^CC=.*;CC ?= cc;' \
  27. -e 's;^STRIP=.*;STRIP=true;' \
  28. -e 's;^CFLAGS=-O2 -Wall -g;CFLAGS+=;' \
  29. Makefile || die
  30. }
  31. src_configure() {
  32. if use !http; then sed -i '/^CONFIG_FS_NET/s;^;#;' Makefile || die; fi
  33. if use !sdl; then sed -i '/^CONFIG_SDL/s;^;#;' Makefile || die; fi
  34. }
  35. src_install() {
  36. mkdir -p "${ED}/usr/bin/" || die
  37. default
  38. }