pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/quickjs



Module Name:    pkgsrc
Committed By:   rillig
Date:           Thu Nov 14 21:20:04 UTC 2019

Added Files:
        pkgsrc/lang/quickjs: DESCR Makefile PLIST distinfo
        pkgsrc/lang/quickjs/patches: patch-Makefile patch-cutils.h patch-qjs.c
            patch-qjsc.c patch-quickjs-libc.c patch-quickjs.c

Log Message:
lang/quickjs: imported version 2019-10-27

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.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/quickjs/DESCR pkgsrc/lang/quickjs/Makefile \
    pkgsrc/lang/quickjs/PLIST pkgsrc/lang/quickjs/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/quickjs/patches/patch-Makefile \
    pkgsrc/lang/quickjs/patches/patch-cutils.h \
    pkgsrc/lang/quickjs/patches/patch-qjs.c \
    pkgsrc/lang/quickjs/patches/patch-qjsc.c \
    pkgsrc/lang/quickjs/patches/patch-quickjs-libc.c \
    pkgsrc/lang/quickjs/patches/patch-quickjs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/lang/quickjs/DESCR
diff -u /dev/null pkgsrc/lang/quickjs/DESCR:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/DESCR   Thu Nov 14 21:20:04 2019
@@ -0,0 +1,5 @@
+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.
Index: pkgsrc/lang/quickjs/Makefile
diff -u /dev/null pkgsrc/lang/quickjs/Makefile:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/Makefile        Thu Nov 14 21:20:04 2019
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+DISTNAME=      quickjs-2019-10-27
+CATEGORIES=    lang
+MASTER_SITES=  https://bellard.org/quickjs/
+EXTRACT_SUFX=  .tar.xz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://bellard.org/quickjs/
+COMMENT=       Quick JavaScript interpreter
+LICENSE=       mit
+
+USE_TOOLS+=    gmake
+MAKE_FLAGS=    prefix=${PREFIX}
+TEST_TARGET=   test
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/lang/quickjs/PLIST
diff -u /dev/null pkgsrc/lang/quickjs/PLIST:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/PLIST   Thu Nov 14 21:20:04 2019
@@ -0,0 +1,10 @@
+@comment $NetBSD: PLIST,v 1.1 2019/11/14 21:20:04 rillig Exp $
+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
Index: pkgsrc/lang/quickjs/distinfo
diff -u /dev/null pkgsrc/lang/quickjs/distinfo:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/distinfo        Thu Nov 14 21:20:04 2019
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+SHA1 (quickjs-2019-10-27.tar.xz) = 6d10526eecc6bbbd13f33262f796f30090195974
+RMD160 (quickjs-2019-10-27.tar.xz) = 4cd24d0d6c6c9fd23c2bc66d1e724e7e43985b22
+SHA512 (quickjs-2019-10-27.tar.xz) = 3654c8998b6c99fb42387c785e2be138b46b644025b2da5f26ecc6c1d58f32ef89b274763b0bcc5d25d86bbae217ec52576d13bf4e9cd81c6c2af46b692b73e9
+Size (quickjs-2019-10-27.tar.xz) = 763012 bytes
+SHA1 (patch-Makefile) = 4cff6c51bbd44d80327f186f261c6c7899b2a031
+SHA1 (patch-cutils.h) = db3fad2bd422d2886538819ef778d13a391d6935
+SHA1 (patch-qjs.c) = 2a2d778bb43540dc5289f84cd9df43162c1ce291
+SHA1 (patch-qjsc.c) = 9a70bde5e19b65942d9f23c10d0b7b3e2741bfaa
+SHA1 (patch-quickjs-libc.c) = 8a82afa9f13c9f7d53f8a94e377fbb4aa4471947
+SHA1 (patch-quickjs.c) = c411d8ed5539bcd77a504caf53541b7bddb51b5a

