[arch-commits] Commit in gnuradio/trunk (3 files)

Evangelos Foutras foutrelis at archlinux.org
Sun Jun 3 04:31:55 UTC 2018


    Date: Sunday, June 3, 2018 @ 04:31:55
  Author: foutrelis
Revision: 338527

Fix build with boost 1.67

Added:
  gnuradio/trunk/boost-1.67-pthread.patch
  gnuradio/trunk/boost-1.67.patch
Modified:
  gnuradio/trunk/PKGBUILD

--------------------------+
 PKGBUILD                 |   10 ++++++-
 boost-1.67-pthread.patch |   23 +++++++++++++++++
 boost-1.67.patch         |   59 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-06-03 03:43:03 UTC (rev 338526)
+++ PKGBUILD	2018-06-03 04:31:55 UTC (rev 338527)
@@ -30,12 +30,15 @@
 #source=("http://s3-dist.gnuradio.org/gnuradio-$pkgver.tar.gz"
 source=("https://gnuradio.org/releases/$pkgbase/$pkgbase-$pkgver.tar.gz"
         "https://gnuradio.org/releases/$pkgbase/$pkgbase-$pkgver.tar.gz.asc"
-        "21-fcd.rules" "gnuradio-gcc7.patch")
+        "21-fcd.rules" "gnuradio-gcc7.patch"
+        "boost-1.67.patch" "boost-1.67-pthread.patch")
 validpgpkeys=('B90DDFAC56989BF62262EB812987C77CBB8ED9B2') # GNU Radio Project
 md5sums=('7b7b871237ae6fc109d203f78c4654ef'
          'SKIP'
          '465e12c454c6a22ebec9849181af7bdc'
-         'c510104fa2ad9852a683c265c42ae1da')
+         'c510104fa2ad9852a683c265c42ae1da'
+         '204b87f1663411c17e5b40e9073e9d48'
+         '4f33c5e3727c04d105ce3142e546a20f')
 
 prepare() {
   cd "$srcdir/$pkgbase-$pkgver"
@@ -47,6 +50,9 @@
     $(find ./ -name '*.py')
   # fix build with GCC 7 (Fedora)
   patch -p1 -i ../gnuradio-gcc7.patch
+  # https://github.com/gnuradio/gnuradio/pull/1733
+  patch -p1 -i ../boost-1.67.patch
+  patch -p1 -i ../boost-1.67-pthread.patch
 }
 
 build() {

Added: boost-1.67-pthread.patch
===================================================================
--- boost-1.67-pthread.patch	                        (rev 0)
+++ boost-1.67-pthread.patch	2018-06-03 04:31:55 UTC (rev 338527)
@@ -0,0 +1,23 @@
+diff -upr gnuradio-3.7.11.orig/gr-blocks/lib/CMakeLists.txt gnuradio-3.7.11/gr-blocks/lib/CMakeLists.txt
+--- gnuradio-3.7.11.orig/gr-blocks/lib/CMakeLists.txt	2017-02-28 01:19:00.000000000 +0200
++++ gnuradio-3.7.11/gr-blocks/lib/CMakeLists.txt	2018-06-03 07:12:46.110899996 +0300
+@@ -328,6 +328,7 @@ if(ENABLE_TESTING)
+     gnuradio-runtime
+     gnuradio-blocks
+     ${Boost_LIBRARIES}
++    ${CMAKE_THREAD_LIBS_INIT}
+     ${CPPUNIT_LIBRARIES}
+     ${LOG4CPP_LIBRARIES}
+   )
+diff -upr gnuradio-3.7.11.orig/gr-uhd/examples/c++/CMakeLists.txt gnuradio-3.7.11/gr-uhd/examples/c++/CMakeLists.txt
+--- gnuradio-3.7.11.orig/gr-uhd/examples/c++/CMakeLists.txt	2017-02-28 01:19:00.000000000 +0200
++++ gnuradio-3.7.11/gr-uhd/examples/c++/CMakeLists.txt	2018-06-03 07:12:53.401117802 +0300
+@@ -35,7 +35,7 @@ link_directories(${Boost_LIBRARY_DIRS})
+ # Build executable
+ ########################################################################
+ add_executable(tags_demo tags_demo.cc)
+-target_link_libraries(tags_demo gnuradio-uhd)
++target_link_libraries(tags_demo gnuradio-uhd ${CMAKE_THREAD_LIBS_INIT})
+ 
+ INSTALL(TARGETS
+     tags_demo

Added: boost-1.67.patch
===================================================================
--- boost-1.67.patch	                        (rev 0)
+++ boost-1.67.patch	2018-06-03 04:31:55 UTC (rev 338527)
@@ -0,0 +1,59 @@
+From b320213c6611cd0ab02034ec1ff1380e83dab8e1 Mon Sep 17 00:00:00 2001
+From: ilovezfs <ilovezfs at icloud.com>
+Date: Tue, 17 Apr 2018 03:25:30 -0700
+Subject: [PATCH] Boost 1.67 compatibility
+
+---
+ gr-blocks/lib/message_strobe_impl.cc        | 2 +-
+ gr-blocks/lib/message_strobe_random_impl.cc | 2 +-
+ gr-uhd/lib/usrp_block_impl.cc               | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gr-blocks/lib/message_strobe_impl.cc b/gr-blocks/lib/message_strobe_impl.cc
+index 059584e636..cee7bfccf3 100644
+--- a/gr-blocks/lib/message_strobe_impl.cc
++++ b/gr-blocks/lib/message_strobe_impl.cc
+@@ -91,7 +91,7 @@ namespace gr {
+     void message_strobe_impl::run()
+     {
+       while(!d_finished) {
+-        boost::this_thread::sleep(boost::posix_time::milliseconds(d_period_ms));
++        boost::this_thread::sleep(boost::posix_time::milliseconds(static_cast<long>(d_period_ms)));
+         if(d_finished) {
+           return;
+         }
+diff --git a/gr-blocks/lib/message_strobe_random_impl.cc b/gr-blocks/lib/message_strobe_random_impl.cc
+index ab9422717c..08bfd1ff1f 100644
+--- a/gr-blocks/lib/message_strobe_random_impl.cc
++++ b/gr-blocks/lib/message_strobe_random_impl.cc
+@@ -110,7 +110,7 @@ namespace gr {
+     void message_strobe_random_impl::run()
+     {
+       while(!d_finished) {
+-        boost::this_thread::sleep(boost::posix_time::milliseconds(std::max(0.0f,next_delay())));
++        boost::this_thread::sleep(boost::posix_time::milliseconds(static_cast<long>(std::max(0.0f,next_delay()))));
+         if(d_finished) {
+           return;
+         }
+diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc
+index 70256d3071..84a6791cf7 100644
+--- a/gr-uhd/lib/usrp_block_impl.cc
++++ b/gr-uhd/lib/usrp_block_impl.cc
+@@ -196,7 +196,7 @@ bool usrp_block_impl::_wait_for_locked_sensor(
+ 
+   while (true) {
+     if ((not first_lock_time.is_not_a_date_time()) and
+-        (boost::get_system_time() > (first_lock_time + boost::posix_time::seconds(LOCK_TIMEOUT)))) {
++        (boost::get_system_time() > (first_lock_time + boost::posix_time::seconds(static_cast<long>(LOCK_TIMEOUT))))) {
+       break;
+     }
+ 
+@@ -207,7 +207,7 @@ bool usrp_block_impl::_wait_for_locked_sensor(
+     else {
+       first_lock_time = boost::system_time(); //reset to 'not a date time'
+ 
+-      if (boost::get_system_time() > (start + boost::posix_time::seconds(LOCK_TIMEOUT))){
++      if (boost::get_system_time() > (start + boost::posix_time::seconds(static_cast<long>(LOCK_TIMEOUT)))){
+         return false;
+       }
+     }



More information about the arch-commits mailing list