diff --git a/srcpkgs/CubicSDR/patches/fix-build.patch b/srcpkgs/CubicSDR/patches/fix-build.patch new file mode 100644 index 00000000000..5bc4715c8c0 --- /dev/null +++ b/srcpkgs/CubicSDR/patches/fix-build.patch @@ -0,0 +1,24 @@ +upstreamed in cjcliffe/CubicSDR#950 + +--- a/src/visual/WaterfallCanvas.cpp ++++ b/src/visual/WaterfallCanvas.cpp +@@ -482,7 +482,7 @@ + } + + } +-void WaterfallCanvas::OnIdle(wxIdleEvent & /* event */) { ++void WaterfallCanvas::OnIdle(wxIdleEvent & event) { + processInputQueue(); + Refresh(); + event.RequestMore(); +--- a/src/visual/TuningCanvas.cpp ++++ b/src/visual/TuningCanvas.cpp +@@ -269,7 +269,7 @@ + } + } + +-void TuningCanvas::OnIdle(wxIdleEvent & /* event */) { ++void TuningCanvas::OnIdle(wxIdleEvent & event) { + if (mouseTracker.mouseDown()) { + if (downState != TUNING_HOVER_NONE) { + dragAccum += 5.0*mouseTracker.getOriginDeltaMouseX(); diff --git a/srcpkgs/CubicSDR/patches/hamlib42.patch b/srcpkgs/CubicSDR/patches/hamlib42.patch deleted file mode 100644 index 8e38d8c0407..00000000000 --- a/srcpkgs/CubicSDR/patches/hamlib42.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: external/hamlib/hamlib/rig.h -=================================================================== ---- a/external/hamlib/hamlib/rig.h -+++ b/external/hamlib/hamlib/rig.h -@@ -147,7 +147,7 @@ typedef struct rig RIG; - - #define RIGNAMSIZ 30 - #define RIGVERSIZ 8 --#define FILPATHLEN 100 -+#define HAMLIB_FILPATHLEN 100 - #define FRQRANGESIZ 30 - #define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */ - #define TSLSTSIZ 20 /* max tuning step list size, zero ended */ -@@ -1479,7 +1479,7 @@ typedef struct hamlib_port { - int timeout; /*!< Timeout, in mS */ - int retry; /*!< Maximum number of retries, 0 to disable */ - -- char pathname[FILPATHLEN]; /*!< Port pathname */ -+ char pathname[HAMLIB_FILPATHLEN]; /*!< Port pathname */ - - union { - struct { - -Index: src/rig/RigThread.cpp -=================================================================== ---- a/src/rig/RigThread.cpp -+++ b/src/rig/RigThread.cpp -@@ -114,7 +114,7 @@ void RigThread::run() { - std::cout << "Rig thread starting." << std::endl; - - rig = rig_init(rigModel); -- strncpy(rig->state.rigport.pathname, rigFile.c_str(), FILPATHLEN - 1); -+ strncpy(rig->state.rigport.pathname, rigFile.c_str(), HAMLIB_FILPATHLEN - 1); - rig->state.rigport.parm.serial.rate = serialRate; - retcode = rig_open(rig); - diff --git a/srcpkgs/CubicSDR/patches/revert-migration-to-wx3.1.patch b/srcpkgs/CubicSDR/patches/revert-migration-to-wx3.1.patch index 6f57501e264..72ceb980931 100644 --- a/srcpkgs/CubicSDR/patches/revert-migration-to-wx3.1.patch +++ b/srcpkgs/CubicSDR/patches/revert-migration-to-wx3.1.patch @@ -1,3 +1,5 @@ +updated for 0.2.7. + From 531b4ef88b0e7f705c80272328d8588b916f9958 Mon Sep 17 00:00:00 2001 From: Andreas Bombe Date: Mon, 11 Jun 2018 23:10:26 +0200 @@ -79,8 +81,8 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. PrimaryGLContext& CubicSDR::GetContext(wxGLCanvas *canvas) { PrimaryGLContext *glContext; if (!m_glContext) { -- m_glContext = new PrimaryGLContext(canvas, NULL, GetContextAttributes()); -+ m_glContext = new PrimaryGLContext(canvas, NULL); +- m_glContext = new PrimaryGLContext(canvas, nullptr, GetContextAttributes()); ++ m_glContext = new PrimaryGLContext(canvas, nullptr); } glContext = m_glContext; @@ -146,7 +148,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. public: - UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + UITestCanvas(wxWindow *parent, std::vector dispAttrs); - ~UITestCanvas(); + ~UITestCanvas() override; private: --- a/src/ui/UITestContext.cpp @@ -208,7 +210,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. public: - GainCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + GainCanvas(wxWindow *parent, std::vector dispAttrs); - ~GainCanvas(); + ~GainCanvas() override; void setHelpTip(std::string tip); --- a/src/visual/InteractiveCanvas.cpp @@ -234,7 +236,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. public: - InteractiveCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + InteractiveCanvas(wxWindow *parent, std::vector dispAttrs); - virtual ~InteractiveCanvas(); + ~InteractiveCanvas() override; long long getFrequencyAt(float x); --- a/src/visual/MeterCanvas.cpp @@ -260,7 +262,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. public: - MeterCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + MeterCanvas(wxWindow *parent, std::vector dispAttrs); - ~MeterCanvas(); + ~MeterCanvas() override; void setLevel(float level_in); --- a/src/visual/MeterContext.cpp @@ -310,7 +312,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. public: - ModeSelectorCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + ModeSelectorCanvas(wxWindow *parent, std::vector dispAttrs); - ~ModeSelectorCanvas(); + ~ModeSelectorCanvas() override; int getHoveredSelection(); --- a/src/visual/ModeSelectorContext.cpp @@ -370,8 +372,8 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. EVT_ENTER_WINDOW(ScopeCanvas::OnMouseEnterWindow) wxEND_EVENT_TABLE() --ScopeCanvas::ScopeCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0), helpTip("") { -+ScopeCanvas::ScopeCanvas(wxWindow *parent, std::vector dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0), helpTip("") { +-ScopeCanvas::ScopeCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0) { ++ScopeCanvas::ScopeCanvas(wxWindow *parent, std::vector dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0) { - glContext = new ScopeContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); + glContext = new ScopeContext(this, &wxGetApp().GetContext(this)); @@ -421,7 +423,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. -SpectrumCanvas::SpectrumCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +SpectrumCanvas::SpectrumCanvas(wxWindow *parent, std::vector dispAttrs) : - InteractiveCanvas(parent, dispAttrs), waterfallCanvas(NULL) { + InteractiveCanvas(parent, dispAttrs), waterfallCanvas(nullptr) { - glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); + glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this)); @@ -436,7 +438,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. public: - SpectrumCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + SpectrumCanvas(wxWindow *parent, std::vector dispAttrs); - ~SpectrumCanvas(); + ~SpectrumCanvas() override; //This is public because it is indeed forwarded from --- a/src/visual/TuningCanvas.cpp @@ -470,7 +472,7 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. }; - TuningCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); + TuningCanvas(wxWindow *parent, std::vector dispAttrs); - ~TuningCanvas(); + ~TuningCanvas() override; void setHelpTip(std::string tip); --- a/src/visual/TuningContext.cpp @@ -532,3 +534,192 @@ This reverts commit e46d7f9735579d651664b6a1243d4b63a39bf109. void setup(unsigned int fft_size_in, int waterfall_lines_in); void setFFTSize(unsigned int fft_size_in); ~WaterfallCanvas(); + +--- a/src/AppFrame.h ++++ b/src/AppFrame.h +@@ -206,22 +206,22 @@ + /** + * UI init functions + */ +- ModeSelectorCanvas *makeModemSelectorPanel(wxWindow *parent, const wxGLAttributes &attribList); +- WaterfallCanvas *makeWaterfallCanvas(wxWindow *parent, const wxGLAttributes &attribList); +- SpectrumCanvas *makeDemodSpectrumCanvas(wxWindow *parent, const wxGLAttributes &attribList); +- MeterCanvas *makeSignalMeter(wxWindow *parent, const wxGLAttributes &attribList); +- ModeSelectorCanvas *makeDeltaLockButton(wxWindow *parent, const wxGLAttributes &attribList); +- TuningCanvas *makeModemTuner(wxWindow *parent, const wxGLAttributes &attribList); +- MeterCanvas *makeModemGainMeter(wxWindow *parent, const wxGLAttributes &attribList); +- ModeSelectorCanvas *makeSoloModeButton(wxWindow *parent, const wxGLAttributes &attribList); +- ModeSelectorCanvas *makeModemMuteButton(wxWindow *parent, const wxGLAttributes &attribList); +- ModeSelectorCanvas *makePeakHoldButton(wxWindow *parent, const wxGLAttributes &attribList); +- SpectrumCanvas *makeSpectrumCanvas(wxWindow *parent, const wxGLAttributes &attribList); +- MeterCanvas *makeSpectrumAvgMeter(wxWindow *parent, const wxGLAttributes &attribList); +- WaterfallCanvas *makeWaterfall(wxWindow *parent, const wxGLAttributes &attribList); +- MeterCanvas *makeWaterfallSpeedMeter(wxWindow *parent, const wxGLAttributes &attribList); +- ScopeCanvas *makeScopeCanvas(wxPanel *parent, const wxGLAttributes &attribList); +- ModeSelectorCanvas *makeModemAdvSelectorPanel(wxPanel *parent, const wxGLAttributes &attribList); ++ ModeSelectorCanvas *makeModemSelectorPanel(wxWindow *parent, std::vector attribList); ++ WaterfallCanvas *makeWaterfallCanvas(wxWindow *parent, std::vector attribList); ++ SpectrumCanvas *makeDemodSpectrumCanvas(wxWindow *parent, std::vector attribList); ++ MeterCanvas *makeSignalMeter(wxWindow *parent, std::vector attribList); ++ ModeSelectorCanvas *makeDeltaLockButton(wxWindow *parent, std::vector attribList); ++ TuningCanvas *makeModemTuner(wxWindow *parent, std::vector attribList); ++ MeterCanvas *makeModemGainMeter(wxWindow *parent, std::vector attribList); ++ ModeSelectorCanvas *makeSoloModeButton(wxWindow *parent, std::vector attribList); ++ ModeSelectorCanvas *makeModemMuteButton(wxWindow *parent, std::vector attribList); ++ ModeSelectorCanvas *makePeakHoldButton(wxWindow *parent, std::vector attribList); ++ SpectrumCanvas *makeSpectrumCanvas(wxWindow *parent, std::vector attribList); ++ MeterCanvas *makeSpectrumAvgMeter(wxWindow *parent, std::vector attribList); ++ WaterfallCanvas *makeWaterfall(wxWindow *parent, std::vector attribList); ++ MeterCanvas *makeWaterfallSpeedMeter(wxWindow *parent, std::vector attribList); ++ ScopeCanvas *makeScopeCanvas(wxPanel *parent, std::vector attribList); ++ ModeSelectorCanvas *makeModemAdvSelectorPanel(wxPanel *parent, std::vector attribList); + ModemProperties *makeModemProperties(wxPanel *parent); + + void initConfigurationSettings(); +@@ -386,4 +386,4 @@ + #define wxID_RIG_FOLLOW_MODEM 11906 + #define wxID_RIG_SERIAL_BASE 11950 + #define wxID_RIG_MODEL_BASE 12000 +-#endif +\ No newline at end of file ++#endif +--- a/src/AppFrame.cpp ++++ b/src/AppFrame.cpp +@@ -461,7 +461,7 @@ + return pProperties; + } + +-ModeSelectorCanvas *AppFrame::makeModemAdvSelectorPanel(wxPanel *parent, const wxGLAttributes &attribList) { ++ModeSelectorCanvas *AppFrame::makeModemAdvSelectorPanel(wxPanel *parent, std::vector attribList) { + auto *pCanvas = new ModeSelectorCanvas(parent, attribList); + pCanvas->addChoice("ASK"); + pCanvas->addChoice("APSK"); +@@ -577,7 +577,7 @@ + #endif + + +-ScopeCanvas *AppFrame::makeScopeCanvas(wxPanel *parent, const wxGLAttributes &attribList) { ++ScopeCanvas *AppFrame::makeScopeCanvas(wxPanel *parent, std::vector attribList) { + auto *pCanvas = new ScopeCanvas(parent, attribList); + pCanvas->setHelpTip("Audio Visuals, drag left/right to toggle Scope or Spectrum, 'B' to toggle decibels display."); + pCanvas->SetMinSize(wxSize(128, -1)); +@@ -672,7 +672,7 @@ + return pMenu; + } + +-MeterCanvas *AppFrame::makeWaterfallSpeedMeter(wxWindow *parent, const wxGLAttributes &attribList) { ++MeterCanvas *AppFrame::makeWaterfallSpeedMeter(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new MeterCanvas(parent, attribList); + pCanvas->setHelpTip("Waterfall speed, click or drag to adjust (max 1024 lines per second)"); + pCanvas->setMax(sqrt(1024)); +@@ -682,13 +682,13 @@ + return pCanvas; + } + +-WaterfallCanvas *AppFrame::makeWaterfall(wxWindow *parent, const wxGLAttributes &attribList) { ++WaterfallCanvas *AppFrame::makeWaterfall(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new WaterfallCanvas(parent, attribList); + pCanvas->setup(DEFAULT_FFT_SIZE, DEFAULT_MAIN_WATERFALL_LINES_NB); + return pCanvas; + } + +-MeterCanvas * AppFrame::makeSpectrumAvgMeter(wxWindow *parent, const wxGLAttributes &attribList) { ++MeterCanvas * AppFrame::makeSpectrumAvgMeter(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new MeterCanvas(parent, attribList); + pCanvas->setHelpTip("Spectrum averaging speed, click or drag to adjust."); + pCanvas->setMax(1.0); +@@ -698,7 +698,7 @@ + return pCanvas; + } + +-SpectrumCanvas *AppFrame::makeSpectrumCanvas(wxWindow *parent, const wxGLAttributes &attribList) { ++SpectrumCanvas *AppFrame::makeSpectrumCanvas(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new SpectrumCanvas(parent, attribList); + pCanvas->setShowDb(true); + pCanvas->setUseDBOfs(true); +@@ -706,7 +706,7 @@ + return pCanvas; + } + +-ModeSelectorCanvas *AppFrame::makePeakHoldButton(wxWindow *parent, const wxGLAttributes &attribList) { ++ModeSelectorCanvas *AppFrame::makePeakHoldButton(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new ModeSelectorCanvas(parent, attribList); + pCanvas->addChoice(1, "P"); + pCanvas->setPadding(-1, -1); +@@ -718,7 +718,7 @@ + return pCanvas; + } + +-ModeSelectorCanvas *AppFrame::makeModemMuteButton(wxWindow *parent, const wxGLAttributes &attribList) { ++ModeSelectorCanvas *AppFrame::makeModemMuteButton(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new ModeSelectorCanvas(parent, attribList); + pCanvas->addChoice(1, "M"); + pCanvas->setPadding(-1, -1); +@@ -730,7 +730,7 @@ + return pCanvas; + } + +-ModeSelectorCanvas *AppFrame::makeSoloModeButton(wxWindow *parent, const wxGLAttributes &attribList) { ++ModeSelectorCanvas *AppFrame::makeSoloModeButton(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new ModeSelectorCanvas(parent, attribList); + pCanvas->addChoice(1, "S"); + pCanvas->setPadding(-1, -1); +@@ -742,7 +742,7 @@ + return pCanvas; + } + +-MeterCanvas *AppFrame::makeModemGainMeter(wxWindow *parent, const wxGLAttributes &attribList) { ++MeterCanvas *AppFrame::makeModemGainMeter(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new MeterCanvas(parent, attribList); + pCanvas->setMax(2.0); + pCanvas->setHelpTip("Current Demodulator Gain Level. Click / Drag to set Gain level."); +@@ -751,13 +751,13 @@ + return pCanvas; + } + +-TuningCanvas *AppFrame::makeModemTuner(wxWindow *parent, const wxGLAttributes &attribList) { ++TuningCanvas *AppFrame::makeModemTuner(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new TuningCanvas(parent, attribList); + pCanvas->SetMinClientSize(wxSize(200, 28)); + return pCanvas; + } + +-ModeSelectorCanvas * AppFrame::makeDeltaLockButton(wxWindow *parent, const wxGLAttributes &attribList) { ++ModeSelectorCanvas * AppFrame::makeDeltaLockButton(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new ModeSelectorCanvas(parent, attribList); + pCanvas->addChoice(1, "V"); + pCanvas->setPadding(-1, -1); +@@ -769,7 +769,7 @@ + return pCanvas; + } + +-MeterCanvas *AppFrame::makeSignalMeter(wxWindow *parent, const wxGLAttributes &attribList) { ++MeterCanvas *AppFrame::makeSignalMeter(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new MeterCanvas(parent, attribList); + pCanvas->setMax(DEMOD_SIGNAL_MAX); + pCanvas->setMin(DEMOD_SIGNAL_MIN); +@@ -780,13 +780,13 @@ + return pCanvas; + } + +-SpectrumCanvas *AppFrame::makeDemodSpectrumCanvas(wxWindow *parent, const wxGLAttributes &attribList) { ++SpectrumCanvas *AppFrame::makeDemodSpectrumCanvas(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new SpectrumCanvas(parent, attribList); + pCanvas->setView(wxGetApp().getConfig()->getCenterFreq(), 300000); + return pCanvas; + } + +-WaterfallCanvas *AppFrame::makeWaterfallCanvas(wxWindow *parent, const wxGLAttributes &attribList) { ++WaterfallCanvas *AppFrame::makeWaterfallCanvas(wxWindow *parent, std::vector attribList) { + auto *pCanvas = new WaterfallCanvas(parent, attribList); + pCanvas->setup(DEFAULT_DMOD_FFT_SIZE, DEFAULT_DEMOD_WATERFALL_LINES_NB); + pCanvas->setView(wxGetApp().getConfig()->getCenterFreq(), 300000); +@@ -796,7 +796,7 @@ + return pCanvas; + } + +-ModeSelectorCanvas *AppFrame::makeModemSelectorPanel(wxWindow *parent, const wxGLAttributes &attribList) { ++ModeSelectorCanvas *AppFrame::makeModemSelectorPanel(wxWindow *parent, std::vector attribList) { + vector modemList = {"FM", "FMS", "NBFM", "AM", "CW", "LSB", "USB", "DSB", "I/Q" }; + + #ifdef CUBICSDR_MODEM_EXCLUDE diff --git a/srcpkgs/CubicSDR/template b/srcpkgs/CubicSDR/template index f2eb67e7f9b..49b9b7b6ed4 100644 --- a/srcpkgs/CubicSDR/template +++ b/srcpkgs/CubicSDR/template @@ -1,7 +1,7 @@ # Template file for 'CubicSDR' pkgname=CubicSDR -version=0.2.5 -revision=3 +version=0.2.7 +revision=1 build_style=cmake build_helper="cmake-wxWidgets-gtk3" configure_args="-DUSE_HAMLIB=1 $(vopt_bool alsa USE_AUDIO_ALSA) @@ -10,11 +10,11 @@ makedepends="SoapySDR-devel wxWidgets-gtk3-devel glu-devel liquid-dsp-devel haml $(vopt_if alsa alsa-lib-devel) $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if jack jack-devel)" short_desc="Cross-Platform Software-Defined Radio (SDR) Application" -maintainer="bra1nwave " +maintainer="classabbyamp " license="GPL-2.0-or-later" homepage="https://cubicsdr.com" distfiles="https://github.com/cjcliffe/CubicSDR/archive/${version}.tar.gz" -checksum=5cb44c110fcbbb70a468b7fa402cf35f84d8901b3dd42d471a90ac3f5db00f4d +checksum=790f851e08f1068081a8593dfd4a149c7414e7d70c1f5cafd287331df493b811 build_options="alsa pulseaudio jack" build_options_default="alsa pulseaudio"