 eab322946a
			
		
	
	
		eab322946a
		
			
		
	
	
	
	
		
			
			Seen in: https://github.com/Homebrew/homebrew-core/pull/191090#issuecomment-2363215204 There's a missing signature issue here due to the `generic_*` aliasing we're doing. With prepend, though: this is no longer needed and we can use `super` instead which is more idiomatic and nicer overall. This pattern should probably be applied in other places but: let's try this targetting fix for here first.
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # typed: strict
 | |
| # frozen_string_literal: true
 | |
| 
 | |
| module OS
 | |
|   module Mac
 | |
|     module Formula
 | |
|       extend T::Helpers
 | |
| 
 | |
|       requires_ancestor { ::Formula }
 | |
| 
 | |
|       sig { returns(T::Boolean) }
 | |
|       def valid_platform?
 | |
|         requirements.none?(LinuxRequirement)
 | |
|       end
 | |
| 
 | |
|       sig {
 | |
|         params(
 | |
|           install_prefix: T.any(String, Pathname),
 | |
|           install_libdir: T.any(String, Pathname),
 | |
|           find_framework: String,
 | |
|         ).returns(T::Array[String])
 | |
|       }
 | |
|       def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST")
 | |
|         args = super
 | |
| 
 | |
|         # Avoid false positives for clock_gettime support on 10.11.
 | |
|         # CMake cache entries for other weak symbols may be added here as needed.
 | |
|         args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0"
 | |
| 
 | |
|         # Ensure CMake is using the same SDK we are using.
 | |
|         args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_for_formula(self).path}" if MacOS.sdk_root_needed?
 | |
| 
 | |
|         args
 | |
|       end
 | |
|     end
 | |
|   end
 | |
| end
 | |
| 
 | |
| Formula.prepend(OS::Mac::Formula)
 |