summaryrefslogtreecommitdiff
path: root/ham/linpsk/patches
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-03-16 15:32:12 +0000
committerrillig <rillig@pkgsrc.org>2005-03-16 15:32:12 +0000
commit250381c5c81f68ee3efe74fcf2043fbe2b1d4972 (patch)
treee2bdc9b0bbb955fb45df27ff216039ca68be0364 /ham/linpsk/patches
parent4573cb2dc10915ed70557a17253af5de2f76e3e2 (diff)
downloadpkgsrc-250381c5c81f68ee3efe74fcf2043fbe2b1d4972.tar.gz
Added some patches for building on NetBSD-1.6.2 with gcc-2.95.3. Approved
by wiz.
Diffstat (limited to 'ham/linpsk/patches')
-rw-r--r--ham/linpsk/patches/patch-ab15
-rw-r--r--ham/linpsk/patches/patch-ac24
-rw-r--r--ham/linpsk/patches/patch-ad29
-rw-r--r--ham/linpsk/patches/patch-ae23
-rw-r--r--ham/linpsk/patches/patch-af24
-rw-r--r--ham/linpsk/patches/patch-ag47
-rw-r--r--ham/linpsk/patches/patch-ah17
-rw-r--r--ham/linpsk/patches/patch-ai24
8 files changed, 203 insertions, 0 deletions
diff --git a/ham/linpsk/patches/patch-ab b/ham/linpsk/patches/patch-ab
new file mode 100644
index 00000000000..e9e5b158a0c
--- /dev/null
+++ b/ham/linpsk/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+Needed for g++-2.95.3.
+
+--- src/cpskdemodulator.cpp.orig Sun Jul 4 17:50:45 2004
++++ src/cpskdemodulator.cpp Wed Mar 16 03:02:48 2005
+@@ -559,7 +559,7 @@ if ( UseAfc )
+ {
+ Phase_Vector=m_BitSignal*conj(Prev_Sample);
+ Prev_Sample = m_BitSignal;
+- Phase[j++]=Phase_Vector;
++ Phase[j++]=complex<float>(Phase_Vector);
+ double angle = atan2(Phase_Vector.imag(),Phase_Vector.real());
+ DecodeSymbol( angle);
+ if ( (unsigned int) m_DevAve > Threshold)
diff --git a/ham/linpsk/patches/patch-ac b/ham/linpsk/patches/patch-ac
new file mode 100644
index 00000000000..3e26a4c190f
--- /dev/null
+++ b/ham/linpsk/patches/patch-ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-ac,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+Needed for g++-2.95.3.
+
+--- src/crxdisplay.cpp.orig Sun Jul 4 17:50:45 2004
++++ src/crxdisplay.cpp Wed Mar 16 03:28:45 2005
+@@ -27,7 +27,7 @@
+ #include <qstyle.h>
+ #include <qpalette.h>
+
+-
++#include <pkgsrc_fixes.h>
+
+ #include "crecording.h"
+ #include "crxchannel.h"
+@@ -69,7 +69,7 @@ void MyTabBar::paintLabel ( QPainter *p,
+ {
+ int position=t->identifier();
+ if ( position >= 0 && position < Farbe->size() )
+- Cg.setColor(QColorGroup::Foreground, Farbe->at(position));
++ Cg.setColor(QColorGroup::Foreground, at_replacement(*Farbe, position));
+ }
+ style().drawControl( QStyle::CE_TabBarLabel, p, this, br,
+ Cg,
diff --git a/ham/linpsk/patches/patch-ad b/ham/linpsk/patches/patch-ad
new file mode 100644
index 00000000000..b8e3277a9ac
--- /dev/null
+++ b/ham/linpsk/patches/patch-ad
@@ -0,0 +1,29 @@
+$NetBSD: patch-ad,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+Needed for g++-2.95.3.
+
+--- src/interfaces/editmacro.ui.h.orig Sun Jul 4 17:50:45 2004
++++ src/interfaces/editmacro.ui.h Wed Mar 16 02:37:57 2005
+@@ -7,9 +7,10 @@
+ ** place of a destructor.
+ *****************************************************************************/
+
+-
+ #include "macros.h"
+ #include <vector>
++#include <pkgsrc_fixes.h>
++
+ using namespace std;
+ void EditMacro::init( Macros *k)
+ {
+@@ -44,8 +45,8 @@ void EditMacro::accept()
+ {
+ int AktPosition, NewPosition;
+ AktPosition=SelectMacro->currentItem()-1;
+-AllMacros->MacroText.at(AktPosition)=Definition->text();
+-AllMacros->Accelerator.at(AktPosition)=Accelerator->text();
++at_replacement(AllMacros->MacroText, AktPosition)=Definition->text();
++at_replacement(AllMacros->Accelerator, AktPosition)=Accelerator->text();
+ /** Position Change to be done later
+ NewPosition=Position->value();
+ if (AktPosition != NewPosition )
diff --git a/ham/linpsk/patches/patch-ae b/ham/linpsk/patches/patch-ae
new file mode 100644
index 00000000000..9adfa9fa0b6
--- /dev/null
+++ b/ham/linpsk/patches/patch-ae
@@ -0,0 +1,23 @@
+$NetBSD: patch-ae,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+Needed for g++-2.95.3.
+
+--- src/interfaces/renamemacro.ui.h.orig Sun Jul 4 17:50:45 2004
++++ src/interfaces/renamemacro.ui.h Wed Mar 16 02:28:54 2005
+@@ -12,6 +12,7 @@
+
+ #include <qmessagebox.h>
+
++#include <pkgsrc_fixes.h>
+
+ //using namespace std;
+
+@@ -41,7 +42,7 @@ if (NewName->text().length() ==0 )
+ return;
+ }
+ else
+- AllMacros->MacroNames.at(MacroNumber)=NewName->text();
++ at_replacement(AllMacros->MacroNames, MacroNumber)=NewName->text();
+ QDialog::accept();
+
+ }
diff --git a/ham/linpsk/patches/patch-af b/ham/linpsk/patches/patch-af
new file mode 100644
index 00000000000..9976f57e772
--- /dev/null
+++ b/ham/linpsk/patches/patch-af
@@ -0,0 +1,24 @@
+$NetBSD: patch-af,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+Needed for g++-2.95.3.
+
+--- src/linpsk.cpp.orig Fri Jul 23 16:41:47 2004
++++ src/linpsk.cpp Wed Mar 16 03:01:04 2005
+@@ -44,6 +44,8 @@
+
+ #include <vector>
+
++#include <pkgsrc_fixes.h>
++
+ #include "controlpanel.h"
+ #include "crxdisplay.h"
+ #include "ctxdisplay.h"
+@@ -421,7 +423,7 @@ if ( Channel->exec() != 0)
+ (Mode) Channel->RxMode->currentItem(),
+ Channel->TitleText->text());
+
+- settings.ActChannel->setWindowColor(WindowColors.at(settings.RxChannels));
++ settings.ActChannel->setWindowColor(at_replacement(WindowColors,settings.RxChannels));
+ settings.RxChannels++;
+ RxDisplay->RxFreq->setAFCWide(settings.ActChannel->getAFCWide());
+
diff --git a/ham/linpsk/patches/patch-ag b/ham/linpsk/patches/patch-ag
new file mode 100644
index 00000000000..2db2645dbc2
--- /dev/null
+++ b/ham/linpsk/patches/patch-ag
@@ -0,0 +1,47 @@
+$NetBSD: patch-ag,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+NetBSD-1.6.2 does not have struct sched_param.
+
+--- src/portaudio/pa_unix.c.orig Sun Jul 11 18:03:57 2004
++++ src/portaudio/pa_unix.c Wed Mar 16 02:58:17 2005
+@@ -87,6 +87,8 @@ O- what if input and output of a device
+ */
+
+
++#include <pkgsrc_fixes.h>
++
+ #include "pa_unix.h"
+
+ typedef void *(*pthread_function_t)(void *);
+@@ -411,6 +413,7 @@ static int PaHost_CanaryProc( PaHostSoun
+
+ static PaError PaHost_WatchDogProc( PaHostSoundControl *pahsc )
+ {
++#ifdef HAVE_STRUCT_SCHED_PARAM
+ struct sched_param schp = { 0 };
+ int maxPri;
+
+@@ -495,6 +498,7 @@ cleanup:
+ #ifdef GNUSTEP
+ GSUnregisterCurrentThread(); /* SB20010904 */
+ #endif
++#endif
+ return 0;
+ }
+
+@@ -574,6 +578,7 @@ static PaError PaHost_BoostPriority( int
+ {
+ PaHostSoundControl *pahsc;
+ PaError result = paNoError;
++#ifdef HAVE_STRUCT_SCHED_PARAM
+ struct sched_param schp = { 0 };
+
+ pahsc = (PaHostSoundControl *) past->past_DeviceData;
+@@ -597,6 +602,7 @@ static PaError PaHost_BoostPriority( int
+ /* We are running at high priority so we should have a watchdog in case audio goes wild. */
+ result = PaHost_StartWatchDog( pahsc );
+ }
++#endif
+
+ return result;
+ }
diff --git a/ham/linpsk/patches/patch-ah b/ham/linpsk/patches/patch-ah
new file mode 100644
index 00000000000..5a23b4cbe01
--- /dev/null
+++ b/ham/linpsk/patches/patch-ah
@@ -0,0 +1,17 @@
+$NetBSD: patch-ah,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+g++-2.95.3 does not know the min() and max() macros/functions.
+
+--- src/rtty2demodulator.cpp.orig Sun Jul 4 17:50:45 2004
++++ src/rtty2demodulator.cpp Wed Mar 16 03:34:16 2005
+@@ -149,8 +149,8 @@ while ( actSample < NxSamples )
+ {
+ j=(ThresholdPointer+i)%SampleBufferLength;
+ float x=ThresholdBuffer[j];
+- xmax=max(xmax,x);
+- xmin=min(xmin,x);
++ xmax= xmax > x ? xmax : x;
++ xmin= xmin < x ? xmin : x;
+ }
+ DiscriminatorThreshold=(xmax+xmin)/2.;
+
diff --git a/ham/linpsk/patches/patch-ai b/ham/linpsk/patches/patch-ai
new file mode 100644
index 00000000000..85815cf7a4c
--- /dev/null
+++ b/ham/linpsk/patches/patch-ai
@@ -0,0 +1,24 @@
+$NetBSD: patch-ai,v 1.1 2005/03/16 15:32:12 rillig Exp $
+
+Needed for g++-2.95.3.
+
+--- src/spectrumdisplay.cpp.orig Sun Jul 25 18:00:51 2004
++++ src/spectrumdisplay.cpp Wed Mar 16 03:25:07 2005
+@@ -21,6 +21,8 @@
+ #include <qpainter.h>
+ #include <qsplitter.h>
+
++#include <pkgsrc_fixes.h>
++
+ #include "spectrumdisplay.h"
+ #include "crxchannel.h"
+ #include "parameter.h"
+@@ -181,7 +183,7 @@ paintLineal(&p,xmax,ymax);
+ {
+ int ID = pRx->getID();
+ if ( ID >= 0 && ID < Farbe->size() )
+- p.setPen(Farbe->at(ID));
++ p.setPen(at_replacement(*Farbe, ID));
+ }
+ // Calculate Centerfrequency Coordinates
+ z=(( (int) pRx->getRxFrequency()-minfreq)*xmax)/(maxfreq-minfreq);