summaryrefslogtreecommitdiffstats
path: root/development/gnuradio/replace_boost_endian_check_with_cmake.patch
diff options
context:
space:
mode:
author Matteo Bernardini <ponce@slackbuilds.org>2020-05-17 11:06:38 +0200
committer Robby Workman <rworkman@slackbuilds.org>2021-04-17 23:25:26 -0500
commitea651dcf198e1af2419d081e82a1ae98bdd56c3f (patch)
treea9f24aefcd4dd26a0627cda2f28f6bcc6ba0dd5f /development/gnuradio/replace_boost_endian_check_with_cmake.patch
parenta685a6f25e6cfcf918dd6b56e3dd58d0bbbdf1f1 (diff)
downloadslackbuilds-ea651dcf198e1af2419d081e82a1ae98bdd56c3f.tar.gz
slackbuilds-ea651dcf198e1af2419d081e82a1ae98bdd56c3f.tar.xz
development/gnuradio: Add various patches for the newer boosts.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'development/gnuradio/replace_boost_endian_check_with_cmake.patch')
-rw-r--r--development/gnuradio/replace_boost_endian_check_with_cmake.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/development/gnuradio/replace_boost_endian_check_with_cmake.patch b/development/gnuradio/replace_boost_endian_check_with_cmake.patch
new file mode 100644
index 0000000000..ba4b1b7e20
--- /dev/null
+++ b/development/gnuradio/replace_boost_endian_check_with_cmake.patch
@@ -0,0 +1,45 @@
+diff -Naur gnuradio-3.7.13.2.orig/CMakeLists.txt gnuradio-3.7.13.2/CMakeLists.txt
+--- gnuradio-3.7.13.2.orig/CMakeLists.txt 2018-06-13 21:38:34.000000000 +0200
++++ gnuradio-3.7.13.2/CMakeLists.txt 2020-05-17 10:45:46.012538000 +0200
+@@ -186,6 +186,12 @@
+ ########################################################################
+ include(GrMiscUtils) #compiler flag check
+
++include(TestBigEndian)
++TEST_BIG_ENDIAN(GR_IS_BIG_ENDIAN)
++if(GR_IS_BIG_ENDIAN)
++ add_definitions(-DGR_IS_BIG_ENDIAN)
++endif(GR_IS_BIG_ENDIAN)
++
+ if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
+ #http://gcc.gnu.org/wiki/Visibility
+ GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
+diff -Naur gnuradio-3.7.13.2.orig/gr-blocks/lib/wavfile.cc gnuradio-3.7.13.2/gr-blocks/lib/wavfile.cc
+--- gnuradio-3.7.13.2.orig/gr-blocks/lib/wavfile.cc 2018-06-13 21:38:34.000000000 +0200
++++ gnuradio-3.7.13.2/gr-blocks/lib/wavfile.cc 2020-05-17 10:47:30.216538000 +0200
+@@ -27,7 +27,6 @@
+ #include <gnuradio/blocks/wavfile.h>
+ #include <cstring>
+ #include <stdint.h>
+-#include <boost/detail/endian.hpp> //BOOST_BIG_ENDIAN
+
+ namespace gr {
+ namespace blocks {
+@@ -35,7 +34,7 @@
+
+ // Basically, this is the opposite of htonx() and ntohx()
+ // Define host to/from worknet (little endian) short and long
+-#ifdef BOOST_BIG_ENDIAN
++#ifdef GR_IS_BIG_ENDIAN
+
+ static inline uint16_t __gri_wav_bs16(uint16_t x)
+ {
+@@ -59,7 +58,7 @@
+ #define htows(x) uint16_t(x)
+ #define wtohs(x) uint16_t(x)
+
+-#endif // BOOST_BIG_ENDIAN
++#endif // GR_IS_BIG_ENDIAN
+
+ // WAV files are always little-endian, so we need some byte switching macros
+ static inline uint32_t host_to_wav(uint32_t x) { return htowl(x); }