highlight 3.8

Also, fix compiling against lua for non-/usr/local/ installs.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Leon Zhang 2012-03-14 03:15:49 +09:00 committed by Adam Vandenberg
parent a78cbc496a
commit 1c2e55247c

View file

@ -1,14 +1,20 @@
require 'formula'
class Highlight < Formula
url 'http://www.andre-simon.de/zip/highlight-3.6.tar.bz2'
homepage 'http://www.andre-simon.de/doku/highlight/en/highlight.html'
sha1 'ff3d5f5d17edfed4881d34ef847e63bf800a33e2'
url 'http://www.andre-simon.de/zip/highlight-3.8.tar.bz2'
sha1 '007a008f1846485e86ad9347f98f69a22afeb718'
depends_on 'boost'
depends_on 'lua'
def install
inreplace "src/Makefile" do |s|
s.change_make_var! "CXX", ENV.cxx
s.gsub! /^(CFLAGS):=.*$/, "\\1 = #{ENV.cppflags}"
s.gsub! /^(LUA_LIBS)=(.*)$/, "\\1 = #{ENV.ldflags} \\2"
end
conf_dir = etc+'highlight/' # highlight needs a final / for conf_dir
system "make", "PREFIX=#{prefix}", "conf_dir=#{conf_dir}"
system "make", "PREFIX=#{prefix}", "conf_dir=#{conf_dir}", "install"