Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jan 2015 19:33:27 +0000 (UTC)
From:      Stephen Hurd <shurd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r376648 - in head: . comms comms/linpsk comms/linpsk/files
Message-ID:  <201501091933.t09JXR2g040072@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: shurd
Date: Fri Jan  9 19:33:26 2015
New Revision: 376648
URL: https://svnweb.freebsd.org/changeset/ports/376648
QAT: https://qat.redports.org/buildarchive/r376648/

Log:
  Re-create comms/linpsk
  Simple Qt PSK31, RTTY, and MSK31 client

Added:
  head/comms/linpsk/
     - copied from r323747, head/comms/linpsk/
  head/comms/linpsk/files/patch-src_csound.cpp   (contents, props changed)
  head/comms/linpsk/files/patch-src_csound.h   (contents, props changed)
  head/comms/linpsk/files/patch-src_textinput.cpp   (contents, props changed)
  head/comms/linpsk/files/patch-src_waveinput.cpp   (contents, props changed)
Deleted:
  head/comms/linpsk/files/LinPSKConfig.xml
  head/comms/linpsk/files/pkg-message.in
  head/comms/linpsk/pkg-plist
Modified:
  head/MOVED
  head/comms/Makefile
  head/comms/linpsk/Makefile
  head/comms/linpsk/distinfo   (contents, props changed)
  head/comms/linpsk/pkg-descr   (contents, props changed)

Modified: head/MOVED
==============================================================================
--- head/MOVED	Fri Jan  9 19:14:49 2015	(r376647)
+++ head/MOVED	Fri Jan  9 19:33:26 2015	(r376648)
@@ -4456,7 +4456,6 @@ comms/kallers||2013-07-26|Has expired: D
 comms/kmobiletools||2013-07-26|Has expired: Depends on Qt 3.x
 comms/kpsk||2013-07-26|Has expired: Depends on Qt 3.x
 comms/ktrack||2013-07-26|Has expired: Depends on Qt 3.x
-comms/linpsk||2013-07-26|Has expired: Depends on Qt 3.x
 converters/ktextdecode||2013-07-26|Has expired: Depends on Qt 3.x
 databases/kmysqladmin||2013-07-26|Has expired: Depends on Qt 3.x
 databases/knoda||2013-07-26|Has expired: Depends on Qt 3.x

Modified: head/comms/Makefile
==============================================================================
--- head/comms/Makefile	Fri Jan  9 19:14:49 2015	(r376647)
+++ head/comms/Makefile	Fri Jan  9 19:33:26 2015	(r376648)
@@ -85,6 +85,7 @@
     SUBDIR += libticables2
     SUBDIR += libticalcs2
     SUBDIR += libusbmuxd
+    SUBDIR += linpsk
     SUBDIR += linrad
     SUBDIR += lirc
     SUBDIR += locator

Modified: head/comms/linpsk/Makefile
==============================================================================
--- head/comms/linpsk/Makefile	Fri Jul 26 19:14:50 2013	(r323747)
+++ head/comms/linpsk/Makefile	Fri Jan  9 19:33:26 2015	(r376648)
@@ -1,53 +1,33 @@
-# New ports collection makefile for:	linpsk
-# Date created:				29 May 2005
-# Whom:					Søren Straarup <xride@x12.dk>
-#
 # $FreeBSD$
-#
 
 PORTNAME=	linpsk
-PORTVERSION=	0.8.1
-PORTREVISION=	10
+PORTVERSION=	1.2
 CATEGORIES=	comms hamradio
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
+MASTER_SITES=	SF
+MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
-MAINTAINER=	hamradio@FreeBSD.org
-COMMENT=	A qt psk31 client
+MAINTAINER=	hamradio@freebsd.org
+COMMENT=	Simple Qt PSK31, RTTY, and MSK31 client
 
-LIB_DEPENDS=	fftw3:${PORTSDIR}/math/fftw3 \
-		portaudio:${PORTSDIR}/audio/portaudio
-RUN_DEPENDS=	${LOCALBASE}/lib/X11/fonts/bitstream-vera/fonts.dir:${PORTSDIR}/x11-fonts/bitstream-vera
+LIB_DEPENDS=	libfftw3.so:${PORTSDIR}/math/fftw3 \
+		libasound.so:${PORTSDIR}/audio/alsa-lib
 
