aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-10-02 18:36:58 +0100
committerMax Howell2009-10-02 20:01:23 +0100
commitc130cf3e71c8feaf29515c35b787a43bd0599c12 (patch)
tree38d492fd49e4bbf8a94376ce8e32507f4d9b8fd2 /Library
parent5f0d2dc032c648af2cdbb9483c1a1ba7b3ddf900 (diff)
downloadbrew-c130cf3e71c8feaf29515c35b787a43bd0599c12.tar.bz2
HttpDownloadStrategy renamed CurlDownloadStrategy
Because people didn't realise it was actually curl and thus supports eg. ftp too.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brewkit.rb18
-rw-r--r--Library/Homebrew/download_strategy.rb11
-rw-r--r--Library/Homebrew/formula.rb2
3 files changed, 20 insertions, 11 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb
index f120cc468..86858ab0f 100644
--- a/Library/Homebrew/brewkit.rb
+++ b/Library/Homebrew/brewkit.rb
@@ -35,9 +35,15 @@ require 'hardware'
ENV['MACOSX_DEPLOYMENT_TARGET']=MACOS_VERSION.to_s
-# ignore existing build vars, thus we should have less bugs to deal with
-ENV['LDFLAGS'] = ''
-ENV['CPPFLAGS'] = ''
+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
+ ENV['CPPFLAGS'] = ''
+ ENV['LDFLAGS'] = ''
+end
if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM']
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
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
module HomebrewEnvExtension
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 9ec0e3897..2d6b17aa1 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -28,7 +28,7 @@ class AbstractDownloadStrategy
end
end
-class HttpDownloadStrategy <AbstractDownloadStrategy
+class CurlDownloadStrategy <AbstractDownloadStrategy
def fetch
ohai "Downloading #{@url}"
if @unique_token
@@ -93,6 +93,15 @@ private
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
def fetch
ohai "Checking out #{@url}"
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 66633a025..a109f7152 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -110,7 +110,7 @@ class Formula
when %r[^http://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy
when %r[^http://(.+?\.)?sourceforge\.net/svnroot/] then SubversionDownloadStrategy
when %r[^http://svn.apache.org/repos/] then SubversionDownloadStrategy
- else HttpDownloadStrategy
+ else CurlDownloadStrategy
end
end