[swift-users] NetBSD patches for swift-2.0
Thomas Klausner
tk at giga.or.at
Sat Jan 11 16:32:37 CET 2014
Hi!
I was compiling swift-2.0 on NetBSD/amd64 with clang-3.4rc1/libc++.
Since the included boost library doesn't compile with that version of
clang/libc++, I used the one from pkgsrc (currently 1.55.0).
Attached are the patches I needed to compile.
The first one treats NetBSD like Linux in the qt handling (patch by
schnoebe).
The second one prefixes "QtGui/" to the include lines, since otherwise
the headers weren't found (also by schnoebe).
The third one replaces boost::lock_guard with std::lock_guard, since
the former didn't exist and clang suggested the latter.
I haven't tried compiling with gcc or on other platforms, so I hope
this works there as well; if not, I can test other patches you'd
suggest for tackling that issue.
Thanks,
Thomas
-------------- next part --------------
$NetBSD$
Handle NetBSD like Linux.
--- BuildTools/SCons/Tools/qt4.py.orig 2012-12-22 12:23:58.000000000 +0000
+++ BuildTools/SCons/Tools/qt4.py
@@ -448,7 +448,7 @@ def enable_modules(self, modules, debug=
except: pass
debugSuffix = ''
- if sys.platform.startswith("linux") and not crosscompiling :
+ if (sys.platform.startswith("linux") or sys.platform.startswith("netbsd")) and not crosscompiling :
if debug : debugSuffix = '_debug'
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include", "phonon")])
for module in modules :
-------------- next part --------------
$NetBSD$
Fix include paths to qt header files.
--- Swift/QtUI/ChatList/ChatListDelegate.cpp.orig 2011-04-22 21:07:47.000000000 +0000
+++ Swift/QtUI/ChatList/ChatListDelegate.cpp
@@ -4,8 +4,8 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include <QPen>
-#include <QPainter>
+#include <QtGui/QPen>
+#include <QtGui/QPainter>
#include "Swift/QtUI/ChatList/ChatListDelegate.h"
#include "Swift/QtUI/Roster/GroupItemDelegate.h"
-------------- next part --------------
$NetBSD$
Fix build with latest boost and clang.
--- Swiften/EventLoop/EventLoop.cpp.orig 2012-12-22 12:23:59.000000000 +0000
+++ Swiften/EventLoop/EventLoop.cpp
@@ -47,7 +47,7 @@ void EventLoop::handleEvent(const Event&
bool doCallback = false;
{
- boost::lock_guard<boost::mutex> lock(eventsMutex_);
+ std::lock_guard<boost::mutex> lock(eventsMutex_);
std::list<Event>::iterator i = std::find(events_.begin(), events_.end(), event);
if (i != events_.end()) {
doCallback = true;
@@ -72,7 +72,7 @@ void EventLoop::handleEvent(const Event&
void EventLoop::postEvent(boost::function<void ()> callback, boost::shared_ptr<EventOwner> owner) {
Event event(owner, callback);
{
- boost::lock_guard<boost::mutex> lock(eventsMutex_);
+ std::lock_guard<boost::mutex> lock(eventsMutex_);
event.id = nextEventID_;
nextEventID_++;
events_.push_back(event);
@@ -82,7 +82,7 @@ void EventLoop::postEvent(boost::functio
}
void EventLoop::removeEventsFromOwner(boost::shared_ptr<EventOwner> owner) {
- boost::lock_guard<boost::mutex> lock(eventsMutex_);
+ std::lock_guard<boost::mutex> lock(eventsMutex_);
events_.remove_if(HasOwner(owner));
}
More information about the swift-users
mailing list