From 72721454ceb1ce6db8e08ebc485dbd5c8f319248 Mon Sep 17 00:00:00 2001 From: Josh Tilles Date: Fri, 1 Jun 2018 01:39:22 -0400 Subject: [PATCH] pijul 0.10.0 (new formula) Closes #28545. Signed-off-by: commitay --- Formula/pijul.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Formula/pijul.rb diff --git a/Formula/pijul.rb b/Formula/pijul.rb new file mode 100644 index 0000000000..f822b9a0e6 --- /dev/null +++ b/Formula/pijul.rb @@ -0,0 +1,31 @@ +class Pijul < Formula + desc "Patch-based distributed version control system" + homepage "https://pijul.org" + url "https://pijul.org/releases/pijul-0.10.0.tar.gz" + sha256 "da3fcba4ab39a4371cda7273691364c2355c9b216bb7867d92dae5812ebb71d2" + + depends_on "pkg-config" => :build + depends_on "rust" => :build + depends_on "libsodium" + depends_on "openssl" + + def install + # Ensure that the `openssl-sys` crate picks up the intended library. + # (If we’re not careful, LibreSSL or OpenSSL 1.1 gets used instead.) + ENV["OPENSSL_DIR"] = Formula["openssl"].opt_prefix + + cd "pijul" do + system "cargo", "install", "--root", prefix + end + end + + test do + system bin/"pijul", "init" + %w[haunted house].each { |f| touch testpath/f } + system bin/"pijul", "add", "haunted", "house" + system bin/"pijul", "record", "--all", + "--message='Initial Patch'", + "--author='Foo Bar '" + assert_equal "haunted\nhouse\n", shell_output("#{bin}/pijul ls") + end +end