85 | | if {(![variant_isset universal] && ![string match *64* $build_arch]) || ([variant_isset universal] && ![string match *64* $universal_archs])} { |
86 | | post-destroot { |
87 | | set framewpath ${frameworks_dir}/Python.framework |
88 | | set framewdir ${framewpath}/Versions/${branch} |
89 | | |
90 | | foreach dir { lib include } { |
91 | | file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir} |
92 | | ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch} |
93 | | } |
94 | | # Since the lib/python${branch} dir was just moved above and |
95 | | # libpython2.4.a in lib/python${branch}/config is relative, we need |
96 | | # to repoint it here |
97 | | file delete ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a |
98 | | ln -s ${framewdir}/Python ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a |
99 | | |
100 | | ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib |
101 | | |
102 | | file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1 |
103 | | |
104 | | # delete symlinks without version suffix, use python_select instead to choose version |
105 | | foreach bin { python pythonw idle pydoc smtpd.py } { |
106 | | file delete ${destroot}${prefix}/bin/${bin} |
107 | | } |
108 | | foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] { |
109 | | file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin |
110 | | ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin} |
111 | | } |
112 | | |
113 | | foreach dir { Headers Resources Python Versions/Current } { |
114 | | file delete ${destroot}${framewpath}/${dir} |
115 | | } |
116 | | |
117 | | # Without this, LINKFORSHARED is set to |
118 | | # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) |
119 | | # (this becomes Python.framework/Versions/2.4/Python) which doesn't |
120 | | # quite work (see ticket #15099); instead specifically list the |
121 | | # full path to the proper Python framework file (which becomes |
122 | | # ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/Python) |
123 | | reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${prefix}/lib/python${branch}/config/Makefile |
| 89 | post-destroot { |
| 90 | set framewpath ${frameworks_dir}/Python.framework |
| 91 | set framewdir ${framewpath}/Versions/${branch} |
| 92 | |
| 93 | foreach dir { lib include } { |
| 94 | file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir} |
| 95 | ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch} |
| 96 | } |
| 97 | # Since the lib/python${branch} dir was just moved above and |
| 98 | # libpython2.4.a in lib/python${branch}/config is relative, we need |
| 99 | # to repoint it here |
| 100 | file delete ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a |
| 101 | ln -s ${framewdir}/Python ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a |
| 102 | |
| 103 | ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib |
| 104 | |
| 105 | file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1 |
| 106 | |
| 107 | # delete symlinks without version suffix, use python_select instead to choose version |
| 108 | foreach bin { python pythonw idle pydoc smtpd.py } { |
| 109 | file delete ${destroot}${prefix}/bin/${bin} |
125 | | } else { |
126 | | # 64-bit, can't build mac-specific stuff |
127 | | configure.args-delete --enable-framework=${frameworks_dir} |
128 | | configure.args-append --disable-toolbox-glue |
129 | | destroot.target install maninstall |
130 | | |
131 | | post-destroot { |
132 | | # delete symlinks without version suffix, use python_select instead to choose version |
133 | | foreach bin { python pythonw idle pydoc smtpd.py python-config } { |
134 | | file delete ${destroot}${prefix}/bin/${bin} |
135 | | } |
136 | | |
137 | | file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1 |
138 | | |
139 | | # install select file for python_select |
140 | | xinstall -m 755 -d ${destroot}${prefix}/etc/select/python |
141 | | xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/ |
| 111 | foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] { |
| 112 | file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin |
| 113 | ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin} |
| 115 | |
| 116 | foreach dir { Headers Resources Python Versions/Current } { |
| 117 | file delete ${destroot}${framewpath}/${dir} |
| 118 | } |
| 119 | |
| 120 | # Without this, LINKFORSHARED is set to |
| 121 | # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) |
| 122 | # (this becomes Python.framework/Versions/2.4/Python) which doesn't |
| 123 | # quite work (see ticket #15099); instead specifically list the |
| 124 | # full path to the proper Python framework file (which becomes |
| 125 | # ${prefix}/Library/Frameworks/Python.framework/Versions/2.4/Python) |
| 126 | reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${prefix}/lib/python${branch}/config/Makefile |