Skip to content

Commit 6a96f6c

Browse files
committed
nesfab 1.6 (new formula)
1 parent b1b44bf commit 6a96f6c

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

Formula/n/nesfab.rb

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
# the libc++ on Ventura is missing C++20 features this codebase depends on
13+
depends_on macos: :sonoma
14+
on_linux do
15+
depends_on "gcc" => :build
16+
end
17+
18+
fails_with :clang do
19+
build 1599
20+
cause "Missing std::lexicographical_compare_three_way"
21+
end
22+
23+
def install
24+
# update this when bumping package version
25+
git_sha = "da18a43d"
26+
27+
if OS.mac?
28+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "release" if Hardware::CPU.intel?
29+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "ARCH=", "release" if Hardware::CPU.arm?
30+
bin.install "nesfab" => "nesfab-release"
31+
32+
system "make", "clean"
33+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "debug" if Hardware::CPU.intel?
34+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "ARCH=", "debug" if Hardware::CPU.arm?
35+
bin.install "nesfab"
36+
else
37+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "release" if Hardware::CPU.intel?
38+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "ARCH=", "release" if Hardware::CPU.arm?
39+
bin.install "nesfab" => "nesfab-release"
40+
41+
system "make", "clean"
42+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "debug" if Hardware::CPU.intel?
43+
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "ARCH=", "debug" if Hardware::CPU.arm?
44+
bin.install "nesfab" => "nesfab"
45+
end
46+
end
47+
48+
test do
49+
system bin/"nesfab", "--version"
50+
end
51+
end

0 commit comments

Comments
 (0)