1648 Commits

Author SHA1 Message Date
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
eb3071332c Decouple Resource from SoftwareSpec 2013-09-17 21:29:50 -05:00
Samuel Cochran
23c869afee Cater to download strategies not yielding a file
Closes Homebrew/homebrew#22580.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-09-16 14:32:40 -05:00
Jack Nagel
a31fcb554c Move SoftwareSpec to a separate file 2013-09-14 10:16:52 -05:00
Jack Nagel
adceeb52f6 Stop exposing the download strategy from Formula 2013-09-13 22:33:46 -05:00
Jack Nagel
320356236d head DSL can accept a block 2013-09-13 11:13:12 -05:00
Jack Nagel
448ce26980 Use SoftwareSpec directly when using a stable block 2013-09-12 19:43:22 -05:00
Adam Vandenberg
d4cf3ef212 Implement Resources
Closes Homebrew/homebrew#20212.
2013-09-11 22:05:26 -07:00
Jack Nagel
771a28427c Use block-form of File.open and let Ruby do the cleanup 2013-09-07 10:22:58 -05:00
Jack Nagel
8b2a8d0595 ARGV.verbose? is always false here 2013-09-07 10:22:11 -05:00
Mike McQuaid
ab20ed0bc2 Optionally use git to keep brew etc versioned.
Still in alpha state.
Handles defaults and merging changes with new versions.
Enable by setting the HOMEBREW_GIT_ETC environment variable.

Closes Homebrew/homebrew#15751.
Closes Homebrew/homebrew#17713.
2013-09-07 13:39:43 +01:00
Jack Nagel
a1f165c02d Fix file descriptor leak in Formula#system 2013-09-06 23:17:50 -05:00
Xiyue Deng
45d5471a43 Enable verbose compile command in create template.
* Add "--disable-silent-rules" option to autotools-based configure
  options.
  - Also add comments to notify user removing unrecognized configure
    options.
* Add "-DCMAKE_VERBOSE_MAKEFILE=ON" to cmake-based configure options.
2013-09-06 17:59:58 -07:00
Samuel John
59a0c1e1b5 Improve python tests for brew bots
Allow `build.with?` and similar methods to be used during the test
phase. The BuildOptions (`build`) are initialized with the
`Tab.used_options` unless explicitly overwritten on the command line.

So basically `build.with?` works in `def install` and in `test do` as
one would naively expect. (For the test, gramatically it should be
`built.with?` but who cares)

If a formula was installed `--with-python`, now the tests are also
run `--with-python`. This enables us to use the `python do ... end` in
a meaningful manner.

Using `python do ... end` blocks for the tests, because the bot.brew.sh has
system python per default and we need to set the PYTHONPATH for the test.
Potentially to different values for Python 2.x and 3.x.
2013-09-05 15:26:57 +02:00
Misty De Meo
922a4f1b77 Formula: record full path to non-core formula
If a formula is passed with a relative path, the build process might
try to expand it in the wrong directory, where it doesn't exist.

Fixes Homebrew/homebrew#22266.
2013-09-02 10:01:36 -07:00
Misty De Meo
ef1d9c0cd0 Implement fails_with for non-Apple compilers
This adds support for non-Apple GCC compilers in the fails_with code.
A fails_with block for a non-Apple compiler looks like:

fails_with :gcc => '4.8.1' do
  cause 'Foo'
end

Non-Apple compilers don't have build numbers, so compiler failures are
based on version strings instead.

Internally non-Apple compilers can be distinguished because they are
passed around as strings instead of symbols.

In addition, this alters the priority list for compilers, with the
following changes:

* Apple GCC 4.2 and LLVM-GCC swap positions, with GCC now taking
  priority. (Maybe LLVM-GCC should just go away.)
* Non-Apple GCC compilers are ranked below GCC 4.2 but above LLVM-GCC
  and Apple GCC 4.0.
