blob: 7dfd83f298c0565815bc9f0893f5d5554eadd6e5 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | require "requirement"
class AprDependency < Requirement
  fatal true
  default_formula "apr-util"
  satisfy { MacOS::CLT.installed? }
  env do
    unless MacOS::CLT.installed?
      ENV.prepend_path "PATH", Formula["apr-util"].opt_bin
      ENV.prepend_path "PATH", Formula["apr"].opt_bin
      ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr"].opt_libexec}/lib/pkgconfig"
      ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig"
    end
  end
  def to_dependency
    super.extend Module.new {
      def tags
        super - [:build]
      end
    }
  end
end
 |