2010-09-25 14:12:23 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Sdelta3 < Formula
|
2010-09-25 14:12:23 +00:00
|
|
|
url 'ftp://ftp.berlios.de//pub/sdelta/files/sdelta3-20100323.tar.bz2'
|
|
|
|
homepage 'http://sdelta.berlios.de/'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'd99718e95b2828f2d4ec376a16b5fedc950792ee'
|
2010-09-25 14:12:23 +00:00
|
|
|
|
|
|
|
def patches; DATA; end
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Sdelta3 code is not 64-bit clean
|
|
|
|
ENV.m32
|
|
|
|
|
|
|
|
inreplace 'Makefile' do |s|
|
|
|
|
s.change_make_var! "PREFIX", prefix
|
|
|
|
s.change_make_var! "CC", ENV.cc
|
|
|
|
s.change_make_var! "CFLAGS", ENV.cflags
|
|
|
|
end
|
|
|
|
|
|
|
|
# fix verbatim references to /usr
|
|
|
|
inreplace 'sd3', "/usr/share", "#{HOMEBREW_PREFIX}/share"
|
|
|
|
|
|
|
|
# fix incorrect help message referencing LICENSE file in sdelta3.c:
|
|
|
|
# Makefile installs LICENSE into /usr/share/sdelta3, not into /usr/doc/sdelta
|
|
|
|
inreplace 'sdelta3.c', "/usr/doc/sdelta", "#{HOMEBREW_PREFIX}/share/#{name}"
|
|
|
|
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/input.h b/input.h
|
|
|
|
index 64c67bb..04d1b6e 100644
|
|
|
|
--- a/input.h
|
|
|
|
+++ b/input.h
|
|
|
|
@@ -11,6 +11,8 @@
|
|
|
|
#include <sys/user.h>
|
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
#include <sys/vmparam.h>
|
|
|
|
+#elif defined(__MACH__)
|
|
|
|
+#include <mach/mach.h>
|
|
|
|
#else
|
|
|
|
#include <sys/param.h>
|
|
|
|
#if (defined(sun) || defined(__sun)) && !defined(PAGE_SIZE)
|