Skip to content

Instantly share code, notes, and snippets.

@angeldm
Created February 7, 2013 22:28
Show Gist options
  • Save angeldm/4734808 to your computer and use it in GitHub Desktop.
Save angeldm/4734808 to your computer and use it in GitHub Desktop.
Highlight Formula
require 'formula'
class Highlight < Formula
homepage 'http://www.andre-simon.de/doku/highlight/en/highlight.html'
url 'http://www.andre-simon.de/zip/highlight-3.13.tar.bz2'
sha1 '8b0861a657f0e73911f514a16ff5136c37f4f724'
depends_on 'boost'
depends_on 'lua'
depends_on 'pkg-config'
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"
s.change_make_var! "LUA_LIBS", "-L/usr/local/lib -llua -lm"
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"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment