improve cmake to support freebsd

pull/255/head
ruki 4 years ago
parent ce84b16908
commit a664f53a0e
No known key found for this signature in database
GPG Key ID: 809EF06AD42725BD
  1. 8
      packages/c/cmake/xmake.lua
  2. 23
      packages/i/irrxml/xmake.lua
  3. 5
      scripts/test.lua

@ -42,6 +42,9 @@ package("cmake")
add_versions("3.15.4", "19c2bfd26c4de4d8046dd5ad6de95b57a2556559ec81b13b94e63ea4ae49b3f2")
add_versions("3.18.4", "4c519051853686927f87df99669ada3ff15a3086535a7131892febd7c6e2f122")
end
else
add_urls("https://github.com/Kitware/CMake/releases/download/v$(version)/cmake-$(version).tar.gz")
add_versions("3.18.4", "597c61358e6a92ecbfad42a9b5321ddd801fc7e7eca08441307c9138382d4f77")
end
on_install("@macosx", function (package)
@ -54,6 +57,11 @@ package("cmake")
os.cp("share", package:installdir())
end)
on_install("@bsd", function (package)
os.vrunv("sh", {"./bootstrap", "--prefix=" .. package:installdir()})
import("package.tools.make").install(package)
end)
on_test(function (package)
os.vrun("cmake --version")
end)

@ -1,23 +0,0 @@
package("irrxml")
set_homepage("https://sourceforge.net/projects/irrlicht/")
set_description("High speed and easy-to-use XML Parser for C++")
set_urls("https://deac-fra.dl.sourceforge.net/project/irrlicht/irrXML%20SDK/$(version)/irrxml-$(version).zip")
add_versions("1.2", "9b4f80639b2dee3caddbf75862389de684747df27bea7d25f96c7330606d7079")
on_install(function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("irrxml")
set_kind("static")
add_headerfiles("src/*.h")
add_files("src/*.cpp")
]])
import("package.tools.xmake").install(package)
end)
on_test(function (package)
assert(package:has_cxxfuncs("irr::io::createIrrXMLReader(\"example.xml\")", {includes = "irrXML.h"}))
end)

@ -146,11 +146,6 @@ function main(...)
return
end
-- we only test one package because freebsd ci is too slow
if is_host("bsd") then
packages = {packages[1]}
end
-- prepare test project
local repodir = os.curdir()
local workdir = path.join(os.tmpdir(), "xmake-repo")

Loading…
Cancel
Save