aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/zint.rb
blob: 879c15a5ecfaa8f868b6c89454f2d2f9537c5fae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class Zint < Formula
  url 'http://downloads.sourceforge.net/project/zint/zint/2.4.1/zint-2.4.1.tar.gz'
  homepage 'http://www.zint.org.uk'
  md5 '7ec4441907827fa613b11847a467c61d'
  head 'git://zint.git.sourceforge.net/gitroot/zint/zint'

  depends_on 'cmake'

  def install
    cd('build')
    system "cmake ..  #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{prefix} -DCMAKE_C_FLAGS=-I/usr/X11/include"
    system "make install"
  end

  def test
    system "zint -o test-zing.png -d 'This Text'"
    system "open test-zing.png"
    puts "You may want to `rm test-zing.png`"
  end
end