aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-06-05 18:18:15 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-06-05 18:46:49 +0000
commit20ab13a945fa52737218c8697caa86959a505504 (patch)
tree8e87c203b2ad4978083ec8b69acf64c830b7788e
parent98830129a06a562f3c7d1704adba2fc4ac1a371e (diff)
math/fast_float: Add fast_float 5.0.0
The fast_float library provides fast header-only implementations for the C++ from_chars functions for float and double types. These functions convert ASCII strings representing decimal values (e.g., 1.3e10) into binary types. We provide exact rounding (including round to even). In our experience, these fast_float functions many times faster than comparable number-parsing functions from existing C++ standard libraries.
-rw-r--r--math/Makefile1
-rw-r--r--math/fast_float/Makefile25
-rw-r--r--math/fast_float/distinfo3
-rw-r--r--math/fast_float/pkg-descr6
-rw-r--r--math/fast_float/pkg-plist12
5 files changed, 47 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 70a0b3ede704..87fd0f7d3d34 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -315,6 +315,7 @@
SUBDIR += facile
SUBDIR += faiss
SUBDIR += fann
+ SUBDIR += fast_float
SUBDIR += fastops
SUBDIR += fcl
SUBDIR += fcl05
diff --git a/math/fast_float/Makefile b/math/fast_float/Makefile
new file mode 100644
index 000000000000..e321fcd472e7
--- /dev/null
+++ b/math/fast_float/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= fast_float
+PORTVERSION= 5.0.0
+DISTVERSIONPREFIX= v
+CATEGORIES= math
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Fast and exact C++ number parsing library
+WWW= https://github.com/fastfloat/fast_float
+
+LICENSE= APACHE20 BSL MIT
+LICENSE_COMB= dual
+LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE
+LICENSE_FILE= ${WRKSRC}/LICENSE-BOOST
+LICENSE_FILE= ${WRKSRC}/LICENSE-MIT
+
+USES= cmake compiler:c++11-lang
+
+CMAKE_OFF= FASTFLOAT_SANITIZE FASTFLOAT_TEST
+CMAKE_ON= FASTFLOAT_INSTALL
+NO_ARCH= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= fastfloat
+
+.include <bsd.port.mk>
diff --git a/math/fast_float/distinfo b/math/fast_float/distinfo
new file mode 100644
index 000000000000..1eaecebc7f49
--- /dev/null
+++ b/math/fast_float/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1685792168
+SHA256 (fastfloat-fast_float-v5.0.0_GH0.tar.gz) = 86645ab4af22d21d4ba2d980572dfb74faf90c20c52240d7d8d2201f3eaf4252
+SIZE (fastfloat-fast_float-v5.0.0_GH0.tar.gz) = 83241
diff --git a/math/fast_float/pkg-descr b/math/fast_float/pkg-descr
new file mode 100644
index 000000000000..6ddfe947c559
--- /dev/null
+++ b/math/fast_float/pkg-descr
@@ -0,0 +1,6 @@
+The fast_float library provides fast header-only implementations for the C++
+from_chars functions for float and double types. These functions convert ASCII
+strings representing decimal values (e.g., 1.3e10) into binary types. We provide
+exact rounding (including round to even). In our experience, these fast_float
+functions many times faster than comparable number-parsing functions from
+existing C++ standard libraries.
diff --git a/math/fast_float/pkg-plist b/math/fast_float/pkg-plist
new file mode 100644
index 000000000000..8df16a67dbf9
--- /dev/null
+++ b/math/fast_float/pkg-plist
@@ -0,0 +1,12 @@
+include/fast_float/ascii_number.h
+include/fast_float/bigint.h
+include/fast_float/constexpr_feature_detect.h
+include/fast_float/decimal_to_binary.h
+include/fast_float/digit_comparison.h
+include/fast_float/fast_float.h
+include/fast_float/fast_table.h
+include/fast_float/float_common.h
+include/fast_float/parse_number.h
+share/cmake/FastFloat/FastFloatConfig.cmake
+share/cmake/FastFloat/FastFloatConfigVersion.cmake
+share/cmake/FastFloat/fast_float-targets.cmake