pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/quickjs Use a pkgsrc-compatible version number.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/52742289ca91
branches:  trunk
changeset: 422428:52742289ca91
user:      he <he%pkgsrc.org@localhost>
date:      Sun Jan 26 19:04:43 2020 +0000

description:
Use a pkgsrc-compatible version number.
Bignum is conditional on 64-bit atomics; mimic that in Makefile
and conditionalize in PLIST.

diffstat:

 lang/quickjs/Makefile                    |  20 ++++++++++++++++++--
 lang/quickjs/PLIST                       |   8 ++++----
 lang/quickjs/files/netbsd-has-atomic64.c |   6 ++++++
 3 files changed, 28 insertions(+), 6 deletions(-)

diffs (61 lines):

diff -r 8b6d82c779dd -r 52742289ca91 lang/quickjs/Makefile
--- a/lang/quickjs/Makefile     Sun Jan 26 18:37:49 2020 +0000
+++ b/lang/quickjs/Makefile     Sun Jan 26 19:04:43 2020 +0000
@@ -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 @@
 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 -r 8b6d82c779dd -r 52742289ca91 lang/quickjs/PLIST
--- a/lang/quickjs/PLIST        Sun Jan 26 18:37:49 2020 +0000
+++ b/lang/quickjs/PLIST        Sun Jan 26 19:04:43 2020 +0000
@@ -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 -r 8b6d82c779dd -r 52742289ca91 lang/quickjs/files/netbsd-has-atomic64.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/quickjs/files/netbsd-has-atomic64.c  Sun Jan 26 19:04:43 2020 +0000
@@ -0,0 +1,6 @@
+#include <sys/types.h>
+#ifdef __HAVE_ATOMIC64_OPS
+YES
+#else
+NO
+#endif



Home | Main Index | Thread Index | Old Index