summaryrefslogtreecommitdiff
path: root/audio/rio
diff options
context:
space:
mode:
authoragc <agc>2000-01-11 11:31:18 +0000
committeragc <agc>2000-01-11 11:31:18 +0000
commit5f5c2828b69adde83950f40602febc6ca843b17a (patch)
treeb578ac584a1c2a93d1e4b850949e13a9e54710e8 /audio/rio
parenta04d81d0aac8948aabdbec1dd940608c4a99804d (diff)
downloadpkgsrc-5f5c2828b69adde83950f40602febc6ca843b17a.tar.gz
Make this program work.
+ add -li386, and a check to make sure that root is running the program (for obvious reasons) + add a small shell script to find the lpt port easily Initialisation of flash RAM on the rio is slow, but upload works quite well and fast. Not yet tested with external flash media.
Diffstat (limited to 'audio/rio')
-rw-r--r--audio/rio/Makefile4
-rw-r--r--audio/rio/files/patch-sum7
-rw-r--r--audio/rio/patches/patch-aa17
-rw-r--r--audio/rio/patches/patch-ab24
-rw-r--r--audio/rio/pkg/PLIST3
5 files changed, 43 insertions, 12 deletions
diff --git a/audio/rio/Makefile b/audio/rio/Makefile
index 56039d202b5..627d59d0f2f 100644
--- a/audio/rio/Makefile
+++ b/audio/rio/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 1999/12/31 21:19:49 agc Exp $
+# $NetBSD: Makefile,v 1.2 2000/01/11 11:31:18 agc Exp $
#
DISTNAME= rio007
@@ -20,5 +20,7 @@ do-install:
${BSD_INSTALL_PROGRAM} ${WRKSRC}/rio ${PREFIX}/bin
${MKDIR} -p ${PREFIX}/share/rio
${BSD_INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/rio
+ ${SED} -e 's|@AWK@|${AWK}|g' ${FILESDIR}/find-lpt-port > ${PREFIX}/bin/find-lpt-port
+ ${CHMOD} 755 ${PREFIX}/bin/find-lpt-port
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/rio/files/patch-sum b/audio/rio/files/patch-sum
index a861f0533a7..34c610bca62 100644
--- a/audio/rio/files/patch-sum
+++ b/audio/rio/files/patch-sum
@@ -1,4 +1,5 @@
-$NetBSD: patch-sum,v 1.2 1999/12/31 22:07:48 agc Exp $
+$NetBSD: patch-sum,v 1.3 2000/01/11 11:31:19 agc Exp $
-MD5 (patch-aa) = e92f08157c6eaf9a0f3963ac91a85a89
-MD5 (patch-ab) = db36766759a252533e2c22737493ebf6
+MD5 (patch-aa) = e7f2884a1e4f09a6e4aa1809f64af262
+MD5 (patch-ab) = 57ac94a22a8dd668543870cb497addd5
+MD5 (patch-ac) = 733a33e1f04fddb1c2b29fd11a6a0a16
diff --git a/audio/rio/patches/patch-aa b/audio/rio/patches/patch-aa
index b4eb5efa254..dac038a66a4 100644
--- a/audio/rio/patches/patch-aa
+++ b/audio/rio/patches/patch-aa
@@ -1,6 +1,7 @@
-$NetBSD: patch-aa,v 1.1.1.1 1999/12/31 21:19:50 agc Exp $
+$NetBSD: patch-aa,v 1.2 2000/01/11 11:31:19 agc Exp $
Add support for NetBSD and Solaris
+Make sure the program is being run by effective uid 0
--- app.cpp 1999/12/17 17:39:52 1.1
+++ app.cpp 1999/12/17 17:41:47
@@ -25,3 +26,17 @@ Add support for NetBSD and Solaris
#else
// not supported
#error ! ! compiler/platform not supported ! !
+@@ -519,6 +533,13 @@
+ Help();
+ CLEANUP_RETURN( FALSE );
+ }
++#if defined(__NetBSD__)
++ if (geteuid() != 0) {
++ ERRORSTR("You need to be root to run this program,\n");
++ ERRORSTR("because access is made to the parallel port directly.\n");
++ CLEANUP_RETURN(FALSE);
++ }
++#endif
+ for( int iA=1; iA<iCountArg; ++iA )
+ {
+ // check for display directory request
diff --git a/audio/rio/patches/patch-ab b/audio/rio/patches/patch-ab
index bfa5e9bd134..9f103fdae13 100644
--- a/audio/rio/patches/patch-ab
+++ b/audio/rio/patches/patch-ab
@@ -1,18 +1,20 @@
-$NetBSD: patch-ab,v 1.2 1999/12/31 22:07:49 agc Exp $
+$NetBSD: patch-ab,v 1.3 2000/01/11 11:31:19 agc Exp $
Add NetBSD and Solaris platforms
Add inb() and outb() from XFree86 sources.
--- rio.cpp 1999/12/17 17:42:31 1.1
+++ rio.cpp 1999/12/17 17:44:25
-@@ -109,9 +109,78 @@
++++ rio.cpp Fri Jan 7 12:43:45 2000
+@@ -109,9 +109,89 @@
#define CLOCK_SECOND ((int)CLOCKS_PER_SEC)
#define DELETEARRAY delete
+#elif defined(__NetBSD__)
-+ // NetBSD g++
++ // NetBSD/i386 g++
+ #include <fcntl.h>
+ #include <unistd.h>
++ #include <machine/sysarch.h>
+ #include <machine/cpufunc.h>
+ #define OUTPORT(p,v) outb( p, v )
+ #define INPORT(p) inb( p )
@@ -20,7 +22,7 @@ Add inb() and outb() from XFree86 sources.
+ #define DELETEARRAY delete[]
+
+#elif defined(__sun__) && defined(__svr4__)
-+ // NetBSD g++
++ // Solaris/i386 g++
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/cpupart.h>
@@ -38,8 +40,8 @@ Add inb() and outb() from XFree86 sources.
+#endif
+
+#if defined(__NetBSD__)
-+/* copied from the XFree86 sources, the copyright notice follows (agc): */
-+
++/* copied from the XFree86 sources */
++/* xc/programs/Xserver/hw/xfree86/common/compiler.h */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/compiler.h,v 3.24.2.4 1998/10/18 20:42:10 hohndel Exp $ */
+/*
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
@@ -64,12 +66,18 @@ Add inb() and outb() from XFree86 sources.
+ *
+ */
+/* $XConsortium: compiler.h /main/16 1996/10/25 15:38:34 kaleb $ */
++/* also hacked by agc to do i386_iopl */
++static int ports_enabled;
+
+static __inline__ unsigned int
+inb(unsigned short int port)
+{
+ unsigned char ret;
+
++ if (!ports_enabled) {
++ i386_iopl(1);
++ ports_enabled = 1;
++ }
+ __asm__ __volatile__("inb %1,%0" :
+ "=a" (ret) :
+ "d" (port));
@@ -79,6 +87,10 @@ Add inb() and outb() from XFree86 sources.
+static __inline__ void
+outb(unsigned short int port, unsigned char val)
+{
++ if (!ports_enabled) {
++ i386_iopl(1);
++ ports_enabled = 1;
++ }
+ __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
+}
#endif
diff --git a/audio/rio/pkg/PLIST b/audio/rio/pkg/PLIST
index aec017854d2..c11f2f19cac 100644
--- a/audio/rio/pkg/PLIST
+++ b/audio/rio/pkg/PLIST
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 1999/12/31 21:19:50 agc Exp $
+@comment $NetBSD: PLIST,v 1.2 2000/01/11 11:31:19 agc Exp $
bin/rio
+bin/find-lpt-port
share/rio/README
@dirrm share/rio