Skip to content

Commit

Permalink
poppler: use resource
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Sep 12, 2013
1 parent a890183 commit 54cf2c5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Formula/poppler.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
require 'formula'

class PopplerData < Formula
url 'http://poppler.freedesktop.org/poppler-data-0.4.6.tar.gz'
sha1 'f030563eed9f93912b1a546e6d87936d07d7f27d'
end

class Poppler < Formula
homepage 'http://poppler.freedesktop.org'
url 'http://poppler.freedesktop.org/poppler-0.24.0.tar.xz'
Expand All @@ -26,6 +21,11 @@ class Poppler < Formula
conflicts_with 'pdf2image', 'xpdf',
:because => 'poppler, pdf2image, and xpdf install conflicting executables'

resource 'font-data' do
url 'http://poppler.freedesktop.org/poppler-data-0.4.6.tar.gz'
sha1 'f030563eed9f93912b1a546e6d87936d07d7f27d'
end

def install
if build.with? 'qt4'
ENV['POPPLER_QT4_CFLAGS'] = `#{HOMEBREW_PREFIX}/bin/pkg-config QtCore QtGui --libs`.chomp
Expand All @@ -44,10 +44,6 @@ def install

system "./configure", *args
system "make install"

# Install poppler font data.
PopplerData.new.brew do
system "make", "install", "prefix=#{prefix}"
end
resource('font-data').stage { system "make", "install", "prefix=#{prefix}" }
end
end

0 comments on commit 54cf2c5

Please sign in to comment.