diff --git a/modules/libyaml/0.2.5/MODULE.bazel b/modules/libyaml/0.2.5/MODULE.bazel new file mode 100644 index 0000000000..89ef4695c5 --- /dev/null +++ b/modules/libyaml/0.2.5/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") diff --git a/modules/libyaml/0.2.5/patches/add_build_file.patch b/modules/libyaml/0.2.5/patches/add_build_file.patch new file mode 100644 index 0000000000..cbe527f245 --- /dev/null +++ b/modules/libyaml/0.2.5/patches/add_build_file.patch @@ -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"], ++) diff --git a/modules/libyaml/0.2.5/patches/module_dot_bazel.patch b/modules/libyaml/0.2.5/patches/module_dot_bazel.patch new file mode 100644 index 0000000000..0dd578a2df --- /dev/null +++ b/modules/libyaml/0.2.5/patches/module_dot_bazel.patch @@ -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") diff --git a/modules/libyaml/0.2.5/presubmit.yml b/modules/libyaml/0.2.5/presubmit.yml new file mode 100644 index 0000000000..3e96242347 --- /dev/null +++ b/modules/libyaml/0.2.5/presubmit.yml @@ -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' diff --git a/modules/libyaml/0.2.5/source.json b/modules/libyaml/0.2.5/source.json new file mode 100644 index 0000000000..f5a63fda8e --- /dev/null +++ b/modules/libyaml/0.2.5/source.json @@ -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 +} diff --git a/modules/libyaml/metadata.json b/modules/libyaml/metadata.json new file mode 100644 index 0000000000..0abc42a23b --- /dev/null +++ b/modules/libyaml/metadata.json @@ -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": {} +}