Skip to content

Commit 46e4b3c

Browse files
committed
Fix all Formulae.
1 parent e77fdf1 commit 46e4b3c

17 files changed

+374
-305
lines changed

Formula/mutt-current.rb

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
def ENV.replace_rpath(**replace_list)
2-
replace_list = replace_list.each_with_object({}) do |(old, new), result|
3-
old_f = Formula[old]
4-
new_f = Formula[new]
5-
result[old_f.opt_lib.to_s] = new_f.opt_lib.to_s
6-
result[old_f.lib.to_s] = new_f.lib.to_s
7-
end
8-
9-
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
10-
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
11-
replace_list.fetch(rpath, rpath)
12-
end).join(":")
13-
end
14-
end
15-
161
class MuttCurrent < Formula
172
desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)"
183
homepage "http://www.mutt.org/"
@@ -58,7 +43,11 @@ class MuttCurrent < Formula
5843
end
5944

6045
def install
61-
ENV.replace_rpath "ncurses" => "z80oolong/eaw/ncurses-eaw@6.5"
46+
old_curses_f = Formula["ncurses"]
47+
new_curses_f = Formula["z80oolong/eaw/ncurses-eaw@6.5"]
48+
49+
ENV.replace_rpath old_curses_f.lib => new_curses_f.lib,
50+
old_curses_f.opt_lib => new_curses_f.opt_lib
6251
ENV.append "CFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
6352
ENV.append "CPPFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
6453
ENV.append "LDFLAGS", "-L#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_lib}"
@@ -112,3 +101,19 @@ def caveats
112101
system bin/"mutt_dotlock", "-u", "foo"
113102
end
114103
end
104+
105+
module EnvExtend
106+
def replace_rpath(**replace_list)
107+
replace_list = replace_list.each_with_object({}) do |(old, new), result|
108+
result[old.to_s] = new.to_s
109+
end
110+
111+
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
112+
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
113+
replace_list.fetch(rpath, rpath)
114+
end).join(":")
115+
end
116+
end
117+
end
118+
119+
ENV.extend(EnvExtend)

Formula/mutt@2.2.14.rb

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
def ENV.replace_rpath(**replace_list)
2-
replace_list = replace_list.each_with_object({}) do |(old, new), result|
3-
old_f = Formula[old]
4-
new_f = Formula[new]
5-
result[old_f.opt_lib.to_s] = new_f.opt_lib.to_s
6-
result[old_f.lib.to_s] = new_f.lib.to_s
7-
end
8-
9-
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
10-
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
11-
replace_list.fetch(rpath, rpath)
12-
end).join(":")
13-
end
14-
end
15-
161
class MuttAT2214 < Formula
172
desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)"
183
homepage "http://www.mutt.org/"
@@ -40,7 +25,11 @@ class MuttAT2214 < Formula
4025
patch :p1, :DATA
4126

4227
def install
43-
ENV.replace_rpath "ncurses" => "z80oolong/eaw/ncurses-eaw@6.5"
28+
old_curses_f = Formula["ncurses"]
29+
new_curses_f = Formula["z80oolong/eaw/ncurses-eaw@6.5"]
30+
31+
ENV.replace_rpath old_curses_f.lib => new_curses_f.lib,
32+
old_curses_f.opt_lib => new_curses_f.opt_lib
4433
ENV.append "CFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
4534
ENV.append "CPPFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
4635
ENV.append "LDFLAGS", "-L#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_lib}"
@@ -97,6 +86,22 @@ def diff_data
9786
end
9887
end
9988

89+
module EnvExtend
90+
def replace_rpath(**replace_list)
91+
replace_list = replace_list.each_with_object({}) do |(old, new), result|
92+
result[old.to_s] = new.to_s
93+
end
94+
95+
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
96+
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
97+
replace_list.fetch(rpath, rpath)
98+
end).join(":")
99+
end
100+
end
101+
end
102+
103+
ENV.extend(EnvExtend)
104+
100105
__END__
101106
diff --git a/curs_lib.c b/curs_lib.c
102107
index efa76ce..eea315d 100644

Formula/mutt@2.2.15.rb

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
def ENV.replace_rpath(**replace_list)
2-
replace_list = replace_list.each_with_object({}) do |(old, new), result|
3-
old_f = Formula[old]
4-
new_f = Formula[new]
5-
result[old_f.opt_lib.to_s] = new_f.opt_lib.to_s
6-
result[old_f.lib.to_s] = new_f.lib.to_s
7-
end
8-
9-
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
10-
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
11-
replace_list.fetch(rpath, rpath)
12-
end).join(":")
13-
end
14-
end
15-
161
class MuttAT2215 < Formula
172
desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)"
183
homepage "http://www.mutt.org/"
@@ -42,7 +27,11 @@ class MuttAT2215 < Formula
4227
patch :p1, :DATA
4328

