git: 6e8260b5e39d - main - devel/p5-Parse-Distname: Add p5-Parse-Distname 0.05

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 18 Apr 2022 00:00:15 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6e8260b5e39d3fcce26458f71b1f29e830771cce

commit 6e8260b5e39d3fcce26458f71b1f29e830771cce
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-04-17 23:39:05 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-04-17 23:39:05 +0000

    devel/p5-Parse-Distname: Add p5-Parse-Distname 0.05
    
    Parse::Distname is yet another distribution name parser. It works almost the
    same as CPAN::DistnameInfo, but Parse::Distname takes a different approach. It
    tries to extract a version part of a distribution and treat the rest as a
    distribution name, contrary to CPAN::DistnameInfo which tries to define a name
    part and treat the rest as a version.
    
    Because of this difference, when Parse::Distname parses a weird distribution
    name such as "AUTHOR/v1.0.tar.gz", it says the name is empty and the version is
    "v1.0", while CPAN::DistnameInfo says the name is "v" and the version is "1.0".
    See test files in this distribution if you need more details. As of this
    writing, Parse::Distname returns a different result for about 200+ distributions
    among about 320000 BackPan distributions.
    
    WWW: https://metacpan.org/dist/Parse-Distname
---
 devel/Makefile                    |  1 +
 devel/p5-Parse-Distname/Makefile  | 25 +++++++++++++++++++++++++
 devel/p5-Parse-Distname/distinfo  |  3 +++
 devel/p5-Parse-Distname/pkg-descr | 14 ++++++++++++++
 devel/p5-Parse-Distname/pkg-plist |  2 ++
 5 files changed, 45 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 7ad4bb66e351..7fd90a3152b0 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -3080,6 +3080,7 @@
     SUBDIR += p5-Paranoid-Log-Syslog
     SUBDIR += p5-Parse-CPAN-Packages
     SUBDIR += p5-Parse-CPAN-Packages-Fast
+    SUBDIR += p5-Parse-Distname
     SUBDIR += p5-Parse-ErrorString-Perl
     SUBDIR += p5-Parse-ExuberantCTags
     SUBDIR += p5-Parse-LocalDistribution
diff --git a/devel/p5-Parse-Distname/Makefile b/devel/p5-Parse-Distname/Makefile
new file mode 100644
index 000000000000..01e49038e23c
--- /dev/null
+++ b/devel/p5-Parse-Distname/Makefile
@@ -0,0 +1,25 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	Parse-Distname
+PORTVERSION=	0.05
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Parse a distribution name
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	p5-ExtUtils-MakeMaker-CPANfile>=0:devel/p5-ExtUtils-MakeMaker-CPANfile
+TEST_DEPENDS=	p5-Test-Differences>=0,1:devel/p5-Test-Differences \
+		p5-Test-UseAllModules>=0.17:devel/p5-Test-UseAllModules
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Parse-Distname/distinfo b/devel/p5-Parse-Distname/distinfo
new file mode 100644
index 000000000000..d4a36fa9bfc3
--- /dev/null
+++ b/devel/p5-Parse-Distname/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1650228646
+SHA256 (Parse-Distname-0.05.tar.gz) = a5fa93bec2dab76d883da12d4f344b73bf8beb0cc4b66c24376f3e0f387aef07
+SIZE (Parse-Distname-0.05.tar.gz) = 34192
diff --git a/devel/p5-Parse-Distname/pkg-descr b/devel/p5-Parse-Distname/pkg-descr
new file mode 100644
index 000000000000..b374d9d60b61
--- /dev/null
+++ b/devel/p5-Parse-Distname/pkg-descr
@@ -0,0 +1,14 @@
+Parse::Distname is yet another distribution name parser. It works almost the
+same as CPAN::DistnameInfo, but Parse::Distname takes a different approach. It
+tries to extract a version part of a distribution and treat the rest as a
+distribution name, contrary to CPAN::DistnameInfo which tries to define a name
+part and treat the rest as a version.
+
+Because of this difference, when Parse::Distname parses a weird distribution
+name such as "AUTHOR/v1.0.tar.gz", it says the name is empty and the version is
+"v1.0", while CPAN::DistnameInfo says the name is "v" and the version is "1.0".
+See test files in this distribution if you need more details. As of this
+writing, Parse::Distname returns a different result for about 200+ distributions
+among about 320000 BackPan distributions.
+
+WWW: https://metacpan.org/dist/Parse-Distname
diff --git a/devel/p5-Parse-Distname/pkg-plist b/devel/p5-Parse-Distname/pkg-plist
new file mode 100644
index 000000000000..de79eba90b46
--- /dev/null
+++ b/devel/p5-Parse-Distname/pkg-plist
@@ -0,0 +1,2 @@
+%%SITE_PERL%%/Parse/Distname.pm
+%%PERL5_MAN3%%/Parse::Distname.3.gz