diff options
Diffstat (limited to 'lang/quickjs')
-rw-r--r-- | lang/quickjs/Makefile | 13 | ||||
-rw-r--r-- | lang/quickjs/distinfo | 6 | ||||
-rw-r--r-- | lang/quickjs/files/extra-clang-patch-Makefile | 25 | ||||
-rw-r--r-- | lang/quickjs/files/extra-gcc-patch-Makefile | 36 | ||||
-rw-r--r-- | lang/quickjs/files/patch-Makefile | 40 | ||||
-rw-r--r-- | lang/quickjs/files/patch-qjs.c | 11 | ||||
-rw-r--r-- | lang/quickjs/files/patch-quickjs-libc.c | 18 |
7 files changed, 30 insertions, 119 deletions
diff --git a/lang/quickjs/Makefile b/lang/quickjs/Makefile index d0fee1c80e1b..3e775b5159e6 100644 --- a/lang/quickjs/Makefile +++ b/lang/quickjs/Makefile @@ -1,9 +1,8 @@ PORTNAME= quickjs -DISTVERSION= 2021.03.27 -PORTREVISION= 2 +DISTVERSION= 2024.01.13-20240717 CATEGORIES= lang devel -MASTER_SITES= https://bellard.org/${PORTNAME}/ -DISTNAME= ${PORTNAME}-${DISTVERSION:S/./-/g} +#MASTER_SITES= https://bellard.org/${PORTNAME}/ +#DISTNAME= ${PORTNAME}-${DISTVERSION:S/./-/g} MAINTAINER= yuri@FreeBSD.org COMMENT= Embeddable Javascript interpreter in C @@ -14,9 +13,11 @@ LICENSE= MIT USES= compiler:c11 cpe gmake tar:xz USE_LDCONFIG= yes -CPE_VENDOR= ${PORTNAME}_project +USE_GITHUB= yes +GH_ACCOUNT= bellard +GH_TAGNAME= 5417ab0 -EXTRA_PATCHES= ${FILESDIR}/extra-${CHOSEN_COMPILER_TYPE}-patch-Makefile +CPE_VENDOR= ${PORTNAME}_project TEST_TARGET= test diff --git a/lang/quickjs/distinfo b/lang/quickjs/distinfo index df7c9ac6d114..a6d53140fcd2 100644 --- a/lang/quickjs/distinfo +++ b/lang/quickjs/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1621877002 -SHA256 (quickjs-2021-03-27.tar.xz) = a45bface4c3379538dea8533878d694e289330488ea7028b105f72572fe7fe1a -SIZE (quickjs-2021-03-27.tar.xz) = 753556 +TIMESTAMP = 1721319860 +SHA256 (bellard-quickjs-2024.01.13-20240717-5417ab0_GH0.tar.gz) = 0965a04a72b91b4900a47a8be702589f33478707fe3f90add6882914a872f4ea +SIZE (bellard-quickjs-2024.01.13-20240717-5417ab0_GH0.tar.gz) = 628270 diff --git a/lang/quickjs/files/extra-clang-patch-Makefile b/lang/quickjs/files/extra-clang-patch-Makefile deleted file mode 100644 index d4014c7285af..000000000000 --- a/lang/quickjs/files/extra-clang-patch-Makefile +++ /dev/null @@ -1,25 +0,0 @@ ---- 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 diff --git a/lang/quickjs/files/extra-gcc-patch-Makefile b/lang/quickjs/files/extra-gcc-patch-Makefile deleted file mode 100644 index bdaf4f8a3c7d..000000000000 --- a/lang/quickjs/files/extra-gcc-patch-Makefile +++ /dev/null @@ -1,36 +0,0 @@ ---- Makefile.orig 2020-09-06 09:31:51 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) -@@ -39,6 +42,12 @@ ifdef CONFIG_DARWIN - CONFIG_CLANG=y - CONFIG_DEFAULT_AR=y - endif -+ifdef CONFIG_FREEBSD -+# use clang instead of gcc -+CONFIG_CLANG= -+CONFIG_DEFAULT_AR=y -+CONFIG_LTO= -+endif - - # installation directory - prefix=/usr/local -@@ -81,8 +90,8 @@ ifdef CONFIG_CLANG - endif - endif - else -- HOST_CC=gcc -- CC=$(CROSS_PREFIX)gcc -+ HOST_CC=gcc%%GCC_DEFAULT%% -+ CC=$(CROSS_PREFIX)gcc%%GCC_DEFAULT%% - CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d - CFLAGS += -Wno-array-bounds -Wno-format-truncation - ifdef CONFIG_LTO diff --git a/lang/quickjs/files/patch-Makefile b/lang/quickjs/files/patch-Makefile index f7bd7b4b90a4..fe0bbaddd998 100644 --- a/lang/quickjs/files/patch-Makefile +++ b/lang/quickjs/files/patch-Makefile @@ -1,14 +1,14 @@ ---- Makefile.orig 2023-10-23 23:26:12 UTC +--- Makefile.orig 2024-05-30 14:41:37 UTC +++ Makefile -@@ -76,6 +76,7 @@ ifdef CONFIG_CLANG +@@ -94,6 +94,7 @@ ifdef CONFIG_CLANG HOST_CC=clang CC=$(CROSS_PREFIX)clang - CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d + CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d + CFLAGS += -fPIC CFLAGS += -Wextra CFLAGS += -Wno-sign-compare CFLAGS += -Wno-missing-field-initializers -@@ -156,9 +157,9 @@ endif +@@ -207,9 +208,9 @@ endif ifdef CONFIG_M32 PROGS+=qjs32 qjs32_s endif @@ -20,7 +20,7 @@ endif # examples -@@ -235,12 +236,12 @@ else +@@ -298,12 +299,12 @@ endif LTOEXT= endif @@ -36,22 +36,22 @@ + $(CC) -shared $(LDFLAGS) -o $@ $^ endif # CONFIG_LTO - repl.c: $(QJSC) repl.js -@@ -311,10 +312,10 @@ install: all - $(STRIP) qjs qjsc - install -m755 qjs qjsc "$(DESTDIR)$(prefix)/bin" - ln -sf qjs "$(DESTDIR)$(prefix)/bin/qjscalc" -- mkdir -p "$(DESTDIR)$(prefix)/lib/quickjs" -- install -m644 libquickjs.a "$(DESTDIR)$(prefix)/lib/quickjs" -+ mkdir -p "$(DESTDIR)$(prefix)/lib" -+ install -m644 libquickjs.so "$(DESTDIR)$(prefix)/lib" + libquickjs.fuzz.a: $(patsubst %.o, %.fuzz.o, $(QJS_LIB_OBJS)) +@@ -384,10 +385,10 @@ install: all + $(STRIP) qjs$(EXE) qjsc$(EXE) + install -m755 qjs$(EXE) qjsc$(EXE) "$(DESTDIR)$(PREFIX)/bin" + ln -sf qjs$(EXE) "$(DESTDIR)$(PREFIX)/bin/qjscalc$(EXE)" +- mkdir -p "$(DESTDIR)$(PREFIX)/lib/quickjs" +- install -m644 libquickjs.a "$(DESTDIR)$(PREFIX)/lib/quickjs" ++ mkdir -p "$(DESTDIR)$(PREFIX)/lib" ++ install -m644 libquickjs.so "$(DESTDIR)$(PREFIX)/lib" ifdef CONFIG_LTO -- install -m644 libquickjs.lto.a "$(DESTDIR)$(prefix)/lib/quickjs" -+ install -m644 libquickjs.lto.so "$(DESTDIR)$(prefix)/lib" +- install -m644 libquickjs.lto.a "$(DESTDIR)$(PREFIX)/lib/quickjs" ++ install -m644 libquickjs.lto.so "$(DESTDIR)$(PREFIX)/lib" endif - mkdir -p "$(DESTDIR)$(prefix)/include/quickjs" - install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(prefix)/include/quickjs" -@@ -347,7 +348,7 @@ HELLO_MODULE_SRCS=examples/hello_module.js + mkdir -p "$(DESTDIR)$(PREFIX)/include/quickjs" + install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(PREFIX)/include/quickjs" +@@ -417,7 +418,7 @@ HELLO_MODULE_OPTS=-fno-string-normalize -fno-map -fno- HELLO_MODULE_OPTS=-fno-string-normalize -fno-map -fno-promise -fno-typedarray \ -fno-typedarray -fno-regexp -fno-json -fno-eval -fno-proxy \ -fno-date -m @@ -60,7 +60,7 @@ $(QJSC) $(HELLO_MODULE_OPTS) -o $@ $(HELLO_MODULE_SRCS) # use of an external C module (static compilation) -@@ -355,7 +356,7 @@ examples/hello_module: $(QJSC) libquickjs$(LTOEXT).a $ +@@ -425,7 +426,7 @@ test_fib.c: $(QJSC) examples/test_fib.js test_fib.c: $(QJSC) examples/test_fib.js $(QJSC) -e -M examples/fib.so,fib -m -o $@ examples/test_fib.js diff --git a/lang/quickjs/files/patch-qjs.c b/lang/quickjs/files/patch-qjs.c deleted file mode 100644 index 5af56c5da80e..000000000000 --- a/lang/quickjs/files/patch-qjs.c +++ /dev/null @@ -1,11 +0,0 @@ ---- qjs.c.orig 2020-09-06 09:31:51 UTC -+++ qjs.c -@@ -36,6 +36,8 @@ - #include <malloc/malloc.h> - #elif defined(__linux__) - #include <malloc.h> -+#elif defined(__FreeBSD__) -+#include <malloc_np.h> - #endif - - #include "cutils.h" diff --git a/lang/quickjs/files/patch-quickjs-libc.c b/lang/quickjs/files/patch-quickjs-libc.c deleted file mode 100644 index 0decd5f412e1..000000000000 --- a/lang/quickjs/files/patch-quickjs-libc.c +++ /dev/null @@ -1,18 +0,0 @@ ---- quickjs-libc.c.orig 2020-09-06 09:31:51 UTC -+++ quickjs-libc.c -@@ -47,8 +47,14 @@ - #include <sys/ioctl.h> - #include <sys/wait.h> - --#if defined(__APPLE__) -+#if defined(__FreeBSD__) -+extern char **environ; -+#endif -+ -+#if defined(__APPLE__) || defined(__FreeBSD__) - typedef sig_t sighandler_t; -+#endif -+#if defined(__APPLE__) - #if !defined(environ) - #include <crt_externs.h> - #define environ (*_NSGetEnviron()) |