@@ -6,6 +6,7 @@ package("lsp-framework")
66 add_urls (" https://github.com/leon-bckl/lsp-framework/archive/refs/tags/$(version).tar.gz" ,
77 " https://github.com/leon-bckl/lsp-framework.git" )
88
9+ add_versions (" 1.3.0" , " b6b4c0cad392b5e6b5b3897095199ed1b9217b7e468d61993eb4e091972c264b" )
910 add_versions (" 1.0.1" , " 07f924d851896a2d424d554d20820483f8458aa1ff907bb68657b0d2d0bd0d13" )
1011
1112 add_patches (" 1.0.1" , " patches/1.0.1/fix-install.diff" , " bb5e4436091ba1846144ffa80fb8afd4d0213760bce45dd6fd31662905cb4bc3" )
@@ -20,16 +21,30 @@ package("lsp-framework")
2021 end
2122
2223 if on_check then
23- on_check (" windows|arm64" , function (package )
24- import (" core.base.semver" )
25- local vs = package :toolchain (" msvc" ):config (" vs" )
26- assert (tonumber (vs ) >= 2022 , " lsp-framework requires Visual Studio 2022 and later for arm64 targets" )
27- assert (os.arch () == " arm64" , " package(lsp-framework): requires host arch to be arm64." )
24+ on_check (function (package )
25+ if package :is_plat (" windows" ) and package :is_arch (" arm64" ) then
26+ import (" core.base.semver" )
27+ local vs = package :toolchain (" msvc" ):config (" vs" )
28+ assert (tonumber (vs ) >= 2022 , " package(lsp-framework): requires Visual Studio 2022 and later for arm64 targets" )
29+ assert (os.arch () == " arm64" , " package(lsp-framework): requires host arch to be arm64." )
30+ end
31+ if package :is_plat (" macosx" ) then
32+ if macos.version ():lt (" 15" ) then
33+ raise (" package(lsp-framework): requires macOS version >= 15." )
34+ end
35+ end
2836 end )
2937 end
3038
3139 on_install (" windows" , " linux" , " macosx" , " mingw@windows" , " bsd" , function (package )
3240 local configs = {}
41+ if package :version ():ge (" 1.3.0" ) then
42+ io .replace (" CMakeLists.txt" , " install(TARGETS lsp EXPORT lsp ARCHIVE LIBRARY)" , " install(TARGETS lsp EXPORT lsp RUNTIME ARCHIVE LIBRARY)" , {plain = true })
43+ table.insert (configs , " -DCMAKE_INSTALL_LIBDIR=lib" )
44+ end
45+ if package :is_plat (" windows" ) and package :config (" shared" ) then
46+ table.insert (configs , " -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" )
47+ end
3348 table.insert (configs , " -DLSP_USE_SANITIZERS=" .. (package :config (" asan" ) and " ON" or " OFF" ))
3449 table.insert (configs , " -DCMAKE_BUILD_TYPE=" .. (package :is_debug () and " Debug" or " Release" ))
3550 table.insert (configs , " -DBUILD_SHARED_LIBS=" .. (package :config (" shared" ) and " ON" or " OFF" ))
0 commit comments