forked from riscv-software-src/homebrew-riscv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathriscv-pk.rb
37 lines (30 loc) · 1.01 KB
/
riscv-pk.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "formula"
class RiscvPk < Formula
homepage "http://riscv.org"
url "https://github.com/riscv/riscv-pk.git"
version "master"
# bottle do
# root_url 'http://riscv.org.s3.amazonaws.com/bottles'
# cellar :any_skip_relocation
# sha256 "2c7e91b169bca977800ca1d14cd7f2fc7494b5729f3e18016fec73fbf832fed2" => :catalina
# end
depends_on "riscv-isa-sim" => :build
depends_on "riscv-gcc" => :build
depends_on "gnu-sed" => :build
def install
# using riscv-gcc from std env
ENV['CC'] = "riscv32-unknown-elf-gcc"
mkdir "build"
cd "build" do
# system "../configure", "--prefix=#{prefix}", "--host=riscv32-unknown-elf"
system "../configure", "--prefix=#{prefix} --with-arch=rv32imafdc", "--host=riscv32-unknown-elf"
# Requires gnu-sed's behavior to build, and don't want to change -Wno-unused
inreplace "Makefile", " sed", " gsed"
system "make", "install"
end
prefix.install Dir["#{prefix}/riscv32-unknown-elf/*"]
end
test do
system "false"
end
end