aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorDominyk Tiller2015-03-23 01:58:50 +0000
committerMike McQuaid2015-03-23 15:34:17 +0000
commit01463d236fe25a8cccc49603c9a2d69524961649 (patch)
treeb0f55fc295d7ba2818f63a597f36c43a811d77a8 /Library/Formula
parent62970ad63fd385ac7277ac6711d5d9d64bd45f2c (diff)
downloadhomebrew-01463d236fe25a8cccc49603c9a2d69524961649.tar.bz2
collectd: don't presume /usr/local in plist
Re: https://github.com/Homebrew/homebrew/pull/37966#issuecomment-84656418 Closes #37984. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/collectd.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/Library/Formula/collectd.rb b/Library/Formula/collectd.rb
index 629896c1d..58d20919f 100644
--- a/Library/Formula/collectd.rb
+++ b/Library/Formula/collectd.rb
@@ -10,8 +10,11 @@ class Collectd < Formula
end
# Will fail against Java 1.7
- option "java", "Enable Java 1.6 support"
- option "debug", "Enable debug support"
+ option "with-java", "Enable Java 1.6 support"
+ option "with-debug", "Enable debug support"
+
+ deprecated_option "java" => "with-java"
+ deprecated_option "debug" => "with-debug"
head do
url "git://git.verplant.org/collectd.git"
@@ -22,6 +25,7 @@ class Collectd < Formula
end
depends_on "pkg-config" => :build
+ depends_on :java => ["1.6", :optional]
depends_on "openssl"
fails_with :clang do
@@ -41,8 +45,8 @@ class Collectd < Formula
]
args << "--disable-embedded-perl" if MacOS.version <= :leopard
- args << "--disable-java" unless build.include? "java"
- args << "--enable-debug" if build.include? "debug"
+ args << "--disable-java" if build.without? "java"
+ args << "--enable-debug" if build.with? "debug"
system "./build.sh" if build.head?
system "./configure", *args
@@ -68,9 +72,9 @@ class Collectd < Formula
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
- <string>/usr/local/var/log/collectd.log</string>
+ <string>#{var}/log/collectd.log</string>
<key>StandardOutPath</key>
- <string>/usr/local/var/log/collectd.log</string>
+ <string>#{var}/log/collectd.log</string>
</dict>
</plist>
EOS