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
commit7702e83d12d15eb2698fad4973e5a59f48ac06bc (patch)
treeb63c578ceb452abfef64a8fbc6ec4282c0216b8f /Library
parent2cfd5d2057615c432bdb2411bde8936997262e1e (diff)
downloadhomebrew-7702e83d12d15eb2698fad4973e5a59f48ac06bc.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/Formula/sbt.rb2
-rw-r--r--Library/Homebrew/brewkit.rb18
-rw-r--r--Library/Homebrew/download_strategy.rb11
-rw-r--r--Library/Homebrew/formula.rb2
4 files changed, 21 insertions, 12 deletions
diff --git a/Library/Formula/sbt.rb b/Library/Formula/sbt.rb
index 0ffa20b9d..ee9173a7d 100644
--- a/Library/Formula/sbt.rb
+++ b/Library/Formula/sbt.rb
@@ -1,7 +1,7 @@
require 'brewkit'
# even though "file -b" reports this as a zip archive, it's just a binary
-class SbtHttpDownloadStrategy <HttpDownloadStrategy
+class SbtHttpDownloadStrategy <CurlDownloadStrategy
def stage
FileUtils.mv @dl, File.basename(@url)
end
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