Add conflicts_with DSL method
conflicts_with is a thin wrapper around Requirement which simplifies marking conflicts between formulae. Closes Homebrew/homebrew#13687. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
parent
d4d244da6e
commit
596476ad78
7 changed files with 29 additions and 22 deletions
|
@ -1,14 +1,17 @@
|
|||
require 'formula'
|
||||
|
||||
class Mariadb < Formula
|
||||
# You probably don't want to have this and MySQL's formula linked at the same time
|
||||
# Just saying.
|
||||
url 'http://ftp.osuosl.org/pub/mariadb/mariadb-5.3.7/kvm-tarbake-jaunty-x86/mariadb-5.3.7.tar.gz'
|
||||
homepage 'http://mariadb.org/'
|
||||
sha1 '1ee2ef4895aefabd66b4884c382ba2cd1f7bbe2d'
|
||||
|
||||
depends_on 'readline'
|
||||
|
||||
conflicts_with 'mysql',
|
||||
:because => "mariadb and mysql install the same binaries."
|
||||
conflicts_with 'percona-server',
|
||||
:because => "mariadb and percona-server install the same binaries."
|
||||
|
||||
fails_with :clang do
|
||||
build 318
|
||||
end
|
||||
|
|
|
@ -10,6 +10,11 @@ class Mysql < Formula
|
|||
depends_on 'readline'
|
||||
depends_on 'pidof'
|
||||
|
||||
conflicts_with 'mariadb',
|
||||
:because => "mysql and mariadb install the same binaries."
|
||||
conflicts_with 'percona-server',
|
||||
:because => "mysql and percona-server install the same binaries."
|
||||
|
||||
fails_with :llvm do
|
||||
build 2326
|
||||
cause "https://github.com/mxcl/homebrew/issues/issue/144"
|
||||
|
|
|
@ -5,6 +5,9 @@ class Par2 < Formula
|
|||
url 'http://downloads.sourceforge.net/project/parchive/par2cmdline/0.4/par2cmdline-0.4.tar.gz'
|
||||
sha1 '2fcdc932b5d7b4b1c68c4a4ca855ca913d464d2f'
|
||||
|
||||
conflicts_with "par2tbb",
|
||||
:because => "par2 and par2tbb install the same binaries."
|
||||
|
||||
def patches
|
||||
"http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch?revision=1.1"
|
||||
end
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
require 'formula'
|
||||
|
||||
class Par2tbb < Formula
|
||||
url 'http://chuchusoft.com/par2_tbb/par2cmdline-0.4-tbb-20100203.tar.gz'
|
||||
homepage 'http://chuchusoft.com/par2_tbb/'
|
||||
md5 'b1052a08c3c6eac8a7a0605addb161e7'
|
||||
url 'http://chuchusoft.com/par2_tbb/par2cmdline-0.4-tbb-20100203.tar.gz'
|
||||
sha1 '2fcdc932b5d7b4b1c68c4a4ca855ca913d464d2f'
|
||||
|
||||
depends_on 'tbb'
|
||||
|
||||
conficts_with "par2",
|
||||
:because "par2tbb and par2 install the same binaries."
|
||||
|
||||
fails_with :clang do
|
||||
build 318
|
||||
end
|
||||
|
@ -21,11 +24,6 @@ class Par2tbb < Formula
|
|||
# but only 10.6+ are available on Xcode4
|
||||
inreplace 'Makefile.am', /^.*-mmacosx-version.*$/, ''
|
||||
|
||||
if Formula.factory('par2').installed?
|
||||
opoo "par2tbb conflicts with par2. Your par2 binaries will be overwritten.
|
||||
If this bothers you, you can restore par2 with `brew link par2`."
|
||||
end
|
||||
|
||||
host_triplet = MacOS.prefer_64_bit? ? "x86_64-apple-darwin11" : "i686-apple-darwin11"
|
||||
|
||||
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
||||
|
@ -34,12 +32,6 @@ class Par2tbb < Formula
|
|||
system "make install"
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<-EOS.undent
|
||||
par2tbb is a modified fork of par2 and conflicts with its binaries.
|
||||
EOS
|
||||
end
|
||||
|
||||
def test
|
||||
system "#{bin}/par2"
|
||||
end
|
||||
|
|
|
@ -6,12 +6,15 @@ class PerconaServer < Formula
|
|||
version '5.5.25-27.1'
|
||||
sha1 'f3388960311b159e46efd305ecdeb806fe2c7fdc'
|
||||
|
||||
keg_only "This brew conflicts with 'mysql'. It's safe to `brew link` if you haven't installed 'mysql'"
|
||||
|
||||
depends_on 'cmake' => :build
|
||||
depends_on 'readline'
|
||||
depends_on 'pidof'
|
||||
|
||||
conflicts_with 'mysql',
|
||||
:because => "percona-server and mysql install the same binaries."
|
||||
conflicts_with 'mariadb',
|
||||
:because => "percona-server and mariadb install the same binaries."
|
||||
|
||||
skip_clean :all # So "INSTALL PLUGIN" can work.
|
||||
|
||||
fails_with :llvm do
|
||||
|
|
|
@ -5,12 +5,10 @@ class Rarian < Formula
|
|||
url 'http://rarian.freedesktop.org/Releases/rarian-0.8.1.tar.bz2'
|
||||
md5 '75091185e13da67a0ff4279de1757b94'
|
||||
|
||||
def install
|
||||
if Formula.factory('scrollkeeper').installed?
|
||||
opoo "rarian conflicts with scrollkeeper. Your scrollkeeper binaries will be overwritten.
|
||||
If this bothers you, you can restore scrollkeeper with `brew link scrollkeeper`."
|
||||
end
|
||||
conflicts_with 'scrollkeeper',
|
||||
:because => "rarian and scrollkeeper install the same binaries."
|
||||
|
||||
def install
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}"
|
||||
system "make install"
|
||||
|
|
|
@ -8,6 +8,9 @@ class Scrollkeeper < Formula
|
|||
depends_on 'gettext'
|
||||
depends_on 'docbook'
|
||||
|
||||
conflicts_with 'rarian',
|
||||
:because => "scrollkeeper and rarian install the same binaries."
|
||||
|
||||
def install
|
||||
system "./configure", "--prefix=#{prefix}",
|
||||
"--mandir=#{man}",
|
||||
|
|
Loading…
Reference in a new issue