Subject: pkg/20468: mplayer works on Alpha now--update to package
To: None <gnats-bugs@gnats.netbsd.org>
From: None <khym@azeotrope.org>
List: netbsd-bugs
Date: 02/22/2003 07:07:06
>Number:         20468
>Category:       pkg
>Synopsis:       mplayer works on Alpha now--update to package
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 22 05:08:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Dave Huang
>Release:        NetBSD 1.6
>Organization:
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 27 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Environment:
	
	
System: NetBSD yerfable.azeotrope.org 1.6 NetBSD 1.6 (YERFABLE) #196: Thu Sep 12 19:22:18 CDT 2002 khym@yerfable.azeotrope.org:/usr2/obj.alpha/YERFABLE alpha
Architecture: alpha
Machine: alpha
>Description:
	mplayer has been pretty much working on NetBSD/alpha for a
while now (see <http://mail-index.netbsd.org/netbsd-help/2002/07/30/0009.html>),
but the package is marked only for i386, powerpc, and SunOS. I just
tried 0.90rc4, and except for a minor bug in libavcodec (which I've
included a patch for), it works fine.

So can we get the package enabled for the alpha? :)
>How-To-Repeat:
	
>Fix:
Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/mplayer-share/Makefile.common,v
retrieving revision 1.24
diff -u -r1.24 Makefile.common
--- Makefile.common	2003/02/18 11:16:33	1.24
+++ Makefile.common	2003/02/22 12:56:17
@@ -20,7 +20,7 @@
 HOMEPAGE?=		http://www.mplayerhq.hu/
 
 PATCHDIR=		${.CURDIR}/../../graphics/mplayer-share/patches
-ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-powerpc SunOS-*-*
+ONLY_FOR_PLATFORM=	NetBSD-*-alpha NetBSD-*-i386 NetBSD-*-powerpc SunOS-*-*
 
 NO_BIN_ON_CD=		"a dependency is restricted"
 NO_BIN_ON_FTP=		"a dependency is restricted"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/mplayer-share/distinfo,v
retrieving revision 1.19
diff -u -r1.19 distinfo
--- distinfo	2003/02/18 11:16:34	1.19
+++ distinfo	2003/02/22 12:56:17
@@ -9,3 +9,4 @@
 SHA1 (mplayer/font-arial-cp1250.tar.bz2) = 7b11d721e348a53abf9656f3ade61d0b99e2e7db
 Size (mplayer/font-arial-cp1250.tar.bz2) = 490101 bytes
 SHA1 (patch-aa) = 6938dbdccb9b760dadad304f3bf61245e8b1baa6
+SHA1 (patch-ab) = 1aefd54878d816cde547178c12d55bf8fec324ec
--- /dev/null	Sat Feb 22 06:51:34 2003
+++ patches/patch-ab	Sat Feb 22 06:16:31 2003
@@ -0,0 +1,29 @@
+--- libavcodec/alpha/simple_idct_alpha.c.orig	Tue Nov 26 19:20:20 2002
++++ libavcodec/alpha/simple_idct_alpha.c	Sat Feb 22 05:57:45 2003
+@@ -49,7 +49,7 @@
+ static inline int idct_row(DCTELEM *row)
+ {
+     int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3, t;
+-    uint64_t l, r;
++    uint64_t l, r, t2;
+     l = ldq(row);
+     r = ldq(row + 4);
+ 
+@@ -60,12 +60,12 @@
+ 
+     if (((l & ~0xffffUL) | r) == 0) {
+         a0 >>= ROW_SHIFT;
+-        a0 = (uint16_t) a0;
+-        a0 |= a0 << 16;
+-        a0 |= a0 << 32;
++        t2 = (uint16_t) a0;
++        t2 |= t2 << 16;
++        t2 |= t2 << 32;
+         
+-        stq(a0, row);
+-        stq(a0, row + 4);
++        stq(t2, row);
++        stq(t2, row + 4);
+         return 1;
+     }
+ 
>Release-Note:
>Audit-Trail:
>Unformatted: