emacs: depend on imagemagick@6 instead of imagemagick (#10477)

Fixes the --with-imagemagick option, which fails silently with ImageMagick 7.

Closes #10453.
This commit is contained in:
Tej Chajed 2017-03-04 12:00:31 -05:00 committed by ilovezfs
parent 093b535ead
commit 1f027176d8

View file

@ -34,12 +34,15 @@ class Emacs < Formula
deprecated_option "cocoa" => "with-cocoa"
deprecated_option "keep-ctags" => "with-ctags"
deprecated_option "with-d-bus" => "with-dbus"
deprecated_option "imagemagick" => "imagemagick@6"
depends_on "pkg-config" => :build
depends_on "dbus" => :optional
depends_on "gnutls" => :optional
depends_on "librsvg" => :optional
depends_on "imagemagick" => :optional
# Emacs does not support ImageMagick 7:
# Reported on 2017-03-04: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25967
depends_on "imagemagick@6" => :optional
depends_on "mailutils" => :optional
def install
@ -70,7 +73,15 @@ class Emacs < Formula
args << "--without-gnutls"
end
args << "--with-imagemagick" if build.with? "imagemagick"
# Note that if ./configure is passed --with-imagemagick but can't find the
# library it does not fail but imagemagick support will not be available.
# See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24455
if build.with? "imagemagick@6"
args << "--with-imagemagick"
else
args << "--without-imagemagick"
end
args << "--with-modules" if build.with? "modules"
args << "--with-rsvg" if build.with? "librsvg"
args << "--without-pop" if build.with? "mailutils"