logo

overlay

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

mrustc-0.10.1.54.0.ebuild (1181B)


  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. inherit verify-sig
  5. MRUSTC_V="0.10"
  6. RUSTC_V="1.54.0"
  7. DESCRIPTION="Alternative rust compiler (re-implementation)"
  8. HOMEPAGE="https://github.com/thepowersgang/mrustc"
  9. SRC_URI="
  10. https://static.rust-lang.org/dist/rustc-${RUSTC_V}-src.tar.xz
  11. verify-sig? ( https://static.rust-lang.org/dist/rustc-${RUSTC_V}-src.tar.xz.asc )
  12. https://github.com/thepowersgang/mrustc/archive/refs/tags/v${MRUSTC_V}.tar.gz -> mrustc-${MRUSTC_V}.tar.gz
  13. "
  14. LICENSE="MIT"
  15. SLOT="0"
  16. KEYWORDS="~amd64"
  17. IUSE="verify-sig"
  18. DEPENDS="sys-libs/zlib:="
  19. DOCS=( docs/ Notes/ README.md )
  20. src_prepare() {
  21. default
  22. sed -i \
  23. -e 's/\$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)/v${PV}/' \
  24. -e 's/\$(shell git diff-index --quiet HEAD; echo $$?)/0/' \
  25. Makefile || die
  26. sed -i '/objcopy --only-keep-debug/,/strip/d' Makefile || die
  27. sed -i '/objcopy --only-keep-debug/,/strip/d' tools/minicargo/Makefile || die
  28. }
  29. src_compile() {
  30. emake all
  31. emake -C tools/minicargo
  32. }
  33. src_install() {
  34. einstalldocs
  35. dobin bin/mrustc
  36. dobin bin/minicargo
  37. }