<pre style='margin:0'>
ra1nb0w (ra1nb0w) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/99f5fc13c7fe2ac1b80d21e5c0f3d3b10224c166">https://github.com/macports/macports-ports/commit/99f5fc13c7fe2ac1b80d21e5c0f3d3b10224c166</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 99f5fc13c7fe2ac1b80d21e5c0f3d3b10224c166
</span>Author: Davide Gerhard <ra1nb0w@macports.org>
AuthorDate: Tue Mar 23 08:49:40 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> gnuradio: update version to 3.8.3.0
</span>---
science/gnuradio/Portfile | 21 +-
...grc-dark-theme-detection-gsettings-fail.38.diff | 27 ---
.../gnuradio/files/patch-fixes_for-thrift.38.diff | 248 ---------------------
3 files changed, 5 insertions(+), 291 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/gnuradio/Portfile b/science/gnuradio/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 71e5791f9f7..0d82318120f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/gnuradio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/gnuradio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -22,11 +22,11 @@ compiler.cxx_standard 2011
</span>
if {${subport} eq ${name}} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- github.setup gnuradio gnuradio 3.8.2.0 v
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 0e3582fdca19c219e4f158f15bde4c943310fa97 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 c9aa8795f76075484dc50fcbad89988a39c91610c80d72182650b700a1529fd3 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 3381987
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup gnuradio gnuradio 3.8.3.0 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 27036f8efd2d35ce17a2eb871355b6056ca029df \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 babd0114be950229c6002518f689b2df719fc69584114f18785284ad82d886bd \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 3390350
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span>
long_description ${description}: \
This port is kept up with the GNU Radio release, \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,9 +41,6 @@ if {${subport} eq ${name}} {
</span> # CMAKE_C/CXX_STANDARD
patchfiles-append \
patch-C_CXX_STANDARD.38.diff
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # TODO check temporary patch to fix using Thrift 0.9.2 through 0.12.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-fixes_for-thrift.38.diff
</span> # temporary patch to fix usage of GNURadioControlPortClient
patchfiles-append \
patch-fix-GNURadioControlPortClient-usage.38.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,17 +49,9 @@ if {${subport} eq ${name}} {
</span> patchfiles-append \
patch-quartz_drag_n_drop.38.diff \
patch-quartz_drop_crash.38.diff
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # temporary fix GRC launch crash for when a GTK3 setting doesn't
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # exist; this or some equivalent fix will be integrated upstream,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # so remove at next release
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-fix-grc-dark-theme-detection-gsettings-fail.38.diff
</span>
set GR_VERSION_INFO "Release 3.8"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # avoid issue with SWIG API changes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts_build gnuradio
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> github.livecheck.regex {(3.8.[0-9.]+)}
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/gnuradio/files/patch-fix-grc-dark-theme-detection-gsettings-fail.38.diff b/science/gnuradio/files/patch-fix-grc-dark-theme-detection-gsettings-fail.38.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 718b53cf67e..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/gnuradio/files/patch-fix-grc-dark-theme-detection-gsettings-fail.38.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,27 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- grc/gui/ParamWidgets.py.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ grc/gui/ParamWidgets.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -35,7 +35,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- """
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Check if a theme is dark based on its name.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- """
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return theme_name in Constants.GTK_DARK_THEMES or "dark" in theme_name.lower()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return theme_name and (theme_name in Constants.GTK_DARK_THEMES or "dark" in theme_name.lower())
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # GoGoGo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- config = configparser.ConfigParser()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- config.read(os.path.expanduser(Constants.GTK_SETTINGS_INI_PATH))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -45,9 +45,12 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- theme_name = config.get(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 'Settings', Constants.GTK_INI_THEME_NAME_KEY, fallback=None)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return is_dark_theme(theme_name)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- theme = subprocess.check_output(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- ["gsettings", "get", "org.gnome.desktop.interface", "gtk-theme"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- ).decode('utf-8').strip().replace("'", "")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ try:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ theme = subprocess.check_output(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ ["gsettings", "get", "org.gnome.desktop.interface", "gtk-theme"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ ).decode('utf-8').strip().replace("'", "")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ except:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return False
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return is_dark_theme(theme)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def add_style_provider():
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/gnuradio/files/patch-fixes_for-thrift.38.diff b/science/gnuradio/files/patch-fixes_for-thrift.38.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 41d9acb8c07..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/gnuradio/files/patch-fixes_for-thrift.38.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,248 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- cmake/Modules/FindTHRIFT.cmake.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ cmake/Modules/FindTHRIFT.cmake
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -91,3 +91,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- INTERFACE_LINK_LIBRARIES "${THRIFT_LIBRARIES}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- )
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# set version to be useable by calling script
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+IF(THRIFT_FOUND)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ set(THRIFT_VERSION ${PC_THRIFT_VERSION} CACHE INTERNAL "Thrift Version" FORCE)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ENDIF()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- gnuradio-runtime/include/gnuradio/CMakeLists.txt.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/include/gnuradio/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -72,6 +72,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- tag_checker.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- types.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unittests.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ rpc_shared_ptr_selection.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rpccallbackregister_base.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rpcmanager_base.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rpcmanager.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- /dev/null
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/include/gnuradio/rpc_shared_ptr_selection.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -0,0 +1,44 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+/* -*- c++ -*- */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * Copyright 2019 Free Software Foundation, Inc.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * This file is part of GNU Radio
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * GNU Radio is free software; you can redistribute it and/or modify
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * it under the terms of the GNU General Public License as published by
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * the Free Software Foundation; either version 3, or (at your option)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * any later version.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * GNU Radio is distributed in the hope that it will be useful,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * GNU General Public License for more details.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ *
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * You should have received a copy of the GNU General Public License
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * along with GNU Radio; see the file COPYING. If not, write to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * the Free Software Foundation, Inc., 51 Franklin Street,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ * Boston, MA 02110-1301, USA.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#ifndef RPC_SHARED_PTR_SELECTION_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define RPC_SHARED_PTR_SELECTION_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// select a "shared_ptr" type to use: std:: or boost:: . The selection
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// will happen in gnuradio-runtime/lib/controlport/CMakeLists.txt .
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// CTRLPORT_USE_STD_SHARED_PTR will be defined here to 0 or 1.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#if CTRLPORT_USE_STD_SHARED_PTR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// c++11 std::shared_ptr
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <memory>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define GR_RPC_SHARED_PTR std::shared_ptr
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#else /* !CTRLPORT_USE_STD_SHARED_PTR */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+// boost::shared_ptr
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <gnuradio/types.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#define GR_RPC_SHARED_PTR boost::shared_ptr
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif /* CTRLPORT_USE_STD_SHARED_PTR */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#endif /* RPC_SHARED_PTR_SELECTION_H */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- gnuradio-runtime/include/gnuradio/rpcmanager_base.h.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/include/gnuradio/rpcmanager_base.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -23,7 +23,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifndef RPCMANAGER_BASE_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define RPCMANAGER_BASE_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#include <boost/shared_ptr.hpp>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <gnuradio/rpc_shared_ptr_selection.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- class rpcserver_booter_base;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // class rpcserver_booter_aggregator;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -31,7 +31,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- class rpcmanager_base
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- public:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- typedef boost::shared_ptr<rpcserver_booter_base> rpcserver_booter_base_sptr;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ typedef GR_RPC_SHARED_PTR<rpcserver_booter_base> rpcserver_booter_base_sptr;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rpcmanager_base() { ; }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ~rpcmanager_base() { ; }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- gnuradio-runtime/include/gnuradio/rpcserver_base.h.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/include/gnuradio/rpcserver_base.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -23,6 +23,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifndef RPCSERVER_BASE_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define RPCSERVER_BASE_H
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <gnuradio/rpc_shared_ptr_selection.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/rpccallbackregister_base.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- class rpcserver_base : public virtual callbackregister_base
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -45,7 +46,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- virtual void setCurPrivLevel(const priv_lvl_t priv) { cur_priv = priv; }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- typedef boost::shared_ptr<rpcserver_base> rpcserver_base_sptr;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ typedef GR_RPC_SHARED_PTR<rpcserver_base> rpcserver_base_sptr;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- protected:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- priv_lvl_t cur_priv;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/include/gnuradio/rpcserver_booter_aggregator.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -24,9 +24,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #define RPCSERVER_BOOTER_AGGREGATOR
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/api.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <gnuradio/rpc_shared_ptr_selection.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/rpcserver_aggregator.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/rpcserver_booter_base.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--#include <boost/shared_ptr.hpp>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <string>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- class rpcserver_server;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -49,7 +49,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- private:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- std::string d_type;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<rpcserver_aggregator> server;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<rpcserver_aggregator> server;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- };
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif /* RPCSERVER_BOOTER_AGGREGATOR */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- gnuradio-runtime/include/gnuradio/thrift_server_template.h.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/include/gnuradio/thrift_server_template.h
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -25,6 +25,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/logger.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/prefs.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#include <gnuradio/rpc_shared_ptr_selection.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <gnuradio/thrift_application_base.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <iostream>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -50,11 +51,11 @@ protected:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- friend class thrift_application_base<TserverBase, TImplClass>;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- private:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<TserverClass> d_handler;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<thrift::TProcessor> d_processor;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<thrift::transport::TServerTransport> d_serverTransport;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<thrift::transport::TTransportFactory> d_transportFactory;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<thrift::protocol::TProtocolFactory> d_protocolFactory;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<TserverClass> d_handler;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<thrift::TProcessor> d_processor;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<thrift::transport::TServerTransport> d_serverTransport;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<thrift::transport::TTransportFactory> d_transportFactory;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<thrift::protocol::TProtocolFactory> d_protocolFactory;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- /**
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Custom TransportFactory that allows you to override the default Thrift buffer size
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * of 512 bytes.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -71,10 +72,10 @@ private:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- virtual ~TBufferedTransportFactory() {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- virtual boost::shared_ptr<thrift::transport::TTransport>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- getTransport(boost::shared_ptr<thrift::transport::TTransport> trans)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ virtual GR_RPC_SHARED_PTR<thrift::transport::TTransport>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ getTransport(GR_RPC_SHARED_PTR<thrift::transport::TTransport> trans)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- return boost::shared_ptr<thrift::transport::TTransport>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ return GR_RPC_SHARED_PTR<thrift::transport::TTransport>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- new thrift::transport::TBufferedTransport(trans, bufferSize));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -133,11 +134,11 @@ thrift_server_template<TserverBase, TserverClass, TImplClass>::thrift_server_tem
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- d_processor, d_serverTransport, d_transportFactory, d_protocolFactory));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- // std::cout << "Thrift Multi-threaded server : " << d_nthreads << std::endl;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<thrift::concurrency::ThreadManager> threadManager(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<thrift::concurrency::ThreadManager> threadManager(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- thrift::concurrency::ThreadManager::newSimpleThreadManager(nthreads));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- threadManager->threadFactory(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- boost::shared_ptr<thrift::concurrency::PlatformThreadFactory>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ GR_RPC_SHARED_PTR<thrift::concurrency::PlatformThreadFactory>(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- new thrift::concurrency::PlatformThreadFactory()));
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- threadManager->start();
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- gnuradio-runtime/lib/CMakeLists.txt.orig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ gnuradio-runtime/lib/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -142,9 +142,37 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- FIND_PACKAGE(THRIFT)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if(THRIFT_FOUND)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- list(APPEND EXTRA_DEPS "THRIFT")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- MATH(EXPR CTRLPORT_BACKENDS "${CTRLPORT_BACKENDS} + 1")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# Thrift was found! Make sure the selected c++ standard is
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# compatible: Thrift <= 0.10 requires using boost:shared_ptr, which
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# will work with any c++ standard. Thrift >= 0.11.0 requires using
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# std::shared_ptr, which requires c++11 or later.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+if(${THRIFT_VERSION} VERSION_GREATER_EQUAL 0.11.0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if(CMAKE_CXX_STANDARD)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if(${CMAKE_CXX_STANDARD} VERSION_LESS 11)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ message(WARNING "\nWarning: Thrift version is ${THRIFT_VERSION}, which requires C++11 for building. The current c++ standard to use is C++${CMAKE_CXX_STANDARD}, which will not work with this Thrift version. Trying to set CMake internally to use C++11 ...")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ set(CMAKE_CXX_STANDARD 11)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ else()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ message(WARNING "\nWarning: Thrift version is ${THRIFT_VERSION}, which requires C++11 for building. The c++ standard to use is not currently set. Trying to set CMake internally to use C++11 ...")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ set(CMAKE_CXX_STANDARD 11)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# Add a macro for whether to require using std::shared_ptr.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# depends on the version of Thrift.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+if(${THRIFT_VERSION} VERSION_LESS_EQUAL 0.10.0)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ # old version that uses boost::shared_ptr
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ add_definitions("-DCTRLPORT_USE_STD_SHARED_PTR=0")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+else()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ # new version that uses c++11 std::shared_ptr
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ add_definitions("-DCTRLPORT_USE_STD_SHARED_PTR=1")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Indicate thrift as an installed backend in the cmake summary.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- message(STATUS "Found and enabling Thrift backend to ControlPort")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- GR_APPEND_SUBCOMPONENT("thrift")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -185,6 +213,22 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- DESTINATION ${GR_PKG_DOC_DIR}/config
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- )
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+else(THRIFT_FOUND)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# building CTRLPORT, but not using Thrift. CTRLPORT does not require
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# std::shared_ptr, can use either std::shared_ptr or
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# boost::shared_ptr. If using c++11 or later, choose the former,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# else choose the latter.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+if(CMAKE_CXX_STANDARD)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ if(${CMAKE_CXX_STANDARD} VERSION_GREATER_EQUAL 11)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ add_definitions("-DCTRLPORT_USE_STD_SHARED_PTR=1")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ else()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ add_definitions("-DCTRLPORT_USE_STD_SHARED_PTR=0")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+else()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ add_definitions("-DCTRLPORT_USE_STD_SHARED_PTR=0")
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+endif()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif(THRIFT_FOUND)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif(ENABLE_CTRLPORT_THRIFT)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span></pre><pre style='margin:0'>
</pre>