--- /dev/null
+--- FreeRDP-06d47530b6501ce09f649814f5023c3dd88ce5a0/libfreerdp/codec/nsc_sse2.c.orig 2016-11-18 12:46:14.000000000 +0100
++++ FreeRDP-06d47530b6501ce09f649814f5023c3dd88ce5a0/libfreerdp/codec/nsc_sse2.c 2016-12-03 09:01:03.673102526 +0100
+@@ -30,6 +30,7 @@
+
+ #include <freerdp/codec/color.h>
+ #include <winpr/crt.h>
++#include <winpr/sysinfo.h>
+
+ #include "nsc_types.h"
+ #include "nsc_sse2.h"
+@@ -400,6 +401,9 @@
+
+ void nsc_init_sse2(NSC_CONTEXT* context)
+ {
++ if (IsProcessorFeaturePresent(PF_SSE2_INSTRUCTIONS_AVAILABLE))
++ {
+ IF_PROFILER(context->priv->prof_nsc_encode->name = "nsc_encode_sse2");
+ context->encode = nsc_encode_sse2;
++ }
+ }
%bcond_without wayland # Wayland client
%bcond_without x11 # X11 client
%bcond_with x264 # X264 for H.264 codec [only if ffmpeg and openh264 disabled]
-%bcond_with sse2 # SSE2 and higher instructions (SSE2 unconditionally in libfreerdp/codec/nsc_sse2.c; elsewhere >=SSE2 runtime detected)
+%bcond_without sse2 # SSE2 and higher instructions (runtime detection with sse patch)
-%ifarch %{x8664} pentium4
-%define with_sse2 1
+%ifnarch %{ix86} %{x8664} x32
+%undefine with_sse2
%endif
Summary: Remote Desktop Protocol client
Summary(pl.UTF-8): Klient protokołu RDP
Patch0: freerdp-DirectFB-include.patch
Patch1: freerdp-opt.patch
Patch2: freerdp-gsm.patch
+Patch3: freerdp-sse.patch
URL: http://www.freerdp.com/
%{?with_directfb:BuildRequires: DirectFB-devel}
%{?with_alsa:BuildRequires: alsa-lib-devel}
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
cat << EOF > xfreerdp.desktop
[Desktop Entry]
%attr(755,root,root) %{_bindir}/winpr-hash
%attr(755,root,root) %{_bindir}/winpr-makecert
%{_iconsdir}/hicolor/256x256/apps/freerdp2.png
+# FIXME: should be wlog(7) or so (refers to wlog logging subsystem, not program)
+%{_mandir}/man1/wlog.1*
%if %{with directfb}
%files dfb