2012-11-10 10:17:43 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libswiften < Formula
|
|
|
|
homepage 'http://swift.im/swiften'
|
2013-05-20 15:11:14 +00:00
|
|
|
url 'http://swift.im/downloads/releases/swift-2.0/swift-2.0.tar.gz'
|
|
|
|
sha1 'b04ba098fffb1edc2ef0215957371c249458f0be'
|
2012-11-10 10:17:43 +00:00
|
|
|
|
2013-09-22 01:47:18 +00:00
|
|
|
head do
|
|
|
|
url 'git://swift.im/swift'
|
|
|
|
depends_on 'lua' => :recommended
|
|
|
|
end
|
2012-11-10 10:17:43 +00:00
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
depends_on :python => :build
|
2012-11-10 10:17:43 +00:00
|
|
|
depends_on 'scons' => :build
|
|
|
|
depends_on 'libidn'
|
|
|
|
depends_on 'boost'
|
|
|
|
|
2013-05-20 15:11:14 +00:00
|
|
|
# Patch to include lock from boost. Taken from
|
|
|
|
# http://comments.gmane.org/gmane.linux.redhat.fedora.extras.cvs/957411
|
2013-09-14 08:32:44 +00:00
|
|
|
def patches; DATA unless build.head?; end
|
2013-05-20 15:11:14 +00:00
|
|
|
|
2012-11-10 10:17:43 +00:00
|
|
|
def install
|
|
|
|
boost = Formula.factory("boost")
|
|
|
|
libidn = Formula.factory("libidn")
|
|
|
|
|
2013-09-14 08:32:44 +00:00
|
|
|
args = %W[
|
|
|
|
-j #{ENV.make_jobs}
|
|
|
|
V=1
|
|
|
|
optimize=1 debug=0
|
|
|
|
allow_warnings=1
|
|
|
|
swiften_dll=1
|
|
|
|
boost_includedir=#{boost.include}
|
|
|
|
boost_libdir=#{boost.lib}
|
|
|
|
libidn_includedir=#{libidn.include}
|
|
|
|
libidn_libdir=#{libidn.lib}
|
|
|
|
SWIFTEN_INSTALLDIR=#{prefix}
|
|
|
|
]
|
|
|
|
|
|
|
|
if build.with? "lua"
|
|
|
|
lua = Formula.factory("lua")
|
|
|
|
args << "SLUIFT_INSTALLDIR=#{prefix}"
|
|
|
|
args << "lua_includedir=#{lua.include}"
|
|
|
|
args << "lua_libdir=#{lua.lib}"
|
|
|
|
end
|
|
|
|
|
|
|
|
args << prefix
|
|
|
|
|
|
|
|
system "scons", *args
|
2012-11-10 10:17:43 +00:00
|
|
|
man1.install 'Swift/Packaging/Debian/debian/swiften-config.1' unless build.stable?
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/swiften-config"
|
|
|
|
end
|
|
|
|
end
|
2013-05-20 15:11:14 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/Swiften/EventLoop/EventLoop.cpp
|
|
|
|
+++ b/Swiften/EventLoop/EventLoop.cpp
|
|
|
|
@@ -12,6 +12,7 @@
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
#include <Swiften/Base/Log.h>
|
|
|
|
+#include <boost/thread/locks.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Swift {
|