math/dragonbox: import dragonbox-1.1.3

This library is a reference implementation of Dragonbox in C++.

Dragonbox is a float-to-string conversion algorithm based on a
beautiful algorithm Schubfach, developed by Raffaello Giulietti in
2017-2018. Dragonbox is further inspired by Grisu and Grisu-Exact.
This commit is contained in:
ryoon 2022-08-24 12:53:24 +00:00
parent 32a67db968
commit 1e794ec548
6 changed files with 65 additions and 0 deletions

5
math/dragonbox/DESCR Normal file
View file

@ -0,0 +1,5 @@
This library is a reference implementation of Dragonbox in C++.
Dragonbox is a float-to-string conversion algorithm based on a
beautiful algorithm Schubfach, developed by Raffaello Giulietti in
2017-2018. Dragonbox is further inspired by Grisu and Grisu-Exact.

19
math/dragonbox/Makefile Normal file
View file

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 2022/08/24 12:53:24 ryoon Exp $
DISTNAME= dragonbox-${GITHUB_TAG}
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_GITHUB:=jk-jeon/}
GITHUB_PROJECT= dragonbox
GITHUB_TAG= 1.1.3
MAINTAINER= ryoon@NetBSD.org
HOMEPAGE= https://github.com/jk-jeon/dragonbox/
COMMENT= Floating-point to binary-to-decimal conversion library
LICENSE= boost-license OR apache-2.0 # with LLVM exceptions
USE_CMAKE= yes
USE_LANGUAGES= c c++
CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON
.include "../../mk/bsd.pkg.mk"

8
math/dragonbox/PLIST Normal file
View file

@ -0,0 +1,8 @@
@comment $NetBSD: PLIST,v 1.1 2022/08/24 12:53:24 ryoon Exp $
include/${PKGNAME}/dragonbox/dragonbox.h
include/${PKGNAME}/dragonbox/dragonbox_to_chars.h
lib/cmake/${PKGNAME}/dragonboxConfig.cmake
lib/cmake/${PKGNAME}/dragonboxConfigVersion.cmake
lib/cmake/${PKGNAME}/dragonboxTargets-noconfig.cmake
lib/cmake/${PKGNAME}/dragonboxTargets.cmake
lib/libdragonbox_to_chars.so

View file

@ -0,0 +1,12 @@
# $NetBSD: buildlink3.mk,v 1.1 2022/08/24 12:53:24 ryoon Exp $
BUILDLINK_TREE+= dragonbox
.if !defined(DRAGONBOX_BUILDLINK3_MK)
DRAGONBOX_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.dragonbox+= dragonbox>=1.1.3
BUILDLINK_PKGSRCDIR.dragonbox?= ../../math/dragonbox
.endif # DRAGONBOX_BUILDLINK3_MK
BUILDLINK_TREE+= -dragonbox

6
math/dragonbox/distinfo Normal file
View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1 2022/08/24 12:53:24 ryoon Exp $
BLAKE2s (dragonbox-1.1.3.tar.gz) = 8224ccc7037b6f08a5c9fd57d4f46f59b4c97c5ee36e5fd7346532f3157d464e
SHA512 (dragonbox-1.1.3.tar.gz) = 41ac356ebced3312c0f9ea0f07ff372337ab78af69071f63f63dc12bd2b0088d5d89aae3792276599dd0393bfdfd2b979946c43d36042e43105080bcdcbe089d
Size (dragonbox-1.1.3.tar.gz) = 4337233 bytes
SHA1 (patch-CMakeLists.txt) = dd1b4588f79789dead14b2b06af52e9f0fb9a2cd

View file

@ -0,0 +1,15 @@
$NetBSD: patch-CMakeLists.txt,v 1.1 2022/08/24 12:53:24 ryoon Exp $
* Honor BUILD_SHARED_LIBS.
--- CMakeLists.txt.orig 2022-06-17 23:48:12.000000000 +0000
+++ CMakeLists.txt
@@ -39,7 +39,7 @@ set(dragonbox_to_chars_headers
set(dragonbox_to_chars_sources source/dragonbox_to_chars.cpp)
-add_library(dragonbox_to_chars STATIC
+add_library(dragonbox_to_chars
${dragonbox_to_chars_headers}
${dragonbox_to_chars_sources})
add_library(dragonbox::dragonbox_to_chars ALIAS dragonbox_to_chars)