1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

lang/spidermonkey78: create port

Create a port for newer spidermonkey based on spidermonkey68 to be used by
upcoming polkit
This commit is contained in:
Steve Wills 2020-09-14 22:20:53 +00:00
parent af1a792f2b
commit fafc1b8e31
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=548684
6 changed files with 364 additions and 0 deletions

View File

@ -337,6 +337,7 @@
SUBDIR += spidermonkey52
SUBDIR += spidermonkey60
SUBDIR += spidermonkey68
SUBDIR += spidermonkey78
SUBDIR += spl
SUBDIR += squeak
SUBDIR += squirrel

View File

@ -0,0 +1,83 @@
# $FreeBSD$
PORTNAME= spidermonkey
DISTVERSION= 78.2.0
CATEGORIES= lang
MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source
PKGNAMESUFFIX= ${SP_VER}
DISTNAME= firefox-${DISTVERSION}esr.source
MAINTAINER= swills@FreeBSD.org
COMMENT= Standalone JavaScript based from Mozilla 78-esr
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} \
${LOCALBASE}/bin/python${PYTHON3_DEFAULT}:lang/python${PYTHON3_DEFAULT:S/.//g} \
${RUST_DEFAULT}>=1.35:lang/${RUST_DEFAULT} \
autoconf-2.13:devel/autoconf213 \
rust-cbindgen>=0.8.7:devel/rust-cbindgen
LIB_DEPENDS= libffi.so:devel/libffi \
libicudata.so:devel/icu \
libnspr4.so:devel/nspr
USES= compiler gmake localbase pathfix pkgconfig python:build \
readline tar:xz
USE_LDCONFIG= yes
SP_VER= 78
HAS_CONFIGURE= yes
WRKSRC= ${WRKDIR}/firefox-${DISTVERSION}
PATCH_WRKSRC= ${WRKDIR}/firefox-${DISTVERSION}/
CONFIGURE_OUTSOURCE= yes
CONFIGURE_SCRIPT= ../firefox-${DISTVERSION}/js/src/configure
CONFIGURE_ARGS= --disable-debug \
--disable-debug-symbols \
--disable-gold \
--disable-jemalloc \
--enable-optimize \
--enable-readline \
--enable-shared-js \
--prefix=${PREFIX:Q} \
--target=${CONFIGURE_TARGET} \
--with-intl-api \
--with-system-icu \
--with-system-nspr \
--with-system-zlib
CONFIGURE_ENV= HOST_CC=${CC} \
HOST_CXX=${CXX}
CONFIGURE_ENV+= LLVM_CONFIG=llvm-config${LLVM_DEFAULT}
BINARY_ALIAS= python3=${PYTHON_CMD}
PLIST_SUB= SP_VER=${SP_VER}
.include <bsd.port.pre.mk>
.if ${ARCH} == amd64
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
# Require newer Clang than what's in base system unless user opted out
.if ${CHOSEN_COMPILER_TYPE} == gcc
USE_GCC= yes
.elif ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so)
CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT}
CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}
CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT}
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
.endif
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/js/moz.configure
post-install:
${RM} ${STAGEDIR}${PREFIX}/lib/libjs_static.ajs
${LN} -fs libmozjs-${SP_VER}.so ${STAGEDIR}${PREFIX}/lib/libmozjs-${SP_VER}.so.1
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/js${SP_VER}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmozjs-${SP_VER}.*
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1600105157
SHA256 (firefox-78.2.0esr.source.tar.xz) = 965ccfcbb8c0aa97639911997c54be0fcf896fd388b03138952089af675ea918
SIZE (firefox-78.2.0esr.source.tar.xz) = 331996944

View File

@ -0,0 +1,27 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
Add "dumb" patch to fix undefined symbols when trying to build gjs against
this spidermonkey version.
This issue was fix in firefox and backported to esr 68.
--- js/public/TypeDecls.h.orig 2020-08-17 18:33:37 UTC
+++ js/public/TypeDecls.h
@@ -20,6 +20,8 @@
#include <stddef.h>
#include <stdint.h>
+#pragma GCC visibility push(default)
+
#include "js-config.h"
#include "jstypes.h"
@@ -123,6 +125,8 @@ using HandleVector = Handle<StackGCVector<T>>;
template <typename T>
using MutableHandleVector = MutableHandle<StackGCVector<T>>;
} // namespace JS
+
+#pragma GCC visibility pop
using jsid = JS::PropertyKey;

View File

@ -0,0 +1,3 @@
Spidermonkey is the JavaScript interpreter from the Mozilla project.
WWW: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey

View File

@ -0,0 +1,247 @@
bin/js%%SP_VER%%
bin/js%%SP_VER%%-config
include/mozjs-%%SP_VER%%/BaseProfiler.h
include/mozjs-%%SP_VER%%/double-conversion/double-conversion.h
include/mozjs-%%SP_VER%%/double-conversion/double-to-string.h
include/mozjs-%%SP_VER%%/double-conversion/string-to-double.h
include/mozjs-%%SP_VER%%/double-conversion/utils.h
include/mozjs-%%SP_VER%%/encoding_rs_mem.h
include/mozjs-%%SP_VER%%/fdlibm.h
include/mozjs-%%SP_VER%%/js-config.h
include/mozjs-%%SP_VER%%/js.msg
include/mozjs-%%SP_VER%%/js/AllocPolicy.h
include/mozjs-%%SP_VER%%/js/AllocationRecording.h
include/mozjs-%%SP_VER%%/js/Array.h
include/mozjs-%%SP_VER%%/js/ArrayBuffer.h
include/mozjs-%%SP_VER%%/js/ArrayBufferMaybeShared.h
include/mozjs-%%SP_VER%%/js/BigInt.h
include/mozjs-%%SP_VER%%/js/BinASTFormat.h
include/mozjs-%%SP_VER%%/js/BuildId.h
include/mozjs-%%SP_VER%%/js/CallArgs.h
include/mozjs-%%SP_VER%%/js/CallNonGenericMethod.h
include/mozjs-%%SP_VER%%/js/CharacterEncoding.h
include/mozjs-%%SP_VER%%/js/Class.h
include/mozjs-%%SP_VER%%/js/ComparisonOperators.h
include/mozjs-%%SP_VER%%/js/CompilationAndEvaluation.h
include/mozjs-%%SP_VER%%/js/CompileOptions.h
include/mozjs-%%SP_VER%%/js/ContextOptions.h
include/mozjs-%%SP_VER%%/js/Conversions.h
include/mozjs-%%SP_VER%%/js/Date.h
include/mozjs-%%SP_VER%%/js/Debug.h
include/mozjs-%%SP_VER%%/js/Equality.h
include/mozjs-%%SP_VER%%/js/ErrorReport.h
include/mozjs-%%SP_VER%%/js/Exception.h
include/mozjs-%%SP_VER%%/js/ForOfIterator.h
include/mozjs-%%SP_VER%%/js/GCAPI.h
include/mozjs-%%SP_VER%%/js/GCAnnotations.h
include/mozjs-%%SP_VER%%/js/GCHashTable.h
include/mozjs-%%SP_VER%%/js/GCPolicyAPI.h
include/mozjs-%%SP_VER%%/js/GCTypeMacros.h
include/mozjs-%%SP_VER%%/js/GCVariant.h
include/mozjs-%%SP_VER%%/js/GCVector.h
include/mozjs-%%SP_VER%%/js/HashTable.h
include/mozjs-%%SP_VER%%/js/HeapAPI.h
include/mozjs-%%SP_VER%%/js/Id.h
include/mozjs-%%SP_VER%%/js/Initialization.h
include/mozjs-%%SP_VER%%/js/JSON.h
include/mozjs-%%SP_VER%%/js/LocaleSensitive.h
include/mozjs-%%SP_VER%%/js/MemoryFunctions.h
include/mozjs-%%SP_VER%%/js/MemoryMetrics.h
include/mozjs-%%SP_VER%%/js/Modules.h
include/mozjs-%%SP_VER%%/js/OffThreadScriptCompilation.h
include/mozjs-%%SP_VER%%/js/Principals.h
include/mozjs-%%SP_VER%%/js/Printf.h
include/mozjs-%%SP_VER%%/js/ProfilingCategory.h
include/mozjs-%%SP_VER%%/js/ProfilingFrameIterator.h
include/mozjs-%%SP_VER%%/js/ProfilingStack.h
include/mozjs-%%SP_VER%%/js/Promise.h
include/mozjs-%%SP_VER%%/js/PropertyDescriptor.h
include/mozjs-%%SP_VER%%/js/PropertySpec.h
include/mozjs-%%SP_VER%%/js/ProtoKey.h
include/mozjs-%%SP_VER%%/js/Proxy.h
include/mozjs-%%SP_VER%%/js/Realm.h
include/mozjs-%%SP_VER%%/js/RealmOptions.h
include/mozjs-%%SP_VER%%/js/RefCounted.h
include/mozjs-%%SP_VER%%/js/RegExp.h
include/mozjs-%%SP_VER%%/js/RegExpFlags.h
include/mozjs-%%SP_VER%%/js/RequiredDefines.h
include/mozjs-%%SP_VER%%/js/Result.h
include/mozjs-%%SP_VER%%/js/RootingAPI.h
include/mozjs-%%SP_VER%%/js/SavedFrameAPI.h
include/mozjs-%%SP_VER%%/js/SharedArrayBuffer.h
include/mozjs-%%SP_VER%%/js/SliceBudget.h
include/mozjs-%%SP_VER%%/js/SourceText.h
include/mozjs-%%SP_VER%%/js/StableStringChars.h
include/mozjs-%%SP_VER%%/js/Stream.h
include/mozjs-%%SP_VER%%/js/StructuredClone.h
include/mozjs-%%SP_VER%%/js/SweepingAPI.h
include/mozjs-%%SP_VER%%/js/Symbol.h
include/mozjs-%%SP_VER%%/js/TraceKind.h
include/mozjs-%%SP_VER%%/js/TraceLoggerAPI.h
include/mozjs-%%SP_VER%%/js/TracingAPI.h
include/mozjs-%%SP_VER%%/js/Transcoding.h
include/mozjs-%%SP_VER%%/js/TypeDecls.h
include/mozjs-%%SP_VER%%/js/UbiNode.h
include/mozjs-%%SP_VER%%/js/UbiNodeBreadthFirst.h
include/mozjs-%%SP_VER%%/js/UbiNodeCensus.h
include/mozjs-%%SP_VER%%/js/UbiNodeDominatorTree.h
include/mozjs-%%SP_VER%%/js/UbiNodePostOrder.h
include/mozjs-%%SP_VER%%/js/UbiNodeShortestPaths.h
include/mozjs-%%SP_VER%%/js/UbiNodeUtils.h
include/mozjs-%%SP_VER%%/js/UniquePtr.h
include/mozjs-%%SP_VER%%/js/Utility.h
include/mozjs-%%SP_VER%%/js/Value.h
include/mozjs-%%SP_VER%%/js/ValueArray.h
include/mozjs-%%SP_VER%%/js/Vector.h
include/mozjs-%%SP_VER%%/js/Warnings.h
include/mozjs-%%SP_VER%%/js/WeakMapPtr.h
include/mozjs-%%SP_VER%%/js/Wrapper.h
include/mozjs-%%SP_VER%%/js/experimental/CodeCoverage.h
include/mozjs-%%SP_VER%%/js/experimental/SourceHook.h
include/mozjs-%%SP_VER%%/jsapi.h
include/mozjs-%%SP_VER%%/jsfriendapi.h
include/mozjs-%%SP_VER%%/jspubtd.h
include/mozjs-%%SP_VER%%/jstypes.h
include/mozjs-%%SP_VER%%/malloc_decls.h
include/mozjs-%%SP_VER%%/mozilla/Algorithm.h
include/mozjs-%%SP_VER%%/mozilla/Alignment.h
include/mozjs-%%SP_VER%%/mozilla/AllocPolicy.h
include/mozjs-%%SP_VER%%/mozilla/AlreadyAddRefed.h
include/mozjs-%%SP_VER%%/mozilla/Array.h
include/mozjs-%%SP_VER%%/mozilla/ArrayUtils.h
include/mozjs-%%SP_VER%%/mozilla/Assertions.h
include/mozjs-%%SP_VER%%/mozilla/Atomics.h
include/mozjs-%%SP_VER%%/mozilla/Attributes.h
include/mozjs-%%SP_VER%%/mozilla/AutoProfilerLabel.h
include/mozjs-%%SP_VER%%/mozilla/BaseProfilerCounts.h
include/mozjs-%%SP_VER%%/mozilla/BaseProfilerDetail.h
include/mozjs-%%SP_VER%%/mozilla/BinarySearch.h
include/mozjs-%%SP_VER%%/mozilla/BlocksRingBuffer.h
include/mozjs-%%SP_VER%%/mozilla/BloomFilter.h
include/mozjs-%%SP_VER%%/mozilla/Buffer.h
include/mozjs-%%SP_VER%%/mozilla/BufferList.h
include/mozjs-%%SP_VER%%/mozilla/Casting.h
include/mozjs-%%SP_VER%%/mozilla/ChaosMode.h
include/mozjs-%%SP_VER%%/mozilla/Char16.h
include/mozjs-%%SP_VER%%/mozilla/CheckedInt.h
include/mozjs-%%SP_VER%%/mozilla/CompactPair.h
include/mozjs-%%SP_VER%%/mozilla/Compiler.h
include/mozjs-%%SP_VER%%/mozilla/Compression.h
include/mozjs-%%SP_VER%%/mozilla/DbgMacro.h
include/mozjs-%%SP_VER%%/mozilla/DebugOnly.h
include/mozjs-%%SP_VER%%/mozilla/Decimal.h
include/mozjs-%%SP_VER%%/mozilla/DefineEnum.h
include/mozjs-%%SP_VER%%/mozilla/DoubleConversion.h
include/mozjs-%%SP_VER%%/mozilla/DoublyLinkedList.h
include/mozjs-%%SP_VER%%/mozilla/EndianUtils.h
include/mozjs-%%SP_VER%%/mozilla/EnumSet.h
include/mozjs-%%SP_VER%%/mozilla/EnumTypeTraits.h
include/mozjs-%%SP_VER%%/mozilla/EnumeratedArray.h
include/mozjs-%%SP_VER%%/mozilla/EnumeratedRange.h
include/mozjs-%%SP_VER%%/mozilla/FStream.h
include/mozjs-%%SP_VER%%/mozilla/FastBernoulliTrial.h
include/mozjs-%%SP_VER%%/mozilla/FloatingPoint.h
include/mozjs-%%SP_VER%%/mozilla/FunctionRef.h
include/mozjs-%%SP_VER%%/mozilla/FunctionTypeTraits.h
include/mozjs-%%SP_VER%%/mozilla/GuardObjects.h
include/mozjs-%%SP_VER%%/mozilla/HashFunctions.h
include/mozjs-%%SP_VER%%/mozilla/HashTable.h
include/mozjs-%%SP_VER%%/mozilla/HelperMacros.h
include/mozjs-%%SP_VER%%/mozilla/InitializedOnce.h
include/mozjs-%%SP_VER%%/mozilla/IntegerPrintfMacros.h
include/mozjs-%%SP_VER%%/mozilla/IntegerRange.h
include/mozjs-%%SP_VER%%/mozilla/IntegerTypeTraits.h
include/mozjs-%%SP_VER%%/mozilla/JSONWriter.h
include/mozjs-%%SP_VER%%/mozilla/JsRust.h
include/mozjs-%%SP_VER%%/mozilla/Latin1.h
include/mozjs-%%SP_VER%%/mozilla/Likely.h
include/mozjs-%%SP_VER%%/mozilla/LinkedList.h
include/mozjs-%%SP_VER%%/mozilla/LinuxSignal.h
include/mozjs-%%SP_VER%%/mozilla/MacroArgs.h
include/mozjs-%%SP_VER%%/mozilla/MacroForEach.h
include/mozjs-%%SP_VER%%/mozilla/MathAlgorithms.h
include/mozjs-%%SP_VER%%/mozilla/Maybe.h
include/mozjs-%%SP_VER%%/mozilla/MaybeOneOf.h
include/mozjs-%%SP_VER%%/mozilla/MemoryChecking.h
include/mozjs-%%SP_VER%%/mozilla/MemoryReporting.h
include/mozjs-%%SP_VER%%/mozilla/MmapFaultHandler.h
include/mozjs-%%SP_VER%%/mozilla/ModuloBuffer.h
include/mozjs-%%SP_VER%%/mozilla/NonDereferenceable.h
include/mozjs-%%SP_VER%%/mozilla/NotNull.h
include/mozjs-%%SP_VER%%/mozilla/Opaque.h
include/mozjs-%%SP_VER%%/mozilla/OperatorNewExtensions.h
include/mozjs-%%SP_VER%%/mozilla/Path.h
include/mozjs-%%SP_VER%%/mozilla/PlatformConditionVariable.h
include/mozjs-%%SP_VER%%/mozilla/PlatformMutex.h
include/mozjs-%%SP_VER%%/mozilla/PodOperations.h
include/mozjs-%%SP_VER%%/mozilla/Poison.h
include/mozjs-%%SP_VER%%/mozilla/PowerOfTwo.h
include/mozjs-%%SP_VER%%/mozilla/Printf.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferChunk.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferChunkManager.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferChunkManagerSingle.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferChunkManagerWithLocalLimit.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferControlledChunkManager.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferEntrySerialization.h
include/mozjs-%%SP_VER%%/mozilla/ProfileBufferIndex.h
include/mozjs-%%SP_VER%%/mozilla/ProfileChunkedBuffer.h
include/mozjs-%%SP_VER%%/mozilla/RandomNum.h
include/mozjs-%%SP_VER%%/mozilla/Range.h
include/mozjs-%%SP_VER%%/mozilla/RangedArray.h
include/mozjs-%%SP_VER%%/mozilla/RangedPtr.h
include/mozjs-%%SP_VER%%/mozilla/ReentrancyGuard.h
include/mozjs-%%SP_VER%%/mozilla/RefCountType.h
include/mozjs-%%SP_VER%%/mozilla/RefCounted.h
include/mozjs-%%SP_VER%%/mozilla/RefPtr.h
include/mozjs-%%SP_VER%%/mozilla/Result.h
include/mozjs-%%SP_VER%%/mozilla/ResultExtensions.h
include/mozjs-%%SP_VER%%/mozilla/ReverseIterator.h
include/mozjs-%%SP_VER%%/mozilla/RollingMean.h
include/mozjs-%%SP_VER%%/mozilla/SHA1.h
include/mozjs-%%SP_VER%%/mozilla/SPSCQueue.h
include/mozjs-%%SP_VER%%/mozilla/Saturate.h
include/mozjs-%%SP_VER%%/mozilla/ScopeExit.h
include/mozjs-%%SP_VER%%/mozilla/Scoped.h
include/mozjs-%%SP_VER%%/mozilla/SegmentedVector.h
include/mozjs-%%SP_VER%%/mozilla/SharedLibrary.h
include/mozjs-%%SP_VER%%/mozilla/SmallPointerArray.h
include/mozjs-%%SP_VER%%/mozilla/Span.h
include/mozjs-%%SP_VER%%/mozilla/SplayTree.h
include/mozjs-%%SP_VER%%/mozilla/Sprintf.h
include/mozjs-%%SP_VER%%/mozilla/StackWalk.h
include/mozjs-%%SP_VER%%/mozilla/StaticAnalysisFunctions.h
include/mozjs-%%SP_VER%%/mozilla/TaggedAnonymousMemory.h
include/mozjs-%%SP_VER%%/mozilla/Tainting.h
include/mozjs-%%SP_VER%%/mozilla/TemplateLib.h
include/mozjs-%%SP_VER%%/mozilla/TextUtils.h
include/mozjs-%%SP_VER%%/mozilla/ThreadLocal.h
include/mozjs-%%SP_VER%%/mozilla/ThreadSafeWeakPtr.h
include/mozjs-%%SP_VER%%/mozilla/TimeStamp.h
include/mozjs-%%SP_VER%%/mozilla/ToString.h
include/mozjs-%%SP_VER%%/mozilla/Tuple.h
include/mozjs-%%SP_VER%%/mozilla/TypeTraits.h
include/mozjs-%%SP_VER%%/mozilla/TypedEnumBits.h
include/mozjs-%%SP_VER%%/mozilla/Types.h
include/mozjs-%%SP_VER%%/mozilla/UniquePtr.h
include/mozjs-%%SP_VER%%/mozilla/UniquePtrExtensions.h
include/mozjs-%%SP_VER%%/mozilla/Unused.h
include/mozjs-%%SP_VER%%/mozilla/Utf8.h
include/mozjs-%%SP_VER%%/mozilla/Variant.h
include/mozjs-%%SP_VER%%/mozilla/Vector.h
include/mozjs-%%SP_VER%%/mozilla/WeakPtr.h
include/mozjs-%%SP_VER%%/mozilla/WrappingOperations.h
include/mozjs-%%SP_VER%%/mozilla/XorShift128PlusRNG.h
include/mozjs-%%SP_VER%%/mozilla/cxxalloc.h
include/mozjs-%%SP_VER%%/mozilla/fallible.h
include/mozjs-%%SP_VER%%/mozilla/glue/Debug.h
include/mozjs-%%SP_VER%%/mozilla/glue/WinUtils.h
include/mozjs-%%SP_VER%%/mozilla/leb128iterator.h
include/mozjs-%%SP_VER%%/mozilla/mozalloc.h
include/mozjs-%%SP_VER%%/mozilla/mozalloc_abort.h
include/mozjs-%%SP_VER%%/mozilla/mozalloc_oom.h
include/mozjs-%%SP_VER%%/mozjemalloc_types.h
include/mozjs-%%SP_VER%%/mozmemory.h
include/mozjs-%%SP_VER%%/mozmemory_wrap.h
lib/libmozjs-%%SP_VER%%.so
lib/libmozjs-%%SP_VER%%.so.1
libdata/pkgconfig/mozjs-%%SP_VER%%.pc