2013-09-01 13:19:13 -07:00
Jack Nagel
0c75f2d280 Push dependency option generation into BuildOptions 2013-08-31 16:16:54 -05:00
Dan Hughes
51d1a8e3c5 Use system path for more tools, for Linux compat.
Closes Homebrew/homebrew#22196.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-30 13:02:19 -07:00
Jack Nagel
b3f0b9f7b9 Allow conflicts_with to accept multiple formula names
Closes Homebrew/homebrew#22202.
2013-08-29 19:08:15 -05:00
Samuel John
e38dd0b764 Don't consider files in the Cellar as Racks
Otherwiese a `Cellar/.DS_Store` may lead to an error about
`.ds_store.rb` not found during `brew upgrade`.
2013-08-28 09:35:11 +02:00
Jack Nagel
db1075fdc7 Use ENV.update to restore removed variables 2013-08-20 18:51:11 -05:00
Jack Nagel
14dd61fc87 Check that the cellar exists in Formula.installed
Fixes Homebrew/homebrew#21741.
2013-08-10 19:56:29 -05:00
Samuel John
81468054e0 Don't hard-code PYTHONPATH for brew test
This rules out any possibility to test Python 3.x software as the
PYTHONPATH is used by any Python and `brew test pyqt --with-python3`
fails because it picks up the `pyqt` module fomr Python 2.x's
site-packages. Upstream tells us not to set the PYTHONPATH and then
starting another (major) python version.
2013-08-08 11:57:51 +02:00
Samuel John
5bb82e3071 Improve docs for Formula#python (python_helper) 2013-08-08 11:55:45 +02:00
Mike McQuaid
e3a7260c1a Formula: temporarily set PYTHONPATH.
Needs a less hacky fix but at least this will stop failing tests.
2013-07-18 09:56:55 -07:00
Jack Nagel
c8e79c3309 Move inreplace off of Object
Closes Homebrew/homebrew#21163.
2013-07-12 16:23:06 -05:00
Jack Nagel
5b75c73df6 Do this in a saner way 2013-06-29 21:36:04 -05:00
Adam Vandenberg
099a62c95b Move Formula.factory into new Formulary module 2013-06-29 16:44:44 -07:00
Adam Vandenberg
3654822f77 Add TODO to canonical_name 2013-06-29 09:40:54 -07:00
Adam Vandenberg
a6777838d4 Pass strings to factory 2013-06-29 09:38:57 -07:00
Jack Nagel
0d35455820 Formula.each: note why import failed
Refs Homebrew/homebrew#20819.
2013-06-26 13:02:48 -05:00
Adam Vandenberg
1a72c85a05 Use 'path or URL' as tap for non-tap, non-core formulae 2013-06-24 07:33:37 -07:00
Adam Vandenberg
b9b1dfb9a6 Show tap/path for non-core formulae on build failure
Closes Homebrew/homebrew#16373.
Closes Homebrew/homebrew#20725.
2013-06-24 07:33:29 -07:00
Adam Vandenberg
9903e7cd92 Remove unused guard in canonical_name
Closes Homebrew/homebrew#20718.
2013-06-23 18:44:10 -07:00
Adam Vandenberg
66fc5fa48a document canonical name and move vars down to usage
Closes Homebrew/homebrew#20719.
2013-06-23 18:42:18 -07:00
Jack Nagel
3ab28ff9ad Remove unused accessor 2013-06-20 16:37:34 -05:00
Jack Nagel
d8756075f4 Use a Set for skip_clean_paths 2013-06-20 16:25:59 -05:00
Jack Nagel
7cdf400762 Splatted parameter is always an array 2013-06-20 16:22:55 -05:00
Mike McQuaid
a783946b6d Formula: improve local bottle failure messaging. 2013-06-20 13:07:43 +01:00
Jack Nagel
a1e30cdd3a Update Formula#to_hash for tweaked conflicts implementation 2013-06-09 15:20:36 -05:00
Jack Nagel
8b9a3a560f Separate formula conflicts from requirements
Closes Homebrew/homebrew#20357.
2013-06-09 13:45:25 -05:00
Jack Nagel
bae36f0830 Make Test::Unit assertions available in formula tests
Closes Homebrew/homebrew#18753.
Closes Homebrew/homebrew#20358.
2013-06-08 21:31:44 -05:00
Adam Vandenberg
fb83fc7bc4 Add class name to method_added error 2013-06-06 16:41:26 -07:00
Jack Nagel
856cebd9b4 Use ivar accessors 2013-06-06 12:10:41 -05:00
Samuel John
1c95045033 Hotfix: Revert Python module 2013-06-06 13:18:32 +02:00
Samuel John
4e8aa8637f PythonInstalled: Don't require superenv
* The python do ... end block does no longer
  require 'superenv' but saves and restores
  the ENV by using ENV.to_hash and `ensure`.
  This should resolve some build problems
  with formulae using `env :std`!
* `python_helper` is now in a module `Python`.
* Imporoved some comments in python_dependency.rb
2013-06-06 12:33:28 +02:00
Adam Vandenberg
3e5ac7e55c Consolidate formula visibility blocks
Closes Homebrew/homebrew#20261.
2013-06-05 09:48:12 -07:00
Jack Nagel
b97b013fce Extract attr_rw from Formula for reuse
Closes Homebrew/homebrew#20239.
2013-06-04 11:06:18 -05:00
Jack Nagel
ef0920e01d Remove unnecessary use of instance_eval 2013-06-03 17:03:09 -05:00