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-
161class 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
11499end
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__
117118warning: refname 'upstream' is ambiguous.
118119diff --git a/curs_lib.c b/curs_lib.c
0 commit comments