From 238336d166c5cdefb22ac5d45099d9f5d66925a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Fri, 9 Oct 2015 00:46:24 +0200 Subject: [PATCH] kde-workspace: unbreak musl Closes #2223 --- .../patches/musl-__uint16_t.patch | 14 ++++++++++ srcpkgs/kde-workspace/patches/musl-uint.patch | 15 +++++++++++ .../kde-workspace/patches/q_byte_order.patch | 27 +++++++++++++++++++ srcpkgs/kde-workspace/template | 4 +-- 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/kde-workspace/patches/musl-__uint16_t.patch create mode 100644 srcpkgs/kde-workspace/patches/musl-uint.patch create mode 100644 srcpkgs/kde-workspace/patches/q_byte_order.patch diff --git a/srcpkgs/kde-workspace/patches/musl-__uint16_t.patch b/srcpkgs/kde-workspace/patches/musl-__uint16_t.patch new file mode 100644 index 00000000000..4376deb9442 --- /dev/null +++ b/srcpkgs/kde-workspace/patches/musl-__uint16_t.patch @@ -0,0 +1,14 @@ +Use Qt defined type quint16 instead of GNU libc +internal type __uint16_t. + +--- ksmserver/fadeeffect.cpp 2015-05-07 20:13:26.000000000 +0200 ++++ ksmserver/fadeeffect.cpp 2015-10-09 00:29:17.537504092 +0200 +@@ -237,7 +237,7 @@ + __m128i *result, uint length) + { + length = (length + 15) >> 4; +- register const __m128i alpha = _mm_set1_epi16(__uint16_t (a)); ++ register const __m128i alpha = _mm_set1_epi16(quint16 (a)); + register const __m128i negalpha = _mm_xor_si128(alpha, _mm_set1_epi16 (0x00ff)); + + for (uint i = 0; i < length; i++) diff --git a/srcpkgs/kde-workspace/patches/musl-uint.patch b/srcpkgs/kde-workspace/patches/musl-uint.patch new file mode 100644 index 00000000000..ab7ceff7af6 --- /dev/null +++ b/srcpkgs/kde-workspace/patches/musl-uint.patch @@ -0,0 +1,15 @@ +The type uint is not defined by musl libc headers. + +--- ksysguard/ksysguardd/Linux/netstat.c 2015-05-07 20:13:26.000000000 +0200 ++++ ksysguard/ksysguardd/Linux/netstat.c 2015-10-09 00:02:49.350628001 +0200 +@@ -32,6 +32,10 @@ + #include "ccont.h" + #include "netstat.h" + ++#if !defined(__GLIBC__) ++typedef unsigned int uint; ++#endif ++ + static CONTAINER TcpSocketList = 0; + static CONTAINER UdpSocketList = 0; + static CONTAINER UnixSocketList = 0; diff --git a/srcpkgs/kde-workspace/patches/q_byte_order.patch b/srcpkgs/kde-workspace/patches/q_byte_order.patch new file mode 100644 index 00000000000..1d06a5e1271 --- /dev/null +++ b/srcpkgs/kde-workspace/patches/q_byte_order.patch @@ -0,0 +1,27 @@ +Use Qt defined macros Q_BYTE_ORDER, Q_BIG_ENDIAN and +Q_LITLLE_ENDIAN which are defined also for musl libc. + +--- ksplash/ksplashx/scale.cpp 2015-05-07 20:13:26.000000000 +0200 ++++ ksplash/ksplashx/scale.cpp 2015-10-09 00:07:44.940604940 +0200 +@@ -165,18 +165,18 @@ + + // FIXME: replace with mRed, etc... These work on pointers to pixels, not + // pixel values +-#if BYTE_ORDER == BIG_ENDIAN ++#if Q_BYTE_ORDER == Q_BIG_ENDIAN + #define A_VAL(p) ((unsigned char *)(p))[0] + #define R_VAL(p) ((unsigned char *)(p))[1] + #define G_VAL(p) ((unsigned char *)(p))[2] + #define B_VAL(p) ((unsigned char *)(p))[3] +-#elif BYTE_ORDER == LITTLE_ENDIAN ++#elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN + #define A_VAL(p) ((unsigned char *)(p))[3] + #define R_VAL(p) ((unsigned char *)(p))[2] + #define G_VAL(p) ((unsigned char *)(p))[1] + #define B_VAL(p) ((unsigned char *)(p))[0] + #else +-#error "BYTE_ORDER is not defined" ++#error "Q_BYTE_ORDER is not defined" + #endif + + #define INV_XAP (256 - xapoints[x]) diff --git a/srcpkgs/kde-workspace/template b/srcpkgs/kde-workspace/template index e06b2a3d281..e3385177127 100644 --- a/srcpkgs/kde-workspace/template +++ b/srcpkgs/kde-workspace/template @@ -4,10 +4,10 @@ _kappversion=15.04.1 pkgname=kde-workspace version=4.11.19 -revision=2 +revision=3 short_desc="Provides the interface and basic tools for the KDE workspace" maintainer="Juan RP " -license="GPL, LGPL, FDL" +license="GPL-2, LGPL-2.1, FDL" homepage="http://www.kde.org" distfiles="http://download.kde.org/stable/applications/${_kappversion}/src/${pkgname}-${version}.tar.xz" checksum=1c1429db0a12d6ad076e0f1c6f1a00cac781aceb1aa8c88937fbf2700dc2c5c2