aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/pev.rb
blob: 27a6515eea75ad5148e39e2185f07bb1c5ff6fca (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
30
require 'formula'

class Pev < Formula
  homepage 'http://pev.sf.net/'
  url 'https://downloads.sourceforge.net/project/pev/pev-0.70/pev-0.70.tar.gz'
  sha1 'b2d1191c3b57049c78ef77b8f54f7f78838af129'

  head 'https://github.com/merces/pev.git'

  depends_on 'pcre'

  def install
    inreplace 'src/Makefile' do |s|
      s.gsub! '/usr', prefix
      s.change_make_var! "SHAREDIR", share
      s.change_make_var! "MANDIR", man
    end

    inreplace 'lib/libpe/Makefile' do |s|
      s.gsub! '/usr', prefix
    end

    system "make", "CC=#{ENV.cc}"
    system "make install"
  end

  test do
    system "#{bin}/pedis", "--version"
  end
end