aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorPetr Tichý2014-08-19 14:40:44 +0200
committerMike McQuaid2014-08-26 17:50:11 +0100
commit5c8c02fbe73566dd4e17908167098a70c1dca8bd (patch)
tree20d6f1d7de4cf0a0f5b3a7d703dab8f870c2a123 /Library/Formula
parent569a52749f2290fb508bcb2e541cd57be744dc50 (diff)
downloadhomebrew-5c8c02fbe73566dd4e17908167098a70c1dca8bd.tar.bz2
moreutils: add --without-parallel option
Allows moreutils to coexist with 'parallel' formula
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/moreutils.rb12
-rw-r--r--Library/Formula/parallel.rb2
2 files changed, 11 insertions, 3 deletions
diff --git a/Library/Formula/moreutils.rb b/Library/Formula/moreutils.rb
index 7a7bd3662..fd1247eb6 100644
--- a/Library/Formula/moreutils.rb
+++ b/Library/Formula/moreutils.rb
@@ -15,8 +15,12 @@ class Moreutils < Formula
depends_on "docbook-xsl" => :build
- conflicts_with 'parallel',
- :because => "both install a 'parallel' executable."
+ option "without-parallel", "Omit the 'parallel' tool. Allows installation of GNU parallel from 'parallel' formula."
+
+ if build.with? "parallel"
+ conflicts_with "parallel",
+ :because => "both install a 'parallel' executable. See the '--without-parallel' option"
+ end
conflicts_with 'task-spooler',
:because => "both install a 'ts' executable."
@@ -49,6 +53,10 @@ class Moreutils < Formula
inreplace "Makefile",
"/usr/share/xml/docbook/stylesheet/docbook-xsl",
"#{Formula["docbook-xsl"].opt_prefix}/docbook-xsl"
+ if build.without? "parallel"
+ inreplace "Makefile", /^BINS=.*\Kparallel/, ""
+ inreplace "Makefile", /^MANS=.*\Kparallel\.1/, ""
+ end
system "make", "all"
system "make", "check"
system "make", "install", "PREFIX=#{prefix}"
diff --git a/Library/Formula/parallel.rb b/Library/Formula/parallel.rb
index cb29e55eb..fd864afce 100644
--- a/Library/Formula/parallel.rb
+++ b/Library/Formula/parallel.rb
@@ -7,7 +7,7 @@ class Parallel < Formula
sha256 "8a146a59bc71218921d561f2c801b85e06fe3a21571083b58e6e0966dd397fd4"
conflicts_with "moreutils",
- :because => "both install a 'parallel' executable."
+ :because => "both install a 'parallel' executable. See the --without-parallel option for 'moreutils'"
def install
system "./configure", "--prefix=#{prefix}"