Skip to content

Commit 269da30

Browse files
authored
Add: boostorg/mysql (#4520)
add boost.mysql closes #4357
1 parent 3954831 commit 269da30

File tree

23 files changed

+459
-0
lines changed

23 files changed

+459
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module(
2+
name = "boost.charconv",
3+
version = "1.87.0",
4+
bazel_compatibility = [">=7.2.1"],
5+
compatibility_level = 108700,
6+
)
7+
8+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
9+
bazel_dep(name = "boost.assert", version = "1.87.0")
10+
bazel_dep(name = "boost.config", version = "1.87.0")
11+
bazel_dep(name = "boost.core", version = "1.87.0")
12+
bazel_dep(name = "platforms", version = "0.0.10")
13+
bazel_dep(name = "rules_cc", version = "0.1.1")
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
2+
load("@rules_cc//cc:defs.bzl", "cc_library")
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
string_flag(
7+
name = "quadmath",
8+
build_setting_default = "off",
9+
values = [
10+
"off",
11+
"on",
12+
],
13+
visibility = ["//visibility:public"],
14+
)
15+
16+
config_setting(
17+
name = "off",
18+
flag_values = {":quadmath": "off"},
19+
)
20+
21+
config_setting(
22+
name = "on",
23+
flag_values = {":quadmath": "on"},
24+
)
25+
26+
cc_library(
27+
name = "boost.charconv",
28+
srcs = glob(["src/*.cpp"]),
29+
hdrs = glob([
30+
"include/**/*.*pp",
31+
"src/*.*pp",
32+
]),
33+
defines = ["BOOST_ALL_NO_LIB"] + select({
34+
":on": ["BOOST_CHARCONV_HAS_QUADMATH"],
35+
":off": ["BOOST_CHARCONV_NO_QUADMATH"],
36+
}),
37+
features = ["parse_headers"],
38+
includes = ["include"],
39+
deps = [
40+
"@boost.assert",
41+
"@boost.config",
42+
"@boost.core",
43+
],
44+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../MODULE.bazel
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_test")
2+
3+
cc_test(
4+
name = "test_boost_json_values",
5+
srcs = ["test_boost_json_values.cpp"],
6+
deps = [
7+
"@boost.charconv",
8+
],
9+
)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bazel_dep(name = "boost.charconv")
2+
bazel_dep(name = "boost.test", version = "1.87.0")
3+
4+
local_path_override(
5+
module_name = "boost.charconv",
6+
path = "..",
7+
)
8+
9+
bazel_dep(name = "platforms", version = "0.0.10")
10+
bazel_dep(name = "rules_cc", version = "0.1.1")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/include/boost/charconv/detail/type_traits.hpp b/include/boost/charconv/detail/type_traits.hpp
2+
index 4160555..54b6d54 100644
3+
--- a/include/boost/charconv/detail/type_traits.hpp
4+
+++ b/include/boost/charconv/detail/type_traits.hpp
5+
@@ -6,6 +6,7 @@
6+
#define BOOST_CHARCONV_DETAIL_TYPE_TRAITS_HPP
7+
8+
#include <boost/charconv/detail/config.hpp>
9+
+#include "emulated128.hpp"
10+
#include <type_traits>
11+
12+
namespace boost { namespace charconv { namespace detail {
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- debian11
5+
- macos
6+
- macos_arm64
7+
- ubuntu2004
8+
- ubuntu2204
9+
- ubuntu2404
10+
- windows
11+
bazel: [7.x, 8.x, rolling]
12+
tasks:
13+
verify_targets:
14+
name: Verify build targets
15+
platform: ${{ platform }}
16+
bazel: ${{ bazel }}
17+
build_flags:
18+
- '--process_headers_in_dependencies'
19+
build_targets:
20+
- '@boost.charconv//:boost.charconv'
21+
bcr_test_module:
22+
module_path: test
23+
matrix:
24+
platform:
25+
- debian10
26+
- debian11
27+
- macos
28+
- macos_arm64
29+
- ubuntu2004
30+
- ubuntu2204
31+
- ubuntu2404
32+
- windows
33+
bazel: [7.x, 8.x, rolling]
34+
tasks:
35+
run_test_module:
36+
name: Run test module
37+
platform: ${{ platform }}
38+
bazel: ${{ bazel }}
39+
build_flags:
40+
- '--process_headers_in_dependencies'
41+
build_targets:
42+
- //...
43+
test_targets:
44+
- //...
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"integrity": "sha256-IV+9lK9/jSNE/wDpeX6vGYRr0aZJleBsfjyztmpRLT0=",
3+
"strip_prefix": "charconv-boost-1.87.0",
4+
"url": "https://github.com/boostorg/charconv/archive/refs/tags/boost-1.87.0.tar.gz",
5+
"patches": {
6+
"patch.diff": "sha256-+tVCv1S3GSxrHeYeRMRpf2lJaB2oOpnesAXkkJ1dRXM="
7+
},
8+
"patch_strip": 1,
9+
"overlay": {
10+
"BUILD.bazel": "sha256-SVFTnql10ZLHs08Qh4crcygt5oENft+f2RWLa3SFzCY=",
11+
"MODULE.bazel": "sha256-eJft/lwnvuS0BD+J1Rnn2oyM7yJIWO2UOPebs/hkrYU=",
12+
"test/BUILD.bazel": "sha256-4vP2zJDOBECZnwhv+k0ywJhurfE+zbgvErCQbhO6hKo=",
13+
"test/MODULE.bazel": "sha256-vReKWE529wY3g6L1ZWrYMKwY0vnPN/9VTSSP8g6M8Jw="
14+
}
15+
}

modules/boost.charconv/metadata.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"homepage": "http://boost.org/libs/charconv",
3+
"maintainers": [
4+
{
5+
"email": "[email protected]",
6+
"github": "kekxv",
7+
"name": "kekxv",
8+
"github_user_id": 15551108
9+
}
10+
],
11+
"repository": [
12+
"github:boostorg/charconv"
13+
],
14+
"versions": [
15+
"1.87.0"
16+
],
17+
"yanked_versions": {}
18+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module(
2+
name = "boost.compat",
3+
version = "1.87.0",
4+
bazel_compatibility = [">=7.2.1"],
5+
compatibility_level = 108700,
6+
)
7+
8+
bazel_dep(name = "boost.assert", version = "1.87.0")
9+
bazel_dep(name = "boost.config", version = "1.87.0")
10+
bazel_dep(name = "boost.throw_exception", version = "1.87.0")
11+
bazel_dep(name = "platforms", version = "0.0.10")
12+
bazel_dep(name = "rules_cc", version = "0.1.1")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
3+
package(default_visibility = ["//visibility:public"])
4+
5+
cc_library(
6+
name = "boost.compat",
7+
hdrs = glob([
8+
"include/boost/compat/**/*",
9+
]),
10+
features = [
11+
"parse_headers",
12+
],
13+
includes = ["include"],
14+
deps = [
15+
"@boost.assert",
16+
"@boost.config",
17+
"@boost.throw_exception",
18+
],
19+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../MODULE.bazel
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- debian11
5+
- macos
6+
- macos_arm64
7+
- ubuntu2004
8+
- ubuntu2204
9+
- ubuntu2404
10+
- windows
11+
bazel: [7.x, 8.x, rolling]
12+
tasks:
13+
verify_targets:
14+
name: Verify build targets
15+
platform: ${{ platform }}
16+
bazel: ${{ bazel }}
17+
build_flags:
18+
- '--process_headers_in_dependencies'
19+
build_targets:
20+
- '@boost.compat//:boost.compat'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"integrity": "sha256-mNTSa5OSQOVWIk92iGO/mTtMARuAIvriTWMOiU0T6RA=",
3+
"strip_prefix": "compat-boost-1.87.0",
4+
"url": "https://github.com/boostorg/compat/archive/refs/tags/boost-1.87.0.tar.gz",
5+
"patch_strip": 0,
6+
"overlay": {
7+
"MODULE.bazel": "sha256-h+2gN6CfwS/a7/1ZKtmVjVm5X/0XVUnecFS7Bgk5xPo=",
8+
"BUILD.bazel": "sha256-KDC7g6R8MghfWVrEGTKQIhyDz403AtzPKGDTnqVPwm8="
9+
}
10+
}

modules/boost.compat/metadata.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"homepage": "http://boost.org/libs/compat",
3+
"maintainers": [
4+
{
5+
"email": "[email protected]",
6+
"github": "kekxv",
7+
"name": "kekxv",
8+
"github_user_id": 15551108
9+
}
10+
],
11+
"repository": [
12+
"github:boostorg/compat"
13+
],
14+
"versions": [
15+
"1.87.0"
16+
],
17+
"yanked_versions": {}
18+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module(
2+
name = "boost.mysql",
3+
version = "1.87.0",
4+
bazel_compatibility = [">=7.2.1"],
5+
compatibility_level = 108700,
6+
)
7+
8+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
9+
bazel_dep(name = "boringssl", version = "0.20240913.0")
10+
bazel_dep(name = "boost.align", version = "1.87.0")
11+
bazel_dep(name = "boost.compat", version = "1.87.0")
12+
bazel_dep(name = "boost.charconv", version = "1.87.0")
13+
bazel_dep(name = "boost.asio", version = "1.87.0.bcr.1")
14+
bazel_dep(name = "boost.array", version = "1.87.0")
15+
bazel_dep(name = "boost.assert", version = "1.87.0")
16+
bazel_dep(name = "boost.bind", version = "1.87.0")
17+
bazel_dep(name = "boost.chrono", version = "1.87.0")
18+
bazel_dep(name = "boost.config", version = "1.87.0")
19+
bazel_dep(name = "boost.context", version = "1.87.0")
20+
bazel_dep(name = "boost.core", version = "1.87.0")
21+
bazel_dep(name = "boost.coroutine", version = "1.87.0")
22+
bazel_dep(name = "boost.date_time", version = "1.87.0")
23+
bazel_dep(name = "boost.endian", version = "1.87.0")
24+
bazel_dep(name = "boost.exception", version = "1.87.0")
25+
bazel_dep(name = "boost.function", version = "1.87.0")
26+
bazel_dep(name = "boost.regex", version = "1.87.0")
27+
bazel_dep(name = "boost.pfr", version = "1.87.0")
28+
bazel_dep(name = "boost.smart_ptr", version = "1.87.0")
29+
bazel_dep(name = "boost.system", version = "1.87.0")
30+
bazel_dep(name = "boost.throw_exception", version = "1.87.0")
31+
bazel_dep(name = "boost.type_traits", version = "1.87.0")
32+
bazel_dep(name = "boost.utility", version = "1.87.0")
33+
bazel_dep(name = "platforms", version = "0.0.10")
34+
bazel_dep(name = "rules_cc", version = "0.1.1")
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
2+
load("@bazel_skylib//rules:write_file.bzl", "write_file")
3+
load("@rules_cc//cc:defs.bzl", "cc_library")
4+
5+
package(default_visibility = ["//visibility:public"])
6+
7+
string_flag(
8+
name = "ssl",
9+
build_setting_default = "no_ssl",
10+
values = [
11+
"no_ssl",
12+
"openssl",
13+
"boringssl",
14+
],
15+
visibility = ["//visibility:public"],
16+
)
17+
18+
config_setting(
19+
name = "no_ssl",
20+
flag_values = {":ssl": "no_ssl"},
21+
)
22+
23+
config_setting(
24+
name = "openssl",
25+
flag_values = {":ssl": "openssl"},
26+
)
27+
28+
config_setting(
29+
name = "boringssl",
30+
flag_values = {":ssl": "boringssl"},
31+
)
32+
33+
write_file(
34+
name = "src",
35+
out = "boost.mysql.src.cpp",
36+
content = ["#include <boost/mysql/src.hpp>"],
37+
visibility = ["//visibility:private"],
38+
)
39+
40+
cc_library(
41+
name = "boost.mysql",
42+
srcs = [":src"],
43+
defines = ["BOOST_MYSQL_SEPARATE_COMPILATION"],
44+
features = [
45+
"parse_headers",
46+
],
47+
includes = ["include"],
48+
textual_hdrs = glob([
49+
"include/**/*.*pp",
50+
]),
51+
deps = [
52+
"@boost.align",
53+
"@boost.array",
54+
"@boost.asio",
55+
"@boost.assert",
56+
"@boost.bind",
57+
"@boost.charconv",
58+
"@boost.chrono",
59+
"@boost.compat",
60+
"@boost.config",
61+
"@boost.context",
62+
"@boost.core",
63+
"@boost.coroutine",
64+
"@boost.date_time",
65+
"@boost.endian",
66+
"@boost.exception",
67+
"@boost.function",
68+
"@boost.pfr",
69+
"@boost.regex",
70+
"@boost.smart_ptr",
71+
"@boost.system",
72+
"@boost.throw_exception",
73+
"@boost.type_traits",
74+
"@boost.utility",
75+
] + select({
76+
":openssl": [
77+
"@openssl//:crypto",
78+
"@openssl//:ssl",
79+
],
80+
":boringssl": [
81+
"@boringssl//:crypto",
82+
"@boringssl//:ssl",
83+
],
84+
":no_ssl": [],
85+
}),
86+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../MODULE.bazel
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary")
2+
3+
cc_binary(
4+
name = "1_sync",
5+
srcs = ["1_tutorial/1_sync.cpp"],
6+
deps = [
7+
"@boost.mysql",
8+
],
9+
)

0 commit comments

Comments
 (0)