blob: 042488e348745c92ece3ac4180aaaf23af071e3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  | 
require 'formula'
class Zint < Formula
  homepage 'http://zint.github.com/'
  url 'https://github.com/downloads/zint/zint/zint-2.4.3.tar.gz'
  md5 '2b47caff88cb746f212d6a0497185358'
  head 'git://zint.git.sourceforge.net/gitroot/zint/zint'
  depends_on 'cmake' => :build
  depends_on :x11
  def install
    mkdir 'zint-build' do
      system "cmake", "..",
                      "-DCMAKE_PREFIX_PATH=#{prefix}",
                      "-DCMAKE_C_FLAGS=-I#{MacOS::XQuartz.include}",
                      *std_cmake_args
      system "make install"
    end
  end
  def test
    mktemp do
      system "#{bin}/zint", "-o", "test-zing.png", "-d", "This Text"
      system "/usr/bin/qlmanage", "-p", "test-zing.png"
    end
  end
end
  |