30 | | set python.branch 2.7 |
31 | | set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch} |
32 | | set python.bin ${python.prefix}/bin/python${python.branch} |
33 | | configure.args-append --prefix=${python.prefix} |
34 | | configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0 |
35 | | configure.pkg_config_path ${python.prefix}/lib/pkgconfig |
36 | | options python.link_binaries python.link_binaries_suffix |
37 | | default python.link_binaries yes |
38 | | default python.link_binaries_suffix {-${python.branch}} |
39 | | post-destroot { |
40 | | if {${python.link_binaries}} { |
41 | | foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] { |
42 | | if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} { |
43 | | ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}" |
| 32 | if {![variant_isset python27] && ![variant_isset python26]} { |
| 33 | default_variants +python27 |
| 34 | } |
| 35 | variant python27 conflicts python26 description {Build using Python 2.7} { |
| 36 | global python.branch python.prefix |
| 37 | set python.branch 2.7 |
| 38 | depends_lib-append port:python27 |
| 39 | set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch} |
| 40 | set python.bin ${python.prefix}/bin/python${python.branch} |
| 41 | configure.args-append --prefix=${python.prefix} |
| 42 | configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0 |
| 43 | configure.pkg_config_path ${python.prefix}/lib/pkgconfig |
| 44 | options python.link_binaries python.link_binaries_suffix |
| 45 | default python.link_binaries yes |
| 46 | default python.link_binaries_suffix {-${python.branch}} |
| 47 | post-destroot { |
| 48 | if {${python.link_binaries}} { |
| 49 | foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] { |
| 50 | if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} { |
| 51 | ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}" |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | variant python26 conflicts python27 description {Build using Python 2.6} { |
| 59 | global python.branch python.prefix |
| 60 | set python.branch 2.6 |
| 61 | depends_lib-append port:python26 |
| 62 | set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch} |
| 63 | set python.bin ${python.prefix}/bin/python${python.branch} |
| 64 | configure.args-append --prefix=${python.prefix} |
| 65 | configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0 |
| 66 | configure.pkg_config_path ${python.prefix}/lib/pkgconfig |
| 67 | options python.link_binaries python.link_binaries_suffix |
| 68 | default python.link_binaries yes |
| 69 | default python.link_binaries_suffix {-${python.branch}} |
| 70 | post-destroot { |
| 71 | if {${python.link_binaries}} { |
| 72 | foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] { |
| 73 | if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} { |
| 74 | ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}" |
| 75 | } |