Ignore:
Timestamp:
Dec 17, 2014, 2:46:05 AM (4 years ago)
Author:
jmr@…
Message:

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

Location:
trunk/dports/www/mod_python
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/www/mod_python/Portfile

    r94845 r129623  
    55name                mod_python
    66version             3.3.1
    7 revision            1
     7revision            2
    88categories          www python
    99platforms           darwin
     
    1111maintainers         nomaintainer
    1212description         Apache2 module that embeds Python within the server.
    13 long_description    \
    14     Mod_python is an Apache 2 module that embeds the Python interpreter within \
    15     the server. With mod_python you can write web-based applications in Python \
    16     that will run many times faster than traditional CGI and will have access \
    17     to advanced features such as ability to retain database connections and \
    18     other data between hits and access to Apache internals.
     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.
    1919
    2020homepage            http://www.modpython.org/
    2121master_sites        apache:httpd/modpython
    2222extract.suffix      .tgz
    23 checksums           rmd160  f78f93172963317f4318f8f2455419743c8fb4f5 \
    24                     sha256  ad2331fd5fcfd720ef9e3482973fc2d06eff36ba0c44693cfa42056a62175a6b
    2523
    26 depends_build       port:flex
    27 depends_lib         port:apache2 port:python24
     24checksums           sha1 e538170fd78e09408b6d8593da980b126a0fef93 \
     25                    rmd160 f78f93172963317f4318f8f2455419743c8fb4f5
    2826
    29 patchfiles          patch-src-connobject.c.diff patch-dist-Makefile.in.diff
     27if {$subport ne $name && $subport ne "mod_python25"} {
     28    depends_build       port:flex
     29    depends_lib         port:apache2
    3030
    31 configure.cppflags  "-I${prefix}/include/python2.4"
    32 configure.ldflags-append "-Wl,-F${prefix}/Library/Frameworks"
    33 configure.args      --with-apxs=${prefix}/apache2/bin/apxs \
    34                     --with-python=${prefix}/bin/python2.4 \
    35                     --with-flex=${prefix}/bin/flex \
    36                     --enable-so
     31    patchfiles          patch-dist-Makefile.in.diff \
     32                        patch-src-connobject.c.diff \
     33                        patch-configure.diff
    3734
    38 pre-destroot {
    39     xinstall -d -m 755 ${destroot}${prefix}/apache2/modules \
    40         ${destroot}${prefix}/share/doc
    41     file copy ${worksrcpath}/doc-html ${destroot}${prefix}/share/doc/${name}
     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
    4265}
    4366
    44 destroot.violate_mtree    yes
    45 
    46 post-install {
    47     ui_msg "########################################################"
    48     ui_msg "# to enable mod_python add"
    49     ui_msg "#  LoadModule python_module modules/mod_python.so"
    50     ui_msg "# to your apache2 config file:"
    51     ui_msg "#  ${prefix}/apache2/conf/httpd.conf"
    52     ui_msg "########################################################"
     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
    5372}
    5473
    55 livecheck.type      regex
    56 livecheck.url       http://httpd.apache.org/modules/python-download.cgi
    57 livecheck.regex     mod_python-(\[0-9\\.\]+)\\.tgz
     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}
    5880
     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 TracChangeset for help on using the changeset viewer.