From 009fb3b47e7ae39e74531e136d6caa92fb627fe2 Mon Sep 17 00:00:00 2001 From: Rui Pereira Date: Tue, 13 Sep 2011 15:00:58 +0200 Subject: [PATCH] New formula: Xaw3d 1.5E Xaw3d is a general-purpose replacement for the Athena toolkit which adds a 3D appearance and support for XPM images. Signed-off-by: Jack Nagel --- Formula/xaw3d.rb | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Formula/xaw3d.rb diff --git a/Formula/xaw3d.rb b/Formula/xaw3d.rb new file mode 100644 index 0000000000..95fc2a1334 --- /dev/null +++ b/Formula/xaw3d.rb @@ -0,0 +1,33 @@ +require 'formula' + +class Xaw3d < Formula + url 'ftp://ftp.visi.com/users/hawkeyd/X/Xaw3d-1.5E.tar.gz' + homepage 'http://freshmeat.net/projects/xaw3d' + md5 '29ecfdcd6bcf47f62ecfd672d31269a1' + version '1.5E' + + depends_on 'imake' + + def install + ENV.x11 + chdir 'lib/Xaw3d' + inreplace 'Imakefile', 'XCOMM EXTRA_INCLUDES', 'EXTRA_INCLUDES' + mkdir 'X11' + chdir 'X11' do + ln_s '..', 'Xaw3d' + end + + system 'xmkmf' + + # 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', 'LDPRELIB = -L$(USRLIBDIR)', 'LDPRELIB = -L$(USRLIBDIR) $(LDFLAGS)' + inreplace 'Makefile', 'USRLIBDIR = /usr/local/lib', "USRLIBDIR = #{lib}" + inreplace 'Makefile', 'SHLIBDIR = /usr/local/lib', "SHLIBDIR = #{lib}" + inreplace 'Makefile', 'INCROOT = /usr/local/include', "INCROOT = #{include}" + + system 'make' + system 'make install' + end +end