git: 43c69bb16b11 - main - devel/p5-Data-Cmp: Add p5-Data-Cmp 0.010

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=43c69bb16b1141e3b2e6b82a272690e99a7f8134

commit 43c69bb16b1141e3b2e6b82a272690e99a7f8134
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-05 05:13:38 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-05 06:11:14 +0000

    devel/p5-Data-Cmp: Add p5-Data-Cmp 0.010
    
    This relatively lightweight (no non-core dependencies, under 100 lines of code)
    module offers the cmp_data function that, like Perl's cmp, returns -1/0/1 value.
    cmp_data differs from cmp in that it can compare two data of different types and
    compare data items recursively, with pretty sensible semantics. In addition to
    returning -1/0/1, cmp_data can also return 2 if two data differ but not
    comparable: there is no sensible notion of which one is "greater than" the
    other. An example is empty hash {} vs empty array []).
    
    This module can handle circular structure.
---
 devel/Makefile              |  1 +
 devel/p5-Data-Cmp/Makefile  | 20 ++++++++++++++++++++
 devel/p5-Data-Cmp/distinfo  |  3 +++
 devel/p5-Data-Cmp/pkg-descr |  9 +++++++++
 devel/p5-Data-Cmp/pkg-plist |  6 ++++++
 5 files changed, 39 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index a1422df42bd4..fbebdb523eac 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2207,6 +2207,7 @@
     SUBDIR += p5-Data-Capture
     SUBDIR += p5-Data-ClearSilver-HDF
     SUBDIR += p5-Data-Clone
+    SUBDIR += p5-Data-Cmp
     SUBDIR += p5-Data-Compare
     SUBDIR += p5-Data-Diver
     SUBDIR += p5-Data-Dmp
diff --git a/devel/p5-Data-Cmp/Makefile b/devel/p5-Data-Cmp/Makefile
new file mode 100644
index 000000000000..747fb6e2c52b
--- /dev/null
+++ b/devel/p5-Data-Cmp/Makefile
@@ -0,0 +1,20 @@
+PORTNAME=	Data-Cmp
+PORTVERSION=	0.010
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Compare two data structures, return -1/0/1 like cmp
+WWW=		https://metacpan.org/dist/Data-Cmp
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Data-Cmp/distinfo b/devel/p5-Data-Cmp/distinfo
new file mode 100644
index 000000000000..692cc8e9bc64
--- /dev/null
+++ b/devel/p5-Data-Cmp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1724084444
+SHA256 (Data-Cmp-0.010.tar.gz) = 96cc24b12e90c7f1a583870f13daee244ebcc765a0d8abbb5e49b6b977b45210
+SIZE (Data-Cmp-0.010.tar.gz) = 18145
diff --git a/devel/p5-Data-Cmp/pkg-descr b/devel/p5-Data-Cmp/pkg-descr
new file mode 100644
index 000000000000..45a232bff633
--- /dev/null
+++ b/devel/p5-Data-Cmp/pkg-descr
@@ -0,0 +1,9 @@
+This relatively lightweight (no non-core dependencies, under 100 lines of code)
+module offers the cmp_data function that, like Perl's cmp, returns -1/0/1 value.
+cmp_data differs from cmp in that it can compare two data of different types and
+compare data items recursively, with pretty sensible semantics. In addition to
+returning -1/0/1, cmp_data can also return 2 if two data differ but not
+comparable: there is no sensible notion of which one is "greater than" the
+other. An example is empty hash {} vs empty array []).
+
+This module can handle circular structure.
diff --git a/devel/p5-Data-Cmp/pkg-plist b/devel/p5-Data-Cmp/pkg-plist
new file mode 100644
index 000000000000..eb16eb8eb73e
--- /dev/null
+++ b/devel/p5-Data-Cmp/pkg-plist
@@ -0,0 +1,6 @@
+%%SITE_PERL%%/Data/Cmp.pm
+%%SITE_PERL%%/Data/Cmp/Numeric.pm
+%%SITE_PERL%%/Data/Cmp/StrOrNumeric.pm
+%%PERL5_MAN3%%/Data::Cmp.3.gz
+%%PERL5_MAN3%%/Data::Cmp::Numeric.3.gz
+%%PERL5_MAN3%%/Data::Cmp::StrOrNumeric.3.gz