Marcel Telka
2024-04-03 72d66ff28ec33bc2c05b355c6218d98d13b79450
commit | author | age
b95bbd 1 #
G 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) 2020, 2021, Oracle and/or its affiliates.
22 # Copyright 2021 Andreas Grueninger, Grueninger GmbH, (grueni). All rights reserved.
23 #
24
56e333 25 USE_DEFAULT_TEST_TRANSFORMS= yes
2db59b 26 USE_PARALLEL_BUILD= yes
MT 27
b95bbd 28 include ../../../make-rules/shared-macros.mk
G 29
30 COMPONENT_NAME=        mozjs
31 COMPONENT_VERSION=    60.8.0
2db59b 32 COMPONENT_REVISION=    2
b95bbd 33 COMPONENT_PROJECT_URL=    https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
G 34 COMPONENT_SRC=          mozjs-60.8.0
35 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.bz2
36 COMPONENT_ARCHIVE_HASH= \
37     sha256:697331336c3d65b80ded9ca87b4a8ceb804e5342b476eaa133ac638102a9dc5d
b7ef23 38 COMPONENT_ARCHIVE_URL=  https://download.gnome.org/teams/releng/tarballs-needing-help/mozjs/$(COMPONENT_ARCHIVE)
b95bbd 39 COMPONENT_FMRI= library/mozjs-60
G 40 COMPONENT_SUMMARY= Javascript engine
41 COMPONENT_CLASSIFICATION= Development/Other Languages
42 COMPONENT_LICENSE= MPL v2.0
43 COMPONENT_LICENSE_FILE= mozjs.license
44
56e333 45 # Tests hook up need work
AW 46 TEST_TARGET= $(NO_TESTS)
47 include $(WS_MAKE_RULES)/common.mk
48
b95bbd 49 CXXFLAGS += -std=c++11
56e333 50 GNU_ARCH= x86_64-sun-solaris
b95bbd 51
2db59b 52 # Python 2.7 path
MT 53 PYTHON = /usr/bin/amd64/python2.7
b95bbd 54
G 55 COMPONENT_PRE_CONFIGURE_ACTION += ( \
56   cd $(COMPONENT_NAME)-$(COMPONENT_VERSION); \
57   cd js/src; \
58   autoconf-2.13 --localdir=. old-configure.in; \
59   touch configure; \
60   );
61
62 # configure script is not at root of source tree.
63 CONFIGURE_SCRIPT= $(SOURCE_DIR)/js/src/configure
64
65 CONFIGURE_ENV += PYTHON="$(PYTHON)"
66 CONFIGURE_ENV += LDSHARED="$(CC) -shared"
67 CONFIGURE_ENV += NSPR_CONFIG=/usr/bin/amd64/nspr-config
2db59b 68 CONFIGURE_ENV += SHELL="$(SHELL)"
b95bbd 69
G 70 # detection of ARCH by config.guess depends on the compiler (e.g. gcc > 8)
71 CONFIGURE_OPTIONS += --target=$(GNU_ARCH)
72 CONFIGURE_OPTIONS += --disable-tests
73 CONFIGURE_OPTIONS += --enable-optimize
74 CONFIGURE_OPTIONS += --enable-readline
75 CONFIGURE_OPTIONS += --enable-shared-js
76 CONFIGURE_OPTIONS += --enable-threadsafe
77 CONFIGURE_OPTIONS += --with-intl-api
78 CONFIGURE_OPTIONS += --with-system-zlib
79 CONFIGURE_OPTIONS += --with-x
80 CONFIGURE_OPTIONS += --with-system-nspr
81
2db59b 82 COMPONENT_BUILD_ENV += SHELL="$(SHELL)"
b95bbd 83
G 84 COMPONENT_POST_INSTALL_ACTION  = \
85     for file in `find $(PROTO_DIR)$(CONFIGURE_LIBDIR.$(BITS)) -name "*.so"`; do \
86         /usr/bin/elfedit -e 'dyn:value -s  RUNPATH "$(GCC_LIBDIR):/usr/lib/mps/amd64"' $$file ; \
87         /usr/bin/elfedit -e 'dyn:value -s  RPATH   "$(GCC_LIBDIR):/usr/lib/mps/amd64"' $$file ; \
88     done ; \
89     for file in `find $(PROTO_DIR)$(USRBINDIR) -name "js60"`; do \
90         /usr/bin/elfedit -e 'dyn:value -s  RUNPATH "$(GCC_LIBDIR):/usr/lib/mps/amd64"' $$file ; \
91         /usr/bin/elfedit -e 'dyn:value -s  RPATH   "$(GCC_LIBDIR):/usr/lib/mps/amd64"' $$file ; \
92     done ;
93
94 # js coredumps on sparc - see bug 24935318
95 ifeq ($(MACH), sparc)
96 LD_EXEC_OPTIONS.64 += -M $(WS_COMPONENTS)/desktop/polkit/mapfile
97 COMPONENT_BUILD_ENV.64 += LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS.64)"
98 COMPONENT_INSTALL_ENV.64 += LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS.64)"
99 endif
100
2db59b 101 COMPONENT_TEST_ENV += SHELL="$(SHELL)"
b95bbd 102 COMPONENT_TEST_ARGS =   -k -i
G 103
104 # Build dependencies
105 REQUIRED_PACKAGES += developer/build/autoconf-213
2db59b 106 REQUIRED_PACKAGES += runtime/python-27
b95bbd 107
G 108 # Auto-generated dependencies
109 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
110 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
111 REQUIRED_PACKAGES += library/nspr
112 REQUIRED_PACKAGES += library/readline
113 REQUIRED_PACKAGES += library/zlib
114 REQUIRED_PACKAGES += shell/ksh93
115 REQUIRED_PACKAGES += system/library
116 REQUIRED_PACKAGES += system/library/math