git: 0eef9247bc9e - main - lang/p5-JavaScript-QuickJS: Add p5-JavaScript-QuickJS 0.21

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 05 Sep 2024 06:19:28 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0eef9247bc9e603f0a81f009b6cb45eede2f3aa1

commit 0eef9247bc9e603f0a81f009b6cb45eede2f3aa1
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-05 05:13:55 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-05 06:11:18 +0000

    lang/p5-JavaScript-QuickJS: Add p5-JavaScript-QuickJS 0.21
    
    JavaScript::QuickJS embeds Fabrice Bellard's QuickJS engine into a Perl XS
    module. You can thus run JavaScript (ES2020 specification) directly in your Perl
    programs.
    
    This distribution includes all needed C code; unlike with most XS modules that
    interface with C libraries, you don't need QuickJS pre-installed on your system.
---
 lang/Makefile                        |  1 +
 lang/p5-JavaScript-QuickJS/Makefile  | 28 ++++++++++++++++++++++++++++
 lang/p5-JavaScript-QuickJS/distinfo  |  3 +++
 lang/p5-JavaScript-QuickJS/pkg-descr |  6 ++++++
 lang/p5-JavaScript-QuickJS/pkg-plist | 11 +++++++++++
 5 files changed, 49 insertions(+)

diff --git a/lang/Makefile b/lang/Makefile
index b57b3d5a6d14..073d6d3594d4 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -240,6 +240,7 @@
     SUBDIR += p5-ExtUtils-F77
     SUBDIR += p5-Interpolation
     SUBDIR += p5-JSAN
+    SUBDIR += p5-JavaScript-QuickJS
     SUBDIR += p5-JavaScript-Squish
     SUBDIR += p5-JavaScript-Value-Escape
     SUBDIR += p5-List-MoreUtils
diff --git a/lang/p5-JavaScript-QuickJS/Makefile b/lang/p5-JavaScript-QuickJS/Makefile
new file mode 100644
index 000000000000..6e7bb99a21f3
--- /dev/null
+++ b/lang/p5-JavaScript-QuickJS/Makefile
@@ -0,0 +1,28 @@
+PORTNAME=	JavaScript-QuickJS
+PORTVERSION=	0.21
+CATEGORIES=	lang perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Run JavaScript via QuickJS in Perl
+WWW=		https://metacpan.org/dist/JavaScript-QuickJS
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+
+BUILD_DEPENDS=	p5-ExtUtils-MakeMaker-CPANfile>=0:devel/p5-ExtUtils-MakeMaker-CPANfile \
+		p5-File-Slurper>=0:devel/p5-File-Slurper \
+		p5-File-Which>=0:sysutils/p5-File-Which
+TEST_DEPENDS=	p5-Test-Deep>=0:devel/p5-Test-Deep \
+		p5-Test-FailWarnings>=0:devel/p5-Test-FailWarnings \
+		p5-Test-Fatal>=0:devel/p5-Test-Fatal \
+		p5-Types-Serialiser>=0:devel/p5-Types-Serialiser
+
+USES=		gmake perl5
+USE_PERL5=	configure
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/JavaScript/QuickJS/QuickJS.so
+
+.include <bsd.port.mk>
diff --git a/lang/p5-JavaScript-QuickJS/distinfo b/lang/p5-JavaScript-QuickJS/distinfo
new file mode 100644
index 000000000000..daf41e8e4cb8
--- /dev/null
+++ b/lang/p5-JavaScript-QuickJS/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1724084474
+SHA256 (JavaScript-QuickJS-0.21.tar.gz) = 1cfdf3fb952ff4865ff2d55a203d58cbe5d8cb41571a35890b834f1eb5442a84
+SIZE (JavaScript-QuickJS-0.21.tar.gz) = 768911
diff --git a/lang/p5-JavaScript-QuickJS/pkg-descr b/lang/p5-JavaScript-QuickJS/pkg-descr
new file mode 100644
index 000000000000..eb647dd50b42
--- /dev/null
+++ b/lang/p5-JavaScript-QuickJS/pkg-descr
@@ -0,0 +1,6 @@
+JavaScript::QuickJS embeds Fabrice Bellard's QuickJS engine into a Perl XS
+module. You can thus run JavaScript (ES2020 specification) directly in your Perl
+programs.
+
+This distribution includes all needed C code; unlike with most XS modules that
+interface with C libraries, you don't need QuickJS pre-installed on your system.
diff --git a/lang/p5-JavaScript-QuickJS/pkg-plist b/lang/p5-JavaScript-QuickJS/pkg-plist
new file mode 100644
index 000000000000..4218fcdca98c
--- /dev/null
+++ b/lang/p5-JavaScript-QuickJS/pkg-plist
@@ -0,0 +1,11 @@
+%%SITE_ARCH%%/JavaScript/QuickJS.pm
+%%SITE_ARCH%%/JavaScript/QuickJS/Date.pm
+%%SITE_ARCH%%/JavaScript/QuickJS/Function.pm
+%%SITE_ARCH%%/JavaScript/QuickJS/Promise.pm
+%%SITE_ARCH%%/JavaScript/QuickJS/RegExp.pm
+%%SITE_ARCH%%/auto/JavaScript/QuickJS/QuickJS.so
+%%PERL5_MAN3%%/JavaScript::QuickJS.3.gz
+%%PERL5_MAN3%%/JavaScript::QuickJS::Date.3.gz
+%%PERL5_MAN3%%/JavaScript::QuickJS::Function.3.gz
+%%PERL5_MAN3%%/JavaScript::QuickJS::Promise.3.gz
+%%PERL5_MAN3%%/JavaScript::QuickJS::RegExp.3.gz