Skip to content

Commit

Permalink
Add marisa-trie 0.2.6. (#2430)
Browse files Browse the repository at this point in the history
  • Loading branch information
BYVoid authored Jul 15, 2024
1 parent a788ea4 commit 5382155
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/marisa-trie/0.2.6/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"MARISA: Matching Algorithm with Recursively Implemented StorAge."

module(
name = "marisa-trie",
version = "0.2.6",
compatibility_level = 0,
)
125 changes: 125 additions & 0 deletions modules/marisa-trie/0.2.6/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -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",
+# ],
+# )
10 changes: 10 additions & 0 deletions modules/marisa-trie/0.2.6/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -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,
+)
26 changes: 26 additions & 0 deletions modules/marisa-trie/0.2.6/presubmit.yml
Original file line number Diff line number Diff line change
@@ -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"
10 changes: 10 additions & 0 deletions modules/marisa-trie/0.2.6/source.json
Original file line number Diff line number Diff line change
@@ -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
}
11 changes: 11 additions & 0 deletions modules/marisa-trie/metadata.json
Original file line number Diff line number Diff line change
@@ -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": {}
}

0 comments on commit 5382155

Please sign in to comment.