aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build_options.rb
AgeCommit message (Collapse)Author
2014-10-09Tab#with? accepts the same types as BuildOptions#with?Jack Nagel
2014-08-16Remove the universal accessor from BuildOptionsJack Nagel
BuildOptions is now immutable (finally).
2014-08-13Options is no longer used directly by BuildOptionsJack Nagel
2014-08-13Set methods on Options already return Options instancesJack Nagel
2014-08-13Always pass an Options instance to the BuildOptions constructorJack Nagel
2014-08-13Revert "Always pass an Options instance to the BuildOptions constructor"Mike McQuaid
This reverts commit e143bcef259ca76b2124e6e73bd9bdf872418723. Closes #31557. Closes #31559. Closes #31561. Closes #31562.
2014-08-13Revert "Set methods on Options already return Options instances"Mike McQuaid
This reverts commit 4d1464c246861f7aedc355cb5f6360370d05114e.
2014-08-13Revert "Options is no longer used directly by BuildOptions"Mike McQuaid
This reverts commit 1c05bc0238aa1abf7d5542b8afa11ead2bee66a8.
2014-08-12Options is no longer used directly by BuildOptionsJack Nagel
2014-08-12Set methods on Options already return Options instancesJack Nagel
2014-08-12Always pass an Options instance to the BuildOptions constructorJack Nagel
2014-08-11Deep copies of the build object are no longer neededJack Nagel
2014-08-11Replace the build object rather than mutate itJack Nagel
2014-08-10Stop exposing defined options from the build objectJack Nagel
2014-08-10Disconnect defined options from the build objectJack Nagel
2014-08-09Stop duping options when duping the build objectJack Nagel
The options collection cannot be mutated from the build object, so it can be shared among copies safely.
2014-08-07Move management of options collection to the spec objectJack Nagel
2014-08-07Spell out the empty string instead of calling to_s on nilJack Nagel
2014-08-07Remove a defensive to_s callJack Nagel
This method is only used internally and we always pass strings.
2014-08-07Remove default argumentJack Nagel
This method is called in two places, always with two arguments.
2014-07-31Hide the options data structure betterJack Nagel
2014-07-31Make options available on the spec objectsJack Nagel
2014-07-31Reduce direct accesses of the args collectionJack Nagel
2014-07-30Remove confusing implicit options handlingJack Nagel
This code is supposed to allow depends_on "foo" => "with-bar" to work when foo has only a "without-bar" option. The options system was not designed to support this. Unfortunately, it was bolted on anyway. The implementation is extremely difficult to understand, and it only works for certain types of options, which is confusing from a user's point of view. Luckily, no formulae in core or the official taps rely on the behavior in order to function. It is hindering progress in improving this code, so I am removing it.
2014-07-30Remove unused accessorJack Nagel
2014-02-28Use Dependency#option_name in BuildOptions#add_dep_optionJack Nagel
2013-12-09Ensure option names are consistent for default formula requirementsJack Nagel
2013-12-05Fix typoJack Nagel
2013-12-05Only coerce to Option when neededJack Nagel
Fixes #24833.
2013-10-26C++11 support.Xiyue Deng
* 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 #22453.
2013-10-08BuildOptions: detect if building a bottle.Mike McQuaid
2013-09-21Allow explicitly requiring universal depsJack Nagel
Previously, instructing Homebrew that all dependencies should be built universal could be accomplished by redefining BuildOptions#universal? in the class body: def build.universal? true end However, the build object is no longer shared by all specs, so this is insufficient. Instead, a new DSL method, "require_universal_deps", can be used. This feature is almost exclusively for wine, which requires universal deps but does not itself have a universal option, since it is always built 32-bit.
2013-09-14Copies of BuildOptions should not share underlying collectionsJack Nagel
2013-09-05Fix breakage in option recognitionJack Nagel
Fixes #22347.
2013-09-05Improve python tests for brew botsSamuel John
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-08-31Push dependency option generation into BuildOptionsJack Nagel
2013-07-09fix comment typoAdam Vandenberg
2013-06-03Python 2.x and 3.x supportSamuel John
New `depends_on :python` Dependency. New `depends_on :python3` Dependency. To avoid having multiple formulae with endings -py2 and -py3, we will handle support for different pythons (2.x vs. 3.x) in the same formula. Further brewed vs. external python will be transparently supported. The formula also gets a new object `python`, which is false if no Python is available or the user has disabled it. Otherwise it is defined and provides several support methods: python.site_packages # the site-packages in the formula's Cellar python.global_site_packages python.binary # the full path to the python binary python.prefix python.version python.version.major python.version.minor python.xy # => e.g. "python2.7" python.incdir # includes of python python.libdir # the python dylib library python.pkg_config_path # used internally by brew python.from_osx? python.framework? python.universal? python.pypy? python.standard_caveats # Text to set PYTHONPATH for python.from_osx? python.if3then3 # => "" for 2.x and to "3" for 3.x. Further, to avoid code duplication, `python` takes an optional block that is run twice if the formula defines depends_on :python AND :python3. python do system python, 'setup.py', "--prefix=#{prefix}" end Read more in the Homebrew wiki.
2013-01-26FormulaInstaller: construct new ARGV from an Options collectionJack Nagel
The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well.
2013-01-26FormulaInstaller: allow formulae to pass options to depsJack Nagel
Formulae can now pass build options to dependencies. The following syntax is supported: depends_on 'foo' => 'with-bar' depends_on 'foo' => ['with-bar', 'with-baz'] If a dependency is already installed but lacks the required build options, an exception is raised. Eventually we may be able to just stash the existing keg and reinstall it with the combined set of used_options and passed options, but enabling that is left for another day.
2013-01-26Add support for optional and recommended depsAdam Vandenberg
Optional deps are not installed by default but generate a corresponding "with-foo" option for the formula. Recommended deps _are_ installed by default, and generate a corresponding "without-foo" option.
2013-01-26Move BuildOptions to a separate fileJack Nagel