summaryrefslogtreecommitdiff
path: root/lang/quickjs
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2020-02-10 13:06:08 +0000
committerhe <he@pkgsrc.org>2020-02-10 13:06:08 +0000
commita3d4b8f4603417328ee3ecd1b881103e06ac4d68 (patch)
treefe847d17cbfd9585bb6079a7b12dc76159b6f0c6 /lang/quickjs
parent14305dfd7936168aa64a596741fdc1259e4db503 (diff)
downloadpkgsrc-a3d4b8f4603417328ee3ecd1b881103e06ac4d68.tar.gz
Make some adjustments to fix the issues from PR#54912:
* Don't use DATE as a variable, as it's used elsewhere, use QJS_DATE instead * Don't use the "bignum" PLIST variable anymore, the "bn" variants are no longer being built * Add "lto" PLIST variable, supported by and used on Linux * Move the setting of CONFIG_BIGNUM to the pkg Makefile instead of always setting it, should support 32-bit NetBSD ports. Bump PKGREVISION.
Diffstat (limited to 'lang/quickjs')
-rw-r--r--lang/quickjs/Makefile21
-rw-r--r--lang/quickjs/PLIST6
-rw-r--r--lang/quickjs/distinfo4
-rw-r--r--lang/quickjs/patches/patch-Makefile14
4 files changed, 26 insertions, 19 deletions
diff --git a/lang/quickjs/Makefile b/lang/quickjs/Makefile
index 46f94539e41..0baaf9d6261 100644
--- a/lang/quickjs/Makefile
+++ b/lang/quickjs/Makefile
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2020/01/26 19:08:41 he Exp $
+# $NetBSD: Makefile,v 1.5 2020/02/10 13:06:08 he Exp $
NAME= quickjs
-DATE= 2020-01-19
-VERSION= ${DATE:S/-//g}
-DISTNAME= ${NAME}-${DATE}
+QJS_DATE= 2020-01-19
+VERSION= ${QJS_DATE:S/-//g}
+DISTNAME= ${NAME}-${QJS_DATE}
PKGNAME= ${NAME}-${VERSION}
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= https://bellard.org/quickjs/
EXTRACT_SUFX= .tar.xz
@@ -20,14 +21,18 @@ TEST_TARGET= test
.include "../../mk/bsd.prefs.mk"
-PLIST_VARS+= bignum
+PLIST_VARS+= lto
+
.if ${OPSYS} == "NetBSD"
HAS_ATOMIC_64!= ${CC} -E files/netbsd-has-atomic64.c | tail -1
.if (${HAS_ATOMIC_64} == "YES")
-PLIST.bignum=yes
+MAKE_ENV+= CONFIG_BIGNUM=yes
.endif
-.else # Not NetBSD
-PLIST.bignum=yes
+.elif ${OPSYS} == "Linux"
+PLIST.lto=yes
+.else # Not NetBSD && not Linux
+# Presumed to be supported
+MAKE_ENV+= CONFIG_BIGNUM=yes
.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/quickjs/PLIST b/lang/quickjs/PLIST
index 833bb616d7e..428ebc50d5d 100644
--- a/lang/quickjs/PLIST
+++ b/lang/quickjs/PLIST
@@ -1,10 +1,8 @@
-@comment $NetBSD: PLIST,v 1.2 2020/01/26 19:04:43 he Exp $
+@comment $NetBSD: PLIST,v 1.3 2020/02/10 13:06:08 he Exp $
bin/qjs
-${PLIST.bignum}bin/qjsbn
-${PLIST.bignum}bin/qjsbnc
bin/qjsc
bin/qjscalc
include/quickjs/quickjs-libc.h
include/quickjs/quickjs.h
lib/quickjs/libquickjs.a
-${PLIST.bignum}lib/quickjs/libquickjs.bn.a
+${PLIST.lto}lib/quickjs/libquickjs.lto.a
diff --git a/lang/quickjs/distinfo b/lang/quickjs/distinfo
index 121ee4edeea..19ec54724e3 100644
--- a/lang/quickjs/distinfo
+++ b/lang/quickjs/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.4 2020/01/26 18:37:49 he Exp $
+$NetBSD: distinfo,v 1.5 2020/02/10 13:06:08 he Exp $
SHA1 (quickjs-2020-01-19.tar.xz) = a33a7abb4471d566da39df90d0b688d120a8a2c4
RMD160 (quickjs-2020-01-19.tar.xz) = 0de6489bf915c3e3d558c39bf5e7b264249b57a5
SHA512 (quickjs-2020-01-19.tar.xz) = 6bbd271a3a3adfd612c9723f98d04c7a62b9f8c44ca5ae2134d34baa077f6fdba3ac65d43f8c573fdc5af23309cde7ada8cc12caf73236d2a9286fecdf677cf2
Size (quickjs-2020-01-19.tar.xz) = 735868 bytes
-SHA1 (patch-Makefile) = 73dd794bd79bc54ec17f94cc059f598da0af9cfe
+SHA1 (patch-Makefile) = c31015842b53368344e07eb39873fa496e5f79f1
SHA1 (patch-cutils.h) = db3fad2bd422d2886538819ef778d13a391d6935
SHA1 (patch-qjs.c) = 2a2d778bb43540dc5289f84cd9df43162c1ce291
SHA1 (patch-qjsc.c) = 9a70bde5e19b65942d9f23c10d0b7b3e2741bfaa
diff --git a/lang/quickjs/patches/patch-Makefile b/lang/quickjs/patches/patch-Makefile
index ec037584f3c..0ff624d9505 100644
--- a/lang/quickjs/patches/patch-Makefile
+++ b/lang/quickjs/patches/patch-Makefile
@@ -1,4 +1,4 @@
-$NetBSD: patch-Makefile,v 1.2 2020/01/26 18:37:49 he Exp $
+$NetBSD: patch-Makefile,v 1.3 2020/02/10 13:06:08 he Exp $
Portability patch for NetBSD.
@@ -36,15 +36,19 @@ Portability patch for NetBSD.
# installation directory
prefix=/usr/local
-@@ -47,6 +57,7 @@ prefix=/usr/local
+@@ -47,8 +57,10 @@ prefix=/usr/local
#CONFIG_PROFILE=y
# use address sanitizer
#CONFIG_ASAN=y
+
# include the code for BigInt/BigFloat/BigDecimal and math mode
- CONFIG_BIGNUM=y
+-CONFIG_BIGNUM=y
++# Set via environment in pkg Makefile if supported:
++# CONFIG_BIGNUM=y
-@@ -168,8 +179,10 @@ endif
+ OBJDIR=.obj
+
+@@ -168,8 +180,10 @@ endif
LIBS=-lm
ifndef CONFIG_WIN32
@@ -55,7 +59,7 @@ Portability patch for NetBSD.
$(OBJDIR):
mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests
-@@ -195,6 +208,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
+@@ -195,6 +209,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
ifdef CONFIG_LTO
QJSC_DEFINES+=-DCONFIG_LTO
endif