mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
devel/p5-Lock-File: Add new port
The Lock::File module provides flock wrapper functions that watch the associated object and release it automatically if the object has no reference. Approved by: hrs (mentor)
This commit is contained in:
parent
ffe345fd46
commit
f4c9fe9a81
5 changed files with 56 additions and 0 deletions
|
@ -2784,6 +2784,7 @@
|
||||||
SUBDIR += p5-Locale-XGettext
|
SUBDIR += p5-Locale-XGettext
|
||||||
SUBDIR += p5-Locale-gettext
|
SUBDIR += p5-Locale-gettext
|
||||||
SUBDIR += p5-Locale-libintl
|
SUBDIR += p5-Locale-libintl
|
||||||
|
SUBDIR += p5-Lock-File
|
||||||
SUBDIR += p5-LockFile-Simple
|
SUBDIR += p5-LockFile-Simple
|
||||||
SUBDIR += p5-Log-Accounting-SVK
|
SUBDIR += p5-Log-Accounting-SVK
|
||||||
SUBDIR += p5-Log-Accounting-SVN
|
SUBDIR += p5-Log-Accounting-SVN
|
||||||
|
|
36
devel/p5-Lock-File/Makefile
Normal file
36
devel/p5-Lock-File/Makefile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
PORTNAME= Lock-File
|
||||||
|
PORTVERSION= 1.03
|
||||||
|
CATEGORIES= devel perl5
|
||||||
|
MASTER_SITES= CPAN
|
||||||
|
MASTER_SITE_SUBDIR= CPAN:MMCLERIC
|
||||||
|
PKGNAMEPREFIX= p5-
|
||||||
|
|
||||||
|
MAINTAINER= nork@FreeBSD.org
|
||||||
|
COMMENT= File locker with an automatic out-of-scope unlocking mechanism
|
||||||
|
WWW= https://metacpan.org/release/Lock-File
|
||||||
|
|
||||||
|
LICENSE= ART10 GPLv1+
|
||||||
|
LICENSE_COMB= dual
|
||||||
|
|
||||||
|
RUN_DEPENDS= p5-Log-Any>0:devel/p5-Log-Any
|
||||||
|
TEST_DEPENDS= p5-IPC-System-Simple>0:devel/p5-IPC-System-Simple \
|
||||||
|
p5-Test-Class>0:devel/p5-Test-Class \
|
||||||
|
p5-Test-Fatal>0:devel/p5-Test-Fatal \
|
||||||
|
p5-Test-Warn>0:devel/p5-Test-Warn
|
||||||
|
#RELEASE TEST# p5-Pod-Coverage-TrustPod>0:devel/p5-Pod-Coverage-TrustPod
|
||||||
|
#RELEASE TEST# p5-Test-Pod>0:devel/p5-Test-Pod
|
||||||
|
#RELEASE TEST# p5-Test-Pod-Coverage>0:devel/p5-Test-Pod-Coverage
|
||||||
|
|
||||||
|
USES= perl5
|
||||||
|
USE_PERL5= configure
|
||||||
|
|
||||||
|
TEST_ENV= # RELEASE_TESTING=1 #: release test not work #
|
||||||
|
|
||||||
|
NO_ARCH= yes
|
||||||
|
|
||||||
|
PLIST_FILES= ${SITE_MAN3_REL}/Lock::File.3.gz \
|
||||||
|
${SITE_MAN3_REL}/Lock::File::Alarm.3.gz \
|
||||||
|
${SITE_PERL_REL}/Lock/File.pm \
|
||||||
|
${SITE_PERL_REL}/Lock/File/Alarm.pm
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
3
devel/p5-Lock-File/distinfo
Normal file
3
devel/p5-Lock-File/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
TIMESTAMP = 1708621438
|
||||||
|
SHA256 (Lock-File-1.03.tar.gz) = dced6ab87fff3de647f80dc20cb1dc7f6e967f721df40f0465a1c4cdd2525865
|
||||||
|
SIZE (Lock-File-1.03.tar.gz) = 15955
|
13
devel/p5-Lock-File/files/patch-t_test.t
Normal file
13
devel/p5-Lock-File/files/patch-t_test.t
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- t/test.t.orig 2013-06-16 20:59:45 UTC
|
||||||
|
+++ t/test.t
|
||||||
|
@@ -177,8 +177,8 @@ sub timeout :Tests {
|
||||||
|
sleep 5; # timeout don't support float values, so we can't use tsleep here
|
||||||
|
});
|
||||||
|
|
||||||
|
- ok(exception { lockf("tfiles/lock", { timeout => 3, blocking => 0 }) }, "timeout is incompatible with blocking => 0");
|
||||||
|
- ok(!exception { lockf("tfiles/lock", { timeout => 3, blocking => 1 }) }, "timeout is compatible with blocking => 1");
|
||||||
|
+ ok(exception { lockfile("tfiles/lock", { timeout => 3, blocking => 0 }) }, "timeout is incompatible with blocking => 0");
|
||||||
|
+ ok(!exception { lockfile("tfiles/lock", { timeout => 3, blocking => 1 }) }, "timeout is compatible with blocking => 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
sub mode :Tests {
|
3
devel/p5-Lock-File/pkg-descr
Normal file
3
devel/p5-Lock-File/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
The Lock::File module provides flock wrapper functions that watch the
|
||||||
|
associated object and release it automatically if the object has no
|
||||||
|
reference.
|
Loading…
Add table
Reference in a new issue