Detect X11 when ENV.x11 is requested; dump in --config.
This commit is contained in:
		
							parent
							
								
									56351558b8
								
							
						
					
					
						commit
						24b6e9c721
					
				@ -504,3 +504,7 @@ def llvm_build
 | 
			
		||||
    $1.to_i
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
def x11_installed?
 | 
			
		||||
  Pathname.new('/usr/X11/lib/libpng.dylib').exist?
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -164,6 +164,8 @@ module HomebrewEnvExtension
 | 
			
		||||
    append_to_cflags ' -I/usr/include/libxml2'
 | 
			
		||||
  end
 | 
			
		||||
  def x11
 | 
			
		||||
    opoo "You do not have X11 installed, this formula may not build." if not x11_installed?
 | 
			
		||||
    
 | 
			
		||||
    # CPPFLAGS are the C-PreProcessor flags, *not* C++!
 | 
			
		||||
    append 'CPPFLAGS', '-I/usr/X11R6/include'
 | 
			
		||||
    append 'LDFLAGS', '-L/usr/X11R6/lib'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user