Add to PKG_CONFIG_PATH for keg-only deps
Also prepending to these vars now too as for kegs that are duplicates of OS X libs, we need to give them the edge and put them first.
This commit is contained in:
		
							parent
							
								
									ceef7729e0
								
							
						
					
					
						commit
						f785369e54
					
				@ -25,9 +25,9 @@ EOS
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ENV_append key, value, separator = ' '
 | 
					def ENV_prepend key, value, separator = ' '
 | 
				
			||||||
  if ENV[key] and not ENV[key].empty?
 | 
					  if ENV[key] and not ENV[key].empty?
 | 
				
			||||||
    ENV[key] += separator+value
 | 
					    ENV[key] = value+separator+ENV[key]
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    ENV[key] = value
 | 
					    ENV[key] = value
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
@ -38,9 +38,10 @@ def install f
 | 
				
			|||||||
  f.deps.each do |dep|
 | 
					  f.deps.each do |dep|
 | 
				
			||||||
    dep = Formula.factory dep
 | 
					    dep = Formula.factory dep
 | 
				
			||||||
    if dep.keg_only?
 | 
					    if dep.keg_only?
 | 
				
			||||||
      ENV_append 'LDFLAGS', "-L#{dep.lib}"
 | 
					      ENV_prepend 'LDFLAGS', "-L#{dep.lib}"
 | 
				
			||||||
      ENV_append 'CPPFLAGS', "-I#{dep.include}"
 | 
					      ENV_prepend 'CPPFLAGS', "-I#{dep.include}"
 | 
				
			||||||
      ENV_append 'PATH', "#{dep.bin}", ':'
 | 
					      ENV_prepend 'PATH', "#{dep.bin}", ':'
 | 
				
			||||||
 | 
					      ENV_prepend 'PKG_CONFIG_PATH', dep.lib+'pkgconfig', ':'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user