537 Commits

Author SHA1 Message Date
Adam Vandenberg
d4b0599a86 --config -> config 2014-04-30 19:09:29 -07:00
Mike McQuaid
249aae177f formula: move cxxstdlib methods to the class.
This allows disabling this checks when e.g. pouring bottles.
2014-04-23 08:10:48 +01:00
Finn Smith
eed3368039 Fix keg version in Formula#to_hash
Closes Homebrew/homebrew#28550.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-21 09:29:53 -05:00
Misty De Meo
9af3917ebf Formula: provide compiler failure collections
`needs` allows formulae to specify dependencies on cross-compiler
dependencies, allowing multiple failures to be specified in a single
statement. For instance, `needs :cxx11` adds seven compiler failures.

Closes Homebrew/homebrew#22912.
2014-04-12 10:36:00 -07:00
Jack Nagel
c1366b111f Initialize cxxstdlib set lazily
This is used rarely and only at build-time, so we don't need to create
it when instantiating the formula.
2014-04-06 18:41:27 -05:00
Jack Nagel
da2a2ab748 drop unnecessary nil checks 2014-04-06 16:11:02 -05:00
Jack Nagel
cfee535786 Remove now unnecessary realpath calls 2014-04-06 00:31:07 -05:00
Jack Nagel
20f4b31763 Implement canonical_name in Formulary 2014-04-05 22:03:49 -05:00
Jack Nagel
ce1f598e98 Avoid realpath where it is not necessary
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.
2014-04-05 12:17:19 -05:00
Jack Nagel
7584b2ca2b Aliases never point at symlinks, so just use resolved_path 2014-03-30 15:55:37 -05:00
Jack Nagel
c8c85b4ac4 Always call Process.wait with an argument 2014-03-29 17:47:42 -05:00
Jack Nagel
c27eed10bd Simplify collecting options 2014-03-28 20:42:55 -05:00
Jack Nagel
a487909e9a Don't rely on Dependency#to_s 2014-03-28 20:42:20 -05:00
Jack Nagel
3871165c58 Add revision to brew info --json
Closes Homebrew/homebrew#27820.
2014-03-28 20:41:02 -05:00
Jack Nagel
1c558d49dd Filter arguments for setup.py and build.py 2014-03-28 19:04:31 -05:00
Jack Nagel
56feb978b8 Make ENV changes in the child so we don't have to roll them back 2014-03-28 19:04:05 -05:00
Jack Nagel
86cdd812a2 Teach fetch to download patches 2014-03-13 21:35:41 -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
4b80d30bab Remove used options check from install_bottle?
This is now handled by requiring that options are always passed to the
installer explicitly.
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
42e60f7c59 Make build_bottle an explicit installer mode 2014-03-10 14:56:01 -05:00
Adam Vandenberg
452d671008 add opt shortcuts to formula 2014-03-07 07:08:52 -08:00
Adam Vandenberg
5cb3b25d43 document formula path helpers 2014-03-07 07:08:52 -08:00
Jack Nagel
d6937c9d3f Oops 2014-03-05 21:11:45 -06:00
Jack Nagel
44dc21ca5d Prepare bottle tooling for formula revisions 2014-03-05 20:45:44 -06:00
Jack Nagel
6008187d5f Encode formula revision in installation prefix
In order to allow kegs built with the same version but differing formula
revisions to coexist, we must encode the revision as part of the keg's
name. This is necessary to actually perform an upgrade, as we cannot
upgrade a keg in-place, and temporarily moving it pending the result of
the upgrade is error-prone and potentially slow.

To accomplish this, we introduce a new Formula#pkg_version method that
concatenates the active_spec version with the formula revision. An
exception is made for a formula that has no revision: the tag is
omitted. This preserves compatibility with existing installations.
2014-03-05 20:12:51 -06:00
Jack Nagel
b5e1715333 Enable tracking of formula revisions
It is useful to be able to prompt upgrades in response to events other
than a version update; for example, when a dependency is updated and its
library version changes, dependents need to be rebuilt to link against
the new library.

Currently we cannot do this automatically, which means a flood of
tickets whenever the library version of a popular library changes.

To address this, we need to track an additional piece of metadata, the
"revision" of the formula, which can be incremented when appropriate to
prompt an upgrade. It can then be reset to zero when the next version
change occurs.
2014-03-05 20:12:51 -06:00
Jack Nagel
6d949599b5 Compare pathnames directly 2014-03-01 18:42:47 -06:00
Jack Nagel
51bec382b0 Make conditional more obvious 2014-03-01 17:49:57 -06:00
Jack Nagel
26785dbe5d Use Formula.path 2014-02-28 16:51:15 -06:00
Jack Nagel
479f4bc7cd Remove deprecation notice from system "xcodebuild"
The new xcodebuild method calls system "xcodebuild" underneath, so this
notice would always be printed. Instead we will just rely on the audit
check.

Fixes Homebrew/homebrew#27092.
2014-02-28 11:04:40 -06:00
Jack Nagel
c72f9a469d Add an xcodebuild helper and deprecate system "xcodebuild"
In the future we can remove the ENV munging branch from Formula#system.

Closes Homebrew/homebrew#27081.
2014-02-27 21:53:21 -06:00
Adam Vandenberg
27365a568d add Formula[]
Closes Homebrew/homebrew#26930
2014-02-27 08:21:14 -08:00
Jack Nagel
d848a6c5fd Add nil check to partially address Homebrew/homebrew#26563 2014-02-24 23:26:11 -05:00
Adam Vandenberg
ed56bdd046 update doc 2014-02-23 15:53:26 -08:00
Adam Vandenberg
1f86923ec2 ignore skip_clean :all 2014-02-23 15:53:26 -08:00
Jack Nagel
85feea33c0 Hoist assignment to simplify a conditional 2014-02-22 21:39:38 -05:00
Jack Nagel
b96411052e Use reader method 2014-02-22 11:17:50 -05:00
Jack Nagel
a2372ad539 Use standard assignment since #initialize is only called once 2014-02-22 11:17:04 -05:00
Jack Nagel
e3e14a0cdf Eliminate nil check on path parameter 2014-02-21 20:07:41 -05:00
Jack Nagel
41a9ba8259 Move Formula.class_s to Formulary 2014-02-21 00:46:03 -05:00
Jack Nagel
fb350bad0f Remove downloader from Formula 2014-02-21 00:41:07 -05:00
Jack Nagel
129e25032b Move methods to a more logical place 2014-02-21 00:41:07 -05:00
Jack Nagel
ccb216c9c7 Delegate downloader to active_spec instead of storing it in an ivar 2014-02-20 13:45:13 -05:00
Jack Nagel
7591b79d7d Push expand_path call down into FromPathLoader 2014-02-19 16:53:18 -05:00
Jack Nagel
63629ab13b Formula#system: simplify xcodebuild special case 2014-02-15 17:47:24 -05:00
Jack Nagel
dca786176e Formula#system: remove unnecessary string casts 2014-02-15 17:47:24 -05:00
Adam Vandenberg
92203ceaca don't trigger VCS when patching
When patching read-only files, patch can try to check-out from
a VCS system when other conditions are met, such as environmental
variables being set.

Homebrew never wants to trigger this behavior, so pass --get=0.

Closes Homebrew/homebrew#26277.
2014-01-29 21:24:30 -08:00
Mike McQuaid
28143fb653 PythonDependency: massive refactoring.
Closes Homebrew/homebrew#24842.
2014-01-20 15:42:52 -08:00