249 Commits

Author SHA1 Message Date
Dominyk Tiller
1591633888
gpg_requirement: add standalone requirement
GPG 1.x has stopped receiving new features, some of which we may well want to
take advantage of sooner or later in Homebrew. Upstream has also been attempting
to work out for a while how well used it still is which suggests it may "go away"
at some point in the future.

Debian is also in the process of migrating GnuPG 1.x to a `gpg1` executable
whilst GnuPG 2.1.x assumes the `gpg` executable. There's a detailed video
discussion of this from DebConf 2015 at:
http://meetings-archive.debian.net/pub/debian-meetings/2015/debconf15/GnuPG_in_Debian_report.webm

It's unsafe to assume every `gpg` executable is going to forever equal 1.x and
every `gpg2` executable is going to forever equal 2.x. MacGPG2 has been symlinking
2.x as a vanilla `gpg` for a while, for example, and we will be soon as well.

You'll still be able to plonk the `libexec/bin` path of `gpg` in your PATH to
access a vanilla `gpg` 1.x executable if you want to, but we're not going to
actively keep adding gpg1 support to formulae going forwards. There's really no
reason why 99.9% of projects should not or cannot use `gpg2` these days.

This uses detection methods to determine regardless of what the executable
is called we're always hitting a 2.0 GnuPG or nothing.
2016-08-13 03:33:33 +01:00
Vlad Shablinsky
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
Dominyk Tiller
3d06f883b9
osxfuse_requirement: update PKG_CONFIG_PATH 2016-07-15 21:25:02 +01:00
Mike McQuaid
a00995fa09 osxfuse_requirement: remove formula reference.
We’re just supporting the Cask now.
2016-07-11 09:05:40 +01:00
Mike McQuaid
f950261b99 tuntap_requirement: remove formula reference.
We’re just supporting the Cask now.
2016-07-11 09:05:40 +01:00
Mike McQuaid
388876c201 osxfuse_requirement: tweak formatting.
Nicer to split this onto two lines.
2016-07-11 09:05:40 +01:00
Mike McQuaid
5413ddcb65 tuntap_requirement: fix binary logic.
Previously this was only using the last line.
2016-07-11 09:05:40 +01:00
Dominyk Tiller
0926f920dc
osxfuse_requirement: fix website link 2016-06-30 17:33:59 +01:00
Dominyk Tiller
c5520d0050 languages: flag missing dependency requirement (#194)
This is in part designed to handle situations described in https://github.com/Homebrew/legacy-homebrew/issues/42273
where we tell someone to install a special dependency, but because we (rightly, IMO)
resolve special dependencies first users can end up being told to execute a command
on a tool that isn't yet installed and isn't immediately obvious how to install it.

In the situation raised there, with the `sile` formula people are being told to
`luarocks install xyz` but we hadn't installed Lua for them first, so they just
get a `command not found: luarocks` message. Perhaps it should be obvious enough
how to install said tools by looking at the formula's dependencies,
but it's not a huge burden on us to make life easier than that.

Shuffled over from https://github.com/Homebrew/legacy-homebrew/pull/42576.
2016-05-07 20:58:20 +01:00
Dominyk Tiller
e96bed6b6c perl_requirement: add 2016-05-03 18:52:40 +01:00
Xu Cheng
3972b900f3 JavaRequirement: use next instead of return in code block 2016-05-01 14:31:26 +08:00
Misty De Meo
c20622ade4 JavaRequirement: return false if no java_home
Closes #118.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2016-04-22 22:37:21 -07:00
Misty De Meo
6b8af260c2 subversion: don't use system APR on Tiger 2016-04-22 22:37:21 -07:00
Xu Cheng
15fe924484 RubyRequirement: check all available ruby
Closes Homebrew/homebrew#47605.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-03 21:00:11 +08:00
Misty De Meo
575b75fced LanguageModuleRequirement: remove jruby support 2016-01-01 20:10:34 -04:00
Misty De Meo
36cef3c974 LanguageModuleRequirement: remove node support 2016-01-01 20:10:34 -04:00
Misty De Meo
1ad2aeef86 LanguageModuleRequirement: remove chicken support 2016-01-01 20:10:34 -04:00
Misty De Meo
d4db443b19 LanguageModuleRequirement: remove rbx support
This test wasn't running by default, so we missed that it wasn't
actually being executed - or that it was failing when running in the
testing environment.

As far as I can tell this is not, and has not, been used either in core
or in any tap, third party or otherwise, so just remove the feature and
its test.
2016-01-01 20:10:34 -04:00
Dominyk Tiller
3a29a3cc93 maximum_macos_requirement: reword message
Closes Homebrew/homebrew#45658.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-11-04 05:25:10 +00:00
Xu Cheng
d7a479f551 JavaRequirement: check satisfaction directly
It made less sense to call a method `java_version` when it returns
boolean value.

Closes Homebrew/homebrew#45501.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-31 20:22:17 +08:00
Alex Dunn
e40e1b7ac7 emacs_requirement: set $EMACS
The Emacs shell sets $EMACS to "t" for detection purposes, but it causes
builds to fail when they attempt to call Emacs using the variable.

Fixes Homebrew/homebrew-emacs#30.

Closes Homebrew/homebrew#45495.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2015-10-30 20:17:42 -07:00
Alex Dunn
dd71d34bab emacs_requirement: allow no version
see Homebrew/homebrew-emacs#29

Closes Homebrew/homebrew#45426.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2015-10-28 19:43:17 -07:00
Tim D. Smith
c7d82a3881 env block is not inherited 2015-09-10 23:10:26 -07:00
Tim D. Smith
5997812ed2 Revert "python_requirement: fix ENV for python3"
This reverts commit 85271644b0083cbc0fd6fea71120d1ad859fbc2a.

Alex noticed that setting PYTHONPATH causes weirdness if we depend_on
something which may be optionally built --with-python3; PYTHONPATH
unexpectedly contains python3 modules in the depending formula if
the formula upon which it depends was built --with-python3 even
though the depending formula may only use python2.

Closes Homebrew/homebrew#43724. Closes Homebrew/homebrew#43744.
2015-09-10 23:10:26 -07:00
Alex Dunn
370df177c4 python_requirement: fix ENV for python3
Closes Homebrew/homebrew#43453.
2015-09-01 13:00:01 -07:00
Xu Cheng
01d7f4e766 remove Requirement#pour_bottle?
It's never used since a0a93f1b3b7b2be9b8a319be91086ffe220f8e32.

Closes Homebrew/homebrew#43462.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-01 19:19:13 +08:00
Dominyk Tiller
bef0c9f37f cctools_requirement: quotes nit 2015-08-21 19:29:07 +01:00
Misty De Meo
727239e12f Merge bottle install without Xcode branch
Merge branch 'bottle_hooks'
2015-08-21 11:04:22 -07:00
William Woodruff
8793a68ee4 Add no-Xcode documentation for all classes, methods 2015-08-21 11:02:33 -07:00
William Woodruff
b46d5de492 Requirements: add CctoolsRequirement
Install it as a dependency unless already satisfied by Xcode.

require cctools_requirement

cctools_requirement should be satisfied by cctools present in opt

add build_env => false to the satify block options in CctoolsRequirement
2015-08-21 10:57:20 -07:00
William Woodruff
dcc394c3f7 add cctools requirement 2015-08-21 10:56:46 -07:00
Misty De Meo
431f23db32 PythonRequirement: fix variable in PYTHONPATH 2015-08-10 07:32:02 -07:00
Misty De Meo
6b1ce9827e PythonRequirement: don't blindly use first Python in PATH
Fixes Homebrew/homebrew#42461.
2015-08-10 07:30:41 -07:00
Dominyk Tiller
3369c55dc6 languages: support both luas 2015-08-06 18:46:56 +01:00
BrewTestBot
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
Jack Nagel
27e184f543 Mark some requirements that don't need the build environment 2015-06-26 00:00:44 -04:00
Mike McQuaid
1e86730289 Rename requirements named *Dependency.
Dependency is another similar, related class and it's super confusing
to have some Requirements that are named *Dependency.

Closes Homebrew/homebrew#38891.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-16 08:12:01 +01:00
Xu Cheng
73277e71b1 RubyRequirement: clean up
1. Remove dead code (RubyRequirement always has a version)
2. Perfer `Utils.popen_read` instead of backticks.
2015-05-08 14:41:38 +08:00
Alex Dunn
dba9675ed3 add EmacsRequirement
Closes Homebrew/homebrew#39326.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-08 14:37:15 +08:00
Mike McQuaid
a76a6b2a9b ruby_requirement: add/fix default_formula. 2015-04-27 14:07:04 +01:00
Mike McQuaid
305ced5360 Add RubyRequirement. 2015-04-21 09:33:41 +01:00
Tim D. Smith
c803b3d967 FortranDependency: make sure gfortran ends up in PATH
Per requirements.rb:

    >  XXX If the satisfy block returns a Pathname, then make sure that it
    >  remains available on the PATH. This makes requirements like
    >    satisfy { which("executable") }
    >  work, even under superenv where "executable" wouldn't normally be on the
    >  PATH.
    >  This is undocumented magic and it should be removed, but we need to add
    >  a way to declare path-based requirements that work with superenv first.

Fixes homebrew/homebrew-python#170.

Closes Homebrew/homebrew#38448.
2015-04-08 09:01:23 -07:00
Jack Nagel
4d5c152666 Remove unnecessary nil check
The backticks will either return a string or raise an exception, so
`executable` cannot be nil.
2015-03-05 20:48:47 -05:00
Jack Nagel
db772eee8a Use env DSL 2015-03-05 20:39:57 -05:00
Xu Cheng
2222834107 java: move java_dependency into a separate file and add Language::Java.java_home_env
Also update activemq to test against it

Closes Homebrew/homebrew#37218.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-02-28 01:42:09 +08:00
Xu Cheng
cf3ee4546f add inspect to Requirement subclass
Closes Homebrew/homebrew#37116.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-02-24 01:39:53 +08:00
Jack Nagel
291e900abc AprRequirement should not generate a build-time dependency
We want the apr requirement to act as a build-time requirement in case
it is satisfied (that is, the CLT is installed), as the resulting
binaries will link to the system libapr which is always present.

When it is *not* satisfied by the CLT, and we need to install the
formula, we have to treat it as a runtime dependency since the resulting
binaries will link to it.

Fixes Homebrew/homebrew#36301.
Fixes Homebrew/homebrew#36438.
Closes Homebrew/homebrew#36443.
2015-02-02 00:39:04 -05:00
Jack Nagel
208bc0516b AprRequirement should not short-circuit if apr is installed
If apr is installed, we still want to grab it during dependency
resolution in case we need to pass options to the generated dependency.

In other words, it doesn't make sense for the satisfiable condition to
include the default formula, as the default formula is the fallback for
when the requirement is *not* satisfied.
2015-02-02 00:39:04 -05:00
Jack Nagel
d362f5a2fb Remove message that is never displayed
Requirements with default formulae cannot fail the build.
2015-02-02 00:39:04 -05:00
Jack Nagel
12e4602a3b AprRequirement's default formula should be apr-util
This matches the recommendation in the message.
2015-02-02 00:39:04 -05:00