Ticket #32429: Portfile-nodejs.diff

File Portfile-nodejs.diff, 1.6 KB (added by spreng@…, 12 years ago)
  • Portfile

    old new  
    2727
    2828distname                node-v${version}
    2929
    30 depends_lib             port:python27
     30set py_bin              ""
     31
     32variant python26 conflicts python27 description {Use python 2.6} {
     33    depends_lib-append      port:python26
     34    set py_bin              ${prefix}/bin/python2.6
     35}
     36
     37variant python27 conflicts python26 description {Use python 2.7} {
     38    depends_lib-append      port:python27
     39    set py_bin              ${prefix}/bin/python2.6
     40}
     41
     42if {![variant_isset python26]} {
     43    default_variants +python27
     44}
    3145
    3246patchfiles              patch-Makefile-python.diff \
    3347                        patch-wscript-npm.diff
     
    4054    return $files
    4155}
    4256
    43 set py27_bin ${prefix}/bin/python2.7
    44 
    4557post-patch {
    4658    foreach f [concat ${worksrcpath}/wscript \
    4759                   ${worksrcpath}/configure-gyp \
     
    5163                   ${worksrcpath}/tools/gyp_node \
    5264                   ${worksrcpath}/deps/uv/gyp_uv \
    5365                   [rec_glob ${worksrcpath} *.py]] {
    54         reinplace "s|/usr/bin/env python|${py27_bin}|" ${f}
     66        reinplace "s|/usr/bin/env python|${py_bin}|" ${f}
    5567    }
    5668}
    5769
     
    8395                    CXX=${configure.cxx} \
    8496                    CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
    8597                    LDFLAGS="${configure.ldflags} ${configure.ld_archflags}" \
    86                     PYTHON=${py27_bin}
     98                    PYTHON=${py_bin}
    8799
    88100post-destroot {
    89101    set docdir ${destroot}${prefix}/share/doc/${name}