Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Sep 2019 20:58:12 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512604 - in head/lang: . quickjs quickjs/files
Message-ID:  <201909222058.x8MKwCpC002840@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Sun Sep 22 20:58:12 2019
New Revision: 512604
URL: https://svnweb.freebsd.org/changeset/ports/512604

Log:
  New port: lang/quickjs: Embeddable Javascript interpreter in C

Added:
  head/lang/quickjs/
  head/lang/quickjs/Makefile   (contents, props changed)
  head/lang/quickjs/distinfo   (contents, props changed)
  head/lang/quickjs/files/
  head/lang/quickjs/files/patch-Makefile   (contents, props changed)
  head/lang/quickjs/files/patch-qjs.c   (contents, props changed)
  head/lang/quickjs/files/patch-quickjs-libc.c   (contents, props changed)
  head/lang/quickjs/files/patch-quickjs.c   (contents, props changed)
  head/lang/quickjs/pkg-descr   (contents, props changed)
  head/lang/quickjs/pkg-plist   (contents, props changed)
Modified:
  head/lang/Makefile

Modified: head/lang/Makefile
==============================================================================
--- head/lang/Makefile	Sun Sep 22 20:58:11 2019	(r512603)
+++ head/lang/Makefile	Sun Sep 22 20:58:12 2019	(r512604)
@@ -315,6 +315,7 @@
     SUBDIR += qmasm
     SUBDIR += qscheme
     SUBDIR += quack
+    SUBDIR += quickjs
     SUBDIR += racket
     SUBDIR += racket-minimal
     SUBDIR += ratfor

Added: head/lang/quickjs/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/Makefile	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+PORTNAME=	quickjs
+DISTVERSION=	2019.09.18
+CATEGORIES=	lang devel
+MASTER_SITES=	https://bellard.org/${PORTNAME}/
+DISTNAME=	${PORTNAME}-${DISTVERSION:S/./-/g}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Embeddable Javascript interpreter in C
+
+LICENSE=	MIT
+
+USES=		gmake tar:xz
+
+.include <bsd.port.mk>

Added: head/lang/quickjs/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/distinfo	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1569184657
+SHA256 (quickjs-2019-09-18.tar.xz) = ae4395d3f45045f920069e6c203ddb3fc3e549ce8fa3c429e696880cff010575
+SIZE (quickjs-2019-09-18.tar.xz) = 761448

Added: head/lang/quickjs/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/files/patch-Makefile	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,25 @@
+--- Makefile.orig	2019-09-18 18:34:20 UTC
++++ Makefile
+@@ -25,6 +25,9 @@
+ ifeq ($(shell uname -s),Darwin)
+ CONFIG_DARWIN=y
+ endif
++ifeq ($(shell uname -s),FreeBSD)
++CONFIG_FREEBSD=y
++endif
+ # Windows cross compilation from Linux
+ #CONFIG_WIN32=y
+ # use link time optimization (smaller and faster executables but slower build)
+@@ -38,6 +41,12 @@ ifdef CONFIG_DARWIN
+ # use clang instead of gcc
+ CONFIG_CLANG=y
+ CONFIG_DEFAULT_AR=y
++endif
++ifdef CONFIG_FREEBSD
++# use clang instead of gcc
++CONFIG_CLANG=y
++CONFIG_DEFAULT_AR=y
++CONFIG_LTO=
+ endif
+ 
+ # installation directory

Added: head/lang/quickjs/files/patch-qjs.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/files/patch-qjs.c	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,20 @@
+--- qjs.c.orig	2019-09-18 18:34:20 UTC
++++ qjs.c
+@@ -130,7 +130,7 @@ static inline size_t js_trace_malloc_usable_size(void 
+     return malloc_usable_size(ptr);
+ #else
+     /* change this to `return 0;` if compilation fails */
+-    return malloc_usable_size(ptr);
++    return 0; //return malloc_usable_size(ptr);
+ #endif
+ }
+ 
+@@ -246,7 +246,7 @@ static const JSMallocFunctions trace_mf = {
+     (size_t (*)(const void *))malloc_usable_size,
+ #else
+     /* change this to `NULL,` if compilation fails */
+-    malloc_usable_size,
++    NULL, //malloc_usable_size,
+ #endif
+ };
+ 

Added: head/lang/quickjs/files/patch-quickjs-libc.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/files/patch-quickjs-libc.c	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,11 @@
+--- quickjs-libc.c.orig	2019-09-18 18:34:20 UTC
++++ quickjs-libc.c
+@@ -45,7 +45,7 @@
+ #include <termios.h>
+ #include <sys/ioctl.h>
+ #include <sys/wait.h>
+-#if defined(__APPLE__)
++#if defined(__APPLE__) || defined(__FreeBSD__)
+ typedef sig_t sighandler_t;
+ #endif
+ #endif

Added: head/lang/quickjs/files/patch-quickjs.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/files/patch-quickjs.c	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,11 @@
+--- quickjs.c.orig	2019-09-18 18:34:20 UTC
++++ quickjs.c
+@@ -1423,7 +1423,7 @@ static const JSMallocFunctions def_malloc_funcs = {
+     (size_t (*)(const void *))malloc_usable_size,
+ #else
+     /* change this to `NULL,` if compilation fails */
+-    malloc_usable_size,
++    NULL, //malloc_usable_size,
+ #endif
+ };
+ 

Added: head/lang/quickjs/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/pkg-descr	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,7 @@
+QuickJS is a small and embeddable Javascript engine. It supports the ES2020
+specification including modules, asynchronous generators and proxies.
+
+It optionally supports mathematical extensions such as big integers (BigInt),
+big floating point numbers (BigFloat) and operator overloading.
+
+WWW: https://bellard.org/quickjs/

Added: head/lang/quickjs/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/quickjs/pkg-plist	Sun Sep 22 20:58:12 2019	(r512604)
@@ -0,0 +1,9 @@
+bin/qjs
+bin/qjsbn
+bin/qjsbnc
+bin/qjsc
+bin/qjscalc
+include/quickjs/quickjs-libc.h
+include/quickjs/quickjs.h
+lib/quickjs/libquickjs.a
+lib/quickjs/libquickjs.bn.a



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909222058.x8MKwCpC002840>