Bug 260997 - devel/rapidyaml: New port: Library to parse and emit YAML
Summary: devel/rapidyaml: New port: Library to parse and emit YAML
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords: needs-qa
Depends on:
Blocks: 260998
  Show dependency treegraph
 
Reported: 2022-01-07 06:48 UTC by Gasol Wu
Modified: 2022-01-08 13:24 UTC (History)
2 users (show)

See Also:


Attachments
Patch (4.94 KB, patch)
2022-01-07 06:48 UTC, Gasol Wu
no flags Details | Diff
Patch updated (4.96 KB, patch)
2022-01-08 04:43 UTC, Gasol Wu
no flags Details | Diff
testport (25.85 KB, text/plain)
2022-01-08 04:45 UTC, Gasol Wu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gasol Wu 2022-01-07 06:48:54 UTC
Created attachment 230780 [details]
Patch

Rapid YAML is a C++ library used in devel/jsonnet 0.18.0


$ cat pkg-descr

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
Comment 1 Gasol Wu 2022-01-07 07:00:15 UTC
bug #260996 for the dependency
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-07 13:42:44 UTC
The LIB_DEPENDS line is ill formed. The minimum version goes before the ':', not after.
On the other hand, unless it is necessay, it is better not to add minimum versions. In this case it is superfluous because we just added c4core and we know we are not going to add a version less than 0.1.8.

Apart from that, the port fails to build:

/bin/mkdir -p /wrkdirs/usr/ports/devel/rapidyaml/work/.build
-- The CXX compiler identification is Clang 11.0.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ryml: using C++ standard: C++11
-- ryml: setting C++ standard: 11
-- ryml: setting C++ standard required: ON
-- ryml: packing the project: 
CMake Error at ext/c4core/cmake/c4Project.cmake:1039 (find_program):
  Could not find GIT using the following names: git
Call Stack (most recent call first):
  ext/c4core/cmake/c4Project.cmake:881 (c4_proj_get_version)
  ext/c4core/cmake/c4Project.cmake:822 (c4_set_default_pack_properties)
  CMakeLists.txt:70 (c4_pack_project)


-- Configuring incomplete, errors occurred!
See also "/wrkdirs/usr/ports/devel/rapidyaml/work/.build/CMakeFiles/CMakeOutput.log".
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/rapidyaml

It misses git@lite as a BUILD_DEPENDS.

Please, test your submissions with poudriere and or portclippy, portlint.
Comment 3 Gasol Wu 2022-01-08 04:43:52 UTC
Created attachment 230805 [details]
Patch updated

Fix build
Comment 4 Gasol Wu 2022-01-08 04:45:00 UTC
Created attachment 230807 [details]
testport

pass portlint and poudriere
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-01-08 13:23:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bab56f380df0090c0d3c592d21b5796d89e3ffd5

commit bab56f380df0090c0d3c592d21b5796d89e3ffd5
Author:     Gasol Wu <gasol.wu@gmail.com>
AuthorDate: 2022-01-08 13:04:43 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-01-08 13:21:23 +0000

    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)

 devel/Makefile                                   |  1 +
 devel/rapidyaml/Makefile (new)                   | 27 +++++++++++++++++++++
 devel/rapidyaml/distinfo (new)                   |  5 ++++
 devel/rapidyaml/files/patch-CMakeLists.txt (new) | 31 ++++++++++++++++++++++++
 devel/rapidyaml/pkg-descr (new)                  | 13 ++++++++++
 devel/rapidyaml/pkg-plist (new)                  | 26 ++++++++++++++++++++
 6 files changed, 103 insertions(+)
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-08 13:24:32 UTC
Committed,

Thanks!