Skip to content

Commit 42544d8

Browse files
committed
nesfab 1.6 (new formula)
1 parent b1b44bf commit 42544d8

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

Formula/n/nesfab.rb

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
class Nesfab < Formula
2+
desc "Programming language that targets the Nintendo Entertainment System"
3+
homepage "https://pubby.games/nesfab.html"
4+
# for this version only, point to a specific commit. post-1.6, this will point to a tagged release.
5+
url "https://github.com/pubby/nesfab/archive/da18a43dc7b941cc4c56c949303aa37633fdc1b0.tar.gz"
6+
version "1.6"
7+
sha256 "bfd8c497df0d87138fda9e5de61d1ab5a36fb1951eeaed413b6619032b711745"
8+
license "GPL-3.0-only"
9+
10+
depends_on "make" => :build
11+
depends_on "boost"
12+
on_system :linux, macos: :ventura do
13+
depends_on "gcc" => :build
14+
end
15+
16+
fails_with :clang do
17+
build 1599
18+
cause "Missing std::lexicographical_compare_three_way"
19+
end
20+
21+
def install
22+
# update this when bumping package version
23+
git_sha = "da18a43d"
24+
25+
if OS.mac? && MacOS.version > :ventura
26+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "release" if Hardware::CPU.intel?
27+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "ARCH=", "release" if Hardware::CPU.arm?
28+
bin.install "nesfab" => "nesfab-release"
29+
30+
system "make", "clean"
31+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "debug" if Hardware::CPU.intel?
32+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "ARCH=", "debug" if Hardware::CPU.arm?
33+
bin.install "nesfab"
34+
else
35+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "release" if Hardware::CPU.intel?
36+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "ARCH=", "release" if Hardware::CPU.arm?
37+
bin.install "nesfab" => "nesfab-release"
38+
39+
system "make", "clean"
40+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "debug" if Hardware::CPU.intel?
41+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "ARCH=", "debug" if Hardware::CPU.arm?
42+
bin.install "nesfab" => "nesfab"
43+
end
44+
end
45+
46+
test do
47+
system bin/"nesfab", "--version"
48+
end
49+
end

0 commit comments

Comments
 (0)