Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

Commit ced0478

Browse files
committed
Merge upstream changes into httpd24
1 parent afeb9be commit ced0478

File tree

1 file changed

+29
-35
lines changed

1 file changed

+29
-35
lines changed

formula/httpd24.rb

+29-35
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
class Httpd24 < Formula
2+
desc "HTTP server"
23
homepage "https://httpd.apache.org/"
3-
url "https://archive.apache.org/dist/httpd/httpd-2.4.17.tar.bz2"
4-
sha256 "331e035dec81d3db95b048f036f4d7b1a97ec8daa5b377bde42d4ccf1f2eb798"
5-
revision 1
4+
url "https://archive.apache.org/dist/httpd/httpd-2.4.18.tar.bz2"
5+
sha256 "0644b050de41f5c9f67c825285049b144690421acb709b06fe53eddfa8a9fd4c"
66

77
bottle do
8-
sha256 "a7744efed0e6bd8dc4eb6926a0f678593b6f18587dde83dc4a902036601f7eb2" => :yosemite
9-
sha256 "db2b2d4763fcd96080556ae2cbdf2cfb70f0d86b42d0ea61f763b5a136357a59" => :mavericks
10-
sha256 "ef80df482e837e5cae17a1f388fc4e60ae57f9a354eb1403843cf9dbcb9ecf17" => :mountain_lion
8+
revision 1
9+
sha256 "e42f84b204594b68e19a7881cf298db5a48d3246b611c5b1657754e2b1fbb97e" => :el_capitan
10+
sha256 "7cf68e02a013b9779eb7b5f4391881f74d803c6cccd90895806ddcf108338624" => :yosemite
11+
sha256 "6ac23f6e09c8ac706e952a8a0aa88ef4649cf8aafd91927723168a61c680e985" => :mavericks
1112
end
1213

1314
conflicts_with "homebrew/apache/httpd22", :because => "different versions of the same software"
@@ -34,9 +35,8 @@ class Httpd24 < Formula
3435
depends_on "nghttp2"
3536
end
3637

37-
if build.with? "mpm-worker" and build.with? "mpm-event"
38-
onoe "Cannot build with both worker and event MPMs, choose one"
39-
exit 1
38+
if build.with?("mpm-worker") && build.with?("mpm-event")
39+
raise "Cannot build with both worker and event MPMs, choose one"
4040
end
4141

4242
def install
@@ -68,14 +68,13 @@ def install
6868
--enable-cgid
6969
--enable-suexec
7070
--enable-rewrite
71+
--with-apr=#{Formula["apr"].opt_prefix}
72+
--with-apr-util=#{Formula["apr-util"].opt_prefix}
73+
--with-pcre=#{Formula["pcre"].opt_prefix}
74+
--with-ssl=#{Formula["openssl"].opt_prefix}
75+
--with-z=#{Formula["zlib"].opt_prefix}
7176
]
7277

73-
args << "--with-apr=#{Formula["apr"].opt_prefix}"
74-
args << "--with-apr-util=#{Formula["apr-util"].opt_prefix}"
75-
args << "--with-pcre=#{Formula['pcre'].opt_prefix}"
76-
args << "--with-ssl=#{Formula['openssl'].opt_prefix}"
77-
args << "--with-z=#{Formula['zlib'].opt_prefix}"
78-
7978
if build.with? "mpm-worker"
8079
args << "--with-mpm=worker"
8180
elsif build.with? "mpm-event"
@@ -85,34 +84,29 @@ def install
8584
end
8685

8786
if build.with? "privileged-ports"
88-
args << "--with-port=80"
89-
args << "--with-sslport=443"
87+
args << "--with-port=80" << "--with-sslport=443"
9088
else
91-
args << "--with-port=8080"
92-
args << "--with-sslport=8443"
89+
args << "--with-port=8080" << "--with-sslport=8443"
9390
end
9491

9592
if build.with? "http2"
96-
args << "--enable-http2"
97-
args << "--with-nghttp2=#{Formula["nghttp2"].opt_prefix}"
93+
args << "--enable-http2" << "--with-nghttp2=#{Formula["nghttp2"].opt_prefix}"
9894
end
9995

10096
if build.with? "ldap"
101-
args << "--with-ldap"
102-
args << "--enable-ldap"
103-
args << "--enable-authnz-ldap"
97+
args << "--with-ldap" << "--enable-ldap" << "--enable-authnz-ldap"
10498
end
10599

106100
(etc/"apache2/2.4").mkpath
107101

108102
system "./configure", *args
109103

110104
system "make"
111-
system "make install"
105+
system "make", "install"
112106
(var/"apache2/log").mkpath
113107
(var/"apache2/run").mkpath
114-
touch("#{var}/log/apache2/access_log") unless File.exists?("#{var}/log/apache2/access_log")
115-
touch("#{var}/log/apache2/error_log") unless File.exists?("#{var}/log/apache2/error_log")
108+
touch("#{var}/log/apache2/access_log") unless File.exist?("#{var}/log/apache2/access_log")
109+
touch("#{var}/log/apache2/error_log") unless File.exist?("#{var}/log/apache2/error_log")
116110
end
117111

118112
def plist; <<-EOS.undent
@@ -124,7 +118,7 @@ def plist; <<-EOS.undent
124118
<string>#{plist_name}</string>
125119
<key>ProgramArguments</key>
126120
<array>
127-
<string>#{opt_sbin}/httpd</string>
121+
<string>#{opt_bin}/httpd</string>
128122
<string>-D</string>
129123
<string>FOREGROUND</string>
130124
</array>
@@ -136,12 +130,12 @@ def plist; <<-EOS.undent
136130
end
137131

138132
def httpd_layout
139-
return <<-EOS.undent
133+
<<-EOS.undent
140134
<Layout Homebrew>
141135
prefix: #{prefix}
142136
exec_prefix: ${prefix}
143137
bindir: ${exec_prefix}/bin
144-
sbindir: ${exec_prefix}/sbin
138+
sbindir: ${exec_prefix}/bin
145139
libdir: ${exec_prefix}/lib
146140
libexecdir: ${exec_prefix}/libexec
147141
mandir: #{man}
@@ -159,11 +153,7 @@ def httpd_layout
159153
logfiledir: #{var}/log/apache2
160154
proxycachedir: ${localstatedir}/proxy
161155
</Layout>
162-
EOS
163-
end
164-
165-
test do
166-
system sbin/"httpd", "-v"
156+
EOS
167157
end
168158

169159
def caveats
@@ -183,4 +173,8 @@ def caveats
183173
EOS
184174
end
185175
end
176+
177+
test do
178+
system bin/"httpd", "-v"
179+
end
186180
end

0 commit comments

Comments
 (0)