aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGasol Wu <gasol.wu@gmail.com>2022-01-08 13:04:43 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2022-01-08 13:21:23 +0000
commitbab56f380df0090c0d3c592d21b5796d89e3ffd5 (patch)
tree3b2a89547a3d736064c5bc1dca6ef419ca5b2727
parent7c70279f0a01ce74bfa24bbfd4764b40893c1350 (diff)
downloadports-bab56f380df0090c0d3c592d21b5796d89e3ffd5.tar.gz
ports-bab56f380df0090c0d3c592d21b5796d89e3ffd5.zip
devel/rapidyaml: New port: Library to parse and emit YAML
Needed for the upcoming version of devel/jsonnet PR: 260997 Reported by: gasol.wu@gmail.com (maintainer)
-rw-r--r--devel/Makefile1
-rw-r--r--devel/rapidyaml/Makefile27
-rw-r--r--devel/rapidyaml/distinfo5
-rw-r--r--devel/rapidyaml/files/patch-CMakeLists.txt31
-rw-r--r--devel/rapidyaml/pkg-descr13
-rw-r--r--devel/rapidyaml/pkg-plist26
6 files changed, 103 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 1654b969b3b0..c1b393863d6e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5568,6 +5568,7 @@
SUBDIR += rapidcheck
SUBDIR += rapidfuzz-cpp
SUBDIR += rapidjson
+ SUBDIR += rapidyaml
SUBDIR += raylib
SUBDIR += rbenv
SUBDIR += rbtools
diff --git a/devel/rapidyaml/Makefile b/devel/rapidyaml/Makefile
new file mode 100644
index 000000000000..dd64eed9b1b9
--- /dev/null
+++ b/devel/rapidyaml/Makefile
@@ -0,0 +1,27 @@
+PORTNAME= rapidyaml
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.3.0
+CATEGORIES= devel
+
+MAINTAINER= gasol.wu@gmail.com
+COMMENT= Library to parse and emit YAML
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= git:devel/git@lite
+LIB_DEPENDS= libc4core.so:devel/c4core
+
+USES= compiler:c++11-lib cmake:noninja localbase:ldflags
+
+USE_GITHUB= yes
+GH_ACCOUNT= biojppm
+GH_PROJECT= cmake:cmake
+GH_TAGNAME= 9416f29:cmake
+GH_SUBDIR= ext/c4core/cmake:cmake
+
+CMAKE_ON= BUILD_SHARED_LIBS
+
+PLIST_SUB= PORTVERSION=${PORTVERSION}
+
+.include <bsd.port.mk>
diff --git a/devel/rapidyaml/distinfo b/devel/rapidyaml/distinfo
new file mode 100644
index 000000000000..61cf33a045d6
--- /dev/null
+++ b/devel/rapidyaml/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1641437701
+SHA256 (biojppm-rapidyaml-v0.3.0_GH0.tar.gz) = 1e25d739207733bd9febaf57793e4df3b7f868aa1d3c18d744b09b5d7b286a53
+SIZE (biojppm-rapidyaml-v0.3.0_GH0.tar.gz) = 291415
+SHA256 (biojppm-cmake-9416f29_GH0.tar.gz) = 4c4b47dec40782866deb56df29a93b89eec059a2b368d3ad72aed85b810109d8
+SIZE (biojppm-cmake-9416f29_GH0.tar.gz) = 121012
diff --git a/devel/rapidyaml/files/patch-CMakeLists.txt b/devel/rapidyaml/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..f325c3ab33ae
--- /dev/null
+++ b/devel/rapidyaml/files/patch-CMakeLists.txt
@@ -0,0 +1,31 @@
+--- CMakeLists.txt.orig 2021-12-28 17:18:42 UTC
++++ CMakeLists.txt
+@@ -17,9 +17,6 @@ option(RYML_DBG "Enable (very verbose) ryml debug prin
+
+ #-------------------------------------------------------
+
+-c4_require_subproject(c4core INCORPORATE
+- SUBDIRECTORY ${RYML_EXT_DIR}/c4core)
+-
+ c4_add_library(ryml
+ SOURCES
+ ryml.hpp
+@@ -47,14 +44,15 @@ c4_add_library(ryml
+ c4/yml/tree.cpp
+ c4/yml/writer.hpp
+ c4/yml/yml.hpp
+- ryml.natvis
+ SOURCE_ROOT ${RYML_SRC_DIR}
+ INC_DIRS
+ $<BUILD_INTERFACE:${RYML_SRC_DIR}>
+ $<INSTALL_INTERFACE:include>
+- LIBS c4core
+- INCORPORATE c4core
+ )
++
++include_directories(/usr/local/include)
++target_link_libraries(ryml c4core)
++
+
+ if(NOT RYML_DEFAULT_CALLBACKS)
+ target_compile_definitions(ryml PRIVATE RYML_NO_DEFAULT_CALLBACKS)
diff --git a/devel/rapidyaml/pkg-descr b/devel/rapidyaml/pkg-descr
new file mode 100644
index 000000000000..480362791dea
--- /dev/null
+++ b/devel/rapidyaml/pkg-descr
@@ -0,0 +1,13 @@
+Rapid YAML or ryml, for short. ryml is a C++ library to parse and emit YAML,
+and do it fast.
+
+ryml parses both read-only and in-situ source buffers; the resulting data nodes
+hold only views to sub-ranges of the source buffer. No string copies or
+duplications are done, and no virtual functions are used. The data tree is a
+flat index-based structure stored in a single array. Serialization happens only
+at your direct request, after parsing / before emitting. Internally, the data
+tree representation stores only strings and has no knowledge of types, but of
+course, every node can have a YAML type tag. ryml makes it easy and fast to
+read and modify the data tree.
+
+WWW: https://github.com/biojppm/rapidyaml
diff --git a/devel/rapidyaml/pkg-plist b/devel/rapidyaml/pkg-plist
new file mode 100644
index 000000000000..b9b03e81fd8c
--- /dev/null
+++ b/devel/rapidyaml/pkg-plist
@@ -0,0 +1,26 @@
+include/c4/yml/common.hpp
+include/c4/yml/detail/checks.hpp
+include/c4/yml/detail/parser_dbg.hpp
+include/c4/yml/detail/print.hpp
+include/c4/yml/detail/stack.hpp
+include/c4/yml/emit.def.hpp
+include/c4/yml/emit.hpp
+include/c4/yml/export.hpp
+include/c4/yml/node.hpp
+include/c4/yml/parse.hpp
+include/c4/yml/preprocess.hpp
+include/c4/yml/std/map.hpp
+include/c4/yml/std/std.hpp
+include/c4/yml/std/string.hpp
+include/c4/yml/std/vector.hpp
+include/c4/yml/tree.hpp
+include/c4/yml/writer.hpp
+include/c4/yml/yml.hpp
+include/ryml.hpp
+include/ryml_std.hpp
+lib/cmake/ryml/rymlConfig.cmake
+lib/cmake/ryml/rymlConfigVersion.cmake
+lib/cmake/ryml/rymlTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/ryml/rymlTargets.cmake
+lib/libryml.so
+lib/libryml.so.%%PORTVERSION%%