Skip to content

Commit c36c7cc

Browse files
1 parent a12dae4 commit c36c7cc

File tree

11 files changed

+181
-3
lines changed

11 files changed

+181
-3
lines changed

modules/libxml2/2.13.3/MODULE.bazel

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module(
2+
name = "libxml2",
3+
version = "2.13.3",
4+
compatibility_level = 1,
5+
)
6+
bazel_dep(name = "rules_foreign_cc", version = "0.11.1-fix")
7+
bazel_dep(name = "platforms", version = "0.0.10")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--- /dev/null
2+
+++ BUILD.bazel
3+
@@ -0,0 +1,38 @@
4+
+""" Builds libxml2.
5+
+"""
6+
+
7+
+load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
8+
+
9+
+filegroup(
10+
+ name = "srcs",
11+
+ srcs = glob(["**"]),
12+
+)
13+
+
14+
+cache_entries = {
15+
+ "CMAKE_INSTALL_LIBDIR": "lib",
16+
+ "CMAKE_POSITION_INDEPENDENT_CODE": "ON",
17+
+ "BUILD_SHARED_LIBS": "OFF",
18+
+ #libxml2 specific options.
19+
+ "LIBXML2_WITH_PYTHON": "OFF",
20+
+ "LIBXML2_WITH_LZMA": "OFF",
21+
+ "LIBXML2_WITH_ICONV": "OFF",
22+
+ "LIBXML2_WITH_TESTS": "OFF",
23+
+ "LIBXML2_WITH_PROGRAMS": "OFF",
24+
+}
25+
+
26+
+cmake(
27+
+ name = "libxml2",
28+
+ env = {"CMAKE_BUILD_TYPE": "Release"},
29+
+ lib_source = ":srcs",
30+
+ cache_entries = cache_entries,
31+
+ out_static_libs = select({
32+
+ "@platforms//os:windows": [
33+
+ "libxml2sd.lib",
34+
+ ],
35+
+ "//conditions:default": [
36+
+ "libxml2.a",
37+
+ ],
38+
+ }),
39+
+ out_include_dir = "include/libxml2",
40+
+ visibility = ["//visibility:public"],
41+
+)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- MODULE.bazel
2+
+++ MODULE.bazel
3+
@@ -0,0 +1,7 @@
4+
+module(
5+
+ name = "libxml2",
6+
+ version = "2.13.3",
7+
+ compatibility_level = 1,
8+
+)
9+
+bazel_dep(name = "rules_foreign_cc", version = "0.11.1-fix")
10+
+bazel_dep(name = "platforms", version = "0.0.10")

modules/libxml2/2.13.3/presubmit.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- ubuntu2004
5+
- macos
6+
- macos_arm64
7+
- windows
8+
bazel:
9+
- 7.x
10+
- 6.x
11+
tasks:
12+
verify_targets:
13+
name: Verify build targets
14+
platform: ${{ platform }}
15+
bazel: ${{ bazel }}
16+
build_targets:
17+
- '@libxml2//:libxml2'

modules/libxml2/2.13.3/source.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"url": "https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.3.tar.xz",
3+
"integrity": "sha256-CAXXwYDPCcqtcWZsekWKdPBBVhpTKQJFTaUEfYOUgTg=",
4+
"strip_prefix": "libxml2-2.13.3",
5+
"patches": {
6+
"add_build_file.patch": "sha256-EiZFATyVf+oNdWMAYWY0TR8j0V0fTvwiyQKRxgq1Zp4=",
7+
"module_dot_bazel.patch": "sha256-+VVzbYR2cOTraQAqSU39gBR4tzvYqfbG/I1FIXHmxCQ="
8+
},
9+
"patch_strip": 0
10+
}

