2009-11-14 09:32:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gearman < Formula
|
2009-11-14 09:32:52 +00:00
|
|
|
homepage 'http://gearman.org/'
|
2013-08-19 16:33:55 +00:00
|
|
|
url 'https://launchpad.net/gearmand/1.2/1.1.9/+download/gearmand-1.1.9.tar.gz'
|
|
|
|
sha1 '59ec305a4535451c3b51a21d2525e1c07770419d'
|
2013-05-31 11:46:43 +00:00
|
|
|
|
|
|
|
option 'with-mysql', 'Compile with MySQL persistent queue enabled'
|
2014-01-12 20:53:13 +00:00
|
|
|
option 'with-postgresql', 'Compile with Postgresql persistent queue enabled'
|
2009-11-14 09:32:52 +00:00
|
|
|
|
2012-03-17 19:06:06 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2011-03-16 12:37:55 +00:00
|
|
|
depends_on 'boost'
|
2012-02-17 04:03:27 +00:00
|
|
|
depends_on 'libevent'
|
|
|
|
depends_on 'ossp-uuid'
|
2013-06-26 02:19:59 +00:00
|
|
|
depends_on :mysql => :optional
|
2014-01-12 20:53:13 +00:00
|
|
|
depends_on :postgresql => :optional
|
2009-12-22 05:49:18 +00:00
|
|
|
|
2014-03-19 17:07:50 +00:00
|
|
|
# build fix for tr1 -> std
|
|
|
|
# Fixes have also been applied upstream
|
|
|
|
patch :DATA if MacOS.version >= :mavericks
|
|
|
|
|
|
|
|
|
2009-11-14 09:32:52 +00:00
|
|
|
def install
|
2013-05-31 11:46:43 +00:00
|
|
|
args = ["--prefix=#{prefix}"]
|
2014-03-06 20:40:26 +00:00
|
|
|
args << "--without-mysql" if build.without? 'mysql'
|
2014-01-12 20:53:13 +00:00
|
|
|
if build.with? 'postgresql'
|
2014-03-06 05:28:31 +00:00
|
|
|
pg_config = "#{Formula["postgresql"].opt_bin}/pg_config"
|
2014-01-12 20:53:13 +00:00
|
|
|
args << "--with-postgresql=#{pg_config}"
|
|
|
|
end
|
2013-05-31 11:46:43 +00:00
|
|
|
system "./configure", *args
|
2009-11-14 09:32:52 +00:00
|
|
|
system "make install"
|
2011-10-12 14:45:48 +00:00
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => "gearmand -d"
|
2011-10-12 14:45:48 +00:00
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
|
|
|
|
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>Program</key>
|
2014-03-06 05:28:31 +00:00
|
|
|
<string>#{opt_sbin}/gearmand</string>
|
2012-11-25 15:06:41 +00:00
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
2011-10-12 14:45:48 +00:00
|
|
|
EOS
|
|
|
|
end
|
2009-11-14 09:32:52 +00:00
|
|
|
end
|
2013-09-17 13:49:49 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/libgearman-1.0/gearman.h b/libgearman-1.0/gearman.h
|
|
|
|
index 850a26d..8f7a8f0 100644
|
|
|
|
--- a/libgearman-1.0/gearman.h
|
|
|
|
+++ b/libgearman-1.0/gearman.h
|
|
|
|
@@ -50,7 +50,11 @@
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
+#ifdef _LIBCPP_VERSION
|
|
|
|
+# include <cinttypes>
|
|
|
|
+#else
|
|
|
|
# include <tr1/cinttypes>
|
|
|
|
+#endif
|
|
|
|
# include <cstddef>
|
|
|
|
# include <cstdlib>
|
|
|
|
# include <ctime>
|