[49416] trunk/dports/www/ajp-wsgi

blb at macports.org blb at macports.org
Wed Apr 8 23:00:26 PDT 2009


Revision: 49416
          http://trac.macports.org/changeset/49416
Author:   blb at macports.org
Date:     2009-04-08 23:00:23 -0700 (Wed, 08 Apr 2009)
Log Message:
-----------
www/ajp-wsgi - use variants always to select which python version to use
(and default to 2.6 when not selected now that trac uses that version);
make sure it links properly with python25 when selected

Modified Paths:
--------------
    trunk/dports/www/ajp-wsgi/Portfile

Added Paths:
-----------
    trunk/dports/www/ajp-wsgi/files/
    trunk/dports/www/ajp-wsgi/files/patch-Makefile.in.py25mac.diff

Modified: trunk/dports/www/ajp-wsgi/Portfile
===================================================================
--- trunk/dports/www/ajp-wsgi/Portfile	2009-04-09 05:41:19 UTC (rev 49415)
+++ trunk/dports/www/ajp-wsgi/Portfile	2009-04-09 06:00:23 UTC (rev 49416)
@@ -3,6 +3,7 @@
 PortSystem       1.0
 name             ajp-wsgi
 version          1.0
+revision         1
 categories       www
 maintainers      blb
 description      WSGI server/gateway implementing AJP
@@ -23,21 +24,9 @@
                  sha1 1c17de9dbd8057b0754850b261a798bfcd874cab \
                  rmd160 a18856043b83dcdcee4ab41f79de4ae13bc19022
 
-depends_lib      port:python24
+configure.args   configure.py
+configure.pre_args
 
-configure {
-   if {[variant_isset python25]} {
-       system "cd ${worksrcpath} && ${prefix}/bin/python2.5 configure.py"
-   } else {
-       system "cd ${worksrcpath} && ${prefix}/bin/python configure.py"
-   }
-}
-
-post-configure {
-   reinplace "s|Python.framework/Versions/.../Python||" ${worksrcpath}/Makefile
-   reinplace "s|LDFLAGS=.*$|LDFLAGS=-L${prefix}/lib|" ${worksrcpath}/Makefile
-}
-
 destroot {
    xinstall -m 755 -d ${destroot}${prefix}/bin \
       ${destroot}${prefix}/share/doc/${name} \
@@ -49,11 +38,36 @@
       ${destroot}${prefix}/share/examples/${name}
 }
 
-variant python25 {
-   depends_lib-delete port:python24
-   depends_lib-append port:python25
+variant python24 conflicts python25 python26 description {Use with Python 2.4} {
+   depends_lib-append   port:python24
+   configure.cmd        ${prefix}/bin/python2.4
 }
 
+variant python25 conflicts python24 python26 description {Use with Python 2.5} {
+   depends_lib-append   port:python25
+   configure.cmd        ${prefix}/bin/python2.5
+}
+
+variant python26 conflicts python24 python25 description {Use with Python 2.6} {
+   depends_lib-append   port:python26
+   configure.cmd        ${prefix}/bin/python2.6
+}
+
+if {![variant_isset python24] && ![variant_isset python25] && ![variant_isset python26]} {
+   default_variants     +python26
+}
+
+platform macosx {
+   if {[variant_isset python25]} {
+      # work around funky LINKFORSHARED with python25
+      patchfiles-append   patch-Makefile.in.py25mac.diff
+      post-patch {
+         reinplace "s|@@@FRAMEWORKS_DIR@@@|${frameworks_dir}|g" \
+            ${worksrcpath}/Makefile.in
+      }
+   }
+}
+
 livecheck.check regex
 livecheck.url   "${master_sites}?C=M;O=D"
 livecheck.regex "${name}-(\[0-9.\]+)${extract.suffix}"

Added: trunk/dports/www/ajp-wsgi/files/patch-Makefile.in.py25mac.diff
===================================================================
--- trunk/dports/www/ajp-wsgi/files/patch-Makefile.in.py25mac.diff	                        (rev 0)
+++ trunk/dports/www/ajp-wsgi/files/patch-Makefile.in.py25mac.diff	2009-04-09 06:00:23 UTC (rev 49416)
@@ -0,0 +1,11 @@
+--- Makefile.in.orig	2006-12-24 15:01:58.000000000 -0700
++++ Makefile.in	2009-04-08 23:50:40.000000000 -0600
+@@ -5,7 +5,7 @@
+ CFLAGS=		$(BASECFLAGS) $(OPT) $(CPPFLAGS) $(DEFINES)
+ LIBPL=		@@LIBPL@@
+ LDFLAGS=	@@LDFLAGS@@
+-LINKFORSHARED=	@@LINKFORSHARED@@
++LINKFORSHARED=  -u _PyMac_Error @@@FRAMEWORKS_DIR@@@/Python.framework/Versions/2.5/Python
+ LIBS=		@@LIBS@@
+ SYSLIBS=	@@SYSLIBS@@
+ VERSION=	@@VERSION@@
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090408/acc6c389/attachment-0001.html>


More information about the macports-changes mailing list