forked from gbuzogany/homebrew-rtl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprjtrellis.rb
52 lines (45 loc) · 1.19 KB
/
prjtrellis.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class Prjtrellis < Formula
include Hardware
desc "Project Trellis Library for ECP5 FPGA"
homepage "https://github.com/SymbiFlow/prjtrellis"
url "https://github.com/BracketMaster/homebrew-rtl/releases/download/v1.0/prjtrellis.tar.gz"
sha256 "03a6194aa0c5cf4c00d0af62db73ce7d7871deb17e0325624f9372aa8a4ff9d9"
bottle do
root_url "https://github.com/BracketMaster/homebrew-rtl/releases/download/v1.0/"
cellar :any
sha256 "b4c55e70c4240e9a84d42096e9f5bb4dbe3795e78ef1c6cea334188ade6ab30d" => :high_sierra
end
head do
url "https://github.com/SymbiFlow/prjtrellis", :using => :git
end
depends_on "cmake" => :build
depends_on "[email protected]"
depends_on "boost"
depends_on "git"
depends_on "yosys"
def install
if build.head?
system "git",
"fetch",
"--unshallow"
system "git",
"pull",
"--tags"
end
cd "libtrellis"
system "cmake",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"."
system "make",
"-j#{CPU.cores}"
system "make",
"install"
end
test do
system "ecppll",
"--clkin",
"50",
"--clkout0",
"25"
end
end