aboutsummaryrefslogtreecommitdiffstats
path: root/audio/xoscope
diff options
context:
space:
mode:
authordb <db@FreeBSD.org>2008-07-29 02:56:45 +0800
committerdb <db@FreeBSD.org>2008-07-29 02:56:45 +0800
commiteeb50fe9af30108b578daa78ea1479dce4c7a6ea (patch)
treeff46468f16259dffa83214aad91d4ad6d0966281 /audio/xoscope
parentab558909f76517afb1d6e3d8be474616fbbc89d7 (diff)
downloadfreebsd-ports-gnome-eeb50fe9af30108b578daa78ea1479dce4c7a6ea.tar.gz
freebsd-ports-gnome-eeb50fe9af30108b578daa78ea1479dce4c7a6ea.tar.zst
freebsd-ports-gnome-eeb50fe9af30108b578daa78ea1479dce4c7a6ea.zip
- xoscope is a digital oscilloscope using input from a sound card or EsounD
and/or a ProbeScope/osziFOX and will soon support Bitscope hardware. Includes 8 signal displays, variable time scale, math, memory, measurements, and file save/load. - Unfortunately will not work on amd64 due to many int vs. string coding errors.
Diffstat (limited to 'audio/xoscope')
-rw-r--r--audio/xoscope/Makefile28
-rw-r--r--audio/xoscope/distinfo3
-rw-r--r--audio/xoscope/files/patch-config.h.in21
-rw-r--r--audio/xoscope/files/patch-sc_linux.c33
-rw-r--r--audio/xoscope/files/patch-ser_unix.c75
-rw-r--r--audio/xoscope/pkg-descr6
-rw-r--r--audio/xoscope/pkg-plist7
7 files changed, 173 insertions, 0 deletions
diff --git a/audio/xoscope/Makefile b/audio/xoscope/Makefile
new file mode 100644
index 000000000000..427a0182cbf4
--- /dev/null
+++ b/audio/xoscope/Makefile
@@ -0,0 +1,28 @@
+# ports collection makefile for: xoscope
+# Date created: March 29, 2008
+# Whom: db
+#
+# $FreeBSD$
+#
+
+PORTNAME= xoscope
+PORTVERSION= 1.12
+CATEGORIES= audio hamradio
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= xoscope
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= db@FreeBSD.org
+COMMENT= Sound card oscilloscope
+
+GNU_CONFIGURE= yes
+CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ARGS= --prefix=${PREFIX} --sysconfdir=${PREFIX}
+USE_GMAKE= yes
+USE_GNOME= gtk12
+USE_XORG= x11
+ONLY_FOR_ARCHS= i386
+
+MAN1= xoscope.1 oscope.1
+
+.include <bsd.port.mk>
diff --git a/audio/xoscope/distinfo b/audio/xoscope/distinfo
new file mode 100644
index 000000000000..0cf148ac5e31
--- /dev/null
+++ b/audio/xoscope/distinfo
@@ -0,0 +1,3 @@
+MD5 (xoscope-1.12.tgz) = 89f8019a772713a976b634305d29cfe5
+SHA256 (xoscope-1.12.tgz) = d7dec98f0d85f7ce889d0b2fcb4ed683a6384057ccea2ab531a0710969ff7ca2
+SIZE (xoscope-1.12.tgz) = 269889
diff --git a/audio/xoscope/files/patch-config.h.in b/audio/xoscope/files/patch-config.h.in
new file mode 100644
index 000000000000..ce1aa903b5fc
--- /dev/null
+++ b/audio/xoscope/files/patch-config.h.in
@@ -0,0 +1,21 @@
+--- config.h.in.orig 2008-03-29 22:30:23.000000000 -0400
++++ config.h.in 2008-03-29 22:33:00.000000000 -0400
+@@ -11,6 +11,9 @@
+ *
+ */
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
+
+ /* Define to empty if the keyword does not work. */
+ #undef const
+@@ -200,4 +203,8 @@
+
+ /* extra places to look for serial scopes (set to {""} to not search) */
+ /* ({"", "/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3"}) */
++#ifdef BSD
++#define PSDEVS {"", "/dev/ttyd0", "/dev/ttyd1", "/dev/ttyd2", "/dev/ttyd3"}
++#else
+ #define PSDEVS {"", "/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3"}
++#endif
diff --git a/audio/xoscope/files/patch-sc_linux.c b/audio/xoscope/files/patch-sc_linux.c
new file mode 100644
index 000000000000..3d0e179b3476
--- /dev/null
+++ b/audio/xoscope/files/patch-sc_linux.c
@@ -0,0 +1,33 @@
+--- sc_linux.c.orig 2005-06-28 17:34:50.000000000 -0400
++++ sc_linux.c 2008-07-26 19:20:00.000000000 -0400
+@@ -21,6 +21,9 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <string.h>
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <stdlib.h> /* for abs() */
+@@ -91,6 +94,9 @@
+ static void
+ check_status_ioctl(int d, int request, void *argp, int line)
+ {
++ if (d < 0) {
++ return;
++ }
+ if (ioctl(d, request, argp) < 0) {
+ snd_errormsg1 = "sound ioctl";
+ snd_errormsg2 = strerror(errno);
+@@ -169,8 +175,10 @@
+ return 0;
+ }
+
++#ifndef BSD
+ parm = dma; /* set DMA buffer size */
+ check_status_ioctl(snd, SOUND_PCM_SUBDIVIDE, &parm, __LINE__);
++#endif
+
+ parm = chan; /* set mono/stereo */
+ //check_status_ioctl(snd, SOUND_PCM_WRITE_CHANNELS, &parm, __LINE__);
diff --git a/audio/xoscope/files/patch-ser_unix.c b/audio/xoscope/files/patch-ser_unix.c
new file mode 100644
index 000000000000..4b5b42de2ba2
--- /dev/null
+++ b/audio/xoscope/files/patch-ser_unix.c
@@ -0,0 +1,75 @@
+--- ser_unix.c.orig 2008-03-29 20:34:36.000000000 -0400
++++ ser_unix.c 2008-03-29 20:53:04.000000000 -0400
+@@ -13,7 +13,14 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++#ifdef BSD
++#include <termios.h>
++#else
+ #include <termio.h>
++#endif
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+@@ -23,7 +30,11 @@
+
+ char device[512] = ""; /* Serial device */
+ int sflags;
++#ifdef BSD
++struct termios stbuf, svbuf; /* termios: svbuf=saved, stbuf=set */
++#else
+ struct termio stbuf, svbuf; /* termios: svbuf=saved, stbuf=set */
++#endif
+
+ /* return a single byte from the serial device or return -1 if none avail. */
+ int
+@@ -65,7 +76,11 @@
+ cleanup_serial(int fd)
+ {
+ if (fd > 0) {
++#ifdef BSD
++ if (tcgetattr(fd, &svbuf) < 0 ) {
++#else
+ if (ioctl(fd, TCSETA, &svbuf) < 0) {
++#endif
+ sprintf(error, "%s: can't ioctl set device %s", progname, device);
+ perror(error);
+ }
+@@ -84,13 +99,21 @@
+ perror(error);
+ return(0);
+ }
++#ifdef BSD
++ if (tcgetattr(fd, &svbuf) < 0) { /* save settings */
++#else
+ if (ioctl(fd, TCGETA, &svbuf) < 0) { /* save settings */
++#endif
+ sprintf(error, "%s: can't ioctl get device %s", progname, dev);
+ perror(error);
+ close(fd);
+ return(0);
+ }
++#ifdef BSD
++ if (tcsetattr(fd, TCSANOW, &stbuf) < 0) {
++#else
+ if (ioctl(fd, TCSETA, &stbuf) < 0) {
++#endif
+ sprintf(error, "%s: can't ioctl set device %s", progname, dev);
+ perror(error);
+ close(fd);
+@@ -101,7 +124,11 @@
+ return (1); /* serial port scope found! */
+ }
+
++#ifdef BSD
++ if (tcsetattr(fd, TCSANOW, &svbuf) < 0) { /* restore settings */
++#else
+ if (ioctl(fd, TCSETA, &svbuf) < 0) { /* restore settings */
++#endif
+ sprintf(error, "%s: can't ioctl set device %s", progname, dev);
+ perror(error);
+ close(fd);
diff --git a/audio/xoscope/pkg-descr b/audio/xoscope/pkg-descr
new file mode 100644
index 000000000000..08987cf4a67d
--- /dev/null
+++ b/audio/xoscope/pkg-descr
@@ -0,0 +1,6 @@
+xoscope is a digital oscilloscope using input from a sound card or EsounD
+and/or a ProbeScope/osziFOX and will soon support Bitscope hardware.
+Includes 8 signal displays, variable time scale, math, memory, measurements,
+and file save/load.
+
+WWW: http://xoscope.sourceforge.net/
diff --git a/audio/xoscope/pkg-plist b/audio/xoscope/pkg-plist
new file mode 100644
index 000000000000..12a404dee7c9
--- /dev/null
+++ b/audio/xoscope/pkg-plist
@@ -0,0 +1,7 @@
+bin/xoscope
+bin/bitscope
+libexec/xoscope/operl
+libexec/xoscope/xy
+libexec/xoscope/ofreq.ini
+libexec/xoscope/offt
+@dirrm libexec/xoscope