pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/njs lang/njs: add new port NGINX JavaScript (njs)...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/71fbb35892c1
branches:  trunk
changeset: 375414:71fbb35892c1
user:      osa <osa%pkgsrc.org@localhost>
date:      Mon Mar 14 02:52:48 2022 +0000

description:
lang/njs: add new port NGINX JavaScript (njs) command line utility

NGINX JavaScript, also knows as njs, is a subset of the JavaScript
language that allows extending nginx functionality.  njs is created
in compliance with ECMAScript 5.1 (strict mode) with some ECMAScript 6
and later extensions.  It's easy to use njs command line utility to
develop and debug additional functionality.  Also, it's light-weight
and very useful as a shebang in some cases as the nodejs substitutor.

diffstat:

 lang/njs/DESCR      |   4 ++++
 lang/njs/Makefile   |  26 ++++++++++++++++++++++++++
 lang/njs/PLIST      |   2 ++
 lang/njs/distinfo   |   5 +++++
 lang/njs/options.mk |  38 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 75 insertions(+), 0 deletions(-)

diffs (95 lines):

diff -r b97d3911b19a -r 71fbb35892c1 lang/njs/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/njs/DESCR    Mon Mar 14 02:52:48 2022 +0000
@@ -0,0 +1,4 @@
+njs scripting language, or just njs, is a subset of the JavaScript language
+that allows extending nginx functionality.  njs is created in compliance
+with ECMAScript 5.1 (strict mode) with some ECMAScript 6 and later
+extensions.  The compliance is still evolving.
diff -r b97d3911b19a -r 71fbb35892c1 lang/njs/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/njs/Makefile Mon Mar 14 02:52:48 2022 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2022/03/14 02:52:48 osa Exp $
+
+DISTNAME=      njs-0.7.2
+CATEGORIES=    lang www
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=nginx/}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    osa%NetBSD.org@localhost
+HOMEPAGE=      https://nginx.org/en/docs/njs
+COMMENT=       NGINX JavaScript command line utility
+LICENSE=       2-clause-bsd
+
+USE_LANGUAGES= c
+
+HAS_CONFIGURE= yes
+
+INSTALLATION_DIRS+=    bin
+
+do-build:
+       ${RUN} cd ${WRKSRC} && ${BUILD_MAKE_CMD} njs
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/build/njs ${DESTDIR}${PREFIX}/bin/njs
+
+.include "options.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r b97d3911b19a -r 71fbb35892c1 lang/njs/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/njs/PLIST    Mon Mar 14 02:52:48 2022 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2022/03/14 02:52:48 osa Exp $
+bin/njs
diff -r b97d3911b19a -r 71fbb35892c1 lang/njs/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/njs/distinfo Mon Mar 14 02:52:48 2022 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2022/03/14 02:52:48 osa Exp $
+
+BLAKE2s (njs-0.7.2.tar.gz) = 6aa7f4d62a9012badde72236cd4d2d8c32a3ea7842b582a7211a4dc836835af1
+SHA512 (njs-0.7.2.tar.gz) = 7ff9c8f4e8cf1a3aeb0f2ed9f37e2b3f4966812966d1aca17dae8b454dd7fa725ccdc631b7dc1f3434f588e589f4cd419b9e087f3c745cd6ca092a683c92d82f
+Size (njs-0.7.2.tar.gz) = 584483 bytes
diff -r b97d3911b19a -r 71fbb35892c1 lang/njs/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/njs/options.mk       Mon Mar 14 02:52:48 2022 +0000
@@ -0,0 +1,38 @@
+# $NetBSD: options.mk,v 1.1 2022/03/14 02:52:48 osa Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.njs
+PKG_SUPPORTED_OPTIONS= pcre pcre2 ssl
+PKG_SUGGESTED_OPTIONS= pcre ssl
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mpcre)
+.include "../../devel/pcre/buildlink3.mk"
+SUBST_CLASSES+=                fix-pcre
+SUBST_STAGE.fix-pcre=  pre-configure
+SUBST_FILES.fix-pcre=  auto/pcre
+SUBST_SED.fix-pcre=    -e 's,/usr/pkg,${BUILDLINK_PREFIX.pcre},g'
+SUBST_NOOP_OK.fix-pcre=        yes
+.else
+CONFIGURE_ARGS+=       --no-pcre2
+.endif
+
+.if !empty(PKG_OPTIONS:Mpcre2)
+.include "../../devel/pcre2/buildlink3.mk"
+SUBST_CLASSES+=                fix-pcre2
+SUBST_STAGE.fix-pcre2= pre-configure
+SUBST_FILES.fix-pcre2= auto/pcre
+SUBST_SED.fix-pcre2=   -e 's,/usr/pkg,${BUILDLINK_PREFIX.pcre2},g'
+SUBST_NOOP_OK.fix-pcre2=yes
+.endif
+
+.if empty(PKG_OPTIONS:Mpcre2) && empty(PKG_OPTIONS:Mpcre)
+CONFIGURE_ARGS+=       --no-pcre
+CONFIGURE_ARGS+=       --no-pcre2
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+.include "../../security/openssl/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --no-openssl
+.endif



Home | Main Index | Thread Index | Old Index