aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/frand/Makefile25
-rw-r--r--sysutils/frand/distinfo5
-rw-r--r--sysutils/frand/pkg-descr5
-rw-r--r--sysutils/frand/pkg-plist2
5 files changed, 38 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 8fa9b41a7feb..ee57442aefc9 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -348,6 +348,7 @@
SUBDIR += fpc-users
SUBDIR += fpc-utmp
SUBDIR += fpc-uuid
+ SUBDIR += frand
SUBDIR += freebsd-snapshot
SUBDIR += freecolor
SUBDIR += freedt
diff --git a/sysutils/frand/Makefile b/sysutils/frand/Makefile
new file mode 100644
index 000000000000..9c87aff4cac4
--- /dev/null
+++ b/sysutils/frand/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PORTNAME= frand
+PORTVERSION= 0.1
+DISTVERSIONPREFIX= v
+CATEGORIES= sysutils
+
+MAINTAINER= serpent7776@gmail.com
+COMMENT= Selects a random file using reservoir sampling algorithm
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs
+
+USES= cmake
+
+USE_GITHUB= yes
+GH_ACCOUNT= serpent7776
+GH_PROJECT= frand StreamSampler:StreamSampler
+GH_TAGNAME= 919a0f1ba6bb3ae63b4708722e9a7d49164ca92d:StreamSampler
+GH_ACCOUNT_StreamSampler= LiorKogan
+GH_SUBDIR_StreamSampler= lib/StreamSampler
+
+.include <bsd.port.mk>
diff --git a/sysutils/frand/distinfo b/sysutils/frand/distinfo
new file mode 100644
index 000000000000..8295bf2a88d5
--- /dev/null
+++ b/sysutils/frand/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1564056505
+SHA256 (serpent7776-frand-v0.1_GH0.tar.gz) = 62a114ad80443b8e3fffa56ca3182e4e7294d1a3ba4b92cdb4e1cbe625794389
+SIZE (serpent7776-frand-v0.1_GH0.tar.gz) = 2225
+SHA256 (LiorKogan-StreamSampler-919a0f1ba6bb3ae63b4708722e9a7d49164ca92d_GH0.tar.gz) = 654ac0c0c0f161ef40c4d3fd4632d71cdf59c9cbe1108b47ba44b7f9f10f1d73
+SIZE (LiorKogan-StreamSampler-919a0f1ba6bb3ae63b4708722e9a7d49164ca92d_GH0.tar.gz) = 36890
diff --git a/sysutils/frand/pkg-descr b/sysutils/frand/pkg-descr
new file mode 100644
index 000000000000..42917ce9aad0
--- /dev/null
+++ b/sysutils/frand/pkg-descr
@@ -0,0 +1,5 @@
+Selects a random file from given directory using reservoir sampling algorithm.
+This means directory contents doesn't need to be read in memory and then sorted
+and so will perform much better than find+sort for big directories.
+
+WWW: https://github.com/serpent7776/frand
diff --git a/sysutils/frand/pkg-plist b/sysutils/frand/pkg-plist
new file mode 100644
index 000000000000..d34420dff9e6
--- /dev/null
+++ b/sysutils/frand/pkg-plist
@@ -0,0 +1,2 @@
+@comment $FreeBSD$
+bin/frand