[41218] trunk/dports/lang/python24

blb at macports.org blb at macports.org
Mon Oct 27 23:31:43 PDT 2008


Revision: 41218
          http://trac.macports.org/changeset/41218
Author:   blb at macports.org
Date:     2008-10-27 23:31:42 -0700 (Mon, 27 Oct 2008)
Log Message:
-----------
lang/python24 - switch to using frameworks_dir and applications_dir

Modified Paths:
--------------
    trunk/dports/lang/python24/Portfile
    trunk/dports/lang/python24/files/patch-Mac-OSX-IDLE-Makefile.in
    trunk/dports/lang/python24/files/patch-Mac-OSX-Makefile.in
    trunk/dports/lang/python24/files/patch-Mac-OSX-PythonLauncher-Makefile.in

Modified: trunk/dports/lang/python24/Portfile
===================================================================
--- trunk/dports/lang/python24/Portfile	2008-10-28 05:58:04 UTC (rev 41217)
+++ trunk/dports/lang/python24/Portfile	2008-10-28 06:31:42 UTC (rev 41218)
@@ -28,6 +28,14 @@
                         sha1    927c6e93ed3ea3bee4e07eff4b0f14254dc04147 \
                         rmd160  6c1c2905b166038fda5edb14baadbeb59acc8005
 
+# Can be removed once MacPorts 1.7.0 is released
+if {![info exists applications_dir]} {
+   set applications_dir /Applications/MacPorts
+}
+if {![info exists frameworks_dir]} {
+   set frameworks_dir ${prefix}/Library/Frameworks
+}
+
 patchfiles              patch-configure \
                         patch-Makefile.pre.in \
                         patch-Lib-cgi.py \
@@ -41,7 +49,7 @@
 depends_lib             port:gettext
 
 configure.args          --enable-shared \
-                        --enable-framework=${prefix}/Library/Frameworks \
+                        --enable-framework=${frameworks_dir} \
                         --mandir=${prefix}/share/man \
                         --without-readline \
                         --disable-tk \
@@ -50,10 +58,15 @@
 use_parallel_build      no
 
 post-patch {
-        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
-        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
-        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
-        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
+        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py \
+           ${worksrcpath}/Lib/site.py ${worksrcpath}/Mac/OSX/Makefile.in \
+           ${worksrcpath}/setup.py
+        reinplace "s|__FRAMEWORKS_DIR__|${frameworks_dir}|g" \
+           ${worksrcpath}/Mac/OSX/Makefile.in
+        reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|g" \
+           ${worksrcpath}/Mac/OSX/IDLE/Makefile.in \
+           ${worksrcpath}/Mac/OSX/Makefile.in \
+           ${worksrcpath}/Mac/OSX/PythonLauncher/Makefile.in
 }
 
 build.target            all libpython${branch}.dylib
@@ -71,7 +84,7 @@
 destroot.target         frameworkinstall maninstall
 
 post-destroot {
-        set framewpath ${prefix}/Library/Frameworks/Python.framework
+        set framewpath ${frameworks_dir}/Python.framework
         set framewdir  ${framewpath}/Versions/${branch}
 
         foreach dir { lib include } {

Modified: trunk/dports/lang/python24/files/patch-Mac-OSX-IDLE-Makefile.in
===================================================================
--- trunk/dports/lang/python24/files/patch-Mac-OSX-IDLE-Makefile.in	2008-10-28 05:58:04 UTC (rev 41217)
+++ trunk/dports/lang/python24/files/patch-Mac-OSX-IDLE-Makefile.in	2008-10-28 06:31:42 UTC (rev 41218)
@@ -5,7 +5,7 @@
  BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
  
 -PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
-+PYTHONAPPSDIR=/Applications/MacPorts/MacPython $(VERSION)
++PYTHONAPPSDIR=__APPLICATIONS_DIR__/MacPython $(VERSION)
  
  all: IDLE.app
  

Modified: trunk/dports/lang/python24/files/patch-Mac-OSX-Makefile.in
===================================================================
--- trunk/dports/lang/python24/files/patch-Mac-OSX-Makefile.in	2008-10-28 05:58:04 UTC (rev 41217)
+++ trunk/dports/lang/python24/files/patch-Mac-OSX-Makefile.in	2008-10-28 06:31:42 UTC (rev 41218)
@@ -5,7 +5,7 @@
  builddir = ../..
  srcdir = @srcdir@
 -prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
-+prefix=__PREFIX__/Library/Frameworks/Python.framework/Versions/$(VERSION)
++prefix=__FRAMEWORKS_DIR__/Python.framework/Versions/$(VERSION)
  LIBDEST=$(prefix)/lib/python$(VERSION)
  BUILDPYTHON=$(builddir)/python.exe
  RUNSHARED=       @RUNSHARED@
@@ -14,7 +14,7 @@
  # These are normally glimpsed from the previous set
  bindir=@exec_prefix@/bin
 -PYTHONAPPSPATH=/Applications/MacPython $(VERSION)
-+PYTHONAPPSPATH=/Applications/MacPorts/MacPython $(VERSION)
++PYTHONAPPSPATH=__APPLICATIONS_DIR__/MacPython $(VERSION)
  PYTHONAPPSDIR=$(PYTHONAPPSPATH)
  APPINSTALLDIR=$(prefix)/Resources/Python.app
  

Modified: trunk/dports/lang/python24/files/patch-Mac-OSX-PythonLauncher-Makefile.in
===================================================================
--- trunk/dports/lang/python24/files/patch-Mac-OSX-PythonLauncher-Makefile.in	2008-10-28 05:58:04 UTC (rev 41217)
+++ trunk/dports/lang/python24/files/patch-Mac-OSX-PythonLauncher-Makefile.in	2008-10-28 06:31:42 UTC (rev 41218)
@@ -5,7 +5,7 @@
  BUNDLEBULDER=$(srcdir)/../../../Lib/plat-mac/bundlebuilder.py
  
 -PYTHONAPPSDIR=/Applications/MacPython $(VERSION)
-+PYTHONAPPSDIR=/Applications/MacPorts/MacPython $(VERSION)
++PYTHONAPPSDIR=__APPLICATIONS_DIR__/MacPython $(VERSION)
  OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
  
  all: PythonLauncher.app
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081027/ef5102c4/attachment.html>


More information about the macports-changes mailing list