pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/rio Make this build on amd64.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9885ef81c4c8
branches:  trunk
changeset: 545422:9885ef81c4c8
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Aug 02 18:32:15 2008 +0000

description:
Make this build on amd64.

diffstat:

 audio/rio/Makefile         |   6 +++---
 audio/rio/distinfo         |   6 +++---
 audio/rio/patches/patch-aa |  18 ++++++++++++++----
 audio/rio/patches/patch-ab |  36 ++++++++++++++++++++++++------------
 4 files changed, 44 insertions(+), 22 deletions(-)

diffs (163 lines):

diff -r 92749ed050d2 -r 9885ef81c4c8 audio/rio/Makefile
--- a/audio/rio/Makefile        Sat Aug 02 18:10:05 2008 +0000
+++ b/audio/rio/Makefile        Sat Aug 02 18:32:15 2008 +0000
@@ -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 @@
 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 -r 92749ed050d2 -r 9885ef81c4c8 audio/rio/distinfo
--- a/audio/rio/distinfo        Sat Aug 02 18:10:05 2008 +0000
+++ b/audio/rio/distinfo        Sat Aug 02 18:32:15 2008 +0000
@@ -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 -r 92749ed050d2 -r 9885ef81c4c8 audio/rio/patches/patch-aa
--- a/audio/rio/patches/patch-aa        Sat Aug 02 18:10:05 2008 +0000
+++ b/audio/rio/patches/patch-aa        Sat Aug 02 18:32:15 2008 +0000
@@ -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 @@
  #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 -r 92749ed050d2 -r 9885ef81c4c8 audio/rio/patches/patch-ab
--- a/audio/rio/patches/patch-ab        Sat Aug 02 18:10:05 2008 +0000
+++ b/audio/rio/patches/patch-ab        Sat Aug 02 18:32:15 2008 +0000
@@ -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 @@
  #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 @@
 + *
 + */
 +/* $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 @@
 +      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 @@
 +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



Home | Main Index | Thread Index | Old Index