From fabf0938b38d8fe4f47a827929d49328191a4827 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Thu, 25 Apr 2024 19:29:04 +0200 Subject: [PATCH] civetweb@1.16 --- modules/civetweb/1.16/MODULE.bazel | 14 +++ .../1.16/patches/add_build_file.patch | 108 ++++++++++++++++++ .../1.16/patches/module_dot_bazel.patch | 17 +++ modules/civetweb/1.16/presubmit.yml | 17 +++ modules/civetweb/1.16/source.json | 10 ++ modules/civetweb/metadata.json | 16 +++ 6 files changed, 182 insertions(+) create mode 100644 modules/civetweb/1.16/MODULE.bazel create mode 100644 modules/civetweb/1.16/patches/add_build_file.patch create mode 100644 modules/civetweb/1.16/patches/module_dot_bazel.patch create mode 100644 modules/civetweb/1.16/presubmit.yml create mode 100644 modules/civetweb/1.16/source.json create mode 100644 modules/civetweb/metadata.json diff --git a/modules/civetweb/1.16/MODULE.bazel b/modules/civetweb/1.16/MODULE.bazel new file mode 100644 index 00000000000..b5406c0dc0e --- /dev/null +++ b/modules/civetweb/1.16/MODULE.bazel @@ -0,0 +1,14 @@ +module( + name = "civetweb", + version = "1.16", + compatibility_level = 1, +) + +bazel_dep( + name = "boringssl", + version = "0.0.0-20230215-5c22014", +) +bazel_dep( + name = "platforms", + version = "0.0.8", +) diff --git a/modules/civetweb/1.16/patches/add_build_file.patch b/modules/civetweb/1.16/patches/add_build_file.patch new file mode 100644 index 00000000000..411a25ebfa3 --- /dev/null +++ b/modules/civetweb/1.16/patches/add_build_file.patch @@ -0,0 +1,108 @@ +--- /dev/null ++++ BUILD.bazel +@@ -0,0 +1,105 @@ ++licenses(["notice"]) # MIT license ++ ++config_setting( ++ name = "osx", ++ constraint_values = [ ++ "@platforms//os:osx", ++ ], ++) ++ ++config_setting( ++ name = "windows", ++ constraint_values = [ ++ "@platforms//os:windows", ++ ], ++) ++ ++config_setting( ++ name = "with_ssl", ++ define_values = { ++ "with_civetweb_ssl": "true", ++ }, ++ visibility = ["//visibility:public"], ++) ++ ++COPTS = [ ++ "-DUSE_IPV6", ++ "-DNDEBUG", ++ "-DNO_CGI", ++ "-DNO_CACHING", ++ "-DNO_FILES", ++ "-UDEBUG", ++] + select({ ++ ":with_ssl": [ ++ "-DOPENSSL_API_1_1", ++ "-DNO_SSL_DL", ++ ], ++ "//conditions:default": [ ++ "-DNO_SSL", ++ ], ++}) ++ ++DEPS = select({ ++ ":with_ssl": [ ++ "@boringssl//:crypto", ++ "@boringssl//:ssl", ++ ], ++ "//conditions:default": [], ++}) ++ ++cc_library( ++ name = "civetweb", ++ srcs = [ ++ "src/civetweb.c", ++ ], ++ hdrs = [ ++ "include/civetweb.h", ++ ], ++ copts = COPTS, ++ includes = [ ++ "include", ++ ], ++ linkopts = select({ ++ ":windows": [], ++ "//conditions:default": ["-lpthread"], ++ }) + select({ ++ ":osx": [], ++ ":windows": [], ++ "//conditions:default": ["-lrt"], ++ }), ++ textual_hdrs = [ ++ "src/handle_form.inl", ++ "src/match.inl", ++ "src/md5.inl", ++ "src/response.inl", ++ "src/sort.inl", ++ ], ++ visibility = ["//visibility:public"], ++ deps = DEPS, ++) ++ ++cc_library( ++ name = "civetserver", ++ srcs = [ ++ "src/CivetServer.cpp", ++ ], ++ hdrs = [ ++ "include/CivetServer.h", ++ ], ++ copts = COPTS, ++ includes = [ ++ "include", ++ ], ++ linkopts = select({ ++ ":windows": [], ++ "//conditions:default": ["-lpthread"], ++ }) + select({ ++ ":osx": [], ++ ":windows": [], ++ "//conditions:default": ["-lrt"], ++ }), ++ visibility = ["//visibility:public"], ++ deps = [ ++ ":civetweb", ++ ], ++) diff --git a/modules/civetweb/1.16/patches/module_dot_bazel.patch b/modules/civetweb/1.16/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..03e710cd808 --- /dev/null +++ b/modules/civetweb/1.16/patches/module_dot_bazel.patch @@ -0,0 +1,17 @@ +--- MODULE.bazel ++++ MODULE.bazel +@@ -0,0 +1,14 @@ ++module( ++ name = "civetweb", ++ version = "1.16", ++ compatibility_level = 1, ++) ++ ++bazel_dep( ++ name = "boringssl", ++ version = "0.0.0-20230215-5c22014", ++) ++bazel_dep( ++ name = "platforms", ++ version = "0.0.8", ++) diff --git a/modules/civetweb/1.16/presubmit.yml b/modules/civetweb/1.16/presubmit.yml new file mode 100644 index 00000000000..bc46f0e9bab --- /dev/null +++ b/modules/civetweb/1.16/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: + - '@civetweb//...' diff --git a/modules/civetweb/1.16/source.json b/modules/civetweb/1.16/source.json new file mode 100644 index 00000000000..bf8eaa58f53 --- /dev/null +++ b/modules/civetweb/1.16/source.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/civetweb/civetweb/archive/v1.16.tar.gz", + "integrity": "sha256-8ORxwb9OeASmz7QeqdE+fWI7K8x7weKk3VSVGiTWAoU=", + "strip_prefix": "civetweb-1.16", + "patches": { + "add_build_file.patch": "sha256-0R40p5wAtmQ/MLvqI9XzF9H5BRpxC85lUdXHlW1teIQ=", + "module_dot_bazel.patch": "sha256-xbUEcDhFEMv7bJHQpFKzPdqDog1yLfH2f5+lt191on8=" + }, + "patch_strip": 0 +} diff --git a/modules/civetweb/metadata.json b/modules/civetweb/metadata.json new file mode 100644 index 00000000000..10b67392f38 --- /dev/null +++ b/modules/civetweb/metadata.json @@ -0,0 +1,16 @@ +{ + "homepage": "https://github.com/civetweb/civetweb", + "maintainers": [ + { + "email": "bcr-maintainers@bazel.build", + "name": "No Maintainer Specified" + } + ], + "repository": [ + "github:civetweb/civetweb" + ], + "versions": [ + "1.16" + ], + "yanked_versions": {} +}