When a requirement is specified like:
satisfy { which "foo" }
There is no reason that we should inject all of ENV.userpaths! into the
build environment. Instead, infer the directory to be added to PATH from
the Pathname that is returned.
This is another step towards condensing the "which program" requirements
down into a one-liner DSL element.
apr-util will add a linkage to sqlite, even though serf doesn't use it
(from what I can tell). But when serf is linked with subversion, they
need to reference the same sqlite or bad things happen.
Closes#17172.
As nzbget was the only formula using libpar2, have changed it into a subformula that gets installed to nzbget's libexec. Also added patches to libpar2 from nzbget, as libpar2 upstream hasn't had any activity in years. The patches are bugfixes and add the ability to cancel par2 repair. They are required for the latest nzbget.
Have moved from gnutls to openssl for nzbget, as gnutls was causing issues, and wasn't necessary when OS X provides openssl. Have tested with openssl, no issues found, and no errors that gnutls was exhibiting.
Closes#17251.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Instead of overriding #satisfied?, Requirement subclasses can specify
the condition in a block:
satisfy do
some_condition?
end
The contents of the block are evaluated in the context of the instance,
and so have access to instance variables and instance methods as before.
Additionally, it is wrapped in an ENV.with_build_environment block. This
can be disabled by passing :build_env => false to satisfy:
satisfy :build_env => false do
some_condition?
end
Not thread safe! But I don't think we care.
We want to evaluate the env DSL block in the context of ENV for asthetic
reasons, but we also want access to methods on the requirement instance.
We can use #instance_exec to pass the requirement itself into the block:
class Foo < Requirement
env do |req|
append 'PATH', req.some_path
end
def some_path
which 'something'
end
end
Also add a simplified version of Object#instance_exec for Ruby 1.8.6.
Adding GnuTLS 2.x
GnuTLS 3.x changed the API slightly, but also changes license terms,
so it is unlikely that some software will update to newer versions.
Closes#17109.