Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add libyaml module definition (#1104)
* Add libyaml module definition * fixup * s/yaml/libyaml/ * add bazel matrix * add (no) maintainers * fix config_h template * Fix to use defines instead of template as that's not available in the release archive (only in source) * Fix MODULE.bazel * not sure what's up with windows, leave it out for now --------- Co-authored-by: Laurenz <git@laure.nz>
- Loading branch information
Showing
6 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module( | ||
name = "libyaml", | ||
version = "0.2.5", | ||
compatibility_level = 1, | ||
) | ||
bazel_dep(name = "rules_cc", version = "0.0.9") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- /dev/null | ||
+++ BUILD.bazel | ||
@@ -0,0 +1,29 @@ | ||
+""" Builds libyaml. | ||
+""" | ||
+ | ||
+load("@rules_cc//cc:defs.bzl", "cc_library") | ||
+ | ||
+cc_library( | ||
+ name = "libyaml", | ||
+ srcs = [ | ||
+ "src/api.c", | ||
+ "src/dumper.c", | ||
+ "src/emitter.c", | ||
+ "src/loader.c", | ||
+ "src/parser.c", | ||
+ "src/reader.c", | ||
+ "src/scanner.c", | ||
+ "src/writer.c", | ||
+ "src/yaml_private.h", | ||
+ ], | ||
+ hdrs = ["include/yaml.h"], | ||
+ copts = ["-w"], | ||
+ includes = ["include"], | ||
+ local_defines = [ | ||
+ "YAML_VERSION_MAJOR=0", | ||
+ "YAML_VERSION_MINOR=2", | ||
+ "YAML_VERSION_PATCH=5", | ||
+ 'YAML_VERSION_STRING=\\"0.2.5\\"', | ||
+ ], | ||
+ visibility = ["//visibility:public"], | ||
+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- /dev/null | ||
+++ MODULE.bazel | ||
@@ -0,0 +1,6 @@ | ||
+module( | ||
+ name = "libyaml", | ||
+ version = "0.2.5", | ||
+ compatibility_level = 1, | ||
+) | ||
+bazel_dep(name = "rules_cc", version = "0.0.9") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
matrix: | ||
platform: | ||
- debian10 | ||
- ubuntu2004 | ||
- macos | ||
- macos_arm64 | ||
bazel: [6.x, 7.x] | ||
tasks: | ||
verify_targets: | ||
name: Verify build targets | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_targets: | ||
- '@libyaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"url": "https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz", | ||
"integrity": "sha256-xkKum3X+4SCy2WxxJTi9LPKDIo0jN98s8piOPAJnjvQ=", | ||
"strip_prefix": "yaml-0.2.5", | ||
"patches": { | ||
"add_build_file.patch": "sha256-/v4tc0vcSCT1ztwhNQoCSvt/YuDUWJ8uQUfr6cAk51w=", | ||
"module_dot_bazel.patch": "sha256-nafHcADd1Yx3bXwUrNemoevJPRtRAWyUtxGmOg4QHs8=" | ||
}, | ||
"patch_strip": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"homepage": "https://github.com/yaml/libyaml", | ||
"maintainers": [ | ||
{ | ||
"email": "bcr-maintainers@bazel.build", | ||
"name": "No Maintainer Specified" | ||
} | ||
], | ||
"repository": [ | ||
"github:yaml/libyaml" | ||
], | ||
"versions": [ | ||
"0.2.5" | ||
], | ||
"yanked_versions": {} | ||
} |