2010-03-19 17:32:12 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class ModPython <Formula
|
|
|
|
url 'http://www.ibiblio.org/pub/mirrors/apache/httpd/modpython/mod_python-3.3.1.tgz'
|
|
|
|
homepage 'http://www.modpython.org/'
|
|
|
|
md5 'a3b0150176b726bd2833dac3a7837dc5'
|
|
|
|
|
|
|
|
def caveats
|
2010-06-16 19:26:46 +00:00
|
|
|
<<-EOS.undent
|
|
|
|
To use mod_python, you must manually edit /etc/apache2/httpd.conf to load:
|
|
|
|
#{libexec}/mod_python.so
|
|
|
|
|
|
|
|
Note also that mod_python is deprecated, with mod_wsgi the recommended
|
|
|
|
replacement. See:
|
|
|
|
http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-officially.html
|
|
|
|
EOS
|
2010-03-19 17:32:12 +00:00
|
|
|
end
|
2010-04-05 17:24:28 +00:00
|
|
|
|
2010-03-19 17:32:12 +00:00
|
|
|
def patches
|
2010-04-05 17:24:28 +00:00
|
|
|
# patch-src-connobject.c.diff from MacPorts
|
|
|
|
{ :p0 => DATA }
|
2010-03-19 17:32:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-04-05 17:24:28 +00:00
|
|
|
# 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")
|
2010-04-12 18:22:47 +00:00
|
|
|
archs.delete :ppc7400
|
|
|
|
archs.delete :ppc64
|
|
|
|
ENV.append_to_cflags archs.collect{ |a| "-arch #{a}" }.join(' ')
|
2010-04-05 17:24:28 +00:00
|
|
|
|
2010-03-19 17:32:12 +00:00
|
|
|
inreplace 'Makefile' do |s|
|
|
|
|
# Don't install to the system Apache libexec folder
|
|
|
|
s.change_make_var! "LIBEXECDIR", libexec
|
|
|
|
end
|
|
|
|
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2010-04-05 17:24:28 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- src/connobject.c 2006-12-03 05:36:37.000000000 +0100
|
|
|
|
+++ 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;
|