python/hypothesis: update to 6.121.0
[oi-userland.git] / components / library / mozjs-60 / Makefile
blob3d7ac9bd56902aed1f0216d092255f727e8036d8
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # Copyright (c) 2020, 2021, Oracle and/or its affiliates.
22 # Copyright 2021 Andreas Grueninger, Grueninger GmbH, (grueni). All rights reserved.
25 USE_DEFAULT_TEST_TRANSFORMS= yes
26 USE_PARALLEL_BUILD= yes
28 include ../../../make-rules/shared-macros.mk
30 COMPONENT_NAME= mozjs
31 COMPONENT_VERSION= 60.8.0
32 COMPONENT_REVISION= 2
33 COMPONENT_PROJECT_URL= https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
34 COMPONENT_SRC= mozjs-60.8.0
35 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
36 COMPONENT_ARCHIVE_HASH= \
37 sha256:697331336c3d65b80ded9ca87b4a8ceb804e5342b476eaa133ac638102a9dc5d
38 COMPONENT_ARCHIVE_URL= https://download.gnome.org/teams/releng/tarballs-needing-help/mozjs/$(COMPONENT_ARCHIVE)
39 COMPONENT_FMRI= library/mozjs-60
40 COMPONENT_SUMMARY= Javascript engine
41 COMPONENT_CLASSIFICATION= Development/Other Languages
42 COMPONENT_LICENSE= MPL v2.0
43 COMPONENT_LICENSE_FILE= mozjs.license
45 # Tests hook up need work
46 TEST_TARGET= $(NO_TESTS)
47 include $(WS_MAKE_RULES)/common.mk
49 CXXFLAGS += -std=c++11
50 GNU_ARCH= x86_64-sun-solaris
52 # Python 2.7 path
53 PYTHON = /usr/bin/amd64/python2.7
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; \
62 # configure script is not at root of source tree.
63 CONFIGURE_SCRIPT= $(SOURCE_DIR)/js/src/configure
65 CONFIGURE_ENV += PYTHON="$(PYTHON)"
66 CONFIGURE_ENV += LDSHARED="$(CC) -shared"
67 CONFIGURE_ENV += NSPR_CONFIG=/usr/bin/amd64/nspr-config
68 CONFIGURE_ENV += SHELL="$(SHELL)"
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
82 COMPONENT_BUILD_ENV += SHELL="$(SHELL)"
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 ;
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
101 COMPONENT_TEST_ENV += SHELL="$(SHELL)"
102 COMPONENT_TEST_ARGS = -k -i
104 # Build dependencies
105 REQUIRED_PACKAGES += developer/build/autoconf-213
106 REQUIRED_PACKAGES += runtime/python-27
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