From 0d5903b9129abf0f7a0bc8faaf8805dbcd8ef759 Mon Sep 17 00:00:00 2001 From: Daniel Vrátil Date: Aug 08 2016 09:29:08 +0000 Subject: Add workaround for build error with flex-2.6.0 --- diff --git a/kf5-solid.spec b/kf5-solid.spec index b49f1d1..89037e6 100644 --- a/kf5-solid.spec +++ b/kf5-solid.spec @@ -17,6 +17,10 @@ URL: https://quickgit.kde.org/?p=%{framework}.git %endif Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz +# Workaround https://bugzilla.redhat.com/show_bug.cgi?id=1364943 +# Technically only affects rawhide/f26, but is harmless elsewhere too +Patch0: solid-5.25-fix-build-with-flex-2.6.0.patch + BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-rpm-macros >= %{version} BuildRequires: libupnp-devel @@ -73,7 +77,6 @@ developing applications that use %{name}. %prep %autosetup -n %{framework}-%{version} - %build mkdir %{_target_platform} pushd %{_target_platform} @@ -82,7 +85,6 @@ popd make %{?_smp_mflags} -C %{_target_platform} - %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} diff --git a/solid-5.25-fix-build-with-flex-2.6.0.patch b/solid-5.25-fix-build-with-flex-2.6.0.patch new file mode 100644 index 0000000..8fd6d8d --- /dev/null +++ b/solid-5.25-fix-build-with-flex-2.6.0.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8a394d1..d88e824 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,11 @@ set_package_properties(BISON PROPERTIES + PURPOSE "Required for the Predicate parser" + ) + ++# flex-2.6.0 generates C90-incompatible code. KDEFrameworksCompilerSettings ++# forces C90 standard though, overriding our CFLAGS env variable, so we must ++# override the -std flag here ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") ++ + if (CMAKE_SYSTEM_NAME MATCHES Linux) + find_package( UDev ) +