diff --git a/packages/l/libcurl/xmake.lua b/packages/l/libcurl/xmake.lua index 33058a39e..4bdecb2c7 100644 --- a/packages/l/libcurl/xmake.lua +++ b/packages/l/libcurl/xmake.lua @@ -80,7 +80,7 @@ package("libcurl") on_install("windows", "mingw", "linux", "macosx", "iphoneos", "cross", "android", function (package) local version = package:version() - local configs = {"-DBUILD_TESTING=OFF", "-DENABLE_MANUAL=OFF"} + local configs = {"-DBUILD_TESTING=OFF", "-DENABLE_MANUAL=OFF", "-DENABLE_CURL_MANUAL=OFF"} table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) @@ -158,7 +158,7 @@ package("libcurl") handledependency("mbedtls", "mbedtls", "MBEDTLS_INCLUDE_DIRS", {MBEDTLS_LIBRARY = "mbedtls", MBEDX509_LIBRARY = "mbedx509", MBEDCRYPTO_LIBRARY = "mbedcrypto"}) handledependency("zlib", "zlib", "ZLIB_INCLUDE_DIR", "ZLIB_LIBRARY") handledependency("zstd", "zstd", "Zstd_INCLUDE_DIR", "Zstd_LIBRARY") - import("package.tools.cmake").install(package, configs, opt) + import("package.tools.cmake").install(package, configs, {buildir = "build"}) end) on_test(function (package) diff --git a/packages/w/webdriverxx/patches/2023.04.22/fix_cxx23.patch b/packages/w/webdriverxx/patches/2023.04.22/fix_cxx23.patch new file mode 100644 index 000000000..327fd5045 --- /dev/null +++ b/packages/w/webdriverxx/patches/2023.04.22/fix_cxx23.patch @@ -0,0 +1,13 @@ +diff --git a/include/webdriverxx/by.h b/include/webdriverxx/by.h +index 0ee2a1b..3f5b44e 100644 +--- a/include/webdriverxx/by.h ++++ b/include/webdriverxx/by.h +@@ -8,7 +8,7 @@ namespace webdriverxx { + + class By { // copyable + public: +- By() : strategy_("css selector"), value_(nullptr) {} ++ By() : strategy_("css selector"), value_("") {} + + By(const std::string& strategy, const std::string& value) + : strategy_(strategy) diff --git a/packages/w/webdriverxx/patches/2023.04.22/picojson.patch b/packages/w/webdriverxx/patches/2023.04.22/picojson.patch new file mode 100644 index 000000000..0d9eb80e6 --- /dev/null +++ b/packages/w/webdriverxx/patches/2023.04.22/picojson.patch @@ -0,0 +1,91 @@ +diff --git a/include/webdriverxx/capabilities.h b/include/webdriverxx/capabilities.h +index ca5cb64..052ad27 100644 +--- a/include/webdriverxx/capabilities.h ++++ b/include/webdriverxx/capabilities.h +@@ -2,7 +2,7 @@ + #define WEBDRIVERXX_CAPABILITIES_H + + #include "conversions.h" +-#include "picojson.h" ++#include + #include + + namespace webdriverxx { +diff --git a/include/webdriverxx/client.h b/include/webdriverxx/client.h +index 5548438..d4b6a3e 100644 +--- a/include/webdriverxx/client.h ++++ b/include/webdriverxx/client.h +@@ -5,7 +5,7 @@ + #include "capabilities.h" + #include "detail/resource.h" + #include "detail/http_connection.h" +-#include "picojson.h" ++#include + #include + #include + +diff --git a/include/webdriverxx/conversions.h b/include/webdriverxx/conversions.h +index 8374073..510b5a0 100644 +--- a/include/webdriverxx/conversions.h ++++ b/include/webdriverxx/conversions.h +@@ -4,7 +4,7 @@ + #include "types.h" + #include "detail/error_handling.h" + #include "detail/meta_tools.h" +-#include "picojson.h" ++#include + #include + + namespace webdriverxx { +diff --git a/include/webdriverxx/detail/resource.h b/include/webdriverxx/detail/resource.h +index 26e3ed6..185c5e0 100644 +--- a/include/webdriverxx/detail/resource.h ++++ b/include/webdriverxx/detail/resource.h +@@ -6,7 +6,7 @@ + #include "shared.h" + #include "../conversions.h" + #include "../response_status_code.h" +-#include "../picojson.h" ++#include + + namespace webdriverxx { + namespace detail { +diff --git a/include/webdriverxx/detail/types.h b/include/webdriverxx/detail/types.h +index f218900..fcbe4e9 100644 +--- a/include/webdriverxx/detail/types.h ++++ b/include/webdriverxx/detail/types.h +@@ -3,7 +3,7 @@ + + #include "../conversions.h" + #include "../capabilities.h" +-#include "../picojson.h" ++#include + #include + + #define CXX17_2X ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) +diff --git a/include/webdriverxx/js_args.h b/include/webdriverxx/js_args.h +index 0944f28..6e90c94 100644 +--- a/include/webdriverxx/js_args.h ++++ b/include/webdriverxx/js_args.h +@@ -2,7 +2,7 @@ + #define WEBDRIVERXX_JS_ARGS_H + + #include "conversions.h" +-#include "picojson.h" ++#include + + namespace webdriverxx { + +diff --git a/include/webdriverxx/session.h b/include/webdriverxx/session.h +index ee5410d..24f4cd5 100644 +--- a/include/webdriverxx/session.h ++++ b/include/webdriverxx/session.h +@@ -12,7 +12,7 @@ + #include "detail/keyboard.h" + #include "detail/shared.h" + #include "detail/factories_impl.h" +-#include "picojson.h" ++#include + #include "utils/picobase64.h" + #include + #include diff --git a/packages/w/webdriverxx/xmake.lua b/packages/w/webdriverxx/xmake.lua new file mode 100644 index 000000000..386f8482a --- /dev/null +++ b/packages/w/webdriverxx/xmake.lua @@ -0,0 +1,29 @@ +package("webdriverxx") + set_kind("library", {headeronly = true}) + set_homepage("https://GermanAizek.github.io/webdriverxx") + set_description("A C++ client library for Selenium Webdriver") + set_license("MIT") + + add_urls("https://github.com/GermanAizek/webdriverxx.git", {submodules = false}) + add_versions("2023.04.22", "b8c9ac36360021daca7b0fd006a092b605b19e29") + + add_patches("2023.04.22", "patches/2023.04.22/picojson.patch", "11e23fe37c7e3b8ec174642542567c9d6bae3657892f5d7ac8203cbb89c9112c") + add_patches("2023.04.22", "patches/2023.04.22/fix_cxx23.patch", "da63a9b134ba78cb17b099486b83d2bc846c9786590265eb4e31f88a9911aeab") + + add_deps("libcurl", "picojson") + + on_install("!bsd and !wasm", function (package) + os.rm("include/webdriverxx/picojson.h") + os.cp("include/webdriverxx.h", package:installdir("include")) + os.cp("include/webdriverxx", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + using namespace webdriverxx; + void test() { + WebDriver chrome = Start(Chrome()); + } + ]]}, {configs = {languages = "c++17"}})) + end)