git: 05428e2920ed - main - devel/p5-B-Hooks-AtRuntime: Add p5-B-Hooks-AtRuntime 8

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 09 Oct 2022 15:38:49 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=05428e2920edbe384203da8f5867bb5347e17e51

commit 05428e2920edbe384203da8f5867bb5347e17e51
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-09 15:19:04 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-09 15:37:42 +0000

    devel/p5-B-Hooks-AtRuntime: Add p5-B-Hooks-AtRuntime 8
    
    B::Hooks::AtRuntime allows code that runs at compile-time to do something at
    runtime. A block passed to at_runtime gets compiled into the code that's
    currently compiling, and will be called when control reaches that point at
    runtime. In the example in the SYNOPSIS, the warnings will occur in order, and
    if that section of code runs more than once, so will all three warnings.
---
 devel/Makefile                       |  1 +
 devel/p5-B-Hooks-AtRuntime/Makefile  | 25 +++++++++++++++++++++++++
 devel/p5-B-Hooks-AtRuntime/distinfo  |  3 +++
 devel/p5-B-Hooks-AtRuntime/pkg-descr |  5 +++++
 devel/p5-B-Hooks-AtRuntime/pkg-plist |  3 +++
 5 files changed, 37 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 1fcb0058e0b6..c557e6e8fb37 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1771,6 +1771,7 @@
     SUBDIR += p5-B-Flags
     SUBDIR += p5-B-Generate
     SUBDIR += p5-B-Graph
+    SUBDIR += p5-B-Hooks-AtRuntime
     SUBDIR += p5-B-Hooks-EndOfScope
     SUBDIR += p5-B-Hooks-OP-Annotation
     SUBDIR += p5-B-Hooks-OP-Check
diff --git a/devel/p5-B-Hooks-AtRuntime/Makefile b/devel/p5-B-Hooks-AtRuntime/Makefile
new file mode 100644
index 000000000000..c317671762c1
--- /dev/null
+++ b/devel/p5-B-Hooks-AtRuntime/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	B-Hooks-AtRuntime
+PORTVERSION=	8
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Lower blocks from compile time to runtime
+WWW=		https://metacpan.org/dist/B-Hooks-AtRuntime
+
+LICENSE=	BSD2CLAUSE
+
+BUILD_DEPENDS=	${RUN_DEPENDS}
+RUN_DEPENDS=	p5-Exporter-Tiny>=0:devel/p5-Exporter-Tiny \
+		p5-Sub-Name>=0.05,1:devel/p5-Sub-Name
+TEST_DEPENDS=	p5-Test-Exception>=0.31:devel/p5-Test-Exception \
+		p5-Test-Warn>=0.22:devel/p5-Test-Warn
+
+USES=		perl5
+USE_PERL5=	modbuild
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/B/Hooks/AtRuntime/AtRuntime.so
+
+.include <bsd.port.mk>
diff --git a/devel/p5-B-Hooks-AtRuntime/distinfo b/devel/p5-B-Hooks-AtRuntime/distinfo
new file mode 100644
index 000000000000..6cb5644e476c
--- /dev/null
+++ b/devel/p5-B-Hooks-AtRuntime/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1665073062
+SHA256 (B-Hooks-AtRuntime-8.tar.gz) = ca7f8231e48c0477f688287fd0b211fc98ed4668fa4fb7133b1a8d75e92c4132
+SIZE (B-Hooks-AtRuntime-8.tar.gz) = 164027
diff --git a/devel/p5-B-Hooks-AtRuntime/pkg-descr b/devel/p5-B-Hooks-AtRuntime/pkg-descr
new file mode 100644
index 000000000000..5291d8721780
--- /dev/null
+++ b/devel/p5-B-Hooks-AtRuntime/pkg-descr
@@ -0,0 +1,5 @@
+B::Hooks::AtRuntime allows code that runs at compile-time to do something at
+runtime. A block passed to at_runtime gets compiled into the code that's
+currently compiling, and will be called when control reaches that point at
+runtime. In the example in the SYNOPSIS, the warnings will occur in order, and
+if that section of code runs more than once, so will all three warnings.
diff --git a/devel/p5-B-Hooks-AtRuntime/pkg-plist b/devel/p5-B-Hooks-AtRuntime/pkg-plist
new file mode 100644
index 000000000000..6c430797b59c
--- /dev/null
+++ b/devel/p5-B-Hooks-AtRuntime/pkg-plist
@@ -0,0 +1,3 @@
+%%SITE_ARCH%%/B/Hooks/AtRuntime.pm
+%%SITE_ARCH%%/auto/B/Hooks/AtRuntime/AtRuntime.so
+%%PERL5_MAN3%%/B::Hooks::AtRuntime.3.gz