pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/ham/linpsk Added some patches for building on NetBSD-1...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e813137a6a54
branches: trunk
changeset: 490623:e813137a6a54
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Mar 16 15:32:12 2005 +0000
description:
Added some patches for building on NetBSD-1.6.2 with gcc-2.95.3. Approved
by wiz.
diffstat:
ham/linpsk/Makefile | 5 +++-
ham/linpsk/distinfo | 10 +++++++-
ham/linpsk/files/pkgsrc_fixes.h | 25 +++++++++++++++++++++
ham/linpsk/patches/patch-ab | 15 +++++++++++++
ham/linpsk/patches/patch-ac | 24 ++++++++++++++++++++
ham/linpsk/patches/patch-ad | 29 +++++++++++++++++++++++++
ham/linpsk/patches/patch-ae | 23 ++++++++++++++++++++
ham/linpsk/patches/patch-af | 24 ++++++++++++++++++++
ham/linpsk/patches/patch-ag | 47 +++++++++++++++++++++++++++++++++++++++++
ham/linpsk/patches/patch-ah | 17 ++++++++++++++
ham/linpsk/patches/patch-ai | 24 ++++++++++++++++++++
11 files changed, 241 insertions(+), 2 deletions(-)
diffs (truncated from 302 to 300 lines):
diff -r df159480a51f -r e813137a6a54 ham/linpsk/Makefile
--- a/ham/linpsk/Makefile Wed Mar 16 15:30:21 2005 +0000
+++ b/ham/linpsk/Makefile Wed Mar 16 15:32:12 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2005/01/31 13:47:04 wulf Exp $
+# $NetBSD: Makefile,v 1.3 2005/03/16 15:32:12 rillig Exp $
#
DISTNAME= linpsk-0.8.0.4
@@ -23,6 +23,9 @@
CONFIGURE_ARGS+="--with-fftw-dir=${LOCALBASE}"
+post-configure:
+ ${_PKG_DEBUG}${_PKG_SILENT}${LN} -s ${FILESDIR}/pkgsrc_fixes.h ${BUILDLINK_DIR}/include/
+
.include "../../mk/ossaudio.buildlink3.mk"
.include "../../x11/qt3-libs/buildlink3.mk"
.include "../../math/fftw/buildlink3.mk"
diff -r df159480a51f -r e813137a6a54 ham/linpsk/distinfo
--- a/ham/linpsk/distinfo Wed Mar 16 15:30:21 2005 +0000
+++ b/ham/linpsk/distinfo Wed Mar 16 15:32:12 2005 +0000
@@ -1,6 +1,14 @@
-$NetBSD: distinfo,v 1.2 2005/02/22 21:06:06 agc Exp $
+$NetBSD: distinfo,v 1.3 2005/03/16 15:32:12 rillig Exp $
SHA1 (linpsk-0.8.0.4.tar.gz) = cd4c76608a0c11f9990345d7a6859db58d7bba27
RMD160 (linpsk-0.8.0.4.tar.gz) = 0113b0b7708a651193b677e96a9544b6e2ec1ba3
Size (linpsk-0.8.0.4.tar.gz) = 426817 bytes
SHA1 (patch-aa) = b3fda2c3242e7f88a6f43ee40f66f35ab7938f85
+SHA1 (patch-ab) = f2be2babf20024e80879d4122735314fe7ffd813
+SHA1 (patch-ac) = 521b6e002a6e15af69f3e754acd0164b9ae50467
+SHA1 (patch-ad) = 331aaf33ccc7cfd5723a84a99c4bfdac31ac7e64
+SHA1 (patch-ae) = 36fd197d1d4320d58462786a16ccb89348bbce6f
+SHA1 (patch-af) = 0a01f2131f87fd4865b00c06e3a38b3827a037b0
+SHA1 (patch-ag) = 2577212da1fffa673d7dce9b8c939f1ae2dee12a
+SHA1 (patch-ah) = 2d626269647214f558557c47b6e806f3ebdb8804
+SHA1 (patch-ai) = 3e5ef3fa0a9cda973f5549a2f675b2edc4bbce7d
diff -r df159480a51f -r e813137a6a54 ham/linpsk/files/pkgsrc_fixes.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/files/pkgsrc_fixes.h Wed Mar 16 15:32:12 2005 +0000
@@ -0,0 +1,25 @@
+#ifndef LINPSK_PKGSRC_FIXES_H
+#define LINPSK_PKGSRC_FIXES_H
+
+#ifdef __NetBSD__
+# include <sys/param.h>
+#endif
+#if !(defined(__NetBSD__) && __NetBSD_Version__ < 200000000)
+# define HAVE_STRUCT_SCHED_PARAM
+#endif
+
+#if !(defined(__GNUC__) && (__GNUC__ < 3))
+# define HAVE_STD_VECTOR_AT
+#endif
+
+#ifdef __cplusplus
+template <class T> typename T::reference at_replacement(T &c, const typename T::size_type &i) {
+# ifdef HAVE_STD_VECTOR_AT
+ return c::at(i);
+# else
+ return c[i];
+# endif
+}
+#endif
+
+#endif
diff -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ab Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ac Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ad Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ae Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-af Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ag Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ah
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ah Wed Mar 16 15:32:12 2005 +0000
@@ -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 -r df159480a51f -r e813137a6a54 ham/linpsk/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/linpsk/patches/patch-ai Wed Mar 16 15:32:12 2005 +0000
@@ -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));
+ }
Home |
Main Index |
Thread Index |
Old Index