2011-09-13 13:00:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Xaw3d < Formula
|
|
|
|
homepage 'http://freshmeat.net/projects/xaw3d'
|
2012-02-22 03:00:12 +00:00
|
|
|
url 'ftp://ftp.visi.com/users/hawkeyd/X/Xaw3d-1.5E.tar.gz'
|
|
|
|
md5 '29ecfdcd6bcf47f62ecfd672d31269a1'
|
2011-09-13 13:00:58 +00:00
|
|
|
|
2012-02-22 03:00:12 +00:00
|
|
|
depends_on 'imake' => :build
|
2011-09-13 13:00:58 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.x11
|
2012-02-22 03:00:12 +00:00
|
|
|
inreplace 'lib/Xaw3d/Imakefile', 'XCOMM EXTRA_INCLUDES', 'EXTRA_INCLUDES'
|
|
|
|
cd 'lib/Xaw3d' do
|
2012-02-22 04:48:36 +00:00
|
|
|
mkdir 'X11' do
|
2012-02-22 03:00:12 +00:00
|
|
|
# TODO - surely this symlink can be made without the cd
|
|
|
|
ln_s '..', 'Xaw3d'
|
|
|
|
end
|
2011-09-13 13:00:58 +00:00
|
|
|
|
2012-02-22 03:00:12 +00:00
|
|
|
system 'xmkmf'
|
2011-09-13 13:00:58 +00:00
|
|
|
|
2012-02-22 03:00:12 +00:00
|
|
|
# force usage of /usr/X11/lib when linking, and install into the Cellar
|
|
|
|
# apparently s.change_make_var! silently fails when Makefile variables
|
|
|
|
# are preceded by whitespace, so do it manually
|
|
|
|
inreplace 'Makefile' do |s|
|
|
|
|
s.gsub! 'LDPRELIB = -L$(USRLIBDIR)', 'LDPRELIB = -L$(USRLIBDIR) $(LDFLAGS)'
|
|
|
|
s.gsub! 'USRLIBDIR = /usr/local/lib', "USRLIBDIR = #{lib}"
|
|
|
|
s.gsub! 'SHLIBDIR = /usr/local/lib', "SHLIBDIR = #{lib}"
|
|
|
|
s.gsub! 'INCROOT = /usr/local/include', "INCROOT = #{include}"
|
|
|
|
end
|
2011-09-13 13:00:58 +00:00
|
|
|
|
2012-02-22 03:00:12 +00:00
|
|
|
system 'make'
|
|
|
|
system 'make install'
|
|
|
|
end
|
2011-09-13 13:00:58 +00:00
|
|
|
end
|
|
|
|
end
|