mxe/plugins/apps/clementine_qt4-1-fixes.patch

86 lines
2.9 KiB
Diff
Raw Normal View History

This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Pavel Vatagin <pavelvat@gmail.com>
Date: Sat, 5 Nov 2016 02:19:37 +0300
Subject: [PATCH 1/2] fix clementine
diff --git a/3rdparty/libprojectm/CMakeLists.txt b/3rdparty/libprojectm/CMakeLists.txt
index 1111111..2222222 100644
--- a/3rdparty/libprojectm/CMakeLists.txt
+++ b/3rdparty/libprojectm/CMakeLists.txt
@@ -174,6 +174,8 @@ if(BUNDLE_PROJECTM_PRESETS)
COPY_ONLY
)
endforeach (preset)
+ elseif (WIN32)
+ INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/projectm-presets)
else (APPLE)
INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/clementine/projectm-presets)
endif (APPLE)
diff --git a/3rdparty/libprojectm/glew.h b/3rdparty/libprojectm/glew.h
index 1111111..2222222 100644
--- a/3rdparty/libprojectm/glew.h
+++ b/3rdparty/libprojectm/glew.h
@@ -149,7 +149,7 @@ typedef unsigned short wchar_t;
# endif
#endif
#if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_)
-# ifdef _WIN64
+# if defined(_WIN64) && !defined(__MINGW32__)
typedef __int64 ptrdiff_t;
# else
typedef _W64 int ptrdiff_t;
diff --git a/3rdparty/tinysvcmdns/CMakeLists.txt b/3rdparty/tinysvcmdns/CMakeLists.txt
index 1111111..2222222 100644
--- a/3rdparty/tinysvcmdns/CMakeLists.txt
+++ b/3rdparty/tinysvcmdns/CMakeLists.txt
@@ -7,7 +7,7 @@ set(TINYSVCMDNS-SOURCES
)
find_library(PTHREAD
- pthreadGC2
+ pthread
)
add_library(tinysvcmdns STATIC
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Thu, 16 Mar 2017 14:54:55 +0300
Subject: [PATCH 2/2] core/database: configure fts3 tokenizer support
Original patch by Arfrever
This fixes https://github.com/clementine-player/Clementine/issues/5297
https://github.com/clementine-player/Clementine/pull/5669
diff --git a/src/core/database.cpp b/src/core/database.cpp
index 1111111..2222222 100644
--- a/src/core/database.cpp
+++ b/src/core/database.cpp
@@ -265,6 +265,20 @@ QSqlDatabase Database::Connect() {
StaticInit();
{
+
+#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
+ // In case sqlite>=3.12 is compiled without -DSQLITE_ENABLE_FTS3_TOKENIZER (generally a good idea
+ // due to security reasons) the fts3 support should be enabled explicitly.
+ // see https://github.com/clementine-player/Clementine/issues/5297
+ QVariant v = db.driver()->handle();
+ if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) {
+ sqlite3* handle = *static_cast<sqlite3**>(v.data());
+ if (handle) {
+ sqlite3_db_config(handle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);
+ }
+ }
+#endif
+
QSqlQuery set_fts_tokenizer("SELECT fts3_tokenizer(:name, :pointer)", db);
set_fts_tokenizer.bindValue(":name", "unicode");
set_fts_tokenizer.bindValue(