svn commit: r548229 - in head/lang: . hermes hermes/files
Yuri Victorovich
yuri at FreeBSD.org
Fri Sep 11 08:04:16 UTC 2020
Author: yuri
Date: Fri Sep 11 08:04:14 2020
New Revision: 548229
URL: https://svnweb.freebsd.org/changeset/ports/548229
Log:
New port: lang/hermes: JavaScript engine
Added:
head/lang/hermes/
head/lang/hermes/Makefile (contents, props changed)
head/lang/hermes/distinfo (contents, props changed)
head/lang/hermes/files/
head/lang/hermes/files/patch-lib_Support_OSCompatPosix.cpp (contents, props changed)
head/lang/hermes/files/patch-lib_VM_Instrumentation_ProcessStats.cpp (contents, props changed)
head/lang/hermes/pkg-descr (contents, props changed)
head/lang/hermes/pkg-plist (contents, props changed)
Modified:
head/lang/Makefile
Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile Fri Sep 11 04:47:01 2020 (r548228)
+++ head/lang/Makefile Fri Sep 11 08:04:14 2020 (r548229)
@@ -126,6 +126,7 @@
SUBDIR += halide
SUBDIR += harbour
SUBDIR += haskell-mode.el
+ SUBDIR += hermes
SUBDIR += hla
SUBDIR += hs-brainfuck
SUBDIR += hs-unlambda
Added: head/lang/hermes/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/hermes/Makefile Fri Sep 11 08:04:14 2020 (r548229)
@@ -0,0 +1,39 @@
+# $FreeBSD$
+
+PORTNAME= hermes
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.5.2-rc1
+CATEGORIES= lang
+PKGNAMESUFFIX= -javascript-engine
+
+MAINTAINER= yuri at FreeBSD.org
+COMMENT= JavaScript engine
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libicui18n.so:devel/icu
+TEST_DEPENDS= zip:archivers/zip
+
+USES= cmake compiler:c++11-lang python:test
+USE_GITHUB= yes
+GH_ACCOUNT= facebook
+USE_LDCONFIG= yes
+
+CMAKE_OFF= HERMES_ENABLE_TEST_SUITE
+
+BINARY_ALIAS= python=${PYTHON_CMD} python3=${PYTHON_CMD}
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1201518
+BROKEN= missing pthread_getname_np
+.endif
+
+do-test: # some tests are known to fail: https://github.com/facebook/hermes/issues/347
+ @cd ${BUILD_WRKSRC} && \
+ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DHERMES_ENABLE_TEST_SUITE:BOOL=ON ${CMAKE_SOURCE_PATH} && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} check-hermes
+
+.include <bsd.port.mk>
Added: head/lang/hermes/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/hermes/distinfo Fri Sep 11 08:04:14 2020 (r548229)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1599791135
+SHA256 (facebook-hermes-v0.5.2-rc1_GH0.tar.gz) = d384bcac5985f11b92ff03a14b1ea393c5b4f804d0236e7884e408b626495aed
+SIZE (facebook-hermes-v0.5.2-rc1_GH0.tar.gz) = 6912229
Added: head/lang/hermes/files/patch-lib_Support_OSCompatPosix.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/hermes/files/patch-lib_Support_OSCompatPosix.cpp Fri Sep 11 08:04:14 2020 (r548229)
@@ -0,0 +1,54 @@
+--- lib/Support/OSCompatPosix.cpp.orig 2020-08-03 19:19:06 UTC
++++ lib/Support/OSCompatPosix.cpp
+@@ -23,6 +23,11 @@
+ #endif
+ #endif // __linux__
+
++#if defined(__FreeBSD__)
++#include <pthread.h>
++#include <pthread_np.h>
++#endif
++
+ #include <sys/types.h>
+ #include <unistd.h>
+
+@@ -213,7 +218,7 @@ void vm_unused(void *p, size_t sz) {
+ /// the process's physical footprint.
+ #define MADV_UNUSED MADV_FREE
+
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+
+ /// On linux, telling the OS that we \p MADV_DONTNEED some pages will cause it
+ /// to immediately deduct their size from the process's resident set.
+@@ -414,6 +419,12 @@ uint64_t thread_id() {
+ return syscall(__NR_gettid);
+ }
+
++#elif defined(__FreeBSD__)
++
++uint64_t thread_id() {
++ return reinterpret_cast<uint64_t>(pthread_self());
++}
++
+ #else
+ #error "Thread ID not supported on this platform"
+ #endif
+@@ -443,7 +454,7 @@ std::chrono::microseconds thread_cpu_time() {
+ return microseconds(total);
+ }
+
+-#elif defined(__linux__) // !(__APPLE__ && __MACH__)
++#elif defined(__linux__) || defined(__FreeBSD__) // !(__APPLE__ && __MACH__)
+
+ std::chrono::microseconds thread_cpu_time() {
+ using namespace std::chrono;
+@@ -480,7 +491,7 @@ bool thread_page_fault_count(int64_t *outMinorFaults,
+ return kr == KERN_SUCCESS;
+ }
+
+-#elif defined(__linux__) // !(__APPLE__ && __MACH__)
++#elif defined(__linux__) || defined(__FreeBSD__) // !(__APPLE__ && __MACH__)
+
+ bool thread_page_fault_count(int64_t *outMinorFaults, int64_t *outMajorFaults) {
+ struct rusage stats = {};
Added: head/lang/hermes/files/patch-lib_VM_Instrumentation_ProcessStats.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/hermes/files/patch-lib_VM_Instrumentation_ProcessStats.cpp Fri Sep 11 08:04:14 2020 (r548229)
@@ -0,0 +1,11 @@
+--- lib/VM/Instrumentation/ProcessStats.cpp.orig 2020-09-11 02:29:31 UTC
++++ lib/VM/Instrumentation/ProcessStats.cpp
+@@ -69,6 +69,8 @@ ProcessStats::Info getProcessStatSnapshot() {
+ va *= PS / 1024;
+ #elif defined(__EMSCRIPTEN__)
+ rss = va = 0;
++#elif defined(__FreeBSD__)
++ rss = va = 0; // TODO implement getProcessStatSnapshot
+ #else
+ #error "Unsupported platform"
+ #endif
Added: head/lang/hermes/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/hermes/pkg-descr Fri Sep 11 08:04:14 2020 (r548229)
@@ -0,0 +1,4 @@
+Hermes is a JavaScript engine optimized for fast start-up of React Native apps
+on Android. It features ahead-of-time static optimization and compact bytecode.
+
+WWW: https://github.com/facebook/hermes
Added: head/lang/hermes/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/hermes/pkg-plist Fri Sep 11 08:04:14 2020 (r548229)
@@ -0,0 +1,29 @@
+bin/hbcdump
+bin/hdb
+bin/hermes
+bin/hermesc
+bin/hvm
+include/hermes/CompileJS.h
+include/hermes/DebuggerAPI.h
+include/hermes/Public/Buffer.h
+include/hermes/Public/CrashManager.h
+include/hermes/Public/CtorConfig.h
+include/hermes/Public/DebuggerTypes.h
+include/hermes/Public/GCConfig.h
+include/hermes/Public/GCTripwireContext.h
+include/hermes/Public/MemoryEventTracker.h
+include/hermes/Public/RuntimeConfig.h
+include/hermes/SynthTrace.h
+include/hermes/SynthTraceParser.h
+include/hermes/TraceInterpreter.h
+include/hermes/TracingRuntime.h
+include/hermes/hermes.h
+include/hermes/hermes_tracing.h
+include/jsi/JSIDynamic.h
+include/jsi/decorator.h
+include/jsi/instrumentation.h
+include/jsi/jsi-inl.h
+include/jsi/jsi.h
+include/jsi/jsilib.h
+include/jsi/threadsafe.h
+lib/libhermes.so
More information about the svn-ports-all
mailing list