diff --git a/Formula/emacs.rb b/Formula/emacs.rb index 3f652540fe..9629d156b6 100644 --- a/Formula/emacs.rb +++ b/Formula/emacs.rb @@ -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"