2010-08-27 15:06:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Noweb < Formula
|
2012-02-21 06:04:21 +00:00
|
|
|
homepage 'http://www.cs.tufts.edu/~nr/noweb/'
|
2010-08-27 15:06:01 +00:00
|
|
|
url 'ftp://www.eecs.harvard.edu/pub/nr/noweb.tgz'
|
|
|
|
version '2.11b'
|
|
|
|
md5 '1df580723497b2f2efde07646abf764c'
|
|
|
|
|
|
|
|
depends_on 'icon'
|
|
|
|
|
|
|
|
def install
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "src" do
|
2011-10-31 19:19:03 +00:00
|
|
|
system "bash", "awkname", "awk"
|
|
|
|
system "make LIBSRC=icon ICONC=icont CFLAGS='-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=1'"
|
2010-08-27 15:06:01 +00:00
|
|
|
|
2012-03-03 23:50:27 +00:00
|
|
|
if which 'kpsewhich'
|
2011-10-31 19:19:03 +00:00
|
|
|
ohai 'TeX installation found. Installing TeX support files there might fail if your user does not have permission'
|
2012-05-15 18:31:21 +00:00
|
|
|
texmf = Pathname.new(`kpsewhich -var-value=TEXMFLOCAL`.chomp)
|
2012-03-03 23:50:27 +00:00
|
|
|
else
|
|
|
|
ohai 'No TeX installation found. Installing TeX support files in the noweb Cellar.'
|
2012-05-15 18:31:21 +00:00
|
|
|
texmf = prefix
|
2010-08-27 15:06:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
bin.mkpath
|
|
|
|
lib.mkpath
|
|
|
|
man.mkpath
|
2012-05-15 18:31:21 +00:00
|
|
|
(texmf/'tex/generic/noweb').mkpath
|
2010-08-27 15:06:01 +00:00
|
|
|
|
|
|
|
system "make", "install", "BIN=#{bin}",
|
|
|
|
"LIB=#{lib}",
|
|
|
|
"MAN=#{man}",
|
|
|
|
"TEXINPUTS=#{texmf}/tex/generic/noweb"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|