Skip to content
Snippets Groups Projects
Commit 27a8f649 authored by Celeste's avatar Celeste Committed by Patrycja Rosa
Browse files

community/quickjs: upgrade to 0.20240113

parent a3b3989c
No related branches found
No related tags found
1 merge request!59032community/quickjs: upgrade to 0.20240113
...@@ -10,19 +10,21 @@ diff --git a/Makefile b/Makefile ...@@ -10,19 +10,21 @@ diff --git a/Makefile b/Makefile
index 49b1f6f..086371c 100644 index 49b1f6f..086371c 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -33,6 +33,7 @@ CONFIG_LTO=y @@ -33,6 +33,7 @@
#CONFIG_WERROR=y #CONFIG_WERROR=y
# force 32 bit build for some utilities # force 32 bit build for some utilities
#CONFIG_M32=y #CONFIG_M32=y
+#CONFIG_STATIC=y +#CONFIG_STATIC=y
# cosmopolitan build (see https://github.com/jart/cosmopolitan)
#CONFIG_COSMO=y
ifdef CONFIG_DARWIN @@ -126,13 +127,14 @@
# use clang instead of gcc
@@ -112,11 +113,13 @@ CFLAGS_DEBUG=$(CFLAGS) -O0
CFLAGS_SMALL=$(CFLAGS) -Os
CFLAGS_OPT=$(CFLAGS) -O2
CFLAGS_NOLTO:=$(CFLAGS_OPT) CFLAGS_NOLTO:=$(CFLAGS_OPT)
-LDFLAGS=-g ifdef CONFIG_COSMO
LDFLAGS+=-s # better to strip by default
-else
-LDFLAGS+=-g
endif
+ifdef CONFIG_STATIC +ifdef CONFIG_STATIC
+LDFLAGS+=-static +LDFLAGS+=-static
+endif +endif
...@@ -36,7 +38,7 @@ index 49b1f6f..086371c 100644 ...@@ -36,7 +38,7 @@ index 49b1f6f..086371c 100644
endif endif
ifdef CONFIG_PROFILE ifdef CONFIG_PROFILE
CFLAGS+=-p CFLAGS+=-p
@@ -126,11 +129,11 @@ ifdef CONFIG_ASAN @@ -142,10 +144,10 @@
CFLAGS+=-fsanitize=address -fno-omit-frame-pointer CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer
endif endif
...@@ -46,8 +48,7 @@ index 49b1f6f..086371c 100644 ...@@ -46,8 +48,7 @@ index 49b1f6f..086371c 100644
+ifndef CONFIG_WIN32 +ifndef CONFIG_WIN32
+ifndef CONFIG_STATIC +ifndef CONFIG_STATIC
LDEXPORT=-rdynamic LDEXPORT=-rdynamic
endif
+endif +endif
endif
PROGS=qjs$(EXE) qjsc$(EXE) run-test262 ifndef CONFIG_COSMO
ifneq ($(CROSS_PREFIX),)
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -154,6 +154,9 @@ @@ -175,6 +175,9 @@
ifdef CONFIG_LTO ifdef CONFIG_LTO
PROGS+=libquickjs.lto.a PROGS+=libquickjs.lto.a
endif endif
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# examples # examples
ifeq ($(CROSS_PREFIX),) ifeq ($(CROSS_PREFIX),)
@@ -237,6 +240,11 @@ @@ -256,6 +259,11 @@
$(AR) rcs $@ $^ $(AR) rcs $@ $^
endif # CONFIG_LTO endif # CONFIG_LTO
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
repl.c: $(QJSC) repl.js repl.c: $(QJSC) repl.js
$(QJSC) -c -o $@ -m repl.js $(QJSC) -c -o $@ -m repl.js
@@ -309,6 +317,10 @@ @@ -328,6 +336,10 @@
install -m644 libquickjs.a "$(DESTDIR)$(prefix)/lib/quickjs" install -m644 libquickjs.a "$(DESTDIR)$(PREFIX)/lib/quickjs"
ifdef CONFIG_LTO ifdef CONFIG_LTO
install -m644 libquickjs.lto.a "$(DESTDIR)$(prefix)/lib/quickjs" install -m644 libquickjs.lto.a "$(DESTDIR)$(PREFIX)/lib/quickjs"
+endif +endif
+ifndef CONFIG_STATIC +ifndef CONFIG_STATIC
+ install -Dm755 libquickjs.so.$(VERSION) -t "$(DESTDIR)$(prefix)/lib" + install -Dm755 libquickjs.so.$(VERSION) -t "$(DESTDIR)$(PREFIX)/lib"
+ ln -s libquickjs.so.$(VERSION) "$(DESTDIR)$(prefix)/lib/libquickjs.so" + ln -s libquickjs.so.$(VERSION) "$(DESTDIR)$(PREFIX)/lib/libquickjs.so"
endif endif
mkdir -p "$(DESTDIR)$(prefix)/include/quickjs" mkdir -p "$(DESTDIR)$(PREFIX)/include/quickjs"
install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(prefix)/include/quickjs" install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(PREFIX)/include/quickjs"
# Contributor: Chloe Kudryavtsev <code@toast.bunkerlabs.net> # Contributor: Chloe Kudryavtsev <code@toast.bunkerlabs.net>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me> # Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=quickjs pkgname=quickjs
_pkgver=2023-12-09 _pkgver=2024-01-13
pkgver=0.${_pkgver//-} pkgver=0.${_pkgver//-}
pkgrel=0 pkgrel=0
pkgdesc="Small and embeddable Javascript engine" pkgdesc="Small and embeddable Javascript engine"
...@@ -23,12 +23,12 @@ builddir="$srcdir/$pkgname-$_pkgver" ...@@ -23,12 +23,12 @@ builddir="$srcdir/$pkgname-$_pkgver"
build() { build() {
for bin in qjs qjsc ; do for bin in qjs qjsc ; do
CONFIG_STATIC=y make prefix=/usr $bin CONFIG_STATIC=y make PREFIX=/usr $bin
cp $bin $bin.static cp $bin $bin.static
done done
make clean make clean
make prefix=/usr VERSION=$pkgver make PREFIX=/usr VERSION=$pkgver
} }
check() { check() {
...@@ -36,7 +36,7 @@ check() { ...@@ -36,7 +36,7 @@ check() {
} }
package() { package() {
make install prefix="$pkgdir"/usr VERSION=$pkgver make install DESTDIR="$pkgdir" PREFIX=/usr VERSION=$pkgver
for bin in qjs.static qjsc.static ; do for bin in qjs.static qjsc.static ; do
install -Dm755 $bin "$pkgdir"/usr/bin/$bin install -Dm755 $bin "$pkgdir"/usr/bin/$bin
done done
...@@ -51,7 +51,7 @@ static() { ...@@ -51,7 +51,7 @@ static() {
} }
sha512sums=" sha512sums="
c63cbff2c2e19512845e4fa2c1306eefcf03316f3e0f29187d6176aaddf840d0423d88429ec73d690da0297c78114092acff76b7f089cb8561214628c1e733c8 quickjs-2023-12-09.tar.xz 9f426404e4dc1e2a41fcc235b72e58708041aed24eadd5fb9e82f62435501003d3a6b04831f307b04852551d2fd265b94cd400b3293ec0810465f52de8a6c057 quickjs-2024-01-13.tar.xz
256e18095c4c891b2f87ed473b04903a80b769f97f7ef4a60681d6496050f00c21a448f6bf1c858c8a3896dced18bfeec53d981c6f5bd1390d69a12bb91530ff 00-makefile.patch c69217ba9cd38e2c4a8fe6a55ea552dd1c1ece8ac77514e824cc90ff36c616c76e98c43f23397e8939412ad8303c7e0bb813762565f97075eee70017fdd27c82 00-makefile.patch
fb540e21a3cd6bd8119935e0f599bb329fea07a13754bb2d85d620c70d4eeb715ee264fb0c245b3ab5213d54cb106d09b2c9ca94648f1824c757971df4ee1265 01-sharedlib.patch 0116e8562909e4867145b4b41a39c24600957ac57b048432ef068d18af007811f7eeab753d8902cd265d0327e64501c69160dfafee37ea840941e77514329514 01-sharedlib.patch
" "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment