2009-12-27 11:27:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class SaneBackends < Formula
|
2009-12-27 11:27:31 +00:00
|
|
|
homepage 'http://www.sane-project.org/'
|
2013-06-22 15:20:48 +00:00
|
|
|
url 'ftp://ftp2.sane-project.org/pub/sane/sane-backends-1.0.23.tar.gz'
|
|
|
|
sha1 '9363b49aecca6ef2b51da31119f48cba4dedcf07'
|
2009-12-27 11:27:31 +00:00
|
|
|
|
2013-06-22 15:15:01 +00:00
|
|
|
option :universal
|
|
|
|
|
2009-12-27 11:27:31 +00:00
|
|
|
depends_on 'jpeg'
|
|
|
|
depends_on 'libtiff'
|
2009-12-24 10:54:58 +00:00
|
|
|
depends_on 'libusb-compat'
|
2009-12-27 11:27:31 +00:00
|
|
|
|
2012-04-14 14:05:22 +00:00
|
|
|
# Fixes u_long missing error. Reported upstream:
|
|
|
|
# https://github.com/fab1an/homebrew/commit/2a716f1a2b07705aa891e2c7fbb5148506aa5a01
|
|
|
|
# When updating this formula, check on the usptream status of this patch.
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2009-12-27 11:27:31 +00:00
|
|
|
def install
|
2013-06-22 15:15:01 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2011-03-11 06:22:43 +00:00
|
|
|
ENV.j1 # Makefile does not seem to be parallel-safe
|
2009-12-24 10:54:58 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2012-01-06 17:23:53 +00:00
|
|
|
"--localstatedir=#{var}",
|
2009-12-24 10:54:58 +00:00
|
|
|
"--without-gphoto2",
|
|
|
|
"--enable-local-backends",
|
|
|
|
"--enable-libusb",
|
|
|
|
"--disable-latex"
|
2009-12-27 11:27:31 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2011-03-11 06:24:18 +00:00
|
|
|
|
|
|
|
# Some drivers require a lockfile
|
|
|
|
(var+"lock/sane").mkpath
|
2009-12-27 11:27:31 +00:00
|
|
|
end
|
|
|
|
end
|
2012-04-14 14:05:22 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/include/sane/sane.h.orig b/include/sane/sane.h
|
|
|
|
index 5320b4a..6cb7090 100644
|
|
|
|
--- a/include/sane/sane.h.orig
|
|
|
|
+++ b/include/sane/sane.h
|
|
|
|
@@ -20,6 +20,9 @@
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+// Fixes u_long missing error
|
|
|
|
+#include <sys/types.h>
|
|
|
|
+
|
|
|
|
/*
|
|
|
|
* SANE types and defines
|
|
|
|
*/
|