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

formulae: update to use modern cmake syntax #203808

Merged
merged 5 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
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
14 changes: 9 additions & 5 deletions Formula/g/gflags.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Gflags < Formula

Check notice on line 1 in Formula/g/gflags.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for gflags built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/g/gflags.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for gflags built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/g/gflags.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for gflags built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/g/gflags.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for gflags built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/g/gflags.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for gflags built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/g/gflags.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for gflags built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)
desc "Library for processing command-line flags"
homepage "https://gflags.github.io/gflags/"
url "https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz"
Expand All @@ -22,11 +22,15 @@
depends_on "cmake" => [:build, :test]

def install
mkdir "buildroot" do
system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON", "-DBUILD_STATIC_LIBS=ON",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
system "make", "install"
end
args = %w[
-DBUILD_SHARED_LIBS=ON
-DBUILD_STATIC_LIBS=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
]

system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args
system "cmake", "--build", "_build"
system "cmake", "--install", "_build"
end

test do
Expand Down
8 changes: 3 additions & 5 deletions Formula/i/ibex.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Ibex < Formula

Check notice on line 1 in Formula/i/ibex.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for ibex built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)
desc "C++ library for constraint processing over real numbers"
homepage "https://github.com/ibex-team/ibex-lib"
url "https://github.com/ibex-team/ibex-lib/archive/refs/tags/ibex-2.8.9.tar.gz"
Expand Down Expand Up @@ -31,11 +31,9 @@
def install
ENV.cxx11

mkdir "build" do
system "cmake", "..", *std_cmake_args.reject { |s| s["CMAKE_INSTALL_LIBDIR"] }
system "make", "SHARED=true"
system "make", "install"
end
system "cmake", "-S", ".", "-B", "build", *std_cmake_args.reject { |s| s["CMAKE_INSTALL_LIBDIR"] }
system "cmake", "--build", "build", "--", "SHARED=true"
system "cmake", "--install", "build"

pkgshare.install %w[examples benchs/solver]
(pkgshare/"examples/symb01.txt").write <<~EOS
Expand Down
6 changes: 2 additions & 4 deletions Formula/l/lastpass-cli.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class LastpassCli < Formula

Check notice on line 1 in Formula/l/lastpass-cli.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for lastpass-cli built at 0d32df054aa (Merge 75ea009bba1decc5290ed96038fe25b65828d823 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-09)

Check notice on line 1 in Formula/l/lastpass-cli.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for lastpass-cli built at 0d32df054aa (Merge 75ea009bba1decc5290ed96038fe25b65828d823 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-09)

Check notice on line 1 in Formula/l/lastpass-cli.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for lastpass-cli built at 0d32df054aa (Merge 75ea009bba1decc5290ed96038fe25b65828d823 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-09)

Check notice on line 1 in Formula/l/lastpass-cli.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for lastpass-cli built at 0d32df054aa (Merge 75ea009bba1decc5290ed96038fe25b65828d823 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-09)
desc "LastPass command-line interface tool"
homepage "https://github.com/lastpass/lastpass-cli"
url "https://github.com/lastpass/lastpass-cli/releases/download/v1.6.1/lastpass-cli-1.6.1.tar.gz"
Expand Down Expand Up @@ -34,10 +34,8 @@
def install
ENV["XML_CATALOG_FILES"] = etc/"xml/catalog"

mkdir "build" do
system "cmake", "..", *std_cmake_args, "-DCMAKE_INSTALL_MANDIR:PATH=#{man}"
system "make", "install", "install-doc"
end
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_MANDIR=#{man}", *std_cmake_args
system "cmake", "--build", "build", "--target", "install", "--target", "install-doc"

bash_completion.install "contrib/lpass_bash_completion"
zsh_completion.install "contrib/lpass_zsh_completion" => "_lpass"
Expand Down
10 changes: 4 additions & 6 deletions Formula/m/mbelib.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Mbelib < Formula

Check notice on line 1 in Formula/m/mbelib.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for mbelib built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/m/mbelib.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for mbelib built at 0d32df054aa (Merge 75ea009bba1decc5290ed96038fe25b65828d823 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-09)

Check notice on line 1 in Formula/m/mbelib.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for mbelib built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)

Check notice on line 1 in Formula/m/mbelib.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for mbelib built at 000aa0ebd28 (Merge 04e4c8c0c3bc89e08a87ca26a7884cedd4cfe670 into aa531c7376854a1c6cab977b65e7c96b8ae0b193, 2025-01-10)
desc "P25 Phase 1 and ProVoice vocoder"
homepage "https://github.com/szechyjs/mbelib"
url "https://github.com/szechyjs/mbelib/archive/refs/tags/v1.3.0.tar.gz"
Expand Down Expand Up @@ -27,12 +27,10 @@
depends_on "cmake" => :build

def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make"
system "make", "test"
system "make", "install"
end
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--build", "build", "--target", "test"
system "cmake", "--install", "build"
end

test do
Expand Down
11 changes: 7 additions & 4 deletions Formula/r/rofs-filtered.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ class RofsFiltered < Formula
depends_on :linux # on macOS, requires closed-source macFUSE

def install
mkdir "build" do
system "cmake", "..", "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", *std_cmake_args
system "make", "install"
end
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
assert_match version.to_s, shell_output("#{bin}/rofs-filtered --version 2>&1")
end
end
Loading