Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libxml2 2.9.12 #282

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/libxml2/2.9.12/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "libxml2",
version = "2.9.12",
compatibility_level = 1,
)
bazel_dep(name = "rules_cc", version = "0.0.2")
bazel_dep(name = "rules_license", version = "0.0.3")
146 changes: 146 additions & 0 deletions modules/libxml2/2.9.12/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,143 @@
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load("@rules_cc//cc:defs.bzl", "cc_library")
+load("@rules_license//rules:license.bzl", "license")
+
+package(
+ default_applicable_licenses = [":license"],
+)
+
+license(
+ name = "license",
+ license_kinds = [
+ "@rules_license//licenses/generic:notice",
+ ],
+ license_text = "COPYING",
+)
+
+genrule(
+ name = "gen_configure",
+ srcs = [
+ "Makefile.in",
+ "config.guess",
+ "config.h.in",
+ "config.sub",
+ "configure",
+ "entities.c",
+ "install-sh",
+ "libxml-2.0.pc.in",
+ "libxml-2.0-uninstalled.pc.in",
+ "libxml2-config.cmake.in",
+ "libxml.spec.in",
+ "ltmain.sh",
+ "missing",
+ "xml2-config.in",
+ "doc/Makefile.in",
+ "doc/devhelp/Makefile.in",
+ "doc/examples/Makefile.in",
+ "example/Makefile.in",
+ "fuzz/Makefile.in",
+ "include/Makefile.in",
+ "include/libxml/Makefile.in",
+ "include/libxml/xmlversion.h.in",
+ "python/Makefile.in",
+ "python/setup.py.in",
+ "python/tests/Makefile.in",
+ "xstc/Makefile.in",
+ ],
+ outs = [
+ "config.h",
+ "include/libxml/xmlversion.h",
+ ],
+ cmd = "./$(location configure) --disable-dependency-tracking --silent --with-python=no --with-modules=no --with-zlib=no --with-lzma=no --with-iconv=no " +
+ "&& cp config.h $(location config.h) " +
+ "&& cp include/libxml/xmlversion.h $(location include/libxml/xmlversion.h)",
+)
+
+cc_library(
+ name = "libxml",
+ srcs = [
+ "HTMLparser.c",
+ "HTMLtree.c",
+ "SAX.c",
+ "SAX2.c",
+ "buf.c",
+ "c14n.c",
+ "catalog.c",
+ "chvalid.c",
+ "debugXML.c",
+ "dict.c",
+ "encoding.c",
+ "entities.c",
+ "error.c",
+ "globals.c",
+ "hash.c",
+ "legacy.c",
+ "list.c",
+ "nanoftp.c",
+ "nanohttp.c",
+ "parser.c",
+ "parserInternals.c",
+ "pattern.c",
+ "relaxng.c",
+ "schematron.c",
+ "threads.c",
+ "tree.c",
+ "uri.c",
+ "valid.c",
+ "xinclude.c",
+ "xlink.c",
+ "xmlIO.c",
+ "xmlmemory.c",
+ "xmlmodule.c",
+ "xmlreader.c",
+ "xmlregexp.c",
+ "xmlsave.c",
+ "xmlschemas.c",
+ "xmlschemastypes.c",
+ "xmlstring.c",
+ "xmlunicode.c",
+ "xmlwriter.c",
+ "xpath.c",
+ "xpointer.c",
+ "xzlib.c",
+ ],
+ hdrs = [
+ "config.h",
+ "include/libxml/xmlversion.h",
+ ] + glob(
+ [
+ "*.h",
+ "include/libxml/*.h",
+ ],
+ exclude = [
+ # Exclude the pre-made version that ships with the tarball,
+ # use the genrule output from ./configure instead.
+ "include/libxml/xmlversion.h",
+ ],
+ ),
+ copts = [
+ "-D_REENTRANT",
+ "-DHAVE_CONFIG_H",
+ "-w",
+ ],
+ includes = [
+ ".",
+ "include",
+ ],
+ linkopts = ["-pthread"],
+ textual_hdrs = ["trionan.c"],
+ visibility = ["//visibility:public"],
+)
10 changes: 10 additions & 0 deletions modules/libxml2/2.9.12/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,7 @@
+module(
+ name = "libxml2",
+ version = "2.9.12",
+ compatibility_level = 1,
+)
+bazel_dep(name = "rules_cc", version = "0.0.2")
+bazel_dep(name = "rules_license", version = "0.0.3")
13 changes: 13 additions & 0 deletions modules/libxml2/2.9.12/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
matrix:
platform:
- centos7
- debian10
- ubuntu2004
- macos
- windows
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
build_targets:
- '@libxml2//:libxml'
10 changes: 10 additions & 0 deletions modules/libxml2/2.9.12/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz",
"integrity": "sha256-yNZoHjjFbxcokshd3AhS4f1LU7Qgnn9Ovxf34urnHZI=",
"strip_prefix": "libxml2-2.9.12",
"patches": {
"add_build_file.patch": "sha256-FehD5XyU/U7RYJu4WAWb6BzTsoRn3ZHYjZNrmv+NKpI=",
"module_dot_bazel.patch": "sha256-GkaK4fYfmevCXfGfc1IN9Zhc2x2cZ7as2K+9br9CWk8="
},
"patch_strip": 0
}
9 changes: 9 additions & 0 deletions modules/libxml2/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"homepage": "https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home",
"maintainers": [],
"repository": [],
"versions": [
"2.9.12"
],
"yanked_versions": {}
}