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

replxx 0.0.4 (new formula) #201204

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,7 @@ release-it
remarshal
remind
renovate
replxx
repo
reposurgeon
repren
Expand Down
40 changes: 40 additions & 0 deletions Formula/r/replxx.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
class Replxx < Formula

Check notice on line 1 in Formula/r/replxx.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for replxx built at 99784eb76f3 (Merge c06a066ddfda5d0f9037fbfab1bd822ae4c9c9f1 into 927520c93bb9d5d96626ee055d2f85a259896322, 2024-12-15)

Check notice on line 1 in Formula/r/replxx.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for replxx built at 99784eb76f3 (Merge c06a066ddfda5d0f9037fbfab1bd822ae4c9c9f1 into 927520c93bb9d5d96626ee055d2f85a259896322, 2024-12-15)

Check notice on line 1 in Formula/r/replxx.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for replxx built at 99784eb76f3 (Merge c06a066ddfda5d0f9037fbfab1bd822ae4c9c9f1 into 927520c93bb9d5d96626ee055d2f85a259896322, 2024-12-15)

Check notice on line 1 in Formula/r/replxx.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for replxx built at 99784eb76f3 (Merge c06a066ddfda5d0f9037fbfab1bd822ae4c9c9f1 into 927520c93bb9d5d96626ee055d2f85a259896322, 2024-12-15)

Check notice on line 1 in Formula/r/replxx.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for replxx built at 99784eb76f3 (Merge c06a066ddfda5d0f9037fbfab1bd822ae4c9c9f1 into 927520c93bb9d5d96626ee055d2f85a259896322, 2024-12-15)

Check notice on line 1 in Formula/r/replxx.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for replxx built at 99784eb76f3 (Merge c06a066ddfda5d0f9037fbfab1bd822ae4c9c9f1 into 927520c93bb9d5d96626ee055d2f85a259896322, 2024-12-15)
desc "Readline and libedit replacement"
homepage "https://github.com/AmokHuginnsson/replxx"
url "https://github.com/AmokHuginnsson/replxx/archive/refs/tags/release-0.0.4.tar.gz"
sha256 "a22988b2184e1d256e2d111b5749e16ffb1accbf757c7b248226d73c426844c4"
license all_of: ["BSD-3-Clause", "Unicode-TOU"]

depends_on "cmake" => :build

def install
system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"

pkgshare.install "examples"
end

test do
cp_r pkgshare/"examples", testpath
cd "examples" do
system ENV.cc, "-c", "util.c", "-o", "util.o"
system ENV.cc, "c-api.c", "util.o", "-L#{lib}", "-I#{include}", "-lreplxx", "-lm", "-o", "test"

# `test` executable is an interactive program so we use Open3 to interact with it
Open3.popen3("./test") do |stdin, stdout, stderr, _|
sleep 2
assert_match "starting...", stdout.gets

stdin.puts "hello"
sleep 2

assert_match "thanks for the input: hello", stdout.gets

stdin.close # simulate Ctrl+D by closing stdin

assert_empty stderr.read
end
end
end
end
Loading