summaryrefslogtreecommitdiff
path: root/chat/spectrum
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2016-01-16 12:18:42 +0000
committerryoon <ryoon@pkgsrc.org>2016-01-16 12:18:42 +0000
commite7494a9fbd5310f150979b0656c0e9748f6bc094 (patch)
treeb1d60fababab76c39d896627c6d44274caa93240 /chat/spectrum
parentc14e2808fe6907264021d1d9af3838a331b78d3e (diff)
downloadpkgsrc-e7494a9fbd5310f150979b0656c0e9748f6bc094.tar.gz
Fix build with poco 1.6.1 and cmake libraries detection
Diffstat (limited to 'chat/spectrum')
-rw-r--r--chat/spectrum/distinfo3
-rw-r--r--chat/spectrum/options.mk5
-rw-r--r--chat/spectrum/patches/patch-src_sql.cpp33
3 files changed, 39 insertions, 2 deletions
diff --git a/chat/spectrum/distinfo b/chat/spectrum/distinfo
index 2b42adaf49a..8f0f1ad1edc 100644
--- a/chat/spectrum/distinfo
+++ b/chat/spectrum/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2015/11/03 01:20:24 agc Exp $
+$NetBSD: distinfo,v 1.7 2016/01/16 12:18:42 ryoon Exp $
SHA1 (spectrum-1.4.8.tar.gz) = 9323f8f89eb1f84e36e1d64845741cbebbf0d249
RMD160 (spectrum-1.4.8.tar.gz) = 859c1d0f6f1c4d535bbada13c1c11f2b4550805a
@@ -10,6 +10,7 @@ SHA1 (patch-spectrumctl_spectrum_env.py) = 0c266de23d0af8d317fcd4efdfec64bb85714
SHA1 (patch-spectrumctl_spectrumctl.py) = 56166fa6477a3dba56b30501f2112cd6d21db40f
SHA1 (patch-src_geventloop.h) = b28685cb69b9759ea3496e163d48de641a49eccb
SHA1 (patch-src_spectrum_util.cpp) = 19201297fe085f093010346c8600399332a60265
+SHA1 (patch-src_sql.cpp) = 348ad9a9b58acb1df1234b2fa13db6c3de0e585c
SHA1 (patch-src_statshandler.cpp) = 0748f6561a2ec8801ba22828722587e8c29054a3
SHA1 (patch-src_transport.h) = 11c7541c8b41556cbaa7a0d99046dd4edc4293e0
SHA1 (patch-src_utf8_checked.h) = aef4e9214e89b97c6dae2c56ea2ce934702d5ac8
diff --git a/chat/spectrum/options.mk b/chat/spectrum/options.mk
index b4e5df2603d..2051e9a59b3 100644
--- a/chat/spectrum/options.mk
+++ b/chat/spectrum/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1.1.1 2011/02/07 06:31:22 schnoebe Exp $
+# $NetBSD: options.mk,v 1.2 2016/01/16 12:18:42 ryoon Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.spectrum
PKG_OPTIONS_REQUIRED_GROUPS= storage
@@ -11,14 +11,17 @@ PKG_SUGGESTED_OPTIONS= sqlite
.include "../../mk/bsd.options.mk"
PLIST_VARS+= sqlite mysql
+CMAKE_ARGS+= -DPOCO_ODBC=OFF
.if !empty(PKG_OPTIONS:Msqlite)
. include "../../databases/poco-data-sqlite/buildlink3.mk"
+CMAKE_ARGS+= -DPOCO_MYSQL=OFF
PLIST.sqlite= yes
.endif
.if !empty(PKG_OPTIONS:Mmysql)
. include "../../databases/poco-data-mysql/buildlink3.mk"
+CMAKE_ARGS+= -DPOCO_SQLITE=OFF
PLIST.mysql= yes
.endif
diff --git a/chat/spectrum/patches/patch-src_sql.cpp b/chat/spectrum/patches/patch-src_sql.cpp
new file mode 100644
index 00000000000..cf76456557d
--- /dev/null
+++ b/chat/spectrum/patches/patch-src_sql.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_sql.cpp,v 1.1 2016/01/16 12:18:42 ryoon Exp $
+
+* Fix build with poso 1.6.1 (1.5 or later)
+
+--- src/sql.cpp.orig 2011-06-11 13:17:44.000000000 +0000
++++ src/sql.cpp
+@@ -40,6 +40,8 @@
+ #include <Poco/Data/SQLite/SQLiteException.h>
+ #endif
+
++using namespace Poco::Data::Keywords;
++
+ static gboolean reconnectMe(gpointer data) {
+ SQLClass *sql = (SQLClass *) data;
+ return sql->reconnectCallback();
+@@ -730,7 +732,7 @@ void SQLClass::removeBuddy(long userId,
+ if (buddy_id == 0) {
+ Poco::UInt32 id = 0;
+ try {
+- *m_sess << "SELECT id FROM " + p->configuration().sqlPrefix + "buddies WHERE user_id=? AND uin=?", use((Poco::UInt32) userId), use(uin), into(id), now;
++ *m_sess << "SELECT id FROM " + p->configuration().sqlPrefix + "buddies WHERE user_id=? AND uin=?", bind((Poco::UInt32) userId), bind(uin), into(id), now;
+ }
+ catch (Poco::Exception e) {
+ Log("SQL ERROR", e.displayText());
+@@ -819,7 +821,7 @@ UserRow SQLClass::getUserByJid(const std
+ }
+
+ if (!p->configuration().sqlVIP.empty()) {
+- *m_sess << p->configuration().sqlVIP, use(jid), into(user.vip), now;
++ *m_sess << p->configuration().sqlVIP, bind(jid), into(user.vip), now;
+ // *m_sess << "SELECT COUNT(jid) as is_vip FROM platby.users WHERE jid='" + jid + "' and expire>NOW();",
+ // into(user.vip), now;
+ }