Update uwsgi to 0.9.5.1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
510955d8d4
commit
815b0c34d1
1 changed files with 5 additions and 22 deletions
|
@ -1,24 +1,11 @@
|
|||
require 'formula'
|
||||
|
||||
class Uwsgi <Formula
|
||||
url 'http://projects.unbit.it/downloads/uwsgi-0.9.4.3.tar.gz'
|
||||
url 'http://projects.unbit.it/downloads/uwsgi-0.9.5.1.tar.gz'
|
||||
homepage 'http://projects.unbit.it/uwsgi/'
|
||||
md5 '5f6a7385138deccfd5f8a80f2e0dea04'
|
||||
|
||||
def python_version
|
||||
`python -c "import sys; print '%s.%s' % sys.version_info[:2]"`.chomp
|
||||
end
|
||||
md5 'cc032e0f0e987a848606d3bc90241756'
|
||||
|
||||
def install
|
||||
case python_version
|
||||
when '2.5'
|
||||
makefile = "Makefile"
|
||||
program = "uwsgi"
|
||||
when '2.6'
|
||||
makefile = "Makefile.Py26"
|
||||
program = "uwsgi26"
|
||||
end
|
||||
|
||||
# Find the archs of the Python we are building against.
|
||||
# We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
|
||||
archs = archs_for_command("python")
|
||||
|
@ -27,12 +14,8 @@ class Uwsgi <Formula
|
|||
|
||||
flags = archs.collect{ |a| "-arch #{a}" }.join(' ')
|
||||
|
||||
inreplace makefile do |s|
|
||||
s.change_make_var! "CFLAGS", "$(PYTHON_CFLAGS) $(XML_CFLAGS) #{flags}"
|
||||
s.change_make_var! "LD_FLAGS", "$(PYTHON_LIBS) $(XML_LIBS) #{flags}"
|
||||
end
|
||||
|
||||
system "make -f #{makefile}"
|
||||
bin.install program
|
||||
system "CFLAGS='#{flags}' LDFLAGS='#{flags}' python uwsgiconfig.py --build"
|
||||
bin.install "uwsgi"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue