components/desktop/mozjs-24/Makefile
changeset 6336 6ba7729e5c3a
child 7104 8f45af4c27d7
equal deleted inserted replaced
6335:8129e14951cc 6336:6ba7729e5c3a
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 
       
    24 BUILD_BITS =            32_and_64
       
    25 COMPILER =              gcc
       
    26 include ../../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		mozjs
       
    29 COMPONENT_VERSION=	24.2.0
       
    30 COMPONENT_PROJECT_URL=	https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
       
    31 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
       
    32 COMPONENT_ARCHIVE_HASH= \
       
    33 	sha256:e62f3f331ddd90df1e238c09d61a505c516fe9fd8c5c95336611d191d18437d8
       
    34 COMPONENT_ARCHIVE_URL=	http://ftp.mozilla.org/pub/mozilla.org/js/$(COMPONENT_ARCHIVE)
       
    35 COMPONENT_BUGDB=	library/libmozjs
       
    36 
       
    37 TPNO=			25517
       
    38 
       
    39 CXXFLAGS += -std=c++11
       
    40 
       
    41 # Only used during build process.
       
    42 PYTHON_VERSIONS= 2.7
       
    43 PYTHON= $(PYTHON.2.7.$(BITS))
       
    44 
       
    45 # Tests take too long to run, disabled for now
       
    46 TEST_TARGET = $(SKIP_TEST)
       
    47 
       
    48 include $(WS_MAKE_RULES)/common.mk
       
    49 
       
    50 # configure script is not at root of source tree.
       
    51 CONFIGURE_SCRIPT= $(SOURCE_DIR)/js/src/configure
       
    52 
       
    53 CONFIGURE_ENV += LDSHARED="$(CC) -shared"
       
    54 CONFIGURE_ENV += NSPR_CONFIG="/usr/bin/pkg-config nspr"
       
    55 
       
    56 # So build can find dtrace.
       
    57 COMPONENT_BUILD_ENV += PATH="$(PATH):/usr/sbin"
       
    58 
       
    59 CONFIGURE_OPTIONS += --enable-ctypes
       
    60 CONFIGURE_OPTIONS += --enable-dtrace
       
    61 # Uses ancient embedded version of ICU.
       
    62 CONFIGURE_OPTIONS += --disable-intl-api
       
    63 # Resulting packages are a few hundred megabytes larger without this!
       
    64 CONFIGURE_OPTIONS += --enable-install-strip
       
    65 CONFIGURE_OPTIONS += --enable-readline
       
    66 CONFIGURE_OPTIONS += --enable-shared-js
       
    67 CONFIGURE_OPTIONS += --enable-system-ffi
       
    68 CONFIGURE_OPTIONS += --enable-threadsafe
       
    69 CONFIGURE_OPTIONS += --with-system-zlib
       
    70 CONFIGURE_OPTIONS += --with-x
       
    71 CONFIGURE_OPTIONS.32 += --with-system-nspr
       
    72 # A pkg-config file isn't shipped in Solaris for nspr 64-bit, so configure will
       
    73 # fail to find it, requiring manual specification of the flags and libs.
       
    74 CONFIGURE_OPTIONS.64 += --with-nspr-cflags="-I/usr/include/mps"
       
    75 CONFIGURE_OPTIONS.64 += --with-nspr-libs="-R/usr/lib/mps/64 -L/usr/lib/mps/64 -lplds4 -lplc4 -lnspr4"
       
    76 
       
    77 unexport SHELLOPTS
       
    78 COMPONENT_TEST_ARGS =   -k -i
       
    79 COMPONENT_TEST_TRANSFORMS += \
       
    80         '-n ' \
       
    81         '-e "/TOTAL:/p" ' \
       
    82         '-e "/SKIP:/p" ' \
       
    83         '-e "/PASS:/p" ' \
       
    84         '-e "/FAIL:/p" ' \
       
    85         '-e "/ERROR:/p" '
       
    86 
       
    87 REQUIRED_PACKAGES += library/libffi
       
    88 REQUIRED_PACKAGES += library/nspr
       
    89 REQUIRED_PACKAGES += library/readline
       
    90 REQUIRED_PACKAGES += library/security/nss
       
    91 REQUIRED_PACKAGES += library/zlib
       
    92 REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
       
    93 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
       
    94 REQUIRED_PACKAGES += system/library/math