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.
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
sysutils/frand: fix build on GCC architectures
Use C++11 compiler:
/wrkdirs/usr/ports/sysutils/frand/work/frand-0.1/main.cpp:7: error: ISO C++
forbids declaration of 'sample_sets_count' with no type
Approved by: mentors (implicit approval)
sysutils/frand: Canonicalize USE_GITHUB usage
Make use of GH_TUPLE, avoid implementation details, and turn this
into a form that everybody understands.
Add new port sysutils/frand
frand is a command line tool who returns
a random file from a given directory using
the reservoir sampling algorithm.
With reservoir sampling algorithm, directory
contents doesn't need to be read in memory
then sorted and so will perform much better
than find+sort for directories with a large
amount of files.
PR: 239467
Submitted by: serpent7776@gmail.com