homebrew-core/Formula/mod_python.rb

54 lines
1.6 KiB
Ruby
Raw Normal View History

2010-03-19 17:32:12 +00:00
require 'formula'
2011-03-10 05:11:03 +00:00
class ModPython < Formula
2010-03-19 17:32:12 +00:00
homepage 'http://www.modpython.org/'
2012-03-17 19:36:46 +00:00
url 'http://archive.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz'
2010-03-19 17:32:12 +00:00
md5 'a3b0150176b726bd2833dac3a7837dc5'
2012-03-17 19:36:46 +00:00
# patch-src-connobject.c.diff from MacPorts
2012-03-18 03:41:16 +00:00
def patches; DATA; end
2010-03-19 17:32:12 +00:00
def install
2011-03-19 16:50:14 +00:00
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
# Explicitly set the arch in CFLAGS so the PSPModule will build against system Python
# We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
archs = archs_for_command("python")
2011-03-19 16:50:14 +00:00
archs.remove_ppc!
ENV.append_to_cflags archs.as_arch_flags
2011-03-19 16:50:14 +00:00
# Don't install to the system Apache libexec folder
2010-03-19 17:32:12 +00:00
inreplace 'Makefile' do |s|
s.change_make_var! "LIBEXECDIR", libexec
end
system "make"
system "make install"
end
2012-03-17 19:36:46 +00:00
def caveats; <<-EOS.undent
To use mod_python, you must manually edit /etc/apache2/httpd.conf to load:
#{libexec}/mod_python.so
NOTE: mod_python is deprecated. See:
http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-officially.html
mod_wsgi is the suggested replacement.
EOS
end
2010-03-19 17:32:12 +00:00
end
__END__
2012-03-18 03:41:16 +00:00
--- a/src/connobject.c 2006-12-03 05:36:37.000000000 +0100
+++ b/src/connobject.c 2008-07-30 12:30:10.000000000 +0200
@@ -139,7 +139,7 @@
bytes_read = 0;
while ((bytes_read < len || len == 0) &&
- !(b == APR_BRIGADE_SENTINEL(b) ||
+ !(b == APR_BRIGADE_SENTINEL(bb) ||
APR_BUCKET_IS_EOS(b) || APR_BUCKET_IS_FLUSH(b))) {
const char *data;