| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 | _CIVETWEB_BUILD_FILE = """licenses(["notice"])  # MIT licensecc_library(    name = "libcivetweb",    srcs = [        "src/civetweb.c",    ],    hdrs = [        "include/civetweb.h",    ],    copts = [        "-DUSE_IPV6",        "-DNDEBUG",        "-DNO_CGI",        "-DNO_CACHING",        "-DNO_SSL",        "-DNO_FILES",    ],    includes = [        "include",    ],    linkopts = [        "-lpthread",        "-lrt",    ],    textual_hdrs = [        "src/md5.inl",        "src/handle_form.inl",    ],    visibility = ["//visibility:public"],)cc_library(    name = "civetweb",    srcs = [        "src/CivetServer.cpp",    ],    hdrs = [        "include/CivetServer.h",    ],    deps = [        ":libcivetweb",    ],    copts = [        "-DUSE_IPV6",        "-DNDEBUG",        "-DNO_CGI",        "-DNO_CACHING",        "-DNO_SSL",        "-DNO_FILES",    ],    includes = [        "include",    ],    linkopts = [        "-lpthread",        "-lrt",    ],    visibility = ["//visibility:public"],)"""_GOOGLEBENCHEMARK_BUILD_FILE = """licenses(["notice"])  # Apache-2.0 licensecc_library(    name = "googlebenchmark",    srcs = glob(        ["src/*.cc"],        exclude = [            "src/re_posix.cc",            "src/gnuregex.cc",        ],    ),    hdrs = glob(        [            "src/*.h",            "include/benchmark/*.h",        ],        exclude = [            "src/re_posix.h",            "src/gnuregex.h",        ],    ),    copts = [        "-DHAVE_STD_REGEX",    ],    includes = [        "include",    ],    visibility = ["//visibility:public"],)"""def load_civetweb():    native.new_http_archive(        name = "civetweb",        strip_prefix = "civetweb-1.9.1",        sha256 = "880d741724fd8de0ebc77bc5d98fa673ba44423dc4918361c3cd5cf80955e36d",        urls = [           "https://github.com/civetweb/civetweb/archive/v1.9.1.tar.gz",       ],       build_file_content = _CIVETWEB_BUILD_FILE,    )def load_com_google_googletest():    native.http_archive(        name = "com_google_googletest",        strip_prefix = "googletest-master",        urls = [            "https://github.com/google/googletest/archive/master.zip",        ],    )def load_com_google_googlebenchmark():    native.new_http_archive(        name = "com_google_googlebenchmark",        sha256 = "3dcc90c158838e2ac4a7ad06af9e28eb5877cf28252a81e55eb3c836757d3070",        strip_prefix = "benchmark-1.2.0",        urls = [            "https://github.com/google/benchmark/archive/v1.2.0.tar.gz",        ],        build_file_content = _GOOGLEBENCHEMARK_BUILD_FILE,    )def prometheus_cpp_repositories():    load_civetweb()    load_com_google_googletest()    load_com_google_googlebenchmark()
 |