Ticket #48827: nodejs-devel-subport.patch

File nodejs-devel-subport.patch, 8.0 KB (added by seanfarley (Sean Farley), 9 years ago)

make nodejs-devel a subport of nodejs

  • deleted file dports/devel/nodejs-devel/Portfile

    # HG changeset patch
    # User Sean Farley <sean@farley.io>
    # Date 1443120609 25200
    #      Thu Sep 24 11:50:09 2015 -0700
    # Node ID f2c0d592c9b680892353c6720f0ba1dcde3afd2c
    # Parent  e3b99f83372574e44c85a81da12360badbf760b6
    nodejs-devel: make subport of nodejs
    
    diff --git a/dports/devel/nodejs-devel/Portfile b/dports/devel/nodejs-devel/Portfile
    deleted file mode 100644
    + -  
    1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    2 # $Id$
    3 
    4 PortSystem              1.0
    5 PortGroup               compiler_blacklist_versions 1.0
    6 
    7 name                    nodejs-devel
    8 version                 0.11.16
    9 categories              devel net
    10 platforms               darwin
    11 license                 {MIT BSD}
    12 maintainers             ciserlohn
    13 
    14 description             Evented I/O for V8 JavaScript
    15 
    16 long_description        Node's goal is to provide an easy way to build scalable network programs in JavaScript. \
    17                         Node is similar in design to and influenced by systems like Ruby's Event \
    18                         Machine or Python's Twisted. Node takes the event model a bit further-it \
    19                         presents the event loop as a language construct instead of as a library.
    20 
    21 conflicts               nodejs iojs
    22 
    23 homepage                http://nodejs.org/
    24 master_sites            ${homepage}dist/v${version}
    25 
    26 checksums               rmd160  7c082b86478fdfcb3ed1a49bea15508f81f6e7ea \
    27                         sha256  f0d141faa1f7da3aff53e9615d76040d29c0650542be3b09ee80aca2f2cc61f6
    28 
    29 distname                node-v${version}
    30 
    31 proc rec_glob {basedir pattern} {
    32     set files [glob -directory $basedir -nocomplain -type f $pattern]
    33     foreach dir [glob -directory $basedir -nocomplain -type d *] {
    34         eval lappend files [rec_glob $dir $pattern]
    35     }
    36     return $files
    37 }
    38 
    39 configure.python ${prefix}/bin/python2.7
    40 
    41 post-patch {
    42     foreach f [concat ${worksrcpath}/configure \
    43                    ${worksrcpath}/tools/gyp/gyp \
    44                    ${worksrcpath}/deps/cares/gyp_cares \
    45                    ${worksrcpath}/deps/v8/build/gyp_v8 \
    46                    ${worksrcpath}/deps/v8/tools/mingw-generate-makefiles.sh \
    47                    [rec_glob ${worksrcpath} *.py]] {
    48         reinplace "s|/usr/bin/env python|${configure.python}|" ${f}
    49     }
    50     foreach gypfile [rec_glob ${worksrcpath} *.gyp] {
    51         reinplace "s|'python'|'${configure.python}'|" ${gypfile}
    52     }
    53     reinplace "s|/usr/bin/env node|${prefix}/bin/node|" ${worksrcpath}/tools/doc/node_modules/marked/bin/marked
    54 }
    55 
    56 configure.args          --without-ssl
    57 configure.args-append   --without-npm
    58 
    59 # TODO: Remove after 2015-12-27.
    60 variant python25 requires python27 description {Legacy variant} {}
    61 
    62 variant python26 conflicts python27 description {Use python 2.6} {
    63     depends_lib-append  port:python26
    64     configure.python    ${prefix}/bin/python2.6
    65 }
    66 
    67 variant python27 conflicts python26 description {Use python 2.7} {
    68     depends_lib-append  port:python27
    69     configure.python    ${prefix}/bin/python2.7
    70 }
    71 
    72 if {![variant_isset python25] && ![variant_isset python26]} {
    73     default_variants +python27
    74 }
    75 
    76 variant ssl description {Add secure socket layer support} {
    77     depends_build-append    port:pkgconfig
    78     depends_lib-append      path:lib/libssl.dylib:openssl
    79     configure.args-delete   --without-ssl
    80     configure.args-append   --shared-openssl
    81     configure.args-append   --shared-openssl-includes=${prefix}/include/openssl
    82     configure.args-append   --shared-openssl-libpath=${prefix}/lib
    83 }
    84 
    85 variant dtrace description {Add dtrace support} {
    86     configure.args-append   --with-dtrace
    87 }
    88 
    89 default_variants        +ssl
    90 
    91 # V8 only supports ARM and IA-32 processors
    92 supported_archs         i386 x86_64
    93 
    94 universal_variant       no
    95 
    96 patchfiles-append       patch-common.gypi.diff
    97 
    98 # "V8 doesn't like cache."
    99 configure.ccache        no
    100 
    101 test.run                yes
    102 
    103 use_parallel_build      no
    104 
    105 switch $build_arch {
    106     i386 {
    107         configure.args-append   --dest-cpu=ia32
    108     }
    109     x86_64 {
    110         configure.args-append   --dest-cpu=x64
    111     }
    112 }
    113 
    114 build.args-append   CC=${configure.cc} \
    115                     CXX=${configure.cxx} \
    116                     CPP=${configure.cpp} \
    117                     CFLAGS="${configure.cflags}" \
    118                     CXXFLAGS="${configure.cxxflags}" \
    119                     LDFLAGS="${configure.ldflags}" \
    120                     PYTHON=${configure.python} \
    121                     V=1
    122 
    123 destroot {
    124     set bindir ${destroot}${prefix}/bin
    125     set libdir ${destroot}${prefix}/lib
    126     set libndir ${libdir}/node
    127     set libddir ${libdir}/dtrace
    128     set incdir ${destroot}${prefix}/include/node
    129     set docdir ${destroot}${prefix}/share/doc/${name}
    130 
    131     xinstall -d ${bindir}
    132     xinstall -d ${libdir}
    133     xinstall -d ${libndir}
    134     xinstall -d ${libddir}
    135     xinstall -d ${incdir}
    136     xinstall -d ${docdir}
    137 
    138 # install binaries
    139     xinstall -m 755 -W ${worksrcpath} \
    140         out/Release/node \
    141         ${bindir}
    142 
    143 # install headers
    144     xinstall -m 644 -W ${worksrcpath} \
    145         src/node.h \
    146         src/node_buffer.h \
    147         src/node_object_wrap.h \
    148         src/node_version.h \
    149         deps/v8/include/v8-debug.h \
    150         deps/v8/include/v8-profiler.h \
    151         deps/v8/include/v8-testing.h \
    152         deps/v8/include/v8.h \
    153         deps/v8/include/v8config.h \
    154         deps/v8/include/v8stdint.h \
    155         deps/uv/include/uv.h \
    156         deps/uv/include/uv-unix.h \
    157         deps/uv/include/uv-errno.h \
    158         deps/uv/include/uv-darwin.h \
    159         deps/uv/include/tree.h \
    160         deps/uv/include/pthread-fixes.h \
    161         deps/cares/include/ares.h \
    162         deps/cares/include/ares_version.h \
    163         ${incdir}
    164 
    165 # install dtrace script
    166     xinstall -m 644 -W ${worksrcpath} \
    167         src/node.d \
    168         ${libddir}
    169 
    170 # install manpage
    171     xinstall -m 644 -W ${worksrcpath} \
    172         doc/node.1 \
    173         ${destroot}${prefix}/share/man/man1
    174 
    175 # install docs
    176     xinstall -m 644 -W ${worksrcpath} \
    177         AUTHORS \
    178         ChangeLog \
    179         LICENSE \
    180         README.md \
    181         ${docdir}
    182 }
    183 
    184 compiler.blacklist *gcc* *clang-2.* {clang < 300}
    185 
    186 if {${os.major} < 10} {
    187     pre-fetch {
    188         ui_error "${name} ${version} requires Mac OS X 10.6 or greater."
    189         return -code error "incompatible Mac OS X version"
    190     }
    191 }
    192 
    193 livecheck.url       ${homepage}dist/
    194 livecheck.type      regex
    195 livecheck.regex     {v(\d+\.\d*[13579]\.\d+)}
  • deleted file dports/devel/nodejs-devel/files/patch-common.gypi.diff

    diff --git a/dports/devel/nodejs-devel/files/patch-common.gypi.diff b/dports/devel/nodejs-devel/files/patch-common.gypi.diff
    deleted file mode 100644
    + -  
    1 --- common.gypi.orig    2014-09-16 17:47:52.000000000 -0500
    2 +++ common.gypi 2014-10-13 22:42:11.000000000 -0500
    3 @@ -207,7 +207,6 @@
    4            'GCC_ENABLE_PASCAL_STRINGS': 'NO',        # No -mpascal-strings
    5            'GCC_THREADSAFE_STATICS': 'NO',           # -fno-threadsafe-statics
    6            'PREBINDING': 'NO',                       # No -Wl,-prebind
    7 -          'MACOSX_DEPLOYMENT_TARGET': '10.5',       # -mmacosx-version-min=10.5
    8            'USE_HEADERMAP': 'NO',
    9            'OTHER_CFLAGS': [
    10              '-fno-strict-aliasing',
  • dports/devel/nodejs/Portfile

    diff --git a/dports/devel/nodejs/Portfile b/dports/devel/nodejs/Portfile
    a b if {${os.major} < 10} { 
    229229    pre-fetch {
    230230        ui_error "${name} ${version} requires Mac OS X 10.6 or greater."
    231231        return -code error "incompatible Mac OS X version"
    232232    }
    233233}
     234
     235subport nodejs-devel {
     236    github.setup        nodejs node 6ac79bcf5838
     237    name                nodejs-devel
     238    version             4.1.99
     239
     240    conflicts           nodejs iojs
     241
     242    checksums           rmd160  01954208dda7c6044e2f33de4940be93943051d9 \
     243                        sha256  3653750e1ef2ad8521e9d440a4f179fcbd4d7cd15a4c4c68273e9117f27d2782
     244}