Ticket #16765: 0003-Fix-framework-and-application-installation-locations.patch

File 0003-Fix-framework-and-application-installation-locations.patch, 5.5 KB (added by blb@…, 12 years ago)

0003-Fix-framework-and-application-installation-locations.patch

  • Portfile

    diff --git a/Portfile b/Portfile
    index d761e08..c142291 100644
    a b checksums md5 d16d29a77db2cd3af882a591f431a403 \ 
    2828                        sha1    d7fd08304b66cb4020786a7ee5aa452235046ecd \
    2929                        rmd160  b44d5cc7efa198b21f41e43e1d28af60875f0a4e
    3030
     31# Can be removed once MacPorts 1.7.0 is released
     32if {![info exists applications_dir]} {
     33   set applications_dir /Applications/MacPorts
     34}
     35if {![info exists frameworks_dir]} {
     36   set frameworks_dir ${prefix}/Library/Frameworks
     37}
     38
    3139patchfiles              patch-Makefile.pre.in.diff \
    3240                        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
    3446
    3547depends_lib             port:gettext
    3648
    3749configure.args          --enable-shared \
    38                         --enable-framework=${prefix}/Library/Frameworks \
     50                        --enable-framework=${frameworks_dir} \
    3951                        --mandir=${prefix}/share/man \
    4052                        --without-readline \
    4153                        --disable-tk \
    configure.args --enable-shared \ 
    4456use_parallel_build      no
    4557
    4658post-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" \
    4961      ${worksrcpath}/Mac/Makefile.in ${worksrcpath}/Mac/IDLE/Makefile.in \
    5062      ${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
    5364   reinplace "s|xargs -0 rm -r|xargs -0 rm -rf|g" \
    5465      ${worksrcpath}/Mac/PythonLauncher/Makefile.in
    5566}
    test.target test 
    6273destroot.target         frameworkinstall maninstall
    6374
    6475post-destroot {
    65    set framewpath ${prefix}/Library/Frameworks/Python.framework
     76   set framewpath ${frameworks_dir}/Python.framework
    6677   set framewdir  ${framewpath}/Versions/${branch}
    6778
    6879   foreach dir { lib include } {
  • files/patch-Lib-cgi.py.diff

    diff --git a/files/patch-Lib-cgi.py.diff b/files/patch-Lib-cgi.py.diff
    index 84a073d..fb861bc 100644
    a b  
    22+++ Lib/cgi.py  2007-08-21 15:36:54.000000000 +0200
    33@@ -1,13 +1,6 @@
    44-#! /usr/local/bin/python
    5 +#! __PREFIX__/bin/python2.6
     5+#! @@PREFIX@@/bin/python2.6
    66 
    77-# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
    88-# intentionally NOT "/usr/bin/env python".  On many systems
  • new file files/patch-Mac-IDLE-Makefile.in.diff

    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 
  • new file files/patch-Mac-Makefile.in.diff

    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
  • new file files/patch-Mac-PythonLauncher-Makefile.in.diff

    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
  • new file files/patch-Mac-Tools-Doc-setup.py.diff

    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):