# -*- 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
PortGroup compiler_blacklist_versions 1.0
license {MPL-2 LGPL-2.1+}
maintainers {devans @dbevans} openmaintainer
description JavaScript-C Engine
long_description SpiderMonkey is Mozilla's JavaScript engine written in C/C++. \
It is used in various Mozilla products, including Firefox, \
and is available under the MPL2.
homepage https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
# build from GNOME releng tarball
master_sites http://ftp.gnome.org/pub/GNOME/teams/releng/tarballs-needing-help/mozjs/
distname mozjs-${version}gnome1
checksums rmd160 b8815d4e62c36c41dc4e568d44a7430a4da2c86e \
sha256 786647e0ee743ab8ebd67d307ab406f93d50363ead7d7d05e29eeb113ebbf525 \
depends_build port:autoconf213 \
# When modifying this blacklist, also update the gjs blacklist.
# Requires clang-3.6 or equivalent
# While clang-602.0.53 (Xcode 6.4) is based on 3.6, it apparently doesn't pass the configure check
compiler.blacklist *gcc-3.* *gcc-4.* {clang < 700} macports-clang-3.3 macports-clang-3.4
compiler.fallback-append macports-clang-5.0 macports-clang-3.7
if { ${os.platform} eq "darwin" && ${os.major} < 11 } {
depends_build-append port:cctools
configure.env-append AR=${prefix}/bin/ar
# Use absolute path for install_name
reinplace "s|@executable_path|${prefix}/lib|g" ${worksrcpath}/config/rules.mk
configure.perl /usr/bin/perl
configure.python ${prefix}/bin/python2.7
configure.dir ${worksrcpath}/js/src/obj