Forráskód Böngészése

add mongo-c-driver (#585)

* add pybind11

* add pybind11

* add pybind11

* add nng

* update for add nng

* update for add nng

* update for add nng

* update for add nng, remove MingW

* update protobuf-cpp

* update for protobuf-cpp

* add libhv

* update for libhv

* nng add new version 1.4.0

* add nngpp

* update nngpp

* add nngpp version

* add httplib

* update taskflow to v3.1.0

* del httplib

* add spdlog 1.8.5 patch for fmt-8.0

* delete spdlog-1.8.5-fmt8.patch

* 修改win git \r\n 后,重新传入

* remove spd 1.8.5 patch

* 更改换行符

* update

* update

* update confict

* add mongo-c-driver

* add mongo-c-driver (update)

* update mongo-c-driver for windows

* upate for mongo-c-driver
fasiondog 4 éve
szülő
commit
911eb8a084
1 módosított fájl, 36 hozzáadás és 0 törlés
  1. 36 0
      packages/m/mongo-c-driver/xmake.lua

+ 36 - 0
packages/m/mongo-c-driver/xmake.lua

@@ -0,0 +1,36 @@
+package("mongo-c-driver")
+
+    set_homepage("http://mongoc.org/")
+    set_description("The MongoDB C Driver.")
+    set_license("Apache-2.0")
+
+    add_urls("https://github.com/mongodb/mongo-c-driver/archive/$(version).zip",
+             "https://github.com/mongodb/mongo-c-driver.git")
+    add_versions("1.19.0", "3e545964ee82ee60afe4213852208e6174297b19d6b837eca3c711af34a4b107")
+
+    add_deps("cmake")
+    if is_plat("macosx", "linux") then
+        add_deps("openssl")
+    end
+
+    add_includedirs("include/libbson-1.0")
+    add_includedirs("include/libmongoc-1.0")
+
+    on_install("windows", "linux", "macosx", function (package)
+        local configs = {"-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF",
+                        "-DENABLE_ICU=OFF",
+                        "-DENABLE_TESTS=OFF",
+                        "-DENABLE_EXAMPLES=OFF"}
+        if package:is_plat("windows") then 
+            table.insert(configs, "-DENABLE_EXTRA_ALIGNMENT=0")    
+        end
+        table.insert(configs, "-DBUILD_VERSION=" .. package:version())
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "RelWithDebInfo"))
+        table.insert(configs, "-DENABLE_STATIC=" .. (package:config("shared") and "OFF" or "BUILD_ONLY"))
+        table.insert(configs, "-DENABLE_STATIC_BUILD=" .. (package:config("shared") and "OFF" or "BUILD_ONLY"))
+        import("package.tools.cmake").install(package, configs)
+    end)
+
+    on_test(function (package)
+        assert(package:has_cfuncs("mongoc_init", {includes = "mongoc/mongoc.h"}))
+    end)