From 4fc5d1f199579fc64c94a245fdf539dede33dcdc Mon Sep 17 00:00:00 2001 From: daohu527 Date: Fri, 12 Jul 2024 19:07:18 +0800 Subject: [PATCH] fix: fix foonathan_memory include path add "include/foonathan_memory" include path instead of "include" --- .../foonathan_memory/0.7.3.bcr.1/MODULE.bazel | 10 ++++++ .../0.7.3.bcr.1/patches/add_build_file.patch | 36 +++++++++++++++++++ .../patches/module_dot_bazel.patch | 16 +++++++++ .../0.7.3.bcr.1/presubmit.yml | 14 ++++++++ .../foonathan_memory/0.7.3.bcr.1/source.json | 10 ++++++ modules/foonathan_memory/metadata.json | 3 +- 6 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 modules/foonathan_memory/0.7.3.bcr.1/MODULE.bazel create mode 100644 modules/foonathan_memory/0.7.3.bcr.1/patches/add_build_file.patch create mode 100644 modules/foonathan_memory/0.7.3.bcr.1/patches/module_dot_bazel.patch create mode 100644 modules/foonathan_memory/0.7.3.bcr.1/presubmit.yml create mode 100644 modules/foonathan_memory/0.7.3.bcr.1/source.json diff --git a/modules/foonathan_memory/0.7.3.bcr.1/MODULE.bazel b/modules/foonathan_memory/0.7.3.bcr.1/MODULE.bazel new file mode 100644 index 00000000000..4ce0e021e15 --- /dev/null +++ b/modules/foonathan_memory/0.7.3.bcr.1/MODULE.bazel @@ -0,0 +1,10 @@ +module( + name = "foonathan_memory", + version = "0.7.3.bcr.1", + compatibility_level = 1, +) + +bazel_dep( + name = "rules_foreign_cc", + version = "0.10.1", +) diff --git a/modules/foonathan_memory/0.7.3.bcr.1/patches/add_build_file.patch b/modules/foonathan_memory/0.7.3.bcr.1/patches/add_build_file.patch new file mode 100644 index 00000000000..1cd6d951aa7 --- /dev/null +++ b/modules/foonathan_memory/0.7.3.bcr.1/patches/add_build_file.patch @@ -0,0 +1,36 @@ +diff --git BUILD.bazel BUILD.bazel +new file mode 100644 +index 0000000..45721ac +--- /dev/null ++++ BUILD.bazel +@@ -0,0 +1,30 @@ ++""" Builds foonathan_memory. ++""" ++ ++load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") ++ ++filegroup( ++ name = "all_srcs", ++ srcs = glob(["**"]), ++) ++ ++cache_entries = { ++ "CMAKE_POSITION_INDEPENDENT_CODE": "ON", # Must be set! ++ "BUILD_SHARED_LIBS": "OFF", ++ # foonathan_memory specific options. ++ "FOONATHAN_MEMORY_BUILD_EXAMPLES": "OFF", ++ "FOONATHAN_MEMORY_BUILD_TESTS": "OFF", ++} ++ ++cmake( ++ name = "foonathan_memory", ++ build_args = [ ++ "--", ++ "-j4", ++ ], ++ cache_entries = cache_entries, ++ lib_source = ":all_srcs", ++ lib_name = "libfoonathan_memory-0.7.3", ++ out_include_dir = "include/foonathan_memory", ++ visibility = ["//visibility:public"] ++) diff --git a/modules/foonathan_memory/0.7.3.bcr.1/patches/module_dot_bazel.patch b/modules/foonathan_memory/0.7.3.bcr.1/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..b29da5530d3 --- /dev/null +++ b/modules/foonathan_memory/0.7.3.bcr.1/patches/module_dot_bazel.patch @@ -0,0 +1,16 @@ +diff --git MODULE.bazel MODULE.bazel +new file mode 100644 +index 0000000..362cdcd +--- /dev/null ++++ MODULE.bazel +@@ -0,0 +1,10 @@ ++module( ++ name = "foonathan_memory", ++ version = "0.7.3.bcr.1", ++ compatibility_level = 1, ++) ++ ++bazel_dep( ++ name = "rules_foreign_cc", ++ version = "0.10.1", ++) diff --git a/modules/foonathan_memory/0.7.3.bcr.1/presubmit.yml b/modules/foonathan_memory/0.7.3.bcr.1/presubmit.yml new file mode 100644 index 00000000000..ddd80ccedc6 --- /dev/null +++ b/modules/foonathan_memory/0.7.3.bcr.1/presubmit.yml @@ -0,0 +1,14 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + bazel: [6.x, 7.x] + +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@foonathan_memory//:foonathan_memory' diff --git a/modules/foonathan_memory/0.7.3.bcr.1/source.json b/modules/foonathan_memory/0.7.3.bcr.1/source.json new file mode 100644 index 00000000000..06a91ecb01f --- /dev/null +++ b/modules/foonathan_memory/0.7.3.bcr.1/source.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/foonathan/memory/archive/refs/tags/v0.7-3.tar.gz", + "integrity": "sha256-QgPRXbIqlKOXjusa+1mjfTXFfA8UhzPw8aU6YoHLdN0=", + "strip_prefix": "memory-0.7-3", + "patch_strip": 0, + "patches": { + "add_build_file.patch": "sha256-SETra+qT0FnuOI6uoRe8BeZVpBXnTgnnQyp5EGHsPZM=", + "module_dot_bazel.patch": "sha256-Vil9DymRxv47rWW3FJSFkyjwEDJ39kALv/Tf78S/4iM=" + } +} diff --git a/modules/foonathan_memory/metadata.json b/modules/foonathan_memory/metadata.json index 03257d4e1c5..dd81c04b5c8 100644 --- a/modules/foonathan_memory/metadata.json +++ b/modules/foonathan_memory/metadata.json @@ -10,7 +10,8 @@ "github:foonathan/memory" ], "versions": [ - "0.7.3" + "0.7.3", + "0.7.3.bcr.1" ], "yanked_versions": {} }