Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/riscv:master commit in: app-emulation/spike/
Date: Fri, 16 Apr 2021 08:40:23
Message-Id: 1618562321.a4a20ad9cc291ddfa88cd7421747b342c3f8af38.dlan@gentoo
1 commit: a4a20ad9cc291ddfa88cd7421747b342c3f8af38
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 16 08:38:41 2021 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 16 08:38:41 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/riscv.git/commit/?id=a4a20ad9
7
8 app-emulation/spike: add golden reference RISC-V ISA simulator
9
10 Package-Manager: Portage-3.0.17, Repoman-3.0.2
11 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
12
13 app-emulation/spike/Manifest | 1 +
14 app-emulation/spike/metadata.xml | 17 +++++++++++++++++
15 app-emulation/spike/spike-1.0.0.ebuild | 25 +++++++++++++++++++++++++
16 app-emulation/spike/spike-9999.ebuild | 21 +++++++++++++++++++++
17 4 files changed, 64 insertions(+)
18
19 diff --git a/app-emulation/spike/Manifest b/app-emulation/spike/Manifest
20 new file mode 100644
21 index 0000000..5a0d0a6
22 --- /dev/null
23 +++ b/app-emulation/spike/Manifest
24 @@ -0,0 +1 @@
25 +DIST spike-1.0.0.tar.gz 283500 BLAKE2B a25f5faad1fa76e131f2477c5c103a738a0a5c6a4bec0a147d9233acc3e9ef60d52621e83d54e4025fa50ab402a294564cfdf4244651c14dd1b852fe3d16becf SHA512 e5755fc2bb38d5cb11d340f612f82207f6f77599b4cd38206c70cdb211f43108694ce2807822bccb77de308bb78b60a23978de972c2c8394601712ff1153267c
26
27 diff --git a/app-emulation/spike/metadata.xml b/app-emulation/spike/metadata.xml
28 new file mode 100644
29 index 0000000..e806b9b
30 --- /dev/null
31 +++ b/app-emulation/spike/metadata.xml
32 @@ -0,0 +1,17 @@
33 +<?xml version="1.0" encoding="UTF-8"?>
34 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
35 +<pkgmetadata>
36 + <longdescription>
37 + Spike, the RISC-V ISA Simulator, implements a functional model of
38 + one or more RISC-V harts. It is named after the golden spike used to
39 + celebrate the completion of the US transcontinental railway.
40 + </longdescription>
41 + <maintainer type="person">
42 + <email>dlan@g.o</email>
43 + <name>Yixun Lan</name>
44 + </maintainer>
45 + <stabilize-allarches/>
46 + <upstream>
47 + <remote-id type="github">riscv/riscv-isa-sim</remote-id>
48 + </upstream>
49 +</pkgmetadata>
50
51 diff --git a/app-emulation/spike/spike-1.0.0.ebuild b/app-emulation/spike/spike-1.0.0.ebuild
52 new file mode 100644
53 index 0000000..7da7a73
54 --- /dev/null
55 +++ b/app-emulation/spike/spike-1.0.0.ebuild
56 @@ -0,0 +1,25 @@
57 +# Copyright 2021 Gentoo Authors
58 +# Distributed under the terms of the GNU General Public License v2
59 +
60 +EAPI="7"
61 +inherit eutils autotools
62 +
63 +DESCRIPTION="The RISC-V ISA Simulator"
64 +HOMEPAGE="https://github.com/riscv/riscv-isa-sim/"
65 +SRC_URI="https://github.com/riscv/riscv-isa-sim/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
66 +
67 +LICENSE="BSD"
68 +SLOT="0/${PV}"
69 +KEYWORDS="~amd64"
70 +IUSE=""
71 +
72 +DEPEND=""
73 +
74 +S="${WORKDIR}/riscv-isa-sim-${PV}"
75 +src_prepare() {
76 + default
77 + sed -i -e "/install_libs_dir/s:/lib:/$(get_libdir):g" Makefile.in || die
78 + sed -i -e "/<string/a#include <stdexcept>" \
79 + fesvr/dtm.cc riscv/devices.h || die
80 + eautoreconf
81 +}
82
83 diff --git a/app-emulation/spike/spike-9999.ebuild b/app-emulation/spike/spike-9999.ebuild
84 new file mode 100644
85 index 0000000..31faa2b
86 --- /dev/null
87 +++ b/app-emulation/spike/spike-9999.ebuild
88 @@ -0,0 +1,21 @@
89 +# Copyright 2021 Gentoo Authors
90 +# Distributed under the terms of the GNU General Public License v2
91 +
92 +EAPI="7"
93 +inherit eutils autotools git-r3 multilib
94 +
95 +DESCRIPTION="The RISC-V ISA Simulator"
96 +HOMEPAGE="https://github.com/riscv/riscv-isa-sim/"
97 +EGIT_REPO_URI="https://github.com/riscv/riscv-isa-sim"
98 +
99 +LICENSE="BSD"
100 +SLOT="0/${PV}"
101 +IUSE=""
102 +
103 +DEPEND=""
104 +
105 +src_prepare() {
106 + default
107 + sed -i -e "/install_libs_dir/s:/lib:/$(get_libdir):g" Makefile.in || die
108 + eautoreconf
109 +}