From 8059716fcc4082c90328e9aa0b31019a07520276 Mon Sep 17 00:00:00 2001 From: Dmitry Mikhin Date: Tue, 30 Jul 2024 17:19:17 +0300 Subject: [PATCH] libxml2@2.13.3 (#2511) --- modules/libxml2/2.13.3/MODULE.bazel | 6 ++++ .../2.13.3/patches/add_build_file.patch | 32 +++++++++++++++++++ .../2.13.3/patches/module_dot_bazel.patch | 9 ++++++ modules/libxml2/2.13.3/presubmit.yml | 17 ++++++++++ modules/libxml2/2.13.3/source.json | 10 ++++++ modules/libxml2/metadata.json | 15 +++++++++ 6 files changed, 89 insertions(+) create mode 100644 modules/libxml2/2.13.3/MODULE.bazel create mode 100644 modules/libxml2/2.13.3/patches/add_build_file.patch create mode 100644 modules/libxml2/2.13.3/patches/module_dot_bazel.patch create mode 100644 modules/libxml2/2.13.3/presubmit.yml create mode 100644 modules/libxml2/2.13.3/source.json create mode 100644 modules/libxml2/metadata.json diff --git a/modules/libxml2/2.13.3/MODULE.bazel b/modules/libxml2/2.13.3/MODULE.bazel new file mode 100644 index 00000000000..bb9e0e31df6 --- /dev/null +++ b/modules/libxml2/2.13.3/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") diff --git a/modules/libxml2/2.13.3/patches/add_build_file.patch b/modules/libxml2/2.13.3/patches/add_build_file.patch new file mode 100644 index 00000000000..b57f65e5988 --- /dev/null +++ b/modules/libxml2/2.13.3/patches/add_build_file.patch @@ -0,0 +1,32 @@ +--- /dev/null ++++ BUILD.bazel +@@ -0,0 +1,29 @@ ++""" Builds libxml2. ++""" ++ ++load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") ++register_toolchains("@rules_foreign_cc//toolchains:built_ninja") ++ ++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_include_dir = "include/libxml2", ++ visibility = ["//visibility:public"], ++) diff --git a/modules/libxml2/2.13.3/patches/module_dot_bazel.patch b/modules/libxml2/2.13.3/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..8fd488088fb --- /dev/null +++ b/modules/libxml2/2.13.3/patches/module_dot_bazel.patch @@ -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") diff --git a/modules/libxml2/2.13.3/presubmit.yml b/modules/libxml2/2.13.3/presubmit.yml new file mode 100644 index 00000000000..060f93eb58a --- /dev/null +++ b/modules/libxml2/2.13.3/presubmit.yml @@ -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' diff --git a/modules/libxml2/2.13.3/source.json b/modules/libxml2/2.13.3/source.json new file mode 100644 index 00000000000..d28b102fc96 --- /dev/null +++ b/modules/libxml2/2.13.3/source.json @@ -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-DtQY+dXMwA9fBZ5G6PBOvoNke3RnSHJj/zvxRNnClJw=", + "module_dot_bazel.patch": "sha256-B5F+5RPZdW0ZjGBy2Ps42Y/YSfKjWWUodvcJxOGCZIc=" + }, + "patch_strip": 0 +} diff --git a/modules/libxml2/metadata.json b/modules/libxml2/metadata.json new file mode 100644 index 00000000000..ef0c152032b --- /dev/null +++ b/modules/libxml2/metadata.json @@ -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": {} +}