Skip to content

Commit

Permalink
emacs: depend on imagemagick@6 instead of imagemagick (#10477)
Browse files Browse the repository at this point in the history
Fixes the --with-imagemagick option, which fails silently with ImageMagick 7.

Closes #10453.
  • Loading branch information
tchajed authored and ilovezfs committed Mar 4, 2017
1 parent 093b535 commit 1f02717
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Formula/emacs.rb
Expand Up @@ -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
Expand Down Expand Up @@ -70,7 +73,15 @@ def install
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"
Expand Down

0 comments on commit 1f02717

Please sign in to comment.