From 53821558a62ae1b57bc4cf185d2e26a7731456f6 Mon Sep 17 00:00:00 2001 From: Carbo Kuo Date: Mon, 15 Jul 2024 15:09:32 -0400 Subject: [PATCH] Add marisa-trie 0.2.6. (#2430) --- modules/marisa-trie/0.2.6/MODULE.bazel | 7 + .../0.2.6/patches/add_build_file.patch | 125 ++++++++++++++++++ .../0.2.6/patches/module_dot_bazel.patch | 10 ++ modules/marisa-trie/0.2.6/presubmit.yml | 26 ++++ modules/marisa-trie/0.2.6/source.json | 10 ++ modules/marisa-trie/metadata.json | 11 ++ 6 files changed, 189 insertions(+) create mode 100644 modules/marisa-trie/0.2.6/MODULE.bazel create mode 100644 modules/marisa-trie/0.2.6/patches/add_build_file.patch create mode 100644 modules/marisa-trie/0.2.6/patches/module_dot_bazel.patch create mode 100644 modules/marisa-trie/0.2.6/presubmit.yml create mode 100644 modules/marisa-trie/0.2.6/source.json create mode 100644 modules/marisa-trie/metadata.json diff --git a/modules/marisa-trie/0.2.6/MODULE.bazel b/modules/marisa-trie/0.2.6/MODULE.bazel new file mode 100644 index 00000000000..0b444177ad1 --- /dev/null +++ b/modules/marisa-trie/0.2.6/MODULE.bazel @@ -0,0 +1,7 @@ +"MARISA: Matching Algorithm with Recursively Implemented StorAge." + +module( + name = "marisa-trie", + version = "0.2.6", + compatibility_level = 0, +) diff --git a/modules/marisa-trie/0.2.6/patches/add_build_file.patch b/modules/marisa-trie/0.2.6/patches/add_build_file.patch new file mode 100644 index 00000000000..73019e62905 --- /dev/null +++ b/modules/marisa-trie/0.2.6/patches/add_build_file.patch @@ -0,0 +1,125 @@ +--- /dev/null ++++ BUILD.bazel +@@ -0,0 +1,122 @@ ++cc_library( ++ name = "public_headers", ++ hdrs = [ ++ "include/marisa.h", ++ "include/marisa/agent.h", ++ "include/marisa/base.h", ++ "include/marisa/exception.h", ++ "include/marisa/iostream.h", ++ "include/marisa/key.h", ++ "include/marisa/keyset.h", ++ "include/marisa/query.h", ++ "include/marisa/scoped-array.h", ++ "include/marisa/scoped-ptr.h", ++ "include/marisa/stdio.h", ++ "include/marisa/trie.h", ++ ], ++ strip_include_prefix = "include", ++) ++ ++cc_library( ++ name = "internal_headers", ++ hdrs = [ ++ "lib/marisa/grimoire/algorithm.h", ++ "lib/marisa/grimoire/algorithm/sort.h", ++ "lib/marisa/grimoire/intrin.h", ++ "lib/marisa/grimoire/io.h", ++ "lib/marisa/grimoire/io/mapper.h", ++ "lib/marisa/grimoire/io/reader.h", ++ "lib/marisa/grimoire/io/writer.h", ++ "lib/marisa/grimoire/trie.h", ++ "lib/marisa/grimoire/trie/cache.h", ++ "lib/marisa/grimoire/trie/config.h", ++ "lib/marisa/grimoire/trie/entry.h", ++ "lib/marisa/grimoire/trie/header.h", ++ "lib/marisa/grimoire/trie/history.h", ++ "lib/marisa/grimoire/trie/key.h", ++ "lib/marisa/grimoire/trie/louds-trie.h", ++ "lib/marisa/grimoire/trie/range.h", ++ "lib/marisa/grimoire/trie/state.h", ++ "lib/marisa/grimoire/trie/tail.h", ++ "lib/marisa/grimoire/vector.h", ++ "lib/marisa/grimoire/vector/bit-vector.h", ++ "lib/marisa/grimoire/vector/flat-vector.h", ++ "lib/marisa/grimoire/vector/pop-count.h", ++ "lib/marisa/grimoire/vector/rank-index.h", ++ "lib/marisa/grimoire/vector/vector.h", ++ ], ++ strip_include_prefix = "lib", ++) ++ ++cc_library( ++ name = "marisa-trie", ++ srcs = [ ++ "lib/marisa/agent.cc", ++ "lib/marisa/grimoire/io/mapper.cc", ++ "lib/marisa/grimoire/io/reader.cc", ++ "lib/marisa/grimoire/io/writer.cc", ++ "lib/marisa/grimoire/trie/louds-trie.cc", ++ "lib/marisa/grimoire/trie/tail.cc", ++ "lib/marisa/grimoire/vector/bit-vector.cc", ++ "lib/marisa/keyset.cc", ++ "lib/marisa/trie.cc", ++ ], ++ visibility = ["//visibility:public"], ++ deps = [ ++ ":internal_headers", ++ ":public_headers", ++ ], ++) ++ ++cc_library( ++ name = "marisa-assert", ++ testonly = True, ++ hdrs = ["tests/marisa-assert.h"], ++ strip_include_prefix = "tests", ++) ++ ++cc_test( ++ name = "base-test", ++ srcs = ["tests/base-test.cc"], ++ deps = [ ++ ":marisa-assert", ++ ":marisa-trie", ++ ], ++) ++ ++cc_test( ++ name = "io-test", ++ srcs = ["tests/io-test.cc"], ++ deps = [ ++ ":marisa-assert", ++ ":marisa-trie", ++ ], ++) ++ ++cc_test( ++ name = "marisa-test", ++ srcs = ["tests/marisa-test.cc"], ++ deps = [ ++ ":marisa-assert", ++ ":marisa-trie", ++ ], ++) ++ ++cc_test( ++ name = "trie-test", ++ srcs = ["tests/trie-test.cc"], ++ deps = [ ++ ":marisa-assert", ++ ":marisa-trie", ++ ], ++) ++ ++# vector-test is not added because of an existing failure. ++# cc_test( ++# name = "vector-test", ++# srcs = ["tests/vector-test.cc"], ++# deps = [ ++# ":marisa-assert", ++# ":marisa-trie", ++# ], ++# ) diff --git a/modules/marisa-trie/0.2.6/patches/module_dot_bazel.patch b/modules/marisa-trie/0.2.6/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..1e722b81364 --- /dev/null +++ b/modules/marisa-trie/0.2.6/patches/module_dot_bazel.patch @@ -0,0 +1,10 @@ +--- MODULE.bazel ++++ MODULE.bazel +@@ -0,0 +1,7 @@ ++"MARISA: Matching Algorithm with Recursively Implemented StorAge." ++ ++module( ++ name = "marisa-trie", ++ version = "0.2.6", ++ compatibility_level = 0, ++) diff --git a/modules/marisa-trie/0.2.6/presubmit.yml b/modules/marisa-trie/0.2.6/presubmit.yml new file mode 100644 index 00000000000..65c75a9d003 --- /dev/null +++ b/modules/marisa-trie/0.2.6/presubmit.yml @@ -0,0 +1,26 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + - windows + bazel: + - 7.x + - 6.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "@marisa-trie" + run_tests: + name: Run tests + platform: ${{ platform }} + bazel: ${{ bazel }} + test_targets: + - "@marisa-trie//:base-test" + - "@marisa-trie//:io-test" + - "@marisa-trie//:marisa-test" + - "@marisa-trie//:trie-test" diff --git a/modules/marisa-trie/0.2.6/source.json b/modules/marisa-trie/0.2.6/source.json new file mode 100644 index 00000000000..ce03c5b1e50 --- /dev/null +++ b/modules/marisa-trie/0.2.6/source.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/s-yata/marisa-trie/files/4832504/marisa-0.2.6.tar.gz", + "integrity": "sha256-EGOifHieda+i7m8XFsxqVIZjHc/Lf01W1khdJGLlZt4=", + "strip_prefix": "marisa-trie-0.2.6", + "patches": { + "add_build_file.patch": "sha256-VFBMtpwL0B5fzBJlXh3Hqry25GlCf55VGkBYaFAuau0=", + "module_dot_bazel.patch": "sha256-Bdh80kte4gA+BCek46jxcufnTrXAhRHO6RZRhQDGNq0=" + }, + "patch_strip": 0 +} diff --git a/modules/marisa-trie/metadata.json b/modules/marisa-trie/metadata.json new file mode 100644 index 00000000000..06ee61ab991 --- /dev/null +++ b/modules/marisa-trie/metadata.json @@ -0,0 +1,11 @@ +{ + "homepage": "https://github.com/s-yata/marisa-trie", + "maintainers": [], + "repository": [ + "github:s-yata/marisa-trie" + ], + "versions": [ + "0.2.6" + ], + "yanked_versions": {} +}