diff --git a/Portfile b/Portfile
index d761e08..c142291 100644
a
|
b
|
checksums md5 d16d29a77db2cd3af882a591f431a403 \ |
28 | 28 | sha1 d7fd08304b66cb4020786a7ee5aa452235046ecd \ |
29 | 29 | rmd160 b44d5cc7efa198b21f41e43e1d28af60875f0a4e |
30 | 30 | |
| 31 | # Can be removed once MacPorts 1.7.0 is released |
| 32 | if {![info exists applications_dir]} { |
| 33 | set applications_dir /Applications/MacPorts |
| 34 | } |
| 35 | if {![info exists frameworks_dir]} { |
| 36 | set frameworks_dir ${prefix}/Library/Frameworks |
| 37 | } |
| 38 | |
31 | 39 | patchfiles patch-Makefile.pre.in.diff \ |
32 | 40 | patch-setup.py.diff \ |
33 | | patch-Lib-cgi.py.diff |
| 41 | patch-Lib-cgi.py.diff \ |
| 42 | patch-Mac-IDLE-Makefile.in.diff \ |
| 43 | patch-Mac-Makefile.in.diff \ |
| 44 | patch-Mac-PythonLauncher-Makefile.in.diff \ |
| 45 | patch-Mac-Tools-Doc-setup.py.diff |
34 | 46 | |
35 | 47 | depends_lib port:gettext |
36 | 48 | |
37 | 49 | configure.args --enable-shared \ |
38 | | --enable-framework=${prefix}/Library/Frameworks \ |
| 50 | --enable-framework=${frameworks_dir} \ |
39 | 51 | --mandir=${prefix}/share/man \ |
40 | 52 | --without-readline \ |
41 | 53 | --disable-tk \ |
… |
… |
configure.args --enable-shared \ |
44 | 56 | use_parallel_build no |
45 | 57 | |
46 | 58 | post-patch { |
47 | | reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py |
48 | | reinplace "s|/Applications/MacPython|/Applications/MacPorts/MacPython|g" \ |
| 59 | reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Lib/cgi.py |
| 60 | reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|g" \ |
49 | 61 | ${worksrcpath}/Mac/Makefile.in ${worksrcpath}/Mac/IDLE/Makefile.in \ |
50 | 62 | ${worksrcpath}/Mac/Tools/Doc/setup.py \ |
51 | | ${worksrcpath}/Mac/PythonLauncher/Makefile.in \ |
52 | | ${worksrcpath}/Mac/BuildScript/build-installer.py |
| 63 | ${worksrcpath}/Mac/PythonLauncher/Makefile.in |
53 | 64 | reinplace "s|xargs -0 rm -r|xargs -0 rm -rf|g" \ |
54 | 65 | ${worksrcpath}/Mac/PythonLauncher/Makefile.in |
55 | 66 | } |
… |
… |
test.target test |
62 | 73 | destroot.target frameworkinstall maninstall |
63 | 74 | |
64 | 75 | post-destroot { |
65 | | set framewpath ${prefix}/Library/Frameworks/Python.framework |
| 76 | set framewpath ${frameworks_dir}/Python.framework |
66 | 77 | set framewdir ${framewpath}/Versions/${branch} |
67 | 78 | |
68 | 79 | foreach dir { lib include } { |
diff --git a/files/patch-Lib-cgi.py.diff b/files/patch-Lib-cgi.py.diff
index 84a073d..fb861bc 100644
a
|
b
|
|
2 | 2 | +++ Lib/cgi.py 2007-08-21 15:36:54.000000000 +0200 |
3 | 3 | @@ -1,13 +1,6 @@ |
4 | 4 | -#! /usr/local/bin/python |
5 | | +#! __PREFIX__/bin/python2.6 |
| 5 | +#! @@PREFIX@@/bin/python2.6 |
6 | 6 | |
7 | 7 | -# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is |
8 | 8 | -# intentionally NOT "/usr/bin/env python". On many systems |
diff --git a/files/patch-Mac-IDLE-Makefile.in.diff b/files/patch-Mac-IDLE-Makefile.in.diff
new file mode 100644
index 0000000..bafcf47
-
|
+
|
|
| 1 | --- Mac/IDLE/Makefile.in.orig 2008-07-17 23:48:03.000000000 -0600 |
| 2 | +++ Mac/IDLE/Makefile.in 2008-10-04 19:50:50.000000000 -0600 |
| 3 | @@ -22,7 +22,7 @@ |
| 4 | |
| 5 | BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py |
| 6 | |
| 7 | -PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION) |
| 8 | +PYTHONAPPSDIR=@@APPLICATIONS_DIR@@/$(PYTHONFRAMEWORK) $(VERSION) |
| 9 | |
| 10 | all: IDLE.app |
| 11 | |
diff --git a/files/patch-Mac-Makefile.in.diff b/files/patch-Mac-Makefile.in.diff
new file mode 100644
index 0000000..cfa5f88
-
|
+
|
|
| 1 | --- Mac/Makefile.in.orig 2008-07-22 01:06:33.000000000 -0600 |
| 2 | +++ Mac/Makefile.in 2008-10-04 19:51:40.000000000 -0600 |
| 3 | @@ -18,7 +18,7 @@ |
| 4 | |
| 5 | # These are normally glimpsed from the previous set |
| 6 | bindir=$(prefix)/bin |
| 7 | -PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION) |
| 8 | +PYTHONAPPSDIR=@@APPLICATIONS_DIR@@/$(PYTHONFRAMEWORK) $(VERSION) |
| 9 | APPINSTALLDIR=$(prefix)/Resources/Python.app |
| 10 | |
| 11 | # Variables for installing the "normal" unix binaries |
diff --git a/files/patch-Mac-PythonLauncher-Makefile.in.diff b/files/patch-Mac-PythonLauncher-Makefile.in.diff
new file mode 100644
index 0000000..be74da9
-
|
+
|
|
| 1 | --- Mac/PythonLauncher/Makefile.in.orig 2008-05-02 13:58:56.000000000 -0600 |
| 2 | +++ Mac/PythonLauncher/Makefile.in 2008-10-04 19:52:27.000000000 -0600 |
| 3 | @@ -21,7 +21,7 @@ |
| 4 | |
| 5 | BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py |
| 6 | |
| 7 | -PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION) |
| 8 | +PYTHONAPPSDIR=@@APPLICATIONS_DIR@@/$(PYTHONFRAMEWORK) $(VERSION) |
| 9 | OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o |
| 10 | |
| 11 | all: Python\ Launcher.app |
diff --git a/files/patch-Mac-Tools-Doc-setup.py.diff b/files/patch-Mac-Tools-Doc-setup.py.diff
new file mode 100644
index 0000000..63e4e11
-
|
+
|
|
| 1 | --- Mac/Tools/Doc/setup.py.diff 2008-03-29 09:24:25.000000000 -0600 |
| 2 | +++ Mac/Tools/Doc/setup.py 2008-10-04 19:53:40.000000000 -0600 |
| 3 | @@ -30,7 +30,7 @@ |
| 4 | |
| 5 | MAJOR_VERSION='2.4' |
| 6 | MINOR_VERSION='2.4.1' |
| 7 | -DESTDIR='/Applications/MacPython-%s/PythonIDE.app/Contents/Resources/English.lproj/PythonDocumentation' % MAJOR_VERSION |
| 8 | +DESTDIR='@@APPLICATIONS_DIR@@/MacPython-%s/PythonIDE.app/Contents/Resources/English.lproj/PythonDocumentation' % MAJOR_VERSION |
| 9 | |
| 10 | class DocBuild(build): |
| 11 | def initialize_options(self): |