aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-02 06:59:19 +0000
committerMike McQuaid2014-11-02 15:30:56 +0000
commit925aff4a0647f578ac6f0ab420ab8f156dcc13ca (patch)
treeb5daf81716074d81d5b5329947c01771a7ea4877 /Library/Formula
parent3cb2e798b3e8a75d778d5fd1e956422e49cfb887 (diff)
downloadhomebrew-925aff4a0647f578ac6f0ab420ab8f156dcc13ca.tar.bz2
uwsgi: upstream ntohll fix
Replaces my super-hacky patch with the vastly better upstream one. The upstream patch will be in the next stable release, and is already in the HEAD. Closes #33812. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/uwsgi.rb52
1 files changed, 18 insertions, 34 deletions
diff --git a/Library/Formula/uwsgi.rb b/Library/Formula/uwsgi.rb
index 6b35871b2..012968058 100644
--- a/Library/Formula/uwsgi.rb
+++ b/Library/Formula/uwsgi.rb
@@ -2,10 +2,26 @@ require "formula"
class Uwsgi < Formula
homepage "https://uwsgi-docs.readthedocs.org/en/latest/"
- url "http://projects.unbit.it/downloads/uwsgi-2.0.8.tar.gz"
- sha1 "f017faf259f409907dc8c37541370d3e803fba32"
head "https://github.com/unbit/uwsgi.git"
+ stable do
+ url "http://projects.unbit.it/downloads/uwsgi-2.0.8.tar.gz"
+ sha1 "f017faf259f409907dc8c37541370d3e803fba32"
+
+ # Upstream ntohll fix - Kill on next stable release.
+ # https://github.com/unbit/uwsgi/issues/760
+ # https://github.com/unbit/uwsgi/commit/1964c9758
+ patch do
+ url "https://github.com/unbit/uwsgi/commit/1964c975.diff"
+ sha1 "5cad23c43ce933d723bf9961b3af303383386f92"
+ end
+ # Patches the patch to make it more ML & Mavericks friendly.
+ patch do
+ url "https://github.com/unbit/uwsgi/commit/48314cb903b.diff"
+ sha1 "4cd25b2c5ff39edacdac942f91839465e246d687"
+ end
+ end
+
bottle do
sha1 "111f178b0f86c2f3e35d791c00c78ce858633e12" => :yosemite
sha1 "607debd03c31e9d3ac74ef3a7a72c06d14c868de" => :mavericks
@@ -44,16 +60,8 @@ class Uwsgi < Formula
option "with-php", "Compile with PHP support (PHP must be built for embedding)"
option "with-ruby", "Compile with Ruby support"
- # This is a hacky patch, but it works. Replace once upstream have a better fix.
- # https://github.com/Homebrew/homebrew/issues/33488
- # https://github.com/unbit/uwsgi/issues/760
- if MacOS.version == :yosemite
- patch :DATA
- end
-
def install
ENV.append %w{CFLAGS LDFLAGS}, "-arch #{MacOS.preferred_arch}"
- ENV.append_to_cflags "-DHAVE_HTONLL" if MacOS.version == :yosemite
json = build.with?("jansson") ? "jansson" : "yajl"
yaml = build.with?("libyaml") ? "libyaml" : "embedded"
@@ -162,27 +170,3 @@ class Uwsgi < Formula
EOS
end
end
-
-__END__
-diff --git a/plugins/emperor_amqp/amqp.c b/plugins/emperor_amqp/amqp.c
-index 7b34c66..a6f8a2f 100644
---- a/plugins/emperor_amqp/amqp.c
-+++ b/plugins/emperor_amqp/amqp.c
-@@ -2,6 +2,8 @@
-
- #define AMQP_CONNECTION_HEADER "AMQP\0\0\x09\x01"
-
-+#ifndef HAVE_HTONLL
-+
- #ifdef __BIG_ENDIAN__
- #define ntohll(x) x
- #else
-@@ -9,6 +11,8 @@
- #endif
- #define htonll(x) ntohll(x)
-
-+#endif
-+
- #define amqp_send(a, b, c) if (send(a, b, c, 0) < 0) { uwsgi_error("send()"); return -1; }
-
- struct amqp_frame_header {