source: trunk/dports/www/mod_python/Portfile

Last change on this file was 129623, checked in by jmr@…, 3 years ago

unify mod_python ports, replace 24 and 25 versions with 27, use notes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 129623 2014-12-17 02:46:05Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                mod_python
6version             3.3.1
7revision            2
8categories          www python
9platforms           darwin
10license             Apache-2
11maintainers         nomaintainer
12description         Apache2 module that embeds Python within the server.
13long_description \
14   Mod_python is an Apache 2 module that embeds the Python interpreter \
15   within the server. With mod_python you can write web-based applications \
16   in Python that will run many times faster than traditional CGI and will \
17   have access to advanced features such as ability to retain database \
18   connections and other data between hits and access to Apache internals.
19
20homepage            http://www.modpython.org/
21master_sites        apache:httpd/modpython
22extract.suffix      .tgz
23
24checksums           sha1 e538170fd78e09408b6d8593da980b126a0fef93 \
25                    rmd160 f78f93172963317f4318f8f2455419743c8fb4f5
26
27if {$subport ne $name && $subport ne "mod_python25"} {
28    depends_build       port:flex
29    depends_lib         port:apache2
30
31    patchfiles          patch-dist-Makefile.in.diff \
32                        patch-src-connobject.c.diff \
33                        patch-configure.diff
34
35    configure.args      --with-apxs=${prefix}/apache2/bin/apxs \
36                        --with-flex=${prefix}/bin/flex \
37                        --enable-so
38
39    destroot.violate_mtree   yes
40    pre-destroot {
41       xinstall -d -m 755 ${destroot}${prefix}/apache2/modules \
42          ${destroot}${prefix}/share/doc
43       file copy ${worksrcpath}/doc-html ${destroot}${prefix}/share/doc/${subport}
44    }
45
46    notes "To enable ${subport}, add
47    LoadModule python_module modules/mod_python.so
48    to your apache2 config file:
49    ${prefix}/apache2/conf/httpd.conf"
50} elseif {$subport eq $name} {
51    # mod_python used to be for python 2.4
52    replaced_by         mod_python27
53    depends_lib         port:mod_python27
54    use_configure       no
55    build               {}
56    destroot {
57        xinstall -d ${destroot}${prefix}/share/doc/${name}
58        system "echo This port is a stub. > ${destroot}${prefix}/share/doc/${name}/README"
59    }
60    supported_archs     noarch
61
62    livecheck.type      regex
63    livecheck.url       http://archive.apache.org/dist/httpd/modpython/
64    livecheck.regex     mod_python-(\[0-9\\.\]+)\\.tgz
65}
66
67subport mod_python27 {
68    conflicts       mod_python26
69    revision        0
70    depends_lib-append  port:python27
71    configure.args-append   --with-python=${prefix}/bin/python2.7
72}
73
74subport mod_python26 {
75    conflicts       mod_python27
76    revision        0
77    depends_lib-append  port:python26
78    configure.args-append   --with-python=${prefix}/bin/python2.6
79}
80
81subport mod_python25 {
82    revision        4
83    replaced_by     mod_python27
84    pre-fetch {
85        error "This port is only a stub and is replaced by $replaced_by"
86    }
87}
Note: See TracBrowser for help on using the repository browser.