summaryrefslogtreecommitdiff
path: root/audio/rio
diff options
context:
space:
mode:
authordholland <dholland>2008-08-02 18:32:15 +0000
committerdholland <dholland>2008-08-02 18:32:15 +0000
commitdf94ef5d01041aff38c4c392138314f7077e123c (patch)
tree5397a16e8452fe7468f83463a75e54e932a71418 /audio/rio
parentf84428ec95f95b7b32861f3e8a9a690b1126f0f2 (diff)
downloadpkgsrc-df94ef5d01041aff38c4c392138314f7077e123c.tar.gz
Make this build on amd64.
Diffstat (limited to 'audio/rio')
-rw-r--r--audio/rio/Makefile6
-rw-r--r--audio/rio/distinfo6
-rw-r--r--audio/rio/patches/patch-aa18
-rw-r--r--audio/rio/patches/patch-ab36
4 files changed, 44 insertions, 22 deletions
diff --git a/audio/rio/Makefile b/audio/rio/Makefile
index 2ac9ad4d622..336f3908a61 100644
--- a/audio/rio/Makefile
+++ b/audio/rio/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2008/03/02 06:10:34 jlam Exp $
+# $NetBSD: Makefile,v 1.23 2008/08/02 18:32:15 dholland Exp $
#
DISTNAME= rio007
@@ -11,14 +11,14 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.world.co.uk/sba/rio.html
COMMENT= Utility to display and manage files on the Diamond Rio PMP300
-ONLY_FOR_PLATFORM= NetBSD-*-i386
+ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64
PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/rio107
MAKE_FILE= makefile
USE_LANGUAGES= c++
-LIBS.NetBSD= -li386
+LIBS.NetBSD= -l$(MACHINE_ARCH)
INSTALLATION_DIRS= bin
SPECIAL_PERMS= bin/rio ${SETUID_ROOT_PERMS}
diff --git a/audio/rio/distinfo b/audio/rio/distinfo
index 35a4a3518f4..820f93a942d 100644
--- a/audio/rio/distinfo
+++ b/audio/rio/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 20:39:51 agc Exp $
+$NetBSD: distinfo,v 1.4 2008/08/02 18:32:15 dholland Exp $
SHA1 (rio007.tgz) = d7abbcd9619ff6528be31c38d55445bebb44e9f0
RMD160 (rio007.tgz) = 82528f4877e3339c407b6e5dea9393123d44f72d
Size (rio007.tgz) = 28953 bytes
-SHA1 (patch-aa) = eeaa99fba0c9c8fc53d9ea4639b81494a448cf2d
-SHA1 (patch-ab) = d3698fc8e76b264276f1809e96eb0675e9840b12
+SHA1 (patch-aa) = 2aba53b31ff0b75a297fe7696252c02c03850014
+SHA1 (patch-ab) = e7b0e333be109ebe1a5d291724b874418e1dd919
SHA1 (patch-ac) = 4f490e55a906891f2c0488e9bdb78f5a26c7f073
diff --git a/audio/rio/patches/patch-aa b/audio/rio/patches/patch-aa
index dac038a66a4..2e39b72c83d 100644
--- a/audio/rio/patches/patch-aa
+++ b/audio/rio/patches/patch-aa
@@ -1,10 +1,11 @@
-$NetBSD: patch-aa,v 1.2 2000/01/11 11:31:19 agc Exp $
+$NetBSD: patch-aa,v 1.3 2008/08/02 18:32:15 dholland Exp $
Add support for NetBSD and Solaris
Make sure the program is being run by effective uid 0
+Bug fix: time_t != long.
---- app.cpp 1999/12/17 17:39:52 1.1
-+++ app.cpp 1999/12/17 17:41:47
+--- app.cpp.orig 1999-06-11 12:26:46.000000000 -0400
++++ app.cpp 2008-08-02 14:25:08.000000000 -0400
@@ -67,6 +67,20 @@
#define SIZE_MAXPATH MAXPATH
#define DELETEARRAY delete
@@ -26,7 +27,16 @@ Make sure the program is being run by effective uid 0
#else
// not supported
#error ! ! compiler/platform not supported ! !
-@@ -519,6 +533,13 @@
+@@ -97,7 +111,7 @@
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // return pointer to static string containing datetime
+-static char* TimeStr( long lValue )
++static char* TimeStr( time_t lValue )
+ {
+ static char szBuf[ 64 ];
+ struct tm* psDateTime;
+@@ -519,6 +533,13 @@ int main( int iCountArg, char* paszArg[]
Help();
CLEANUP_RETURN( FALSE );
}
diff --git a/audio/rio/patches/patch-ab b/audio/rio/patches/patch-ab
index 9f103fdae13..7c782f773de 100644
--- a/audio/rio/patches/patch-ab
+++ b/audio/rio/patches/patch-ab
@@ -1,21 +1,21 @@
-$NetBSD: patch-ab,v 1.3 2000/01/11 11:31:19 agc Exp $
+$NetBSD: patch-ab,v 1.4 2008/08/02 18:32:15 dholland Exp $
Add NetBSD and Solaris platforms
Add inb() and outb() from XFree86 sources.
+Add NetBSD/x86_64 support.
---- rio.cpp 1999/12/17 17:42:31 1.1
-+++ rio.cpp 1999/12/17 17:44:25
-+++ rio.cpp Fri Jan 7 12:43:45 2000
-@@ -109,9 +109,89 @@
+--- rio.cpp.orig 1999-06-11 12:26:46.000000000 -0400
++++ rio.cpp 2008-08-02 14:16:07.000000000 -0400
+@@ -109,11 +109,101 @@
#define CLOCK_SECOND ((int)CLOCKS_PER_SEC)
#define DELETEARRAY delete
+#elif defined(__NetBSD__)
-+ // NetBSD/i386 g++
++ // NetBSD/i386,amd64 g++
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <machine/sysarch.h>
-+ #include <machine/cpufunc.h>
++ //#include <machine/cpufunc.h>
+ #define OUTPORT(p,v) outb( p, v )
+ #define INPORT(p) inb( p )
+ #define CLOCK_SECOND CLOCKS_PER_SEC
@@ -37,8 +37,8 @@ Add inb() and outb() from XFree86 sources.
#else
// not supported
#error ! ! compiler/platform not supported ! !
-+#endif
-+
+ #endif
+
+#if defined(__NetBSD__)
+/* copied from the XFree86 sources */
+/* xc/programs/Xserver/hw/xfree86/common/compiler.h */
@@ -66,7 +66,7 @@ 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 */
++/* also hacked by agc to do i386_iopl, and by dholland for x86_64_iopl */
+static int ports_enabled;
+
+static __inline__ unsigned int
@@ -75,7 +75,12 @@ Add inb() and outb() from XFree86 sources.
+ unsigned char ret;
+
+ if (!ports_enabled) {
++#ifdef __i386__
+ i386_iopl(1);
++#endif
++#ifdef __x86_64__
++ x86_64_iopl(1);
++#endif
+ ports_enabled = 1;
+ }
+ __asm__ __volatile__("inb %1,%0" :
@@ -88,11 +93,18 @@ Add inb() and outb() from XFree86 sources.
+outb(unsigned short int port, unsigned char val)
+{
+ if (!ports_enabled) {
++#ifdef __i386__
+ i386_iopl(1);
++#endif
++#ifdef __x86_64__
++ x86_64_iopl(1);
++#endif
+ ports_enabled = 1;
+ }
+ __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
+}
- #endif
-
++#endif
++
// port offset constants
+ #define OFFSET_PORT_DATA 0
+ #define OFFSET_PORT_STATUS 1