mapbox_polylabel: add package (#4511)

pull/3939/merge
star9029 5 months ago committed by GitHub
parent a4812838bc
commit ad5eeb5d11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      packages/m/mapbox_geometry/xmake.lua
  2. 25
      packages/m/mapbox_polylabel/xmake.lua
  3. 5
      packages/m/mapbox_variant/xmake.lua

@ -1,5 +1,4 @@
package("mapbox_geometry")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/mapbox/geometry.hpp")
set_description("Provides header-only, generic C++ interfaces for geometry types, geometry collections, and features.")
@ -7,8 +6,10 @@ package("mapbox_geometry")
add_urls("https://github.com/mapbox/geometry.hpp/archive/refs/tags/v$(version).zip",
"https://github.com/mapbox/geometry.hpp.git")
add_versions("1.1.0", "dc9203db94eda6b5377b96edeb4b53109cbf3d29e714d1d50c5cb598f2b39ab4")
add_versions("2.0.3", "64d1005d4ee9931ac162b853cfb4a7c8a8bda9992ba83211386a6b40955bcc49")
add_patches("1.1.0", path.join(os.scriptdir(), "patches", "1.1.0", "pragma.patch"), "235a89eb4d78874bb8e3e49c95317c540511f33a67dec80a41c6984df7ff20c5")
add_patches("2.0.3", path.join(os.scriptdir(), "patches", "2.0.3", "pragma.patch"), "235a89eb4d78874bb8e3e49c95317c540511f33a67dec80a41c6984df7ff20c5")
@ -24,12 +25,7 @@ package("mapbox_geometry")
add_rules("utils.install.cmake_importfiles")
add_rules("utils.install.pkgconfig_importfiles")
]])
local configs = {}
if package:config("shared") then
configs.kind = "shared"
end
import("package.tools.xmake").install(package, config)
import("package.tools.xmake").install(package)
end)
on_test(function (package)

@ -0,0 +1,25 @@
package("mapbox_polylabel")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/mapbox/polylabel")
set_description("A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)")
set_license("ISC")
add_urls("https://github.com/mapbox/polylabel/archive/refs/tags/$(version).tar.gz",
"https://github.com/mapbox/polylabel.git")
add_versions("v2.0.0", "9aba4320c6cb5a8e9a8d44feb0d68b79b3127bdcb759a26aca92ac637668d7b9")
add_deps("mapbox_geometry")
on_install(function (package)
os.cp("include", package:installdir())
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
mapbox::geometry::polygon<double> polygon;
mapbox::geometry::point<double> p = mapbox::polylabel(polygon, 1.0);
}
]]}, {configs = {languages = "c++14"}, includes = {"mapbox/polylabel.hpp"}}))
end)

@ -1,13 +1,14 @@
package("mapbox_variant")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/mapbox/variant")
set_description("C++11/C++14 Variant")
set_license("BSD")
set_urls("https://github.com/mapbox/variant/archive/refs/tags/$(version).tar.gz",
set_urls("https://github.com/mapbox/variant/archive/f87fcbda9daf13fba47a6a889696b0ad23fc098d.tar.gz",
"https://github.com/mapbox/variant/archive/refs/tags/$(version).tar.gz",
"https://github.com/mapbox/variant.git")
add_versions("2020.12.02", "1c158fb10da5605060950eb8d2a87a3313d29e558576e35fd445653d863a0103")
add_versions("v1.2.0", "7059f4420d504c4bc96f8a462a0f6d029c5be914ba55cc030a0a773366dd7bc8")
on_install(function (package)

Loading…
Cancel
Save