Skip to content

Commit

Permalink
devel/p5-Parse-Distname: Add p5-Parse-Distname 0.05
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sunpoet committed Apr 17, 2022
1 parent c8b6d04 commit 6e8260b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions 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>
3 changes: 3 additions & 0 deletions 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
14 changes: 14 additions & 0 deletions 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
2 changes: 2 additions & 0 deletions devel/p5-Parse-Distname/pkg-plist
@@ -0,0 +1,2 @@
%%SITE_PERL%%/Parse/Distname.pm
%%PERL5_MAN3%%/Parse::Distname.3.gz

0 comments on commit 6e8260b

Please sign in to comment.