1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

New port: databases/p5-File-Locate

File::Locate provides the locate() function that scans the locate
database for a given substring or POSIX regular expression. The
module can handle both plain old locate databases as well as the
more hip slocate format.

WWW: http://search.cpan.org/dist/File-Locate/
This commit is contained in:
Kurt Jaeger 2017-02-17 20:49:22 +00:00
parent de481b1e28
commit 5b7d4741fb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434314
5 changed files with 76 additions and 0 deletions

View File

@ -428,6 +428,7 @@
SUBDIR += p5-Data-Page
SUBDIR += p5-Data-Pageset
SUBDIR += p5-Exception-Class-DBI
SUBDIR += p5-File-Locate
SUBDIR += p5-GDBM
SUBDIR += p5-Genezzo
SUBDIR += p5-GitDDL

View File

@ -0,0 +1,22 @@
# $FreeBSD$
PORTNAME= File-Locate
PORTVERSION= 0.62
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= pi@FreeBSD.org
COMMENT= Search the locate(1)-database from Perl
LICENSE= GPLv2+
USES= perl5
USE_PERL5= configure
PLIST_FILES= %%SITE_ARCH%%/File/Locate.pm \
%%SITE_ARCH%%/auto/File/Locate/Locate.so \
%%SITE_ARCH%%/auto/File/Locate/autosplit.ix \
%%PERL5_MAN3%%/File::Locate.3.gz
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1487361878
SHA256 (File-Locate-0.62.tar.gz) = 8565f067b3ba285f6ba8a4e2939a02ba37be82d6d37e420c61f1f85825f2a3d0
SIZE (File-Locate-0.62.tar.gz) = 21343

View File

@ -0,0 +1,44 @@
--- Locate.xs.orig 2007-02-17 13:56:53 UTC
+++ Locate.xs
@@ -48,7 +48,8 @@ extern int errno;
uid_t UID;
gid_t GID;
-typedef enum {false, true} boolean;
+// typedef enum {false, true} boolean;
+#include <stdbool.h>
static char * last_literal_end (char *name) {
static char *globfree = NULL; /* A copy of the subpattern in NAME. */
@@ -247,7 +248,7 @@ _locate (pathpart, ...)
FILE *fp; /* The pathname database. */
int c; /* An input byte. */
int nread; /* Number of bytes read from an entry. */
- boolean globflag; /* true if PATHPART contains globbing
+ bool globflag; /* true if PATHPART contains globbing
metacharacters. */
char *patend; /* The end of the last glob-free subpattern
in PATHPART. */
@@ -258,11 +259,11 @@ _locate (pathpart, ...)
char *cutoff; /* Where in `path' to stop the backward search for
the last character in the subpattern. Set
according to `count'. */
- boolean prev_fast_match = false; /* true if we found a fast match
+ bool prev_fast_match = false; /* true if we found a fast match
(of patend) on the previous
path. */
int printed = 0; /* The return value. */
- boolean old_format = false; /* true if reading a bigram-encoded
+ bool old_format = false; /* true if reading a bigram-encoded
database. */
char bigram1[128], bigram2[128]; /* For the old database format, the
first and second characters of
@@ -511,7 +512,7 @@ _slocate (str, ...)
char slevel = '1';
int res = 0;
- boolean prev_fast_match = false; /* true if we found a fast match
+ bool prev_fast_match = false; /* true if we found a fast match
(of patend) on the previous
path. */
register int i;

View File

@ -0,0 +1,6 @@
File::Locate provides the locate() function that scans the locate
database for a given substring or POSIX regular expression. The
module can handle both plain old locate databases as well as the
more hip slocate format.
WWW: http://search.cpan.org/dist/File-Locate/