[129623] trunk/dports/www

jmr at macports.org jmr at macports.org
Tue Dec 16 18:46:05 PST 2014


Revision: 129623
          https://trac.macports.org/changeset/129623
Author:   jmr at macports.org
Date:     2014-12-16 18:46:05 -0800 (Tue, 16 Dec 2014)
Log Message:
-----------
unify mod_python ports, replace 24 and 25 versions with 27, use notes

Modified Paths:
--------------
    trunk/dports/www/mod_python/Portfile

Added Paths:
-----------
    trunk/dports/www/mod_python/files/patch-configure.diff

Removed Paths:
-------------
    trunk/dports/www/mod_python25/
    trunk/dports/www/mod_python26/

Modified: trunk/dports/www/mod_python/Portfile
===================================================================
--- trunk/dports/www/mod_python/Portfile	2014-12-17 02:40:49 UTC (rev 129622)
+++ trunk/dports/www/mod_python/Portfile	2014-12-17 02:46:05 UTC (rev 129623)
@@ -4,55 +4,84 @@
 
 name                mod_python
 version             3.3.1
-revision            1
+revision            2
 categories          www python
 platforms           darwin
 license             Apache-2
 maintainers         nomaintainer
 description         Apache2 module that embeds Python within the server.
-long_description    \
-    Mod_python is an Apache 2 module that embeds the Python interpreter within \
-    the server. With mod_python you can write web-based applications in Python \
-    that will run many times faster than traditional CGI and will have access \
-    to advanced features such as ability to retain database connections and \
-    other data between hits and access to Apache internals.
+long_description \
+   Mod_python is an Apache 2 module that embeds the Python interpreter \
+   within the server. With mod_python you can write web-based applications \
+   in Python that will run many times faster than traditional CGI and will \
+   have access to advanced features such as ability to retain database \
+   connections and other data between hits and access to Apache internals.
 
 homepage            http://www.modpython.org/
 master_sites        apache:httpd/modpython
 extract.suffix      .tgz
-checksums           rmd160  f78f93172963317f4318f8f2455419743c8fb4f5 \
-                    sha256  ad2331fd5fcfd720ef9e3482973fc2d06eff36ba0c44693cfa42056a62175a6b
 
-depends_build       port:flex
-depends_lib         port:apache2 port:python24
+checksums           sha1 e538170fd78e09408b6d8593da980b126a0fef93 \
+                    rmd160 f78f93172963317f4318f8f2455419743c8fb4f5
 
-patchfiles          patch-src-connobject.c.diff patch-dist-Makefile.in.diff
+if {$subport ne $name && $subport ne "mod_python25"} {
+    depends_build       port:flex
+    depends_lib         port:apache2
 
-configure.cppflags  "-I${prefix}/include/python2.4"
-configure.ldflags-append "-Wl,-F${prefix}/Library/Frameworks"
-configure.args      --with-apxs=${prefix}/apache2/bin/apxs \
-                    --with-python=${prefix}/bin/python2.4 \
-                    --with-flex=${prefix}/bin/flex \
-                    --enable-so
+    patchfiles          patch-dist-Makefile.in.diff \
+                        patch-src-connobject.c.diff \
+                        patch-configure.diff
 
-pre-destroot {
-    xinstall -d -m 755 ${destroot}${prefix}/apache2/modules \
-        ${destroot}${prefix}/share/doc
-    file copy ${worksrcpath}/doc-html ${destroot}${prefix}/share/doc/${name}
+    configure.args      --with-apxs=${prefix}/apache2/bin/apxs \
+                        --with-flex=${prefix}/bin/flex \
+                        --enable-so
+
+    destroot.violate_mtree   yes
+    pre-destroot {
+       xinstall -d -m 755 ${destroot}${prefix}/apache2/modules \
+          ${destroot}${prefix}/share/doc
+       file copy ${worksrcpath}/doc-html ${destroot}${prefix}/share/doc/${subport}
+    }
+
+    notes "To enable ${subport}, add
+    LoadModule python_module modules/mod_python.so
+    to your apache2 config file:
+    ${prefix}/apache2/conf/httpd.conf"
+} elseif {$subport eq $name} {
+    # mod_python used to be for python 2.4
+    replaced_by         mod_python27
+    depends_lib         port:mod_python27
+    use_configure       no
+    build               {}
+    destroot {
+        xinstall -d ${destroot}${prefix}/share/doc/${name}
+        system "echo This port is a stub. > ${destroot}${prefix}/share/doc/${name}/README"
+    }
+    supported_archs     noarch
+
+    livecheck.type      regex
+    livecheck.url       http://archive.apache.org/dist/httpd/modpython/
+    livecheck.regex     mod_python-(\[0-9\\.\]+)\\.tgz
 }
 
-destroot.violate_mtree    yes
+subport mod_python27 {
+    conflicts       mod_python26
+    revision        0
+    depends_lib-append  port:python27
+    configure.args-append   --with-python=${prefix}/bin/python2.7
+}
 
-post-install {
-    ui_msg "########################################################"
-    ui_msg "# to enable mod_python add"
-    ui_msg "#  LoadModule python_module modules/mod_python.so"
-    ui_msg "# to your apache2 config file:"
-    ui_msg "#  ${prefix}/apache2/conf/httpd.conf"
-    ui_msg "########################################################"
+subport mod_python26 {
+    conflicts       mod_python27
+    revision        0
+    depends_lib-append  port:python26
+    configure.args-append   --with-python=${prefix}/bin/python2.6
 }
 
-livecheck.type      regex
-livecheck.url       http://httpd.apache.org/modules/python-download.cgi
-livecheck.regex     mod_python-(\[0-9\\.\]+)\\.tgz
-
+subport mod_python25 {
+    revision        4
+    replaced_by     mod_python27
+    pre-fetch {
+        error "This port is only a stub and is replaced by $replaced_by"
+    }
+}

Copied: trunk/dports/www/mod_python/files/patch-configure.diff (from rev 129614, trunk/dports/www/mod_python26/files/patch-configure.diff)
===================================================================
--- trunk/dports/www/mod_python/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/www/mod_python/files/patch-configure.diff	2014-12-17 02:46:05 UTC (rev 129623)
@@ -0,0 +1,24 @@
+--- configure-old	2009-04-01 04:38:10.000000000 +0200
++++ configure	2009-04-01 04:50:59.000000000 +0200
+@@ -2906,12 +2906,6 @@
+ 
+ save_LDFLAGS="$LDFLAGS"
+ save_LIBS="$LIBS"
+-if test "$PyFRAMEWORKDIR" != "no-framework"; then
+-  if test -n "$PyFRAMEWORK"; then
+-    PyPYTHONLIBS="-framework $PyFRAMEWORK"
+-    LDFLAGS="${LDFLAGS} -Wl,-framework,Python"
+-  fi
+-else
+   LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
+   as_ac_Lib=`echo "ac_cv_lib_python${PyVERSION}''_Py_NewInterpreter" | $as_tr_sh`
+ echo "$as_me:$LINENO: checking for Py_NewInterpreter in -lpython${PyVERSION}" >&5
+@@ -2990,8 +2984,6 @@
+                fi
+ 
+ fi
+-
+-fi
+ LIBS="$save_LIBS"
+ 
+ # (actually this check already just happened above)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141216/7924164a/attachment-0001.html>


More information about the macports-changes mailing list