Skip to content

Commit

Permalink
cabin: renamed from poac
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed Dec 28, 2024
1 parent af1c8d0 commit f979e7a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
49 changes: 49 additions & 0 deletions Formula/c/cabin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
class Cabin < Formula
desc "Package manager and build system for C++"
homepage "https://github.com/cabinpkg/cabin"
url "https://github.com/cabinpkg/cabin/archive/refs/tags/0.11.0.tar.gz"
sha256 "0ffefbfa8aa26a55c9acb058943a35a4d316ad13f588fee0c66ee5e16673e657"
license "Apache-2.0"
head "https://github.com/cabinpkg/cabin.git", branch: "main"

depends_on "nlohmann-json" => :build
depends_on "toml11" => :build
depends_on "curl"
depends_on "fmt"
depends_on "libgit2"
depends_on "pkgconf"
depends_on "tbb"

on_macos do
depends_on "llvm" => [:build, :test] if DevelopmentTools.clang_build_version <= 1200
end

on_linux do
depends_on "gcc" # C++20
end

fails_with :clang do
build 1200
cause "Requires C++20"
end

fails_with :gcc do
version "11"
cause "Requires C++20"
end

def install
ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1200)
# Avoid cloning `toml11` at build-time.
(buildpath/"build-out/DEPS/toml11").install_symlink Formula["toml11"].opt_include
system "make", "RELEASE=1", "PREFIX=#{prefix}", "install"
end

test do
ENV.clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1200)
system bin/"cabin", "new", "hello_world"
cd "hello_world" do
assert_equal "Hello, world!", shell_output("#{bin}/cabin run").split("\n").last
end
end
end
4 changes: 2 additions & 2 deletions audit_exceptions/linux_only_gcc_dependency_allowlist.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
"cabin",
"gsmartcontrol",
"nghttp2",
"poac"
"nghttp2"
]
1 change: 1 addition & 0 deletions formula_renames.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"[email protected]": "[email protected]",
"parallelstl": "onedpl",
"pev": "readpe",
"poac": "cabin",
"polarssl": "mbedtls",
"postgresql": "postgresql@14",
"prest": "prestd",
Expand Down

0 comments on commit f979e7a

Please sign in to comment.