git: 7ab2bd1ae802 - main - devel/p5-Mutex: Add new port

From: Dan Langille <dvl_at_FreeBSD.org>
Date: Tue, 22 Jul 2025 17:36:52 UTC
The branch main has been updated by dvl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7ab2bd1ae8020d6b1c1524d65e15d4f473ba207a

commit 7ab2bd1ae8020d6b1c1524d65e15d4f473ba207a
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2025-07-22 14:57:09 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2025-07-22 17:36:40 +0000

    devel/p5-Mutex: Add new port
    
    This module, a standalone version of MCE::Mutex, implements locking methods
    that can be used to coordinate access to shared data from multiple workers
    spawned as processes or threads.
---
 devel/Makefile           |  1 +
 devel/p5-Mutex/Makefile  | 21 +++++++++++++++++++++
 devel/p5-Mutex/distinfo  |  3 +++
 devel/p5-Mutex/pkg-descr | 14 ++++++++++++++
 devel/p5-Mutex/pkg-plist |  8 ++++++++
 5 files changed, 47 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 1927e32c34f5..3701757f7233 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -3178,6 +3178,7 @@
     SUBDIR += p5-MouseX-Types
     SUBDIR += p5-MouseX-Types-Path-Class
     SUBDIR += p5-Multiplex-CMD
+    SUBDIR += p5-Mutex
     SUBDIR += p5-NEXT
     SUBDIR += p5-Net-DBus
     SUBDIR += p5-No-Worries
diff --git a/devel/p5-Mutex/Makefile b/devel/p5-Mutex/Makefile
new file mode 100644
index 000000000000..c765b42ff814
--- /dev/null
+++ b/devel/p5-Mutex/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	Mutex
+PORTVERSION=	1.011
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+MASTER_SITE_SUBDIR=	CPAN:MARIOROY
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	dvl@FreeBSD.org
+COMMENT=	Various locking implementations supporting processes and threads
+WWW=		https://metacpan.org/pod/Mutex
+
+LICENSE=	ART10
+
+USES=		perl5
+USE_PERL5=	configure
+
+RUN_DEPENDS=	p5-ExtUtils-MakeMaker>0:devel/p5-ExtUtils-MakeMaker
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Mutex/distinfo b/devel/p5-Mutex/distinfo
new file mode 100644
index 000000000000..5b313369147c
--- /dev/null
+++ b/devel/p5-Mutex/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1752859539
+SHA256 (Mutex-1.011.tar.gz) = c9aad8b6ebafbdd1de8404d87c5ac1e455d84dca6eb55fa506e3ce3365cb3369
+SIZE (Mutex-1.011.tar.gz) = 17447
diff --git a/devel/p5-Mutex/pkg-descr b/devel/p5-Mutex/pkg-descr
new file mode 100644
index 000000000000..8d05c2da268f
--- /dev/null
+++ b/devel/p5-Mutex/pkg-descr
@@ -0,0 +1,14 @@
+This module, a standalone version of MCE::Mutex, implements locking methods
+that can be used to coordinate access to shared data from multiple workers
+spawned as processes or threads.
+
+The inspiration for this module came from reading Mutex for Ruby.
+
+$m1 = Mutex->new( );
+$m1->impl();   # Channel
+$m2 = Mutex->new( path => /tmp/my.lock );
+$m2->impl();   # Flock
+$m3 = Mutex->new( impl => "Channel" );
+$m3->impl();   # Channel
+$m4 = Mutex->new( impl => "Flock" );
+$m4->impl();   # Flock
diff --git a/devel/p5-Mutex/pkg-plist b/devel/p5-Mutex/pkg-plist
new file mode 100644
index 000000000000..53106252f5d9
--- /dev/null
+++ b/devel/p5-Mutex/pkg-plist
@@ -0,0 +1,8 @@
+%%SITE_PERL%%/Mutex.pm
+%%SITE_PERL%%/Mutex/Channel.pm
+%%SITE_PERL%%/Mutex/Flock.pm
+%%SITE_PERL%%/Mutex/Util.pm
+%%PERL5_MAN3%%/Mutex.3.gz
+%%PERL5_MAN3%%/Mutex::Channel.3.gz
+%%PERL5_MAN3%%/Mutex::Flock.3.gz
+%%PERL5_MAN3%%/Mutex::Util.3.gz