File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ class Gpatch < Formula
2
+ desc "Apply a diff file to an original"
3
+ homepage "https://savannah.gnu.org/projects/patch/"
4
+ url "https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz"
5
+ mirror "https://ftpmirror.gnu.org/patch/patch-2.7.6.tar.xz"
6
+ sha256 "ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd"
7
+ license "GPL-3.0-or-later"
8
+
9
+ bottle do
10
+ root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/gpatch-2.7.6"
11
+ sha256 cellar : :any_skip_relocation , aarch64_linux : "00455ac03636a8cdbf9305fbd0a3751c5ae3686d5842392b1b2ce26a37b4de71"
12
+ end
13
+
14
+ def install
15
+ system "./configure" , "--disable-dependency-tracking" , "--prefix=#{ prefix } "
16
+ system "make" , "install"
17
+ end
18
+
19
+ test do
20
+ testfile = testpath /"test"
21
+ testfile . write "homebrew\n "
22
+ patch = <<~EOS
23
+ 1c1
24
+ < homebrew
25
+ ---
26
+ > hello
27
+ EOS
28
+ pipe_output ( "#{ bin } /patch #{ testfile } " , patch )
29
+ assert_equal "hello" , testfile . read . chomp
30
+ end
31
+ end
You can’t perform that action at this time.
0 commit comments