Saturday, October 29, 2022

Re: [new] math/ministat: small statistic utility

Hi,

On 2022/10/28 22:52:19 +0300, Mikhail <mp39590@gmail.com> wrote:
> Simple utility from FreeBSD base[1], it is used for getting statistics,
> for example, from benchmarks data.
>
> Capsicum has been replaced with pledge().

It looks fine, I haven't diffed it against the original FreeBSD'
ministat and haven't rechecked the math neither, but the pledge(2)
usage seems OK from a cursory read. A bit exaggerate maybe (it
calls pledge three times "stdio rpath tty", then "stdio rpath" and
then "stdio") but fine.

Port-wise, the only thing that needs to be adjusted is CFLAGS, as
it uses the hardcoded ones '-O2 -pipe -Werror' and not the ones
provided by the port infrastructure; it's very easy to fix:

--- Makefile.orig Sat Oct 29 09:15:47 2022
+++ Makefile Sat Oct 29 09:16:52 2022
@@ -13,6 +13,7 @@

MASTER_SITES= https://people.freebsd.org/~misha/
NO_TEST= Yes
+MAKE_FLAGS= CFLAGS="${CFLAGS}"
FAKE_FLAGS= PREFIX="${TRUEPREFIX}"

EXAMPLES= ${PREFIX}/share/examples/ministat



(this because CFLAGS by default are passed in the environment rather
than as MAKE_FLAGS)

No comments:

Post a Comment