Skip to content

Commit 1d75148

Browse files
committed
patchpal 0.4.0: (new formula)
Initial homebrew packaging. This is software developed by some folks at Red Hat, looking to improve the patch backporting experience, even for those using macOS. It's a rust-based frontend that can be run entirely without the backend, but can also hook into a python-based backend AI server that helps provide AI assistance with backporting patches from a development branch to an older stable maintenance branch, such as, say, from the upstream Linux kernel branch to an old Red Hat Enterprise Linux kernel branch. Signed-off-by: Jarod Wilson <[email protected]>
1 parent cdac3d3 commit 1d75148

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

Formula/p/patchpal.rb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
class Patchpal < Formula
2+
desc "AI Assisted Patch Backporting Tool Frontend"
3+
homepage "https://gitlab.com/patchpal-ai/patchpal-gui"
4+
url "https://gitlab.com/patchpal-ai/patchpal-gui/-/archive/v0.4.0/patchpal-gui-v0.4.0.tar.bz2"
5+
sha256 "69e949af1c458879ffbc7198fffc16f7fae288825dc012045224d108be9be339"
6+
license "Apache-2.0"
7+
8+
depends_on "pkgconf" => :build
9+
depends_on "rust" => :build
10+
11+
depends_on "cairo"
12+
depends_on "gawk"
13+
depends_on "gdk-pixbuf"
14+
depends_on "gettext"
15+
depends_on "git"
16+
depends_on "glib"
17+
depends_on "graphene"
18+
depends_on "gtk4"
19+
depends_on "harfbuzz"
20+
depends_on "llvm"
21+
depends_on "pango"
22+
23+
def install
24+
ENV.prepend_path "PATH", Formula["gawk"].bin if OS.mac?
25+
inreplace "tests/run.sh", "readlink -e", "echo"
26+
inreplace "tests/run.sh", "target/release/patchpal", "bin/patchpal"
27+
inreplace "tests/run.sh", "awk", "gawk"
28+
system "cargo", "install", *std_cargo_args
29+
prefix.install "tests"
30+
end
31+
32+
test do
33+
assert_equal "Usage:\n patchpal [OPTION…] COMMIT\n", shell_output("#{bin}/patchpal --help | head -n 2")
34+
ENV["GIT_AUTHOR_NAME"] = "A Developer"
35+
ENV["GIT_AUTHOR_EMAIL"] = "[email protected]"
36+
ENV["GIT_COMMITTER_NAME"] = "A Developer"
37+
ENV["GIT_COMMITTER_EMAIL"] = "[email protected]"
38+
output = shell_output("#{prefix}/tests/run.sh -v")
39+
assert_match <<~EOS, output
40+
ok 1 test_add_copied.sh
41+
ok 2 test_change_renamed1.sh
42+
ok 3 test_change_renamed2.sh
43+
ok 4 test_change_renamed3.sh
44+
ok 5 test_change_renamed4.sh
45+
ok 6 test_clean_add.sh
46+
ok 7 test_clean_change.sh
47+
ok 8 test_clean_remove.sh
48+
ok 9 test_clean_rename.sh
49+
ok 10 test_rename_renamed1.sh
50+
ok 11 test_rename_renamed2.sh
51+
1..11
52+
EOS
53+
end
54+
end

0 commit comments

Comments
 (0)