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 <jacknagel@gmail.com>
master
Rui Pereira 2011-09-13 15:00:58 +02:00 committed by Jack Nagel
parent 6423a96e21
commit 009fb3b47e
1 changed files with 33 additions and 0 deletions

33
Formula/xaw3d.rb Normal file
View File

@ -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