logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 8205445c0f5354cb307cad07a4475319e4bb4f1a
parent f024c746138ae59a4e55184a8a52dfa7ee6abaff
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 28 Sep 2022 19:12:49 +0200

dev-lang/mrustc: Build minicargo

Diffstat:

Adev-lang/mrustc/mrustc-0.10-r1.ebuild38++++++++++++++++++++++++++++++++++++++
Ddev-lang/mrustc/mrustc-0.10.ebuild31-------------------------------
2 files changed, 38 insertions(+), 31 deletions(-)

diff --git a/dev-lang/mrustc/mrustc-0.10-r1.ebuild b/dev-lang/mrustc/mrustc-0.10-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Alternative rust compiler (re-implementation)" +HOMEPAGE="https://github.com/thepowersgang/mrustc" +SRC_URI="https://github.com/thepowersgang/mrustc/archive/refs/tags/v0.10.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPENDS="sys-libs/zlib:=" +DOCS=( docs/ Notes/ README.md ) + +src_prepare() { + default + + sed -i \ + -e 's/\$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)/v${PV}/' \ + -e 's/\$(shell git diff-index --quiet HEAD; echo $$?)/0/' \ + Makefile || die + + sed -i '/objcopy --only-keep-debug/,/strip/d' Makefile || die + sed -i '/objcopy --only-keep-debug/,/strip/d' tools/minicargo/Makefile || die +} + +src_compile() { + emake all + emake -C tools/minicargo +} + +src_install() { + einstalldocs + dobin bin/mrustc + dobin bin/minicargo +} diff --git a/dev-lang/mrustc/mrustc-0.10.ebuild b/dev-lang/mrustc/mrustc-0.10.ebuild @@ -1,31 +0,0 @@ -# Copyright 2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me> -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Alternative rust compiler (re-implementation)" -HOMEPAGE="https://github.com/thepowersgang/mrustc" -SRC_URI="https://github.com/thepowersgang/mrustc/archive/refs/tags/v0.10.tar.gz -> ${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -DEPENDS="sys-libs/zlib:=" -DOCS=( docs/ Notes/ README.md ) - -src_prepare() { - default - - sed -i \ - -e 's/\$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)/v${PV}/' \ - -e 's/\$(shell git diff-index --quiet HEAD; echo $$?)/0/' \ - Makefile || die - - sed -i '/objcopy --only-keep-debug/,/strip/d' Makefile || die -} - -src_install() { - einstalldocs - dobin bin/mrustc -}