aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2010-09-21 21:25:33 -0700
committerAdam Vandenberg2010-09-21 21:28:29 -0700
commit57cd2dc5abb4a9db6519023e5806dd212f0a39d5 (patch)
tree85cfae4893e6ae4b886dcdd6d5f26b56019ef404 /Library/Formula
parent8f5d3af6628c16e913d9b2a3fd96f00c62833823 (diff)
downloadhomebrew-57cd2dc5abb4a9db6519023e5806dd212f0a39d5.tar.bz2
ImageMagick - use svn repo instead of tarballs
The ImageMagick mirrors like to drop old tarballs, which means that our formula breaks whenever the version we're using disappears. So I've switched to using their SVN repo (and added a --HEAD build.) Caveat: Their SVN repo is only served over https, with a bad cert, so this brew know has a custom SVN download strategy that auto-accepts that cert. If this bothers you, get ImageMagick to fix their cert upstream (or let us know where a stable tarball mirror lives.)
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/imagemagick.rb40
1 files changed, 33 insertions, 7 deletions
diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb
index 8c11d6895..eb22e0274 100644
--- a/Library/Formula/imagemagick.rb
+++ b/Library/Formula/imagemagick.rb
@@ -1,6 +1,12 @@
# some credit to http://github.com/maddox/magick-installer
require 'formula'
+class UnsafeSvn <SubversionDownloadStrategy
+ def _fetch_command svncommand, url, target
+ [svn, '--non-interactive', '--trust-server-cert', svncommand, '--force', url, target]
+ end
+end
+
def ghostscript_srsly?
ARGV.include? '--with-ghostscript'
end
@@ -24,10 +30,14 @@ def x11?
end
class Imagemagick <Formula
- url 'ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.4-2.tar.bz2'
- md5 'a7e9bbbc84fee362e04bb7c32ea46689'
+ url 'https://www.imagemagick.org/subversion/ImageMagick/trunk',
+ :using => UnsafeSvn, :revision => '2715'
+ version '6.6.4-5'
homepage 'http://www.imagemagick.org'
+ head 'https://www.imagemagick.org/subversion/ImageMagick/trunk',
+ :using => UnsafeSvn
+
depends_on 'jpeg'
depends_on 'libpng' unless x11?
@@ -80,11 +90,27 @@ class Imagemagick <Formula
end
def caveats
- s = ""
- s += "You don't have X11 from the Xcode DMG installed. Consequently Imagemagick is less fully featured.\n" unless x11?
- s += "Some tools will complain if the ghostscript fonts are not installed in:\n\t#{HOMEBREW_PREFIX}/share/ghostscript/fonts\n" \
- unless ghostscript_fonts? or ghostscript_srsly?
- return nil if s.empty?
+ s = <<-EOS.undent
+ Because ImageMagick likes to remove tarballs, we're downloading their
+ stable release from their SVN repo instead. But they only serve the
+ repo over HTTPS, and have an untrusted certificate, so we auto-accept
+ this certificate for you.
+
+ If this bothers you, open a ticket with ImageMagick to fix their cert.
+
+ EOS
+ unless x11?
+ s += <<-EOS.undent
+ You don't have X11 from the Xcode DMG installed. Consequently Imagemagick is less fully featured.
+
+ EOS
+ end
+ unless ghostscript_fonts? or ghostscript_srsly?
+ s += <<-EOS.undent
+ Some tools will complain if the ghostscript fonts are not installed in:
+ #{HOMEBREW_PREFIX}/share/ghostscript/fonts
+ EOS
+ end
return s
end