source: trunk/dports/lang/v8/Portfile

Last change on this file was 143185, checked in by cal@…, 20 months ago

v8: drop maintainership

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
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: Portfile 143185 2015-12-06 17:37:16Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    v8
7version                 3.23.17.23
8revision                3
9
10platforms               darwin
11supported_archs         i386 x86_64
12categories              lang devel
13maintainers             gmail.com:frodwith openmaintainer
14
15homepage                http://code.google.com/p/v8/
16license                 BSD
17description             Google's open source JavaScript Engine
18long_description        Library and command line shell for Google's \
19                        high performance, open source Javascript engine.
20
21depends_build           bin:svn:subversion
22
23depends_lib             port:icu
24
25variant universal       {}
26
27fetch.type              svn
28svn.url                 http://v8.googlecode.com/svn/tags/${version}
29worksrcdir              ${version}
30
31post-patch {
32    # checkout fails on the buildbot without --trust-server-cert
33    reinplace "s#svn checkout --force#svn checkout --force --non-interactive --trust-server-cert#g" ${worksrcpath}/Makefile
34}
35
36configure.cmd           make
37configure.pre_args
38configure.args          dependencies
39# v8's configure script doesn't recognize the --disable-dependency-tracking flag
40configure.universal_args-delete \
41                        --disable-dependency-tracking
42
43
44build.env-append        CC="${configure.cc}" \
45                        CXX="${configure.cxx}" \
46                        LINK="${configure.cxx}" \
47                        CC.host="${configure.cc}" \
48                        CFLAGS.host="${configure.cflags}" \
49                        CXX.host="${configure.cxx}" \
50                        CXXFLAGS.host="${configure.cxxflags}" \
51                        LINK.host="${configure.cxx}" \
52                        LDFLAGS.host="${configure.ldflags}" \
53                        GYPFLAGS="-Duse_system_icu=1 -Dwerror="
54if {[string match *clang* ${configure.compiler}]} {
55    build.env-append    GYP_DEFINES=clang=1
56}
57
58if {[variant_isset universal]} {
59    set archs ${universal_archs}
60} else {
61    set archs ${build_arch}
62}
63regsub "i386" ${archs} "ia32" archs
64regsub "x86_64" ${archs} "x64" archs
65set buildarchstring ""
66foreach arch ${archs} {
67    set buildarchstring "${buildarchstring} ${arch}.release"
68}
69build.pre_args
70build.args              ${buildarchstring} library=shared
71
72post-build {
73    set libstr ""
74    set exstr ""
75    foreach arch ${archs} {
76        append libstr "${worksrcpath}/out/${arch}.release/libv8.dylib "
77        append exstr "${worksrcpath}/out/${arch}.release/d8 "
78    }
79    system "lipo -create ${libstr} -output ${worksrcpath}/libv8.dylib"
80    system "lipo -create ${exstr} -output ${worksrcpath}/v8"
81}
82
83destroot {
84    eval xinstall -m 0644 \
85        [glob ${worksrcpath}/include/*.h] \
86        ${destroot}${prefix}/include
87
88    xinstall -d ${destroot}${prefix}/share/doc/${name}
89    foreach file {AUTHORS ChangeLog LICENSE LICENSE.v8 LICENSE.strongtalk LICENSE.valgrind} {
90        xinstall -m 0644 ${worksrcpath}/${file} ${destroot}${prefix}/share/doc/${name}
91    }
92
93    xinstall -m 0755 \
94        ${worksrcpath}/libv8.dylib \
95        ${destroot}${prefix}/lib
96
97    xinstall -m 0755 \
98        ${worksrcpath}/v8 \
99        ${destroot}${prefix}/bin
100
101    set libpath ${prefix}/lib/libv8.dylib
102
103    system "install_name_tool -id ${libpath} ${destroot}${libpath}"
104    system "install_name_tool -change /usr/local/lib/libv8.dylib ${libpath} ${destroot}${prefix}/bin/v8"
105}
106
107livecheck.type  regex
108livecheck.url   http://omahaproxy.appspot.com/all?channel=stable&os=mac
109livecheck.regex {,(\d+(\.\d+)*)$}
Note: See TracBrowser for help on using the repository browser.