-USE_PERL5_BUILD=yes
-USE_QT_VER=	3
-USE_GMAKE=	yes
-GNU_CONFIGURE=	yes
+USES=		qmake tar:tgz
+USE_QT4=	gui network corelib moc_build uic_build rcc_build qmake_build
+DESKTOP_ENTRIES="LinPsk" "${COMMENT}" \
+		"${DATADIR}/linpsk.png" "linpsk" "Audio;HamRadio;" \
+		false
 
-CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
-LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
-CONFIGURE_ARGS=	--with-qtdir=${LOCALBASE} --prefix=${PREFIX}
-
-SUB_FILES=	pkg-message
+PLIST_FILES=	bin/linpsk \
+		%%DATADIR%%/linpsk.png
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|-lpthread||' ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e 's|-I$$(top_srcdir)/src/portaudio||' \
-		${WRKSRC}/src/Makefile.in \
-		${WRKSRC}/src/interfaces/Makefile.in
-	@${REINPLACE_CMD} -e \
-		's|$$(top_builddir)/src/portaudio/libportaudio\.a|-lportaudio|; \
-		 /^SUBDIRS =/ s|portaudio||' \
-		${WRKSRC}/src/Makefile.in
-	@${REINPLACE_CMD} -e \
-		's|-O2|${CXXFLAGS}|; \
-		 /^install-exec-am/ s|install-libLIBRARIES||' \
-		${WRKSRC}/src/interfaces/Makefile.in
+	${REINPLACE_CMD} -e 's|<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>|<!-- & -->|g' \
+		${WRKSRC}/gui/*.ui
 
 post-install:
-	${MKDIR} ${EXAMPLESDIR}
-	${INSTALL_DATA} ${FILESDIR}/LinPSKConfig.xml ${EXAMPLESDIR}
-	@${CAT} ${PKGMESSAGE}
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/images/linpsk.png ${STAGEDIR}${DATADIR}
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/linpsk
 
 .include <bsd.port.mk>

Modified: head/comms/linpsk/distinfo
==============================================================================
--- head/comms/linpsk/distinfo	Fri Jul 26 19:14:50 2013	(r323747)
+++ head/comms/linpsk/distinfo	Fri Jan  9 19:33:26 2015	(r376648)
@@ -1,2 +1,2 @@
-SHA256 (linpsk-0.8.1.tar.gz) = f4363bf4d72e4720f190d9e96ebc2a8f40bc77ac9345c187cbc6512d939f5c10
-SIZE (linpsk-0.8.1.tar.gz) = 435463
+SHA256 (linpsk-1.2.tgz) = be02a5dcb2168ad60d1e450fe77346a9aa8480669fe11e209fc94f26835aaec8
+SIZE (linpsk-1.2.tgz) = 126171

Added: head/comms/linpsk/files/patch-src_csound.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/linpsk/files/patch-src_csound.cpp	Fri Jan  9 19:33:26 2015	(r376648)
@@ -0,0 +1,80 @@
+--- src/csound.cpp.orig	2013-12-24 23:45:41.000000000 -0800
++++ src/csound.cpp	2015-01-09 11:00:21.000000000 -0800
+@@ -21,7 +21,7 @@
+ 
+ using namespace std;
+ extern Parameter settings;
+-CSound::CSound ( int ptt = -1 ) : Input ( ptt )
++CSound::CSound ( int ptt ) : Input ( ptt )
+ {
+   started = false;
+   output = false;
+@@ -41,7 +41,13 @@
+     return 0;
+   if ( anzahl > available )
+     return 0;
+-  memcpy ( sample, &buffer[readPointer], anzahl*sizeof ( double ) ) ;
++  for (int i=0; i<anzahl; i++) {
++	sample[i] = (double)buffer[readPointer+i] / 0x7fffffff;
++	if (sample[i] < -1.0)
++	  sample[i] = -1.0;
++	else if(sample[i] > 1.0)
++	  sample[i] = 1.0;
++  }
+   LockPointers.lock();
+   available -= anzahl;
+   free += anzahl;
+@@ -101,10 +107,10 @@
+     return false;
+   }
+   /* Set the sample format */
+-  err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE );
++  err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32 );
+   if ( err < 0 )
+   {
+-    *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) );
++    *errorstring = QString ( "Sample format Signed 32-bit not available : " ) + QString ( snd_strerror ( err ) );
+     return false;
+   }
+   /* Set the count of channels, most soundcards only support stereo */
+@@ -229,10 +235,10 @@
+     return false;
+   }
+   /* Set the sample format */
+-  err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE );
++  err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32 );
+   if ( err < 0 )
+   {
+-    *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) );
++    *errorstring = QString ( "Sample format Signed 32-bit not available : " ) + QString ( snd_strerror ( err ) );
+     return false;
+   }
+   /* Set the count of channels */
+@@ -305,7 +311,8 @@
+ {
+   if ( anzahl <= free )
+   {
+-    memcpy ( &buffer[freePointer], sample, anzahl*sizeof ( double ) );
++	for (int i=0; i<anzahl; i++)
++	  buffer[freePointer+i] = sample[i] * 0x7fffffff;
+     LockPointers.lock();
+     toBePlayed += anzahl;
+     free -= anzahl;
+@@ -394,7 +401,7 @@
+ void CSound::record()
+ {
+   int toBeRead, err;
+-  float SampleBuffer[256];
++  int32_t SampleBuffer[256];
+   qDebug ( "Start recording" );
+   while ( started )
+   {
+@@ -447,7 +454,7 @@
+ 
+ void CSound::play()
+ {
+-  float SampleBuffer[256], x;
++  int32_t SampleBuffer[256], x;
+   bool signaled;
+   int err, laenge;
+   laenge = 128;

Added: head/comms/linpsk/files/patch-src_csound.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/linpsk/files/patch-src_csound.h	Fri Jan  9 19:33:26 2015	(r376648)
@@ -0,0 +1,19 @@
+--- src/csound.h.orig	2013-12-24 23:45:41.000000000 -0800
++++ src/csound.h	2015-01-07 07:38:09.000000000 -0800
+@@ -22,6 +22,7 @@
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <inttypes.h>
+ 
+ #include <QMutex>
+ #include <QWaitCondition>
+@@ -49,7 +50,7 @@
+   private: // Private attributes
+     snd_pcm_t *handle;
+     bool output;
+-    double buffer[2*BUF_SIZE]; // 16 bit , stereo
++    int32_t buffer[2*BUF_SIZE]; // 16 bit , stereo
+     QMutex LockPointers;
+     QWaitCondition WakeUp;
+     void record();

Added: head/comms/linpsk/files/patch-src_textinput.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/linpsk/files/patch-src_textinput.cpp	Fri Jan  9 19:33:26 2015	(r376648)
@@ -0,0 +1,11 @@
+--- src/textinput.cpp.orig	2015-01-07 06:35:27.000000000 -0800
++++ src/textinput.cpp	2015-01-07 06:35:36.000000000 -0800
+@@ -22,7 +22,7 @@
+ extern Parameter settings;
+ extern int errno;
+ 
+-TextInput::TextInput ( int ptt = -1 ) : Input ( ptt )
++TextInput::TextInput ( int ptt ) : Input ( ptt )
+ {
+ }
+ TextInput::~TextInput()

Added: head/comms/linpsk/files/patch-src_waveinput.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/linpsk/files/patch-src_waveinput.cpp	Fri Jan  9 19:33:26 2015	(r376648)
@@ -0,0 +1,11 @@
+--- src/waveinput.cpp.orig	2015-01-07 06:36:15.000000000 -0800
++++ src/waveinput.cpp	2015-01-07 06:36:25.000000000 -0800
+@@ -19,7 +19,7 @@
+ 
+ extern Parameter settings;
+ 
+-WaveInput::WaveInput(int ptt = -1): Input(ptt)
++WaveInput::WaveInput(int ptt): Input(ptt)
+ {
+  EightBits=false;
+ }

Modified: head/comms/linpsk/pkg-descr
==============================================================================
--- head/comms/linpsk/pkg-descr	Fri Jul 26 19:14:50 2013	(r323747)
+++ head/comms/linpsk/pkg-descr	Fri Jan  9 19:33:26 2015	(r376648)
@@ -1,3 +1,16 @@
-This is a small PSK31 program that uses QT, and a soundcard as modem.
+LinPsk is a program for operating on digital modes running on Linux.
+
+LinPsk supports BPSK , QPSK and RTTY at the moment.
+
+Main features are:
+
+    the simultaneuos decoding of up to four channels.
+    The different digital modes may be mixed
+    You can define a trigger on each channel to be notified if a text of your choice is detected.
+    You can log each received channel at a file.
+    For easy qso'ing you can define macros and for larger texts to be send you can use two files.
+    You can view the signal as spectrum or in a waterfall display. Both are scalable in the frequency domain.
+
+At the Moment RTTY only supports 45 baud and 1.5 stopbits.
 
 WWW: http://linpsk.sourceforge.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501091933.t09JXR2g040072>