Package: gnuradio Version: 3.7.10.1-2 Followup-For: Bug #862133 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu artful ubuntu-patch
Hi Maitland, While gnuradio currently configures itself to build under -std=c++98, it appears that with the exception of one module, the code is compatible with c++11 (builds and passes its build-time test suite). Attached is a patch which switches the build to C++11 (with one module excepted) and lets gnuradio build against current cppunit. I know it's not a particularly pretty use of CMake (I'm not adept at CMake), but this should unblock the cppunit transition. I've uploaded gnuradio with this change to Ubuntu; please consider applying the same, or something like it, in Debian. Or if you know of a reason that this is a bad idea, let me know! Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru gnuradio-3.7.10.1/debian/patches/series gnuradio-3.7.10.1/debian/patches/series --- gnuradio-3.7.10.1/debian/patches/series 2016-10-09 19:15:44.000000000 -0700 +++ gnuradio-3.7.10.1/debian/patches/series 2017-07-26 23:12:51.000000000 -0700 @@ -37,3 +37,4 @@ provide-example-grfreedv.grc-flowgraph Convert-tabs-to-spaces Get-the-FreeDV-demodulator-working +use-cxx11 diff -Nru gnuradio-3.7.10.1/debian/patches/use-cxx11 gnuradio-3.7.10.1/debian/patches/use-cxx11 --- gnuradio-3.7.10.1/debian/patches/use-cxx11 1969-12-31 16:00:00.000000000 -0800 +++ gnuradio-3.7.10.1/debian/patches/use-cxx11 2017-07-26 23:14:12.000000000 -0700 @@ -0,0 +1,37 @@ +Description: use c++11 standard instead of c++98 + cppunit now requires c++11, so use this for building. +Author: Steve Langasek <steve.langa...@ubuntu.com> +Bug-Debian: https://bugs.debian.org/862133 + +Index: gnuradio-3.7.10.1/CMakeLists.txt +=================================================================== +--- gnuradio-3.7.10.1.orig/CMakeLists.txt ++++ gnuradio-3.7.10.1/CMakeLists.txt +@@ -66,11 +66,11 @@ + # set(CMAKE_CXX_STANDARD 98) + + IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + ELSE() + message(warning "C++ standard could not be set because compiler is not GNU, Clang or MSVC.") + ENDIF() +Index: gnuradio-3.7.10.1/gr-fec/CMakeLists.txt +=================================================================== +--- gnuradio-3.7.10.1.orig/gr-fec/CMakeLists.txt ++++ gnuradio-3.7.10.1/gr-fec/CMakeLists.txt +@@ -46,6 +46,8 @@ + + SET(GR_PKG_FEC_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/fec) + ++add_compile_options(-std=c++98) ++ + ######################################################################## + # Begin conditional configuration + ########################################################################