43 Commits

Author SHA1 Message Date
Jack Nagel
1cc3747094 Move bottle URL construction to the bottle object 2014-07-18 15:15:11 -05:00
Jack Nagel
a87d2108ea Move bottle filename construction to a class 2014-07-18 15:14:57 -05:00
Jack Nagel
44fcb24606 Spell out "formula" in parameter name 2014-07-17 20:46:39 -05:00
Jack Nagel
33eed80ccc Rename fetch_bottle_for to fetch_checksum_for 2014-07-16 14:52:18 -05:00
Jack Nagel
68326805ae Implement []= on BottleCollector 2014-07-15 21:55:14 -05:00
Jack Nagel
33cdff99ba Make some constant strings into actual constants
We only need one copy of each of these strings, not ~7500.
2014-05-27 21:16:15 -05:00
Jack Nagel
7d3215c9f4 Extract tag and checksum selection from DSL method 2014-04-01 16:03:08 -05:00
Jack Nagel
7552669719 Remove now unnecessary branching from bottle DSL methods 2014-04-01 16:03:07 -05:00
Jack Nagel
f1601f6d8a Stop jumping through hoops to get at the collector object 2014-04-01 16:03:07 -05:00
Jack Nagel
45bdeadd94 Set bottle download strategy directly
We know what strategy we want, so going through DownloadStrategyDetector
is wasted work. Now we can remove those patterns from the detector and
have two fewer branches each time through.
2014-03-18 21:28:33 -05:00
Jack Nagel
4e48560701 Detect build-time deps from resource downloads 2014-03-14 23:46:20 -05:00
Jack Nagel
665b14c4a4 Enable new patch implementation with compatibility layer 2014-03-13 21:35:41 -05:00
Jack Nagel
bc6e4a1894 New patch implementation and DSL
This commit introduces a new patch implementation that supports
checksums and caching.

Patches are declared in blocks:

  patch do
    url ...
    sha1 ...
  end

A strip level of -p1 is assumed. It can be overridden using a symbol
argument:

  patch :p0 do
    url ...
    sha1 ...
  end

Patches can be declared in stable, devel, and head blocks. This form is
preferred over using conditionals.

  stable do
    # ...

    patch do
      url ...
      sha1 ...
    end
  end

Embedded (__END__) patches are declared like so:

  patch :DATA
  patch :p0, :DATA

Patches can also be embedded by passing a string. This makes it possible
to provide multiple embedded patches while making only some of them
conditional.

  patch :p0, "..."
2014-03-13 21:35:41 -05:00
Jack Nagel
7dcb54a963 Set bottle name so brew fetch --retry works 2014-03-13 10:01:01 -05:00
Mike McQuaid
35093b7a37 Revert "software_spec: set a name for bottles."
This reverts commit 7cdcd13aa08ed91a73837b73dc185ad9147f7130.
2014-03-13 13:13:06 +00:00
Mike McQuaid
5d11b5e7a5 software_spec: set a name for bottles.
Avoids errors on `brew fetch --retry` with bottles.
2014-03-13 11:22:33 +00:00
Jack Nagel
32ab18c189 Wrap cellar compatibility check in a method 2014-03-10 14:56:02 -05:00
Jack Nagel
7da459874f Make bottle implementation more generic 2014-03-10 14:56:02 -05:00
Jack Nagel
7e8c693218 Consolidate bottle defaults and remove a method 2014-03-05 10:24:33 -06:00
Jack Nagel
4928b4e02c Set owner ivar in SoftwareSpec 2014-02-27 14:50:22 -06:00
Jack Nagel
9d3b9edb4d Remove download_strategy from SoftwareSpec 2014-02-22 20:17:04 -05:00
Jack Nagel
fb350bad0f Remove downloader from Formula 2014-02-21 00:41:07 -05:00
Jack Nagel
5e0a8668fb Silence more warnings 2013-12-09 15:15:53 -06:00
Misty De Meo
a9823bc518 SoftwareSpec: compact array that may contain nil 2013-12-05 23:09:52 -08:00
Misty De Meo
e2af1cbeeb Use BottleCollector in Bottle SoftwareSpec 2013-12-05 18:24:51 -08:00
Jack Nagel
85f424b270 SoftwareSpec: set resource version when missing
Closes Homebrew/homebrew#24695.
2013-11-26 20:35:28 -06:00
Mike McQuaid
42c9ecd665 Bottle: handle legacy bottle OS tags.
Otherwise :mountainlion, :snowleopard in the history for CMake breaks 
bottle_filenames from versions for new CMake bottles.
2013-10-28 10:50:02 +00:00
Xiyue Deng
f2132c47bd C++11 support.
* Add options and ENV method to specify building in C++11 mode.
  - Set C++ compiler flags to enable C++11 mode.
  - To add options to support C++11 mode, a formula can now use

      option :cxx11

    to provide "--c++11" option, and detect and enable C++11 support in
    install method using

      ENV.cxx11 if build.cxx11?

Closes Homebrew/homebrew#22453.
2013-10-26 22:17:04 -07:00
Jack Nagel
c5289f2503 Infer dependencies from download strategies and URLs
Closes Homebrew/homebrew#20849.
Closes Homebrew/homebrew#22871.
2013-09-28 16:37:05 -05:00
Jack Nagel
cb32f76f27 SoftwareSpec: remove dead code 2013-09-27 21:29:37 -05:00
Mike McQuaid
e4b6fc5ae0 Bottle: set version from stable spec. 2013-09-27 09:22:15 +01:00
Jack Nagel
c464c7549f Clean up SoftwareSpec and Resource initializers 2013-09-23 21:39:33 -05:00
Jack Nagel
567f3448c9 Set owner of resources to SoftwareSpec object 2013-09-23 21:39:33 -05:00
Jack Nagel
5d17f6fb97 Set name of SoftwareSpec to owner name 2013-09-23 21:39:32 -05:00
Mike McQuaid
fd49e498fa bottle: fix merging .rb files. 2013-09-23 17:30:56 +01:00
Mike McQuaid
5de0b4964a SoftwareSpec: add method for bottle checksums. 2013-09-22 16:01:02 +01:00
Jack Nagel
5511a8b3f5 Move dependencies to SoftwareSpec 2013-09-21 19:27:24 -05:00
Jack Nagel
a8d3aca169 Move options to SoftwareSpec 2013-09-21 19:27:24 -05:00
Jack Nagel
9c7a18bdcb Make spec-scoped resources override top-level resources 2013-09-17 21:29:53 -05:00
Jack Nagel
6116450328 Move formula resources to SoftwareSpec 2013-09-17 21:29:52 -05:00
Jack Nagel
df537528c7 Reimplement SoftwareSpec on top of Resource 2013-09-17 21:29:52 -05:00
Jack Nagel
32315c9348 Combine attr declarations 2013-09-17 21:29:50 -05:00
Jack Nagel
a31fcb554c Move SoftwareSpec to a separate file 2013-09-14 10:16:52 -05:00