Commit Graph
109 Commits
Author SHA1 Message Date
Mike McQuaid 4971855e9b software_spec: process macOS versions on Linux.
This module doesn't actually have any behaviour that's problematic at
runtime on Linux so we may as well use it to properly sort macOS
versions there.
2017-04-25 14:34:27 +01:00
Mike McQuaid ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Mike McQuaid f98304026b Deprecate 32-bit options.
These were formerly supported but as it has been a very long time since
32-bit software was necessary on macOS these have been deprecated with
a `brew audit` warning and a future `odeprecated`.
2016-12-20 10:22:30 +00:00
Mike McQuaid cf1fa0c5bc audit: flag use of "fails_with :llvm".
Also, add TODOs for deprecating this properly at a later point.
2016-12-13 02:10:11 +00:00
Shaun Jackman 8a3481ee1d Do not remove unknown bottle tags 2016-11-23 10:36:09 -08:00
Mike McQuaid 1f6c26a2e4 software_spec: no _or_later in bottle filenames.
It's more useful to be able to "bless" an existing bottle to be used on
later OSs (e.g. where it cannot yet be built) than it is to have to
create a new, identical bottle just to have a different filename.
2016-11-05 16:13:42 -04:00
Markus Reiter e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Markus Reiter 23eac7ab89 Fix DoubleNegation. 2016-09-23 15:30:06 +02:00
Markus Reiter 52ff988530 Fix RuboCop CaseEquality. 2016-09-23 15:30:06 +02:00
Mike McQuaid 3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid 1bdbb0f462 Improve rescue nesting. 2016-09-17 17:01:04 +01:00
Mike McQuaid 6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Mike McQuaid 27ecf588c7 Rename bottle's revision to rebuild. 2016-08-18 17:32:35 +01:00
Xu ChengandGitHub a8566c9848 various: eliminate the usage of any? (#638)
`any?` is not the opposite of `empty?`. Besides the case that
`[false, nil].any?` will return false, `any?`(O(n)) has much worse
performance than `empty?`(O(1)).
2016-08-05 22:01:32 +08:00
Uladzislau ShablinskiandXu Cheng 242508fca4 software_spec: use version dups for resources (#534)
Also prevent the commit of formula's HeadVersion from passing to the resource. 

This is a fix of #531
2016-07-17 04:49:32 +08:00
Vlad ShablinskyandXu Cheng 3fb5d70a72 Unify Version.create usage
Substitue each Version.new and HeadVersion.new with Version.create
to unify Version and HeadVersion instantiation among core code.

Note that this does not relate to Mac::OS::Version class.
2016-07-16 20:39:13 +08:00
Vlad ShablinskyandXu Cheng 2e916110e4 Use HeadVersion for install/reinstall 2016-07-16 20:39:13 +08:00
Mike McQuaid 931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00
Andrew Janke 094f6f47dd Formula: include bad value in invalid-option error message
Makes identifying which line in a formula has the bad use of 'option' easier.

Closes #120.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 15:21:44 -04:00
Xu Cheng 478f18a8f5 software_spec: add ExternalPatch to dependency_collector
Since we support `apply` DSL in the `patch` block, external
patch files could be any compressed archive. As result, it
could introduce dependencies like xz, 7z etc.

Add the resource of ExternalPatch to dependency_collector, so
we could track these resource dependencies.

Closes Homebrew/homebrew#50318.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-22 19:44:16 +08:00
Mike McQuaid 26ec9f9ea0 formula: add new pour_bottle DSL with reason.
This allows there to be a user-visible description of why a bottle is
not being installed.
2016-02-18 10:21:20 +00:00
Mike McQuaid 74858b28c5 software_spec: add new bottle check class. 2016-02-18 10:21:20 +00:00
Xu Cheng 6c8c56a689 build: store source modified time in tabfile 2016-01-15 16:26:04 +08:00
Mike McQuaid e5ba31fcdc Allow multiple option_names in dep/reqs.
This means that dependencies can be merged but still maintain all
their option names.

Closes Homebrew/homebrew#46916.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-15 08:37:16 +00:00
Xu ChengandMike McQuaid ff9fdc078f add Formula#bottle_defined? 2015-11-01 08:22:18 -08:00
Xu Cheng b5032ad2cb Formula: add bottle disable DSL 2015-10-19 21:41:36 +08:00
William WoodruffandMisty De Meo 8793a68ee4 Add no-Xcode documentation for all classes, methods 2015-08-21 11:02:33 -07:00
William WoodruffandMisty De Meo 1face808f5 Add guards to calls that would trigger Xcode install requests
add guard in Formula#file_modified? to prevent git popup

add guard in Superenv.bin before calling MacOS::Xcode.version

add guard against missing Xcode/CLT in Xcode.uncached_version

return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior

checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well

needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation

MacOS.can_build? becomes MacOS.has_apple_developer_tools?
2015-08-21 11:02:33 -07:00
William WoodruffandMisty De Meo ab10ab42fa BottleSpecification: add does_not_need_relocation field
Toggled with does_not_need_relocation method in bottle block.
Also declare needs_relocation? accessors in software/bottle specs.
2015-08-21 10:56:23 -07:00
BrewTestBotandMike McQuaid 13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng ab9a62370f support downloading bottles through 3rd-party mirror
Closes Homebrew/homebrew#41328.

Closes Homebrew/homebrew#41332.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-06 18:05:00 +08:00
Xu Cheng 024c2d508b auto resolve bottle root_url based on tap 2015-07-06 18:04:59 +08:00
Xu Cheng 10bc99ff7b SoftwareSpec: add full_name field 2015-05-29 17:01:53 +08:00
Tim D. Smith 5a0ec0c491 add SoftwareSpec#go_resource
by analogy to similar code in formula.rb.

Permits Homebrew/homebrew#37877. Closes Homebrew/homebrew#38330.
2015-04-06 20:26:52 -07:00
Xu Cheng c46e2dc196 software_spec: ignore bottles compatibility if --force-bottle is passed
Closes Homebrew/homebrew#38123.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-28 13:06:15 +08:00
Mike McQuaid 3933b84dea software_spec: check if bottles are compatible.
The `bottled?` method makes more sense when it also checks for
compatibility.

This is particularly useful for the case in `brew info` so it prints out
`(bottled)` correctly depending on the `Cellar`.

Closes Homebrew/homebrew#37636.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-17 09:16:57 +00:00
Mike McQuaid 17bfb0f804 Remove SourceForge references.
It was fun but we just love Bintray more than you.

Closes Homebrew/homebrew#37211.

Closes Homebrew/homebrew#37213.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-26 11:32:42 +00:00
Mike McQuaid 77d47de3b4 Switch bottle provider over to Bintray. 2015-02-19 16:57:30 +00:00
Mike McQuaid 635681401e software_spec: use homebrew Bintray subdomain.
Also: split into two variables so they can be used for taps.
2015-02-19 12:58:53 +00:00
Mike McQuaid 38f9a78c29 Add initial Bintray upload support. 2015-02-17 18:57:59 +00:00
Jack Nagel 0f01e9ff43 Remove the direct url writer from Resource 2015-01-08 14:18:41 -05:00
Mike McQuaid d0240e7cd4 formula: add spec deprecated_option DSL. 2014-10-19 13:58:52 +01:00
Mike McQuaid 02e10beb7c Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options
and flags accordingly.
2014-10-19 13:58:52 +01:00
Jack Nagel ae88549797 Remove fails_with? from the formula instance 2014-09-18 15:50:54 -05:00
Misty De Meo 4743fc1662 Add Go language module, resources
This introduces a new GoResource category of resource. GoResources
have a specialized stage method which allows a resource to stage
itself into a gopath.

The new Go language module provides a one-liner to stage all
GoResources present in the formula.
2014-09-01 19:56:43 -07:00
Jack Nagel b14851903c Add a method for retrieving only flags from ARGV 2014-08-29 19:38:32 -05:00
Jack Nagel 7adbb1ccb9 Single character options should not be used in a formula 2014-08-28 23:54:00 -05:00
Jack Nagel 023f02b90a Make fails_with available in spec blocks
Closes Homebrew/homebrew#31706.
2014-08-19 17:14:02 -05:00
Jack Nagel 268cd143be Replace Options.coerce with an alternate constructor 2014-08-13 11:09:57 -05:00
Jack Nagel c5a888fb3a Always pass an Options instance to the BuildOptions constructor 2014-08-13 11:09:57 -05:00