diff options
author | he <he@pkgsrc.org> | 2020-01-26 19:04:43 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2020-01-26 19:04:43 +0000 |
commit | ec4c8af4ba6082c13399901c93dec02272f26267 (patch) | |
tree | 2718e6076d24535db2a6078e95767e91091423dc /lang/quickjs | |
parent | 4fe3b1525028b7969aa14b99d51d03083e5475e2 (diff) | |
download | pkgsrc-ec4c8af4ba6082c13399901c93dec02272f26267.tar.gz |
Use a pkgsrc-compatible version number.
Bignum is conditional on 64-bit atomics; mimic that in Makefile
and conditionalize in PLIST.
Diffstat (limited to 'lang/quickjs')
-rw-r--r-- | lang/quickjs/Makefile | 20 | ||||
-rw-r--r-- | lang/quickjs/PLIST | 8 | ||||
-rw-r--r-- | lang/quickjs/files/netbsd-has-atomic64.c | 6 |
3 files changed, 28 insertions, 6 deletions
diff --git a/lang/quickjs/Makefile b/lang/quickjs/Makefile index ed7dda052eb..161b331f1c2 100644 --- a/lang/quickjs/Makefile +++ b/lang/quickjs/Makefile @@ -1,6 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2020/01/26 18:37:49 he Exp $ +# $NetBSD: Makefile,v 1.3 2020/01/26 19:04:43 he Exp $ -DISTNAME= quickjs-2020-01-19 +NAME= quickjs +DATE= 2020-01-19 +VERSION= ${DATE:S/-//g} +DISTNAME= ${NAME}-${DATE} +PKGNAME= ${NAME}-${VERSION} CATEGORIES= lang MASTER_SITES= https://bellard.org/quickjs/ EXTRACT_SUFX= .tar.xz @@ -14,4 +18,16 @@ USE_TOOLS+= gmake MAKE_FLAGS= prefix=${PREFIX} TEST_TARGET= test +.include "../../mk/bsd.prefs.mk" + +PLIST_VARS+= bignum +.if ${OPSYS} == "NetBSD" +HAS_ATOMIC_64!= ${CC} -E files/netbsd-has-atomic64.c | tail -1 +.if (${HAS_ATOMIC_64} == "YES") +PLIST.bignum = yes +.endif +.else # Not NetBSD +PLIST.bignum = yes +.endif + .include "../../mk/bsd.pkg.mk" diff --git a/lang/quickjs/PLIST b/lang/quickjs/PLIST index 0c5a3a7da4c..833bb616d7e 100644 --- a/lang/quickjs/PLIST +++ b/lang/quickjs/PLIST @@ -1,10 +1,10 @@ -@comment $NetBSD: PLIST,v 1.1 2019/11/14 21:20:04 rillig Exp $ +@comment $NetBSD: PLIST,v 1.2 2020/01/26 19:04:43 he Exp $ bin/qjs -bin/qjsbn -bin/qjsbnc +${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 -lib/quickjs/libquickjs.bn.a +${PLIST.bignum}lib/quickjs/libquickjs.bn.a diff --git a/lang/quickjs/files/netbsd-has-atomic64.c b/lang/quickjs/files/netbsd-has-atomic64.c new file mode 100644 index 00000000000..3fde93840bf --- /dev/null +++ b/lang/quickjs/files/netbsd-has-atomic64.c @@ -0,0 +1,6 @@ +#include <sys/types.h> +#ifdef __HAVE_ATOMIC64_OPS +YES +#else +NO +#endif |