4429
def install
45-
ENV.replace_rpath "ncurses" => "z80oolong/eaw/ncurses-eaw@6.5"
30+
old_curses_f = Formula["ncurses"]
31+
new_curses_f = Formula["z80oolong/eaw/ncurses-eaw@6.5"]
32+
33+
ENV.replace_rpath old_curses_f.lib => new_curses_f.lib,
34+
old_curses_f.opt_lib => new_curses_f.opt_lib
4635
ENV.append "CFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
4736
ENV.append "CPPFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
4837
ENV.append "LDFLAGS", "-L#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_lib}"
@@ -99,6 +88,22 @@ def diff_data
9988
end
10089
end
10190

91+
module EnvExtend
92+
def replace_rpath(**replace_list)
93+
replace_list = replace_list.each_with_object({}) do |(old, new), result|
94+
result[old.to_s] = new.to_s
95+
end
96+
97+
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
98+
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
99+
replace_list.fetch(rpath, rpath)
100+
end).join(":")
101+
end
102+
end
103+
end
104+
105+
ENV.extend(EnvExtend)
106+
102107
__END__
103108
diff --git a/curs_lib.c b/curs_lib.c
104109
index efa76ce..eea315d 100644

Formula/mutt@9999-dev.rb

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
1-
def ENV.replace_rpath(**replace_list)
2-
replace_list = replace_list.each_with_object({}) do |(old, new), result|
3-
old_f = Formula[old]
4-
new_f = Formula[new]
5-
result[old_f.opt_lib.to_s] = new_f.opt_lib.to_s
6-
result[old_f.lib.to_s] = new_f.lib.to_s
7-
end
8-
9-
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
10-
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
11-
replace_list.fetch(rpath, rpath)
12-
end).join(":")
13-
end
14-
end
15-
161
class MuttAT9999Dev < Formula
172
desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)"
183
homepage "http://www.mutt.org/"
4+
5+
CURRENT_COMMIT = "ba36b184f1c84b2200163ca3a361150a9d6311e4".freeze
6+
url "https://gitlab.com/muttmua/mutt.git", revision: CURRENT_COMMIT
7+
version "git-#{CURRENT_COMMIT[0..7]}"
198
license "GPL-2.0-or-later"
209
revision 3
2110

22-
@@current_commit = "ba36b184f1c84b2200163ca3a361150a9d6311e4"
23-
url "https://gitlab.com/muttmua/mutt.git",
24-
branch: "master",
25-
revision: @@current_commit
26-
version "git-#{@@current_commit[0..7]}"
27-
2811
keg_only :versioned_fomula
2912

3013
depends_on "autoconf" => :build
@@ -41,8 +24,6 @@ class MuttAT9999Dev < Formula
4124
uses_from_macos "krb5"
4225
uses_from_macos "zlib"
4326

44-
conflicts_with "tin", because: "both install mmdf.5 and mbox.5 man pages"
45-
4627
resource "html" do
4728
url "https://muttmua.gitlab.io/mutt/manual-dev.html"
4829
sha256 "107c8e55cf0a2801cbec22055758c9554726a3db8e908c6aee5448385925753d"
@@ -51,7 +32,11 @@ class MuttAT9999Dev < Formula
5132
patch :p1, :DATA
5233

5334
def install
54-
ENV.replace_rpath "ncurses" => "z80oolong/eaw/ncurses-eaw@6.5"
35+
old_curses_f = Formula["ncurses"]
36+
new_curses_f = Formula["z80oolong/eaw/ncurses-eaw@6.5"]
37+
38+
ENV.replace_rpath old_curses_f.lib => new_curses_f.lib,
39+
old_curses_f.opt_lib => new_curses_f.opt_lib
5540
ENV.append "CFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
5641
ENV.append "CPPFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
5742
ENV.append "LDFLAGS", "-L#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_lib}"
@@ -88,7 +73,7 @@ def install
8873
def caveats
8974
<<~EOS
9075
#{full_name} is a Formula for installing the development version of
91-
`mutt` based on the HEAD version (commit #{@@current_commit[0..7]}) from its Github repository.
76+
`mutt` based on the HEAD version (commit #{CURRENT_COMMIT[0..7]}) from its Github repository.
9277
9378
mutt_dotlock(1) has been installed, but does not have the permissions to lock
9479
spool files in /var/mail. To grant the necessary permissions, run
@@ -113,6 +98,22 @@ def diff_data
11398
end
11499
end
115100

101+
module EnvExtend
102+
def replace_rpath(**replace_list)
103+
replace_list = replace_list.each_with_object({}) do |(old, new), result|
104+
result[old.to_s] = new.to_s
105+
end
106+
107+
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
108+
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
109+
replace_list.fetch(rpath, rpath)
110+
end).join(":")
111+
end
112+
end
113+
end
114+
115+
ENV.extend(EnvExtend)
116+
116117
__END__
117118
warning: refname 'upstream' is ambiguous.
118119
diff --git a/curs_lib.c b/curs_lib.c

Formula/nano-current.rb

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
def ENV.replace_rpath(**replace_list)
2-
replace_list = replace_list.each_with_object({}) do |(old, new), result|
3-
old_f = Formula[old]
4-
new_f = Formula[new]
5-
result[old_f.opt_lib.to_s] = new_f.opt_lib.to_s
6-
result[old_f.lib.to_s] = new_f.lib.to_s
7-
end
8-
9-
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
10-
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
11-
replace_list.fetch(rpath, rpath)
12-
end).join(":")
13-
end
14-
end
15-
161
class NanoCurrent < Formula
172
desc "Free (GNU) replacement for the Pico text editor"
183
homepage "https://www.nano-editor.org/"
@@ -29,12 +14,12 @@ class NanoCurrent < Formula
2914
head do
3015
url "https://github.com/madnight/nano.git"
3116

32-
patch :p1, Formula["z80oolong/eaw/nano@9999-dev"].diff_data
33-
3417
depends_on "autoconf" => :build
3518
depends_on "automake" => :build
3619
depends_on "perl" => :build
3720
depends_on "texinfo" => :build
21+
22+
patch :p1, Formula["z80oolong/eaw/nano@9999-dev"].diff_data
3823
end
3924

4025
keg_only "it conflicts with 'homebrew/core/nano'"
@@ -47,10 +32,12 @@ class NanoCurrent < Formula
4732
depends_on "libmagic"
4833
end
4934

50-
5135
def install
52-
ENV.replace_rpath "ncurses" => "z80oolong/eaw/ncurses-eaw@6.5"
36+
old_curses_f = Formula["ncurses"]
37+
new_curses_f = Formula["z80oolong/eaw/ncurses-eaw@6.5"]
5338

39+
ENV.replace_rpath old_curses_f.lib => new_curses_f.lib,
40+
old_curses_f.opt_lib => new_curses_f.opt_lib
5441
ENV.append "CFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
5542
ENV.append "CPPFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
5643
ENV.append "LDFLAGS", "-L#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_lib}"
@@ -78,3 +65,19 @@ def install
7865
system "#{bin}/nano", "--version"
7966
end
8067
end
68+
69+
module EnvExtend
70+
def replace_rpath(**replace_list)
71+
replace_list = replace_list.each_with_object({}) do |(old, new), result|
72+
result[old.to_s] = new.to_s
73+
end
74+
75+
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
76+
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
77+
replace_list.fetch(rpath, rpath)
78+
end).join(":")
79+
end
80+
end
81+
end
82+
83+
ENV.extend(EnvExtend)

Formula/nano@8.5.rb

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
def ENV.replace_rpath(**replace_list)
2-
replace_list = replace_list.each_with_object({}) do |(old, new), result|
3-
old_f = Formula[old]
4-
new_f = Formula[new]
5-
result[old_f.opt_lib.to_s] = new_f.opt_lib.to_s
6-
result[old_f.lib.to_s] = new_f.lib.to_s
7-
end
8-
9-
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
10-
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
11-
replace_list.fetch(rpath, rpath)
12-
end).join(":")
13-
end
14-
end
15-
161
class NanoAT85 < Formula
172
desc "Free (GNU) replacement for the Pico text editor"
183
homepage "https://www.nano-editor.org/"
@@ -34,8 +19,11 @@ class NanoAT85 < Formula
3419
patch :p1, :DATA
3520

3621
def install
37-
ENV.replace_rpath "ncurses" => "z80oolong/eaw/ncurses-eaw@6.5"
22+
old_curses_f = Formula["ncurses"]
23+
new_curses_f = Formula["z80oolong/eaw/ncurses-eaw@6.5"]
3824

25+
ENV.replace_rpath old_curses_f.lib => new_curses_f.lib,
26+
old_curses_f.opt_lib => new_curses_f.opt_lib
3927
ENV.append "CFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
4028
ENV.append "CPPFLAGS", "-I#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_include}"
4129
ENV.append "LDFLAGS", "-L#{Formula["z80oolong/eaw/ncurses-eaw@6.5"].opt_lib}"
@@ -61,6 +49,22 @@ def install
6149
end
6250
end
6351

52+
module EnvExtend
53+
def replace_rpath(**replace_list)
54+
replace_list = replace_list.each_with_object({}) do |(old, new), result|
55+
result[old.to_s] = new.to_s
56+
end
57+
58+
if (rpaths = fetch("HOMEBREW_RPATH_PATHS", false))
59+
self["HOMEBREW_RPATH_PATHS"] = (rpaths.split(":").map do |rpath|
60+
replace_list.fetch(rpath, rpath)
61+
end).join(":")
62+
end
63+
end
64+
end
65+
66+
ENV.extend(EnvExtend)
67+
6468
__END__
6569
diff --git a/src/chars.c b/src/chars.c
6670
index a0ebaec..911dd8a 100644

0 commit comments

Comments
 (0)