libluv: require CMake 3 and CMP0042 (#40716)
This commit is contained in:
		 Alberto Invernizzi
					Alberto Invernizzi
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							b4cf3d9f18
						
					
				
				
					commit
					bf88ed45da
				
			| @@ -22,11 +22,18 @@ class Libluv(CMakePackage): | |||||||
|     version("1.42.0-0", sha256="b5228a9d0eaacd9f862b6270c732d5c90773a28ce53b6d9e32a14050e7947f36") |     version("1.42.0-0", sha256="b5228a9d0eaacd9f862b6270c732d5c90773a28ce53b6d9e32a14050e7947f36") | ||||||
|     version("1.36.0-0", sha256="f2e7eb372574f25c6978c1dc74280d22efdcd7df2dda4a286c7fe7dceda26445") |     version("1.36.0-0", sha256="f2e7eb372574f25c6978c1dc74280d22efdcd7df2dda4a286c7fe7dceda26445") | ||||||
| 
 | 
 | ||||||
|  |     # https://github.com/neovim/neovim/issues/25770 | ||||||
|  |     # up to 1.45 (included) dynamic library on macOS did not have the @rpath prefix, being not | ||||||
|  |     # usable on this platform. | ||||||
|  |     # from 1.46, by requiring a newer cmake version, CMP0042 is in place and it works correctly. | ||||||
|  |     depends_on("cmake@3:", type="build") | ||||||
|  | 
 | ||||||
|     depends_on("lua-lang", type="link") |     depends_on("lua-lang", type="link") | ||||||
|     depends_on("libuv", type="link") |     depends_on("libuv", type="link") | ||||||
| 
 | 
 | ||||||
|     def cmake_args(self): |     def cmake_args(self): | ||||||
|         args = [ |         args = [ | ||||||
|  |             self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"), | ||||||
|             "-DLUA_BUILD_TYPE=System", |             "-DLUA_BUILD_TYPE=System", | ||||||
|             "-DBUILD_STATIC_LIBS=ON", |             "-DBUILD_STATIC_LIBS=ON", | ||||||
|             "-DBUILD_SHARED_LIBS=ON", |             "-DBUILD_SHARED_LIBS=ON", | ||||||
|   | |||||||
| @@ -140,9 +140,6 @@ class Neovim(CMakePackage): | |||||||
|     # https://github.com/neovim/neovim/issues/16217#issuecomment-958590493 |     # https://github.com/neovim/neovim/issues/16217#issuecomment-958590493 | ||||||
|     conflicts("libvterm@0.2:", when="@:0.7") |     conflicts("libvterm@0.2:", when="@:0.7") | ||||||
| 
 | 
 | ||||||
|     # https://github.com/neovim/neovim/issues/25770 |  | ||||||
|     conflicts("libluv@1.44:", when="platform=darwin") |  | ||||||
| 
 |  | ||||||
|     @when("^lua") |     @when("^lua") | ||||||
|     def cmake_args(self): |     def cmake_args(self): | ||||||
|         return [self.define("PREFER_LUA", True)] |         return [self.define("PREFER_LUA", True)] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user