tomahawk-qt5: rebuild with fixed qca-qt5 and quazip-qt5

Also, unbreak glibc builds by fixing the musl patch.
This commit is contained in:
Alessio Sergi 2017-04-02 17:24:55 +02:00
parent 54f2dd0d20
commit b65be0d4b0
3 changed files with 32 additions and 34 deletions

View file

@ -1,30 +0,0 @@
--- src/libtomahawk/accounts/ResolverAccount.cpp 2016-11-08 20:50:59.907398017 +0100
+++ src/libtomahawk/accounts/ResolverAccount.cpp 2016-11-08 20:56:33.222289769 +0100
@@ -16,6 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
+#if !defined(__GLIBC__)
+#include <bits/reg.h>
+#endif
#include "ResolverAccount.h"
@@ -185,10 +185,17 @@
#elif defined( Q_OS_MAC )
myPlatform = "osx";
#elif defined( Q_OS_LINUX )
+#if defined(__GLIBC__)
if ( __WORDSIZE == 32 )
myPlatform = "linux-x86";
else if ( __WORDSIZE == 64 )
myPlatform = "linux-x64";
+#else
+ if ( __WORDSIZE == 32 )
+ myPlatform = "linux-musl-x86";
+ else if ( __WORDSIZE == 64 )
+ myPlatform = "linux-musl-x64";
+#endif
#endif
if ( !myPlatform.contains( platform ) )

View file

@ -0,0 +1,20 @@
--- src/libtomahawk/accounts/ResolverAccount.cpp.orig
+++ src/libtomahawk/accounts/ResolverAccount.cpp
@@ -44,6 +44,17 @@
#include <QFileInfo>
#include <QDir>
+#include <limits.h>
+
+#ifndef __WORDSIZE
+# if ULONG_MAX == 0xffffffffffffffff
+# define __WORDSIZE 64
+# elif ULONG_MAX == 0xffffffff
+# define __WORDSIZE 32
+# endif /* ULONG_MAX */
+#endif /* __WORDSIZE */
+
+
#define MANUALRESOLVERS_DIR "manualresolvers"
using namespace Tomahawk;

View file

@ -1,7 +1,7 @@
# Template file for 'tomahawk'
pkgname=tomahawk-qt5
version=0.8.4
revision=9
revision=10
wrksrc=${pkgname%-*}-${version}
build_style=cmake
build_options="upower hatchet kde xmpp"
@ -9,7 +9,7 @@ desc_option_hatchet="Enable support for http://hatchet.is"
desc_option_kde="Enable support for KDE"
desc_option_xmpp="Enable support for XMPP"
build_options_default=${build_options}
configure_args="-DBUILD_RELEASE=ON \
configure_args="-Wno-dev -DBUILD_RELEASE=ON \
$(vopt_if hatchet '-DBUILD_HATCHET=ON' '-DBUILD_HATCHET=OFF') \
-DBUILD_WITH_QT4=OFF \
-DWITH_CRASHREPORTER=OFF \
@ -22,8 +22,7 @@ makedepends="boost-devel Lucene++-devel qt5-devel taglib-devel sparsehash
qt5-svg-devel qt5-tools-devel phonon-qt5-devel liblastfm-qt5-devel quazip-qt5-devel
libechonest-qt5-devel libressl-devel $(vopt_if hatchet websocketpp)
$(vopt_if xmpp jreen-qt5-devel) $(vopt_if kde telepathy-qt5-devel)"
depends="virtual?phonon-qt5-backend qt5-plugin-sqlite $(vopt_if xmpp qca-qt5-ossl)
qca-qt5 quazip-qt5"
depends="virtual?phonon-qt5-backend qt5-plugin-sqlite $(vopt_if xmpp qca-qt5-ossl)"
short_desc="Multi-source social music player"
maintainer="Duncaen <duncaen@voidlinux.eu>"
license="GPL-3"
@ -54,6 +53,15 @@ post_extract() {
src/libtomahawk/EchonestCatalogSynchronizer.h \
src/infoplugins/generic/echonest/EchonestPlugin.cpp \
src/infoplugins/generic/echonest/EchonestPlugin.h
# fix quazip-qt5 detection
sed -i CMakeModules/FindQuaZip.cmake \
-e 's|quazip/quazip.h|quazip5/quazip.h|' \
-e '/^find_library/s|quazip|&5|'
sed -i 's|#include <quazip|&5|' src/libtomahawk/utils/TomahawkUtils.cpp
# fix qca-qt5 detection
sed -i CMakeModules/FindQCA2.cmake \
-e 's|qca2|&-qt5|' \
-e 's|NAMES qca|&-qt5|'
# fix build
sed -i '24a#include <QDataStream>' src/libtomahawk/network/acl/AclRegistry.cpp
sed -i '30a#include <QDataStream>' src/libtomahawk/utils/TomahawkCache.h