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 115481 2014-01-03 05:15:11Z jeremyhu@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | |
---|
7 | name mozjs17 |
---|
8 | version 17.0.0 |
---|
9 | revision 3 |
---|
10 | categories lang |
---|
11 | platforms darwin |
---|
12 | license MPL-2.0 |
---|
13 | maintainers gmail.com:juanrgar \ |
---|
14 | openmaintainer |
---|
15 | description JavaScript-C Engine |
---|
16 | long_description SpiderMonkey is Mozilla's JavaScript engine written in C/C++. \ |
---|
17 | It is used in various Mozilla products, including Firefox, \ |
---|
18 | and is available under the MPL2. |
---|
19 | |
---|
20 | homepage http://www.mozilla.org/js/spidermonkey/ |
---|
21 | master_sites http://ftp.mozilla.org/pub/mozilla.org/js/ \ |
---|
22 | ftp://ftp.mozilla.org/pub/mozilla.org/js/ |
---|
23 | |
---|
24 | checksums rmd160 2fa3a891da2a7a09019f67c1555c03bcdc51e6c5 \ |
---|
25 | sha256 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba |
---|
26 | |
---|
27 | depends_build port:autoconf213 \ |
---|
28 | port:xorg-libXt \ |
---|
29 | port:pkgconfig |
---|
30 | |
---|
31 | depends_lib port:nspr \ |
---|
32 | port:libffi |
---|
33 | |
---|
34 | distname mozjs${version} |
---|
35 | worksrcdir ${distname}/js/src |
---|
36 | |
---|
37 | use_autoconf yes |
---|
38 | autoconf.cmd autoconf213 |
---|
39 | compiler.blacklist *gcc-* |
---|
40 | configure.args --with-system-nspr \ |
---|
41 | --enable-system-ffi \ |
---|
42 | --disable-readline \ |
---|
43 | --enable-threadsafe |
---|
44 | |
---|
45 | patchfiles fix-goto-scope-jsinterp.cpp.diff \ |
---|
46 | patch-configure-no-deployment-target.diff |
---|
47 | |
---|
48 | variant readline description {Link js shell to system readline library} { |
---|
49 | depends_lib-append port:readline |
---|
50 | configure.args-delete --disable-readline |
---|
51 | configure.args-append --enable-readline |
---|
52 | } |
---|
53 | |
---|
54 | variant llvm_hacks description {Enable workarounds required for several LLVM instrumentations} { |
---|
55 | configure.args-append --enable-llvm-hacks |
---|
56 | } |
---|
57 | |
---|
58 | variant profiling description {Set compile flags necessary for using sampling profilers (e.g. shark, perf)} { |
---|
59 | configure.args-append --enable-profiling |
---|
60 | } |
---|
61 | |
---|
62 | # Tune install_name |
---|
63 | post-destroot { |
---|
64 | system "install_name_tool -id ${prefix}/lib/libmozjs-17.0.dylib ${destroot}/${prefix}/lib/libmozjs-17.0.dylib" |
---|
65 | } |
---|
66 | |
---|
67 | if {[variant_isset universal]} { |
---|
68 | set merger_host(x86_64) x86_64-apple-${os.platform}${os.major} |
---|
69 | set merger_host(i386) i686-apple-${os.platform}${os.major} |
---|
70 | set merger_configure_args(x86_64) "--build=x86_64-apple-${os.platform}${os.major} --target=x86_64-apple-${os.platform}${os.major}" |
---|
71 | set merger_configure_args(i386) "--build=i686-apple-${os.platform}${os.major} --target=i686-apple-${os.platform}${os.major}" |
---|
72 | } else { |
---|
73 | if {${build_arch} eq "i386"} { |
---|
74 | configure.args-append \ |
---|
75 | --host=i686-apple-${os.platform}${os.major} \ |
---|
76 | --build=i686-apple-${os.platform}${os.major} \ |
---|
77 | --target=i686-apple-${os.platform}${os.major} |
---|
78 | } elseif {${build_arch} eq "x86_64"} { |
---|
79 | configure.args-append \ |
---|
80 | --host=${build_arch}-apple-${os.platform}${os.major} \ |
---|
81 | --build=${build_arch}-apple-${os.platform}${os.major} \ |
---|
82 | --target=${build_arch}-apple-${os.platform}${os.major} |
---|
83 | } |
---|
84 | } |
---|
85 | |
---|