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.ebuild (978B)


  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. src_prepare() {
  22. default
  23. sed -i \
  24. -e 's;^bindir=.*;bindir=/usr/bin/;' \
  25. -e 's;^CC=.*;CC ?= cc;' \
  26. -e 's;^STRIP=.*;STRIP=true;' \
  27. -e 's;^CFLAGS=-O2 -Wall -g;CFLAGS+=;' \
  28. Makefile || die
  29. }
  30. src_configure() {
  31. if use !http; then sed -i '/^CONFIG_FS_NET/s;^;#;' Makefile || die; fi
  32. if use !sdl; then sed -i '/^CONFIG_SDL/s;^;#;' Makefile || die; fi
  33. }
  34. src_install() {
  35. mkdir -p "${ED}/usr/bin/" || die
  36. default
  37. }