diff options
author | Zane C. Bowers-Hadley <vvelox@vvelox.net> | 2021-11-05 08:07:10 +0000 |
---|---|---|
committer | Yasuhiro Kimura <yasu@FreeBSD.org> | 2021-11-05 08:18:09 +0000 |
commit | 0821d602adcb0ed87fb39b8222572a87cd6a0793 (patch) | |
tree | 1efa696e7fc1c1f571efad489ba042571ff860a8 /textproc/p5-Number-Format-Metric | |
parent | 34b8755a4260c12e6d6f487adb56670de36f4c5a (diff) | |
download | ports-0821d602adcb0ed87fb39b8222572a87cd6a0793.tar.gz ports-0821d602adcb0ed87fb39b8222572a87cd6a0793.zip |
textproc/p5-Number-Format-Metric: Add new port
Format number with metric prefix.
format_metric(14 , {base=>10}); # => "14"
format_metric(12000 , {base=> 2, precision=>1}); # => "11.7K"
format_metric(12000 , {base=>10, precision=>1}); # => "11.7Ki"
format_metric(-0.0017, {base=>10}); # => "1.7m"
PR: 259078
MFH: 2021Q4 (required to fix missing dependency issue)
Diffstat (limited to 'textproc/p5-Number-Format-Metric')
-rw-r--r-- | textproc/p5-Number-Format-Metric/Makefile | 20 | ||||
-rw-r--r-- | textproc/p5-Number-Format-Metric/distinfo | 3 | ||||
-rw-r--r-- | textproc/p5-Number-Format-Metric/pkg-descr | 8 | ||||
-rw-r--r-- | textproc/p5-Number-Format-Metric/pkg-plist | 2 |
4 files changed, 33 insertions, 0 deletions
diff --git a/textproc/p5-Number-Format-Metric/Makefile b/textproc/p5-Number-Format-Metric/Makefile new file mode 100644 index 000000000000..2cff1aee6b48 --- /dev/null +++ b/textproc/p5-Number-Format-Metric/Makefile @@ -0,0 +1,20 @@ +# Created by: Zane C. Bowers-Hadley <vvelox@vvelox.net> + +PORTNAME= Number-Format-Metric +PORTVERSION= 0.60 +CATEGORIES= textproc perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= vvelox@vvelox.net +COMMENT= Format number with metric prefix + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual + +USES= perl5 +USE_PERL5= configure + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/textproc/p5-Number-Format-Metric/distinfo b/textproc/p5-Number-Format-Metric/distinfo new file mode 100644 index 000000000000..2d4a813fcc9a --- /dev/null +++ b/textproc/p5-Number-Format-Metric/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1633971826 +SHA256 (Number-Format-Metric-0.60.tar.gz) = f46c5c32f2979dcecc8fbaf054eb17adb6dd306d4be9db98397bde706857bbb3 +SIZE (Number-Format-Metric-0.60.tar.gz) = 13772 diff --git a/textproc/p5-Number-Format-Metric/pkg-descr b/textproc/p5-Number-Format-Metric/pkg-descr new file mode 100644 index 000000000000..6747844b8a4d --- /dev/null +++ b/textproc/p5-Number-Format-Metric/pkg-descr @@ -0,0 +1,8 @@ +Format number with metric prefix. + +format_metric(14 , {base=>10}); # => "14" +format_metric(12000 , {base=> 2, precision=>1}); # => "11.7K" +format_metric(12000 , {base=>10, precision=>1}); # => "11.7Ki" +format_metric(-0.0017, {base=>10}); # => "1.7m" + +WWW: https://metacpan.org/dist/Number-Format-Metric diff --git a/textproc/p5-Number-Format-Metric/pkg-plist b/textproc/p5-Number-Format-Metric/pkg-plist new file mode 100644 index 000000000000..f2139e4c587a --- /dev/null +++ b/textproc/p5-Number-Format-Metric/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Number/Format/Metric.pm +%%PERL5_MAN3%%/Number::Format::Metric.3.gz |