diff --git a/codec2-el6_gnu11.patch b/codec2-el6_gnu11.patch deleted file mode 100644 index 2b133e7..0000000 --- a/codec2-el6_gnu11.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: codec2-dev/CMakeLists.txt -=================================================================== ---- codec2-dev/CMakeLists.txt (revision 3026) -+++ codec2-dev/CMakeLists.txt (working copy) -@@ -52,18 +52,21 @@ - endif() - - # Set default C++ flags. --set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") --set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O3 -std=gnu11") -+include(CheckCCompilerFlag) -+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O3") -+CHECK_C_COMPILER_FLAG("-std=gnu11" COMPILER_SUPPORTS_GNU11) -+if(COMPILER_SUPPORTS_GNU11) -+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") -+else() -+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") -+endif() - # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") - - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS}") --set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS}") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS}") - - # -fPIC is implied on MinGW... - if(NOT WIN32) -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - endif() - diff --git a/codec2.spec b/codec2.spec index 541eb67..21c0d57 100644 --- a/codec2.spec +++ b/codec2.spec @@ -7,8 +7,6 @@ License: LGPLv2 URL: http://rowetel.com/codec2.html Source0: http://files.freedv.org/%{name}/%{name}-%{version}.tar.xz -Patch0: codec2-el6_gnu11.patch - BuildRequires: cmake%{?rhel:3} BuildRequires: speex-devel %if 0%{?fedora} @@ -41,8 +39,7 @@ Example code for Codec 2 %prep -%setup -q -%patch0 -p1 +%autosetup %build