HttpDownloadStrategy renamed CurlDownloadStrategy
Because people didn't realise it was actually curl and thus supports eg. ftp too.
This commit is contained in:
parent
5f0d2dc032
commit
c130cf3e71
@ -35,9 +35,15 @@ require 'hardware'
|
|||||||
|
|
||||||
ENV['MACOSX_DEPLOYMENT_TARGET']=MACOS_VERSION.to_s
|
ENV['MACOSX_DEPLOYMENT_TARGET']=MACOS_VERSION.to_s
|
||||||
|
|
||||||
|
unless HOMEBREW_PREFIX.to_s == '/usr/local'
|
||||||
|
# /usr/local is always in the build system path so only add other paths
|
||||||
|
ENV['CPPFLAGS'] = "-I#{HOMEBREW_PREFIX}/include"
|
||||||
|
ENV['LDFLAGS'] = "-L#{HOMEBREW_PREFIX}/lib"
|
||||||
|
else
|
||||||
# ignore existing build vars, thus we should have less bugs to deal with
|
# ignore existing build vars, thus we should have less bugs to deal with
|
||||||
ENV['LDFLAGS'] = ''
|
|
||||||
ENV['CPPFLAGS'] = ''
|
ENV['CPPFLAGS'] = ''
|
||||||
|
ENV['LDFLAGS'] = ''
|
||||||
|
end
|
||||||
|
|
||||||
if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM']
|
if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM']
|
||||||
ENV['CC'] = '/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2'
|
ENV['CC'] = '/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2'
|
||||||
@ -93,12 +99,6 @@ ENV['CFLAGS']=ENV['CXXFLAGS']="#{cflags*' '} #{BREWKIT_SAFE_FLAGS}"
|
|||||||
# compile faster
|
# compile faster
|
||||||
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
|
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
|
||||||
|
|
||||||
# /usr/local is always in the build system path
|
|
||||||
unless HOMEBREW_PREFIX.to_s == '/usr/local'
|
|
||||||
ENV['CPPFLAGS']="-I#{HOMEBREW_PREFIX}/include"
|
|
||||||
ENV['LDFLAGS']="-L#{HOMEBREW_PREFIX}/lib"
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
# you can use these functions for packages that have build issues
|
# you can use these functions for packages that have build issues
|
||||||
module HomebrewEnvExtension
|
module HomebrewEnvExtension
|
||||||
|
@ -28,7 +28,7 @@ class AbstractDownloadStrategy
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class HttpDownloadStrategy <AbstractDownloadStrategy
|
class CurlDownloadStrategy <AbstractDownloadStrategy
|
||||||
def fetch
|
def fetch
|
||||||
ohai "Downloading #{@url}"
|
ohai "Downloading #{@url}"
|
||||||
if @unique_token
|
if @unique_token
|
||||||
@ -93,6 +93,15 @@ private
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class HttpDownloadStrategy <CurlDownloadStrategy
|
||||||
|
def initialize url, name, version
|
||||||
|
opoo "HttpDownloadStrategy is deprecated"
|
||||||
|
puts "Please use CurlDownloadStrategy in future"
|
||||||
|
puts "HttpDownloadStrategy will be removed in version 0.5"
|
||||||
|
super url, name, version
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class SubversionDownloadStrategy <AbstractDownloadStrategy
|
class SubversionDownloadStrategy <AbstractDownloadStrategy
|
||||||
def fetch
|
def fetch
|
||||||
ohai "Checking out #{@url}"
|
ohai "Checking out #{@url}"
|
||||||
|
@ -110,7 +110,7 @@ class Formula
|
|||||||
when %r[^http://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy
|
when %r[^http://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy
|
||||||
when %r[^http://(.+?\.)?sourceforge\.net/svnroot/] then SubversionDownloadStrategy
|
when %r[^http://(.+?\.)?sourceforge\.net/svnroot/] then SubversionDownloadStrategy
|
||||||
when %r[^http://svn.apache.org/repos/] then SubversionDownloadStrategy
|
when %r[^http://svn.apache.org/repos/] then SubversionDownloadStrategy
|
||||||
else HttpDownloadStrategy
|
else CurlDownloadStrategy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user