modules/libxml2/metadata.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"homepage": "https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home",
3+
"maintainers": [
4+
{
5+
"email": "[email protected]",
6+
"github": "dmitry-j-mikhin",
7+
"name": "Dmitry Mikhin"
8+
}
9+
],
10+
"repository": [],
11+
"versions": [
12+
"2.13.3"
13+
],
14+
"yanked_versions": {}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
"bazelbuild/rules_foreign_cc"
2+
3+
module(
4+
name = "rules_foreign_cc",
5+
version = "0.11.1-fix",
6+
compatibility_level = 1,
7+
)
8+
9+
bazel_dep(name = "bazel_skylib", version = "1.3.0")
10+
bazel_dep(name = "platforms", version = "0.0.5")
11+
bazel_dep(name = "rules_python", version = "0.23.1")
12+
13+
# Dev dependencies
14+
bazel_dep(name = "gazelle", version = "0.34.0", dev_dependency = True, repo_name = "bazel_gazelle")
15+
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
16+
bazel_dep(name = "stardoc", version = "0.5.6", dev_dependency = True, repo_name = "io_bazel_stardoc")
17+
bazel_dep(name = "rules_cc", version = "0.0.9")
18+
19+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
20+
python.toolchain(python_version = "3.9")
21+
use_repo(python, "python_3_9")
22+
23+
tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
24+
use_repo(
25+
tools,
26+
"cmake_3.23.2_toolchains",
27+
"cmake_src",
28+
"gettext_runtime",
29+
"glib_dev",
30+
"glib_src",
31+
"gnumake_src",
32+
"meson_src",
33+
"ninja_1.12.0_toolchains",
34+
"ninja_build_src",
35+
"pkgconfig_src",
36+
"rules_foreign_cc_framework_toolchains",
37+
)
38+
39+
register_toolchains(
40+
"@rules_foreign_cc_framework_toolchains//:all",
41+
"@cmake_3.23.2_toolchains//:all",
42+
"@ninja_1.12.0_toolchains//:all",
43+
"@python_3_9//:all",
44+
"@rules_foreign_cc//toolchains:all",
45+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
===================================================================
2+
--- a/MODULE.bazel
3+
+++ b/MODULE.bazel
4+
@@ -1,9 +1,9 @@
5+
"bazelbuild/rules_foreign_cc"
6+
7+
module(
8+
name = "rules_foreign_cc",
9+
- version = "0.0.0",
10+
+ version = "0.11.1-fix",
11+
compatibility_level = 1,
12+
)
13+
14+
bazel_dep(name = "bazel_skylib", version = "1.3.0")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
matrix:
2+
platform: ["centos7", "debian10", "macos", "ubuntu2004", "windows"]
3+
bazel: ["6.x", "7.x"]
4+
5+
tasks:
6+
verify_targets:
7+
name: "Verify build targets"
8+
platform: ${{ platform }}
9+
bazel: ${{ bazel }}
10+
build_targets:
11+
- "@rules_foreign_cc//toolchains/private:make_tool"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"integrity": "sha256-CufV9MOCpUpC8FwWHTCOfq/QcJ0XgafHnMCah34KKVI=",
3+
"strip_prefix": "rules_foreign_cc-0.11.1-fix5",
4+
"url": "https://github.com/dmitry-j-mikhin/rules_foreign_cc/releases/download/0.11.1-fix5/rules_foreign_cc-0.11.1-fix5.tar.gz",
5+
"patches": {
6+
"module_dot_bazel_version.patch": "sha256-KNy4hxrtD5aT5HCkvAu0ispP5K8WLP5lszgy0LTdSSI="
7+
},
8+
"patch_strip": 1
9+
}

modules/rules_foreign_cc/metadata.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
"name": "James Sharpe"
88
}
99
],
10-
"repository": [
11-
"github:bazelbuild/rules_foreign_cc"
12-
],
10+
"repository": [],
1311
"versions": [
1412
"0.8.0",
1513
"0.9.0",
1614
"0.10.1",
15+
"0.11.1-fix",
1716
"0.11.1"
1817
],
1918
"yanked_versions": {}

0 commit comments

Comments
 (0)