From patchwork Thu Mar 5 11:03:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 446666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7D310140142 for ; Thu, 5 Mar 2015 21:07:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BCC83A3730; Thu, 5 Mar 2015 10:07:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F4kDmGJhfEpB; Thu, 5 Mar 2015 10:06:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9164FA371C; Thu, 5 Mar 2015 10:06:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 403481C2923 for ; Thu, 5 Mar 2015 10:06:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3B31192085 for ; Thu, 5 Mar 2015 10:06:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G55GyiyO+F20 for ; Thu, 5 Mar 2015 10:06:54 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6ED8192084 for ; Thu, 5 Mar 2015 10:06:54 +0000 (UTC) Received: from serveur.trabucayre.com (unknown [81.56.132.22]) by smtp2-g21.free.fr (Postfix) with ESMTP id CEA0A4B024F; Thu, 5 Mar 2015 11:06:13 +0100 (CET) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Thu, 5 Mar 2015 12:03:21 +0100 Message-Id: <1425553401-27461-3-git-send-email-gwenj@trabucayre.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1425553401-27461-1-git-send-email-gwenj@trabucayre.com> References: <1425553401-27461-1-git-send-email-gwenj@trabucayre.com> Cc: Thomas Petazzoni , Gwenhael Goavec-Merou Subject: [Buildroot] [PATCH v4 3/3] GNURadio: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou Signed-off-by: Gwenhael Goavec-Merou --- Changes v2 -> v3: * move comment at the beginning of the file. * add a patch to suppress boost-test dependency. * move python dependencies in the specific option. * use stable archive instead of git. * add hook specific for ARM for using neon if available (without this hook volk fails to build). Changes v1 -> v2: * overload _BUILDDIR variable to specify build directory --- package/Config.in | 1 + package/gnuradio/Config.in | 42 +++++++++++++++++++++ ...dio-0001-suppress-boost_unitest-detection.patch | 44 ++++++++++++++++++++++ package/gnuradio/gnuradio.hash | 2 + package/gnuradio/gnuradio.mk | 39 +++++++++++++++++++ 5 files changed, 128 insertions(+) create mode 100644 package/gnuradio/Config.in create mode 100644 package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch create mode 100644 package/gnuradio/gnuradio.hash create mode 100644 package/gnuradio/gnuradio.mk diff --git a/package/Config.in b/package/Config.in index ba45f32..2e167d5 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1041,6 +1041,7 @@ menu "Miscellaneous" source "package/clamav/Config.in" source "package/collectd/Config.in" source "package/empty/Config.in" + source "package/gnuradio/Config.in" source "package/googlefontdirectory/Config.in" source "package/haveged/Config.in" source "package/mcrypt/Config.in" diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in new file mode 100644 index 0000000..8e5c516 --- /dev/null +++ b/package/gnuradio/Config.in @@ -0,0 +1,42 @@ +comment "GNURadio needs a toolchain w/ C++, mmu, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_MMU \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS \ + && BR2_LARGEFILE && BR2_INET_IPV6) + +config BR2_PACKAGE_GNURADIO + bool "GNURadio" + depends on BR2_INET_IPV6 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_DATE_TIME + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + + help + GNU Radio is a free & open-source software development toolkit that + provides signal processing blocks to implement software radios. It can be + used with readily-available low-cost external RF hardware to create + software-defined radios, or without hardware in a simulation-like + environment. It is widely used in hobbyist, academic and commercial + environments to support both wireless communications research and + real-world radio systems. + + http://gnuradio.org/ + +if BR2_PACKAGE_GNURADIO + +config BR2_PACKAGE_GNURADIO_BLOCKS + bool "gnuradio-blocks" + +config BR2_PACKAGE_GNURADIO_PYTHON + select BR2_PACKAGE_BOOST_PYTHON + select BR2_PACKAGE_PYTHON + bool "gnuradio-python" + +endif diff --git a/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch new file mode 100644 index 0000000..7b35a59 --- /dev/null +++ b/package/gnuradio/gnuradio-0001-suppress-boost_unitest-detection.patch @@ -0,0 +1,44 @@ +Index: gnuradio-3.7.5/volk/cmake/VolkBoost.cmake +=================================================================== +--- gnuradio-3.7.5.orig/volk/cmake/VolkBoost.cmake ++++ gnuradio-3.7.5/volk/cmake/VolkBoost.cmake +@@ -29,7 +29,6 @@ set(__INCLUDED_VOLK_BOOST_CMAKE TRUE) + set(BOOST_REQUIRED_COMPONENTS + filesystem + system +- unit_test_framework + program_options + ) + +Index: gnuradio-3.7.5/volk/lib/CMakeLists.txt +=================================================================== +--- gnuradio-3.7.5.orig/volk/lib/CMakeLists.txt ++++ gnuradio-3.7.5/volk/lib/CMakeLists.txt +@@ -535,27 +535,3 @@ if(ENABLE_STATIC_LIBS) + ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_devel" # .lib file + ) + endif(ENABLE_STATIC_LIBS) +- +-######################################################################## +-# Build the QA test application +-######################################################################## +- +- +-if(Boost_FOUND) +- +- set_source_files_properties( +- ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES +- COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK;BOOST_TEST_MAIN" +- ) +- +- include_directories(${Boost_INCLUDE_DIRS}) +- link_directories(${Boost_LIBRARY_DIRS}) +- +- add_executable(test_all +- ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc +- ${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc +- ) +- target_link_libraries(test_all volk ${Boost_LIBRARIES}) +- add_test(qa_volk_test_all test_all) +- +-endif(Boost_FOUND) diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash new file mode 100644 index 0000000..a25b466 --- /dev/null +++ b/package/gnuradio/gnuradio.hash @@ -0,0 +1,2 @@ +# From http://gnuradio.org/redmine/projects/gnuradio/files +md5 b4a917a548f41ce25c6c88f9bc864bca gnuradio-3.7.5.tar.gz diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk new file mode 100644 index 0000000..4528e55 --- /dev/null +++ b/package/gnuradio/gnuradio.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# gnuradio +# +################################################################################ + +GNURADIO_VERSION = 3.7.5 +GNURADIO_SITE = http://gnuradio.org/redmine/attachments/download/792 +GNURADIO_SOURCE = gnuradio-$(GNURADIO_VERSION).tar.gz +GNURADIO_LICENSE = GPLv3+ +GNURADIO_LICENSE_FILES = COPYING + +# gnuradio prevent from in-source-tree build +GNURADIO_BUILDDIR = $(GNURADIO_SRCDIR)/build + +#needed for volk compile +GNURADIO_DEPENDENCIES += host-python-cheetah +GNURADIO_DEPENDENCIES += host-swig host-boost boost + +GNURADIO_DEPENDENCIES += $(if $(BR2_PACKAGE_GNURADIO_PYTHON),python) + +GNURADIO_INSTALL_STAGING = YES + +GNURADIO_CONF_OPTS += -DENABLE_DEFAULT=OFF -DENABLE_TESTING=OFF +GNURADIO_CONF_OPTS += -DENABLE_VOLK=ON -DENABLE_GNURADIO_RUNTIME=ON +ifeq ($(BR2_arm),y) +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_ARM_EABIHF),yy) +GNURADIO_MTUNE = $(call qstrip,$(BR2_GCC_TARGET_CPU)) +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-mfloat-abi=hard -mfpu=neon -march=armv7-a -mtune=$(GNURADIO_MTUNE)" +GNURADIO_CONF_OPTS += -DCMAKE_ASM_FLAGS="-mfpu=neon -mfloat-abi=hard -march=armv7-a" +else +GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0 +endif +endif + +GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=$(if $(BR2_PACKAGE_GNURADIO_BLOCKS),ON,OFF) +GNURADIO_CONF_OPTS += -DENABLE_PYTHON=$(if $(BR2_PACKAGE_GNURADIO_PYTHON),ON,OFF) + +$(eval $(cmake-package))