Skip to content

Commit

Permalink
gpatch: update 2.7.6 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Sep 3, 2024
1 parent aba4f3f commit b916f1a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Formula/g/gpatch.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class Gpatch < Formula
desc "Apply a diff file to an original"
homepage "https://savannah.gnu.org/projects/patch/"
url "https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz"
mirror "https://ftpmirror.gnu.org/patch/patch-2.7.6.tar.xz"
sha256 "ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd"
license "GPL-3.0-or-later"

bottle do
root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/gpatch-2.7.6"
sha256 cellar: :any_skip_relocation, aarch64_linux: "00455ac03636a8cdbf9305fbd0a3751c5ae3686d5842392b1b2ce26a37b4de71"
end

def install
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
end

test do
testfile = testpath/"test"
testfile.write "homebrew\n"
patch = <<~EOS
1c1
< homebrew
---
> hello
EOS
pipe_output("#{bin}/patch #{testfile}", patch)
assert_equal "hello", testfile.read.chomp
end
end

0 comments on commit b916f1a

Please sign in to comment.