Skip to content

Commit

Permalink
libxml2@2.13.3 (bazelbuild#2511)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-j-mikhin committed Jul 30, 2024
1 parent a12dae4 commit 4fe62aa
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/libxml2/2.13.3/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module(
name = "libxml2",
version = "2.13.3",
compatibility_level = 1,
)
bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
32 changes: 32 additions & 0 deletions modules/libxml2/2.13.3/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,29 @@
+""" Builds libxml2.
+"""
+
+load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+cache_entries = {
+ "CMAKE_POSITION_INDEPENDENT_CODE": "ON",
+ "BUILD_SHARED_LIBS": "OFF",
+ #libxml2 specific options.
+ "LIBXML2_WITH_PYTHON": "OFF",
+ "LIBXML2_WITH_LZMA": "OFF",
+ "LIBXML2_WITH_TESTS": "OFF",
+ "LIBXML2_WITH_PROGRAMS": "OFF",
+}
+
+cmake(
+ name = "libxml2",
+ env = {"CMAKE_BUILD_TYPE": "Release"},
+ lib_source = ":srcs",
+ cache_entries = cache_entries,
+ out_lib_dir = "lib64",
+ out_include_dir = "include/libxml2",
+ visibility = ["//visibility:public"],
+)
9 changes: 9 additions & 0 deletions modules/libxml2/2.13.3/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,6 @@
+module(
+ name = "libxml2",
+ version = "2.13.3",
+ compatibility_level = 1,
+)
+bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
17 changes: 17 additions & 0 deletions modules/libxml2/2.13.3/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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:
- '@libxml2//:libxml2'
10 changes: 10 additions & 0 deletions modules/libxml2/2.13.3/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.3.tar.xz",
"integrity": "sha256-CAXXwYDPCcqtcWZsekWKdPBBVhpTKQJFTaUEfYOUgTg=",
"strip_prefix": "libxml2-2.13.3",
"patches": {
"add_build_file.patch": "sha256-orCkjxlNwZQPDKnyr0/V0XIqR96VVncKpTWtbzS++/4=",
"module_dot_bazel.patch": "sha256-B5F+5RPZdW0ZjGBy2Ps42Y/YSfKjWWUodvcJxOGCZIc="
},
"patch_strip": 0
}
15 changes: 15 additions & 0 deletions modules/libxml2/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"homepage": "https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home",
"maintainers": [
{
"email": "tectep@gmail.com",
"github": "dmitry-j-mikhin",
"name": "Dmitry Mikhin"
}
],
"repository": [],
"versions": [
"2.13.3"
],
"yanked_versions": {}
}

0 comments on commit 4fe62aa

Please sign in to comment.