git: 367b1aba710d - main - devel/p5-XT-Files: New port: standard interface for author tests to find files to check

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Fri, 31 Jan 2025 18:02:43 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=367b1aba710d21acda7b8c3790501e32dc2fdb1d

commit 367b1aba710d21acda7b8c3790501e32dc2fdb1d
Author:     Sergei Vyshenski <svysh.fbsd@gmail.com>
AuthorDate: 2025-01-31 17:59:09 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-01-31 18:02:29 +0000

    devel/p5-XT-Files: New port: standard interface for author tests to find files to check
    
    XT::Files is the Tests that know what they want to check (e.g. module files),
    but it's the distribution that knows where these files can be found (e.g. in
    the lib directory and in the t/lib directory). Without XT::Files you may add
    the same code to multiple .t files under xt that iterate over a check function
    of the test. XT::Files is a standard interface that makes it easy for author
    tests to ask the distribution for the kind of files it would like to test. And
    it can easily be used for author tests that don't support XT::Files to have the
    same set of files tested with every test.
    
    PR:     284478
---
 devel/Makefile              |  1 +
 devel/p5-XT-Files/Makefile  | 25 +++++++++++++++++++++++++
 devel/p5-XT-Files/distinfo  |  3 +++
 devel/p5-XT-Files/pkg-descr |  8 ++++++++
 devel/p5-XT-Files/pkg-plist | 20 ++++++++++++++++++++
 5 files changed, 57 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 763ebb732711..0d14d60bdc85 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -3934,6 +3934,7 @@
     SUBDIR += p5-XS-Parse-Keyword
     SUBDIR += p5-XS-Parse-Sublike
     SUBDIR += p5-XSLoader
+    SUBDIR += p5-XT-Files
     SUBDIR += p5-XXX
     SUBDIR += p5-Xporter
     SUBDIR += p5-YAML-AppConfig
diff --git a/devel/p5-XT-Files/Makefile b/devel/p5-XT-Files/Makefile
new file mode 100644
index 000000000000..fad8d064bf0d
--- /dev/null
+++ b/devel/p5-XT-Files/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	XT-Files
+DISTVERSION=	0.002
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+MASTER_SITE_SUBDIR=	CPAN:SKIRMESS
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	svysh.fbsd@gmail.com
+COMMENT=	Standard interface for author tests to find files to check
+WWW=		https://metacpan.org/dist/XT-Files
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${RUN_DEPENDS}
+RUN_DEPENDS=	p5-Class-Tiny>=1:devel/p5-Class-Tiny \
+		p5-Role-Tiny>=0:devel/p5-Role-Tiny
+TEST_DEPENDS=	p5-Test-Fatal>=0:devel/p5-Test-Fatal
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-XT-Files/distinfo b/devel/p5-XT-Files/distinfo
new file mode 100644
index 000000000000..6564fcd1e628
--- /dev/null
+++ b/devel/p5-XT-Files/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1738274534
+SHA256 (XT-Files-0.002.tar.gz) = 527a27763d7cbcb941d9579d65d5c41120f0e0a296a16e84365aab9d62b1505b
+SIZE (XT-Files-0.002.tar.gz) = 31696
diff --git a/devel/p5-XT-Files/pkg-descr b/devel/p5-XT-Files/pkg-descr
new file mode 100644
index 000000000000..bc0284784cb5
--- /dev/null
+++ b/devel/p5-XT-Files/pkg-descr
@@ -0,0 +1,8 @@
+XT::Files is the Tests that know what they want to check (e.g. module files),
+but it's the distribution that knows where these files can be found (e.g. in
+the lib directory and in the t/lib directory). Without XT::Files you may add
+the same code to multiple .t files under xt that iterate over a check function
+of the test. XT::Files is a standard interface that makes it easy for author
+tests to ask the distribution for the kind of files it would like to test. And
+it can easily be used for author tests that don't support XT::Files to have the
+same set of files tested with every test.
diff --git a/devel/p5-XT-Files/pkg-plist b/devel/p5-XT-Files/pkg-plist
new file mode 100644
index 000000000000..7dd62f034f6e
--- /dev/null
+++ b/devel/p5-XT-Files/pkg-plist
@@ -0,0 +1,20 @@
+%%SITE_PERL%%/Test/XTFiles.pm
+%%SITE_PERL%%/XT/Files.pm
+%%SITE_PERL%%/XT/Files/File.pm
+%%SITE_PERL%%/XT/Files/Plugin.pm
+%%SITE_PERL%%/XT/Files/Plugin/Default.pm
+%%SITE_PERL%%/XT/Files/Plugin/Dirs.pm
+%%SITE_PERL%%/XT/Files/Plugin/Excludes.pm
+%%SITE_PERL%%/XT/Files/Plugin/Files.pm
+%%SITE_PERL%%/XT/Files/Plugin/lib.pm
+%%SITE_PERL%%/XT/Files/Role/Logger.pm
+%%PERL5_MAN3%%/Test::XTFiles.3.gz
+%%PERL5_MAN3%%/XT::Files.3.gz
+%%PERL5_MAN3%%/XT::Files::File.3.gz
+%%PERL5_MAN3%%/XT::Files::Plugin.3.gz
+%%PERL5_MAN3%%/XT::Files::Plugin::Default.3.gz
+%%PERL5_MAN3%%/XT::Files::Plugin::Dirs.3.gz
+%%PERL5_MAN3%%/XT::Files::Plugin::Excludes.3.gz
+%%PERL5_MAN3%%/XT::Files::Plugin::Files.3.gz
+%%PERL5_MAN3%%/XT::Files::Plugin::lib.3.gz
+%%PERL5_MAN3%%/XT::Files::Role::Logger.3.gz