pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/cs4235 Fix broken build on -current. While here,...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8f6a984f8e59
branches: trunk
changeset: 545414:8f6a984f8e59
user: dholland <dholland%pkgsrc.org@localhost>
date: Sat Aug 02 16:46:56 2008 +0000
description:
Fix broken build on -current. While here, make it build on amd64 too.
(Patches have been sent upstream.)
PKGREVISION++.
diffstat:
audio/cs4235/Makefile | 5 +-
audio/cs4235/distinfo | 8 +-
audio/cs4235/patches/patch-aa | 14 ++
audio/cs4235/patches/patch-ab | 38 ++++++
audio/cs4235/patches/patch-ac | 14 ++
audio/cs4235/patches/patch-ad | 16 ++
audio/cs4235/patches/patch-ae | 13 ++
audio/cs4235/patches/patch-af | 237 ++++++++++++++++++++++++++++++++++++++++++
8 files changed, 342 insertions(+), 3 deletions(-)
diffs (truncated from 394 to 300 lines):
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/Makefile
--- a/audio/cs4235/Makefile Sat Aug 02 11:36:06 2008 +0000
+++ b/audio/cs4235/Makefile Sat Aug 02 16:46:56 2008 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.10 2006/11/05 14:47:55 rillig Exp $
+# $NetBSD: Makefile,v 1.11 2008/08/02 16:46:56 dholland Exp $
#
DISTNAME= cs4235-20001009
+PKGREVISION= 1
CATEGORIES= audio sysutils
MASTER_SITES= http://www.invisible.ca/~jmcneill/
@@ -9,7 +10,7 @@
HOMEPAGE= http://www.invisible.ca/~jmcneill/
COMMENT= Modifies the 3D mode on Crystal CS4235 sound cards
-ONLY_FOR_PLATFORM= NetBSD-*-i386
+ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64
WRKSRC= ${WRKDIR}/cs4235
MAKE_ENV+= ${BSD_MAKE_ENV}
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/distinfo
--- a/audio/cs4235/distinfo Sat Aug 02 11:36:06 2008 +0000
+++ b/audio/cs4235/distinfo Sat Aug 02 16:46:56 2008 +0000
@@ -1,5 +1,11 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 20:39:43 agc Exp $
+$NetBSD: distinfo,v 1.4 2008/08/02 16:46:56 dholland Exp $
SHA1 (cs4235-20001009.tar.gz) = 599d28d94dc72ccccb0d9478f5e0383bcbff2bd8
RMD160 (cs4235-20001009.tar.gz) = f1768596e9dee389d9435f8ce72fc61ba2f36dfa
Size (cs4235-20001009.tar.gz) = 1967 bytes
+SHA1 (patch-aa) = 428bbba16bd1fe32f96ec9cbb0062ac053693f49
+SHA1 (patch-ab) = 10f85ffd04057ae9612134940590053a5764e151
+SHA1 (patch-ac) = ed060c5977d645dca15ed712d339f019672f008c
+SHA1 (patch-ad) = 6ffe4c9afb240f125d3bd815049641961cfb3f38
+SHA1 (patch-ae) = 9f8ab76babd508b3399c6862af74f49d447ffe98
+SHA1 (patch-af) = 8bac18e90fb8ae57bf6fd1cf8edded10c1c909ef
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cs4235/patches/patch-aa Sat Aug 02 16:46:56 2008 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-aa,v 1.1 2008/08/02 16:46:56 dholland Exp $
+
+diff -urpN Makefile.orig Makefile
+--- Makefile.orig 2000-10-09 09:55:19.000000000 -0400
++++ Makefile 2008-08-02 12:09:06.000000000 -0400
+@@ -3,7 +3,7 @@
+ PROG= cs4235_3dctl
+ SRCS= cs4235_3dctl.c cs4235_ctl.c
+
+-LDFLAGS=-li386
++LDFLAGS=-l$(MACHINE_ARCH)
+
+ NOMAN= Sorry
+
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cs4235/patches/patch-ab Sat Aug 02 16:46:56 2008 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-ab,v 1.1 2008/08/02 16:46:56 dholland Exp $
+
+diff -urpN cs4235_3dctl.c.orig cs4235_3dctl.c
+--- cs4235_3dctl.c.orig 2000-10-09 09:55:19.000000000 -0400
++++ cs4235_3dctl.c 2008-08-02 12:21:57.000000000 -0400
+@@ -10,9 +10,10 @@
+ #include <sys/types.h>
+
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #include <machine/sysarch.h>
+-#include <machine/pio.h>
++#include "pio.h"
+
+ #include "cs4235_ctl.h"
+
+@@ -42,9 +43,9 @@ main(int argc, char *argv[])
+ }
+
+ /* Enable access to IO ports */
+- if (i386_iopl(3))
++ if (iopl(3))
+ {
+- perror("i386_iopl");
++ perror("iopl");
+ return(1);
+ }
+
+@@ -62,7 +63,7 @@ main(int argc, char *argv[])
+ printf("cs4235.spacectl: %i -> %i\n", old_volume / 16, new_volume / 16);
+
+ /* Disable access to IO ports */
+- i386_iopl(0);
++ iopl(0);
+
+ /* All done */
+ return(0);
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cs4235/patches/patch-ac Sat Aug 02 16:46:56 2008 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ac,v 1.1 2008/08/02 16:46:56 dholland Exp $
+
+diff -urpN cs4235_ctl.c.orig cs4235_ctl.c
+--- cs4235_ctl.c.orig 2000-10-09 09:55:19.000000000 -0400
++++ cs4235_ctl.c 2008-08-02 12:21:52.000000000 -0400
+@@ -13,7 +13,7 @@
+ #include <string.h>
+
+ #include <machine/sysarch.h>
+-#include <machine/pio.h>
++#include "pio.h"
+
+ #include "cs4235_regs.h"
+ #include "cs4235_ctl.h"
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cs4235/patches/patch-ad Sat Aug 02 16:46:56 2008 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ad,v 1.1 2008/08/02 16:46:56 dholland Exp $
+
+diff -urpN cs4235.orig/cs4235_ctl.h cs4235/cs4235_ctl.h
+--- cs4235_ctl.h.orig 2000-10-09 09:55:19.000000000 -0400
++++ cs4235_ctl.h 2008-08-02 12:26:36.000000000 -0400
+@@ -17,4 +17,10 @@ void cs4235_enable_access_indirect __P((
+ void cs4235_enable_access_extended __P((void));
+ void cs4235_enable_3d __P((void));
+
++#if defined(__i386__)
++#define iopl i386_iopl
++#elif defined(__x86_64__) || defined(__amd64__)
++#define iopl x86_64_iopl
++#endif
++
+ #endif /* !_CS4235_CTL_H_ */
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cs4235/patches/patch-ae Sat Aug 02 16:46:56 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2008/08/02 16:46:56 dholland Exp $
+
+diff -urpN /dev/null pio.h
+--- /dev/null 1969-12-31 19:00:00.000000000 -0500
++++ pio.h 2008-08-02 12:22:17.000000000 -0400
+@@ -0,0 +1,7 @@
++#include <sys/param.h>
++
++#if __NetBSD_Version__ < 499003100 /* NetBSD 4.99.31 */
++#include <machine/pio.h>
++#else
++#include "x86_pio.h"
++#endif
diff -r 5084fa7a7dc2 -r 8f6a984f8e59 audio/cs4235/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cs4235/patches/patch-af Sat Aug 02 16:46:56 2008 +0000
@@ -0,0 +1,237 @@
+$NetBSD: patch-af,v 1.1 2008/08/02 16:46:56 dholland Exp $
+
+diff -urpN /dev/null x86_pio.h
+--- /dev/null 1969-12-31 19:00:00.000000000 -0500
++++ x86_pio.h 2008-08-02 12:15:47.000000000 -0400
+@@ -0,0 +1,231 @@
++/* $NetBSD: patch-af,v 1.1 2008/08/02 16:46:56 dholland Exp $ */
++
++/*-
++ * Copyright (c) 1998 The NetBSD Foundation, Inc.
++ * All rights reserved.
++ *
++ * This code is derived from software contributed to The NetBSD Foundation
++ * by Charles M. Hannum.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. All advertising materials mentioning features or use of this software
++ * must display the following acknowledgement:
++ * This product includes software developed by the NetBSD
++ * Foundation, Inc. and its contributors.
++ * 4. Neither the name of The NetBSD Foundation nor the names of its
++ * contributors may be used to endorse or promote products derived
++ * from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
++ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
++ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#ifndef _X86_PIO_H_
++#define _X86_PIO_H_
++
++/*
++ * Functions to provide access to x86 programmed I/O instructions.
++ *
++ * The in[bwl]() and out[bwl]() functions are split into two varieties: one to
++ * use a small, constant, 8-bit port number, and another to use a large or
++ * variable port number. The former can be compiled as a smaller instruction.
++ */
++
++
++#ifdef __OPTIMIZE__
++
++#define __use_immediate_port(port) \
++ (__builtin_constant_p((port)) && (port) < 0x100)
++
++#else
++
++#define __use_immediate_port(port) 0
++
++#endif
++
++
++#define inb(port) \
++ (/* CONSTCOND */ __use_immediate_port(port) ? __inbc(port) : __inb(port))
++
++static __inline u_int8_t
++__inbc(unsigned port)
++{
++ u_int8_t data;
++ __asm volatile("inb %w1,%0" : "=a" (data) : "id" (port));
++ return data;
++}
++
++static __inline u_int8_t
++__inb(unsigned port)
++{
++ u_int8_t data;
++ __asm volatile("inb %w1,%0" : "=a" (data) : "d" (port));
++ return data;
++}
++
++static __inline void
++insb(unsigned port, void *addr, int cnt)
++{
++ void *dummy1;
++ int dummy2;
++ __asm volatile("cld\n\trep\n\tinsb" :
++ "=D" (dummy1), "=c" (dummy2) :
++ "d" (port), "0" (addr), "1" (cnt) :
++ "memory");
++}
++
++#define inw(port) \
++ (/* CONSTCOND */ __use_immediate_port(port) ? __inwc(port) : __inw(port))
++
++static __inline u_int16_t
++__inwc(unsigned port)
++{
++ u_int16_t data;
++ __asm volatile("inw %w1,%0" : "=a" (data) : "id" (port));
++ return data;
++}
++
++static __inline u_int16_t
++__inw(unsigned port)
++{
++ u_int16_t data;
++ __asm volatile("inw %w1,%0" : "=a" (data) : "d" (port));
++ return data;
++}
++
++static __inline void
++insw(unsigned port, void *addr, int cnt)
++{
++ void *dummy1;
++ int dummy2;
++ __asm volatile("cld\n\trep\n\tinsw" :
++ "=D" (dummy1), "=c" (dummy2) :
++ "d" (port), "0" (addr), "1" (cnt) :
++ "memory");
++}
++
++#define inl(port) \
++ (/* CONSTCOND */ __use_immediate_port(port) ? __inlc(port) : __inl(port))
++
++static __inline u_int32_t
++__inlc(unsigned port)
++{
++ u_int32_t data;
++ __asm volatile("inl %w1,%0" : "=a" (data) : "id" (port));
++ return data;
++}
++
++static __inline u_int32_t
++__inl(unsigned port)
++{
++ u_int32_t data;
Home |
Main Index |
Thread Index |
Old Index