2014-03-17 20:36:25 +00:00
|
|
|
class Perlmagick < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Objected-oriented Perl interface to ImageMagick"
|
2014-03-17 20:36:25 +00:00
|
|
|
homepage "http://www.imagemagick.org/script/perl-magick.php"
|
2014-08-18 05:07:32 +00:00
|
|
|
url "http://www.imagemagick.org/download/perl/PerlMagick-6.89.tar.gz"
|
2014-10-15 04:22:58 +00:00
|
|
|
sha256 "c8f81869a4f007be63e67fddf724b23256f6209f16aa95e14d0eaef283772a59"
|
|
|
|
revision 1
|
2014-03-17 20:36:25 +00:00
|
|
|
|
2014-03-29 15:24:20 +00:00
|
|
|
bottle do
|
2014-10-15 04:29:41 +00:00
|
|
|
sha1 "ce1cf658507f5269ea3167a9d6f83ff4e38b9749" => :mavericks
|
|
|
|
sha1 "939ec50e438de4caf808f324e9949a5a75c13eb8" => :mountain_lion
|
|
|
|
sha1 "c040bc6e0b238c49c076414b5a082b4b54047406" => :lion
|
2014-03-29 15:24:20 +00:00
|
|
|
end
|
|
|
|
|
2014-03-17 20:36:25 +00:00
|
|
|
depends_on "freetype"
|
|
|
|
depends_on "imagemagick"
|
|
|
|
|
|
|
|
def install
|
|
|
|
inreplace "Makefile.PL" do |s|
|
2014-04-28 02:08:00 +00:00
|
|
|
s.gsub! "INC_magick = '-I/usr/local/include/ImageMagick-6", "INC_magick = '-I#{Formula["imagemagick"].include}/ImageMagick-6"
|
2014-03-17 20:36:25 +00:00
|
|
|
s.gsub! "-I/usr/include/freetype2", "-I#{Formula["freetype"].include}/freetype2"
|
|
|
|
s.gsub! "'INSTALLBIN' => '/usr/local/bin'", "'INSTALLBIN' => '#{bin}'"
|
|
|
|
s.gsub! "# 'PREFIX' => '/usr/local'", "'PREFIX' => '#{prefix}'"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "perl", "Makefile.PL"
|
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
# References the system Perl version.
|
2014-10-25 08:36:54 +00:00
|
|
|
def caveats
|
|
|
|
perl_version = `/usr/bin/perl -e 'printf "%vd", $^V;'`
|
|
|
|
<<-EOS.undent
|
|
|
|
You need to define the OS X system Perl library directory to use PerlMagick:
|
|
|
|
export PERL5LIB="#{HOMEBREW_PREFIX}/lib/perl5/site_perl/#{perl_version}"
|
2014-03-17 20:36:25 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|