Add workaround for build error with flex-2.6.0

epel9
Daniel Vrátil 9 years ago
parent 8c36f5c780
commit 0d5903b912

@ -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}

@ -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 )
Loading…
Cancel
Save