Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nesfab 1.6 (new formula) #211113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Formula/n/nesfab.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
class Nesfab < Formula
desc "Programming language that targets the Nintendo Entertainment System"
homepage "https://pubby.games/nesfab.html"
# for this version only, point to a specific commit. post-1.6, this will point to a tagged release.
url "https://github.com/pubby/nesfab/archive/da18a43dc7b941cc4c56c949303aa37633fdc1b0.tar.gz"
version "1.6"
sha256 "bfd8c497df0d87138fda9e5de61d1ab5a36fb1951eeaed413b6619032b711745"
license "GPL-3.0-only"

depends_on "make" => :build
depends_on "boost"
# the libc++ on Ventura is missing C++20 features this codebase depends on
depends_on macos: :sonoma
on_linux do
depends_on "gcc" => :build
end

fails_with :clang do
build 1599
cause "Missing std::lexicographical_compare_three_way"
end

def install
# update this when bumping package version
git_sha = "da18a43d"

if OS.mac?
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "release" if Hardware::CPU.intel?
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "ARCH=", "release" if Hardware::CPU.arm?
bin.install "nesfab" => "nesfab-release"

system "make", "clean"
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "debug" if Hardware::CPU.intel?
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "CXX=#{ENV.cxx}", "ARCH=", "debug" if Hardware::CPU.arm?
bin.install "nesfab"
else
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "release" if Hardware::CPU.intel?
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "ARCH=", "release" if Hardware::CPU.arm?
bin.install "nesfab" => "nesfab-release"

system "make", "clean"
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "debug" if Hardware::CPU.intel?
system "make", "GIT_COMMIT=#{git_sha}-homebrew", "ARCH=", "debug" if Hardware::CPU.arm?
bin.install "nesfab" => "nesfab"
end
end

test do
system bin/"nesfab", "--version"
end
end
Loading