Index: pkgsrc/lang/quickjs/patches/patch-Makefile
diff -u /dev/null pkgsrc/lang/quickjs/patches/patch-Makefile:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/patches/patch-Makefile  Thu Nov 14 21:20:04 2019
@@ -0,0 +1,59 @@
+$NetBSD: patch-Makefile,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+Portability patch for NetBSD.
+
+--- Makefile.orig      2019-10-27 10:55:35.000000000 +0000
++++ Makefile
+@@ -22,13 +22,19 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ # THE SOFTWARE.
+ 
+-ifeq ($(shell uname -s),Darwin)
++OPSYS=$(shell uname -s)
++ifeq ($(OPSYS),Darwin)
+ CONFIG_DARWIN=y
+ endif
++ifeq ($(OPSYS),NetBSD)
++CONFIG_NETBSD=y
++endif
+ # Windows cross compilation from Linux
+ #CONFIG_WIN32=y
+ # use link time optimization (smaller and faster executables but slower build)
++ifndef CONFIG_NETBSD
+ CONFIG_LTO=y
++endif
+ # consider warnings as errors (for development)
+ #CONFIG_WERROR=y
+ # force 32 bit build for some utilities
+@@ -40,6 +46,10 @@ CONFIG_CLANG=y
+ CONFIG_DEFAULT_AR=y
+ endif
+ 
++ifndef CONFIG_NETBSD
++CONFIG_LDL=y
++endif
++
+ # installation directory
+ prefix=/usr/local
+ 
+@@ -165,8 +175,10 @@ QJSBN_OBJS=$(OBJDIR)/qjs.bn.o $(OBJDIR)/
+ 
+ LIBS=-lm
+ ifndef CONFIG_WIN32
++ifndef CONFIG_NETBSD
+ LIBS+=-ldl
+ endif
++endif
+ 
+ $(OBJDIR):
+       mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests
+@@ -199,6 +211,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
+ ifdef CONFIG_LTO
+ QJSC_DEFINES+=-DCONFIG_LTO
+ endif
++ifdef CONFIG_LDL
++QJSC_DEFINES+=-DCONFIG_LDL
++endif
+ QJSC_HOST_DEFINES:=-DCONFIG_CC=\"$(HOST_CC)\" -DCONFIG_PREFIX=\"$(prefix)\"
+ 
+ $(OBJDIR)/qjsc.o $(OBJDIR)/qjsc.bn.o: CFLAGS+=$(QJSC_DEFINES)
Index: pkgsrc/lang/quickjs/patches/patch-cutils.h
diff -u /dev/null pkgsrc/lang/quickjs/patches/patch-cutils.h:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/patches/patch-cutils.h  Thu Nov 14 21:20:04 2019
@@ -0,0 +1,37 @@
+$NetBSD: patch-cutils.h,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+Portability patch for NetBSD.
+
+--- cutils.h.orig      2019-10-27 10:55:35.000000000 +0000
++++ cutils.h
+@@ -207,17 +207,22 @@ static inline void put_u8(uint8_t *tab, 
+     *tab = val;
+ }
+ 
++#ifndef bswap16
+ static inline uint16_t bswap16(uint16_t x)
+ {
+     return (x >> 8) | (x << 8);
+ }
++#endif
+ 
++#ifndef bswap32
+ static inline uint32_t bswap32(uint32_t v)
+ {
+     return ((v & 0xff000000) >> 24) | ((v & 0x00ff0000) >>  8) |
+         ((v & 0x0000ff00) <<  8) | ((v & 0x000000ff) << 24);
+ }
++#endif
+ 
++#ifndef bswap64
+ static inline uint64_t bswap64(uint64_t v)
+ {
+     return ((v & ((uint64_t)0xff << (7 * 8))) >> (7 * 8)) | 
+@@ -229,6 +234,7 @@ static inline uint64_t bswap64(uint64_t 
+         ((v & ((uint64_t)0xff << (1 * 8))) << (5 * 8)) | 
+         ((v & ((uint64_t)0xff << (0 * 8))) << (7 * 8));
+ }
++#endif
+ 
+ /* XXX: should take an extra argument to pass slack information to the caller */
+ typedef void *DynBufReallocFunc(void *opaque, void *ptr, size_t size);
Index: pkgsrc/lang/quickjs/patches/patch-qjs.c
diff -u /dev/null pkgsrc/lang/quickjs/patches/patch-qjs.c:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/patches/patch-qjs.c     Thu Nov 14 21:20:04 2019
@@ -0,0 +1,24 @@
+$NetBSD: patch-qjs.c,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+Portability patch for NetBSD.
+
+--- qjs.c.orig 2019-10-27 10:55:35.000000000 +0000
++++ qjs.c
+@@ -124,7 +124,7 @@ static inline size_t js_trace_malloc_usa
+     return malloc_size(ptr);
+ #elif defined(_WIN32)
+     return _msize(ptr);
+-#elif defined(EMSCRIPTEN)
++#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
+     return 0;
+ #elif defined(__linux__)
+     return malloc_usable_size(ptr);
+@@ -240,7 +240,7 @@ static const JSMallocFunctions trace_mf 
+     malloc_size,
+ #elif defined(_WIN32)
+     (size_t (*)(const void *))_msize,
+-#elif defined(EMSCRIPTEN)
++#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
+     NULL,
+ #elif defined(__linux__)
+     (size_t (*)(const void *))malloc_usable_size,
Index: pkgsrc/lang/quickjs/patches/patch-qjsc.c
diff -u /dev/null pkgsrc/lang/quickjs/patches/patch-qjsc.c:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/patches/patch-qjsc.c    Thu Nov 14 21:20:04 2019
@@ -0,0 +1,16 @@
+$NetBSD: patch-qjsc.c,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+Portability patch for NetBSD.
+
+--- qjsc.c.orig        2019-11-14 20:58:23.645680708 +0000
++++ qjsc.c
+@@ -450,7 +450,9 @@ static int output_executable(const char 
+              lib_dir, bn_suffix, lto_suffix);
+     *arg++ = libjsname;
+     *arg++ = "-lm";
++#ifdef CONFIG_LDL
+     *arg++ = "-ldl";
++#endif
+     *arg = NULL;
+     
+     if (verbose) {
Index: pkgsrc/lang/quickjs/patches/patch-quickjs-libc.c
diff -u /dev/null pkgsrc/lang/quickjs/patches/patch-quickjs-libc.c:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/patches/patch-quickjs-libc.c    Thu Nov 14 21:20:04 2019
@@ -0,0 +1,15 @@
+$NetBSD: patch-quickjs-libc.c,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+Portability patch for NetBSD.
+
+--- quickjs-libc.c.orig        2019-10-27 10:55:35.000000000 +0000
++++ quickjs-libc.c
+@@ -1652,7 +1652,7 @@ static void os_signal_handler(int sig_nu
+     os_pending_signals |= ((uint64_t)1 << sig_num);
+ }
+ 
+-#if defined(_WIN32)
++#if defined(_WIN32) || defined(__NetBSD__)
+ typedef void (*sighandler_t)(int sig_num);
+ #endif
+ 
Index: pkgsrc/lang/quickjs/patches/patch-quickjs.c
diff -u /dev/null pkgsrc/lang/quickjs/patches/patch-quickjs.c:1.1
--- /dev/null   Thu Nov 14 21:20:04 2019
+++ pkgsrc/lang/quickjs/patches/patch-quickjs.c Thu Nov 14 21:20:04 2019
@@ -0,0 +1,24 @@
+$NetBSD: patch-quickjs.c,v 1.1 2019/11/14 21:20:04 rillig Exp $
+
+Portability patch for NetBSD.
+
+--- quickjs.c.orig     2019-10-27 10:55:35.000000000 +0000
++++ quickjs.c
+@@ -1343,7 +1343,7 @@ static inline size_t js_def_malloc_usabl
+     return malloc_size(ptr);
+ #elif defined(_WIN32)
+     return _msize(ptr);
+-#elif defined(EMSCRIPTEN)
++#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
+     return 0;
+ #elif defined(__linux__)
+     return malloc_usable_size(ptr);
+@@ -1417,7 +1417,7 @@ static const JSMallocFunctions def_mallo
+     malloc_size,
+ #elif defined(_WIN32)
+     (size_t (*)(const void *))_msize,
+-#elif defined(EMSCRIPTEN)
++#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
+     NULL,
+ #elif defined(__linux__)
+     (size_t (*)(const void *))malloc_usable_size,



Home | Main Index | Thread Index | Old Index