diff options
author | skrll <skrll> | 2002-10-07 11:36:15 +0000 |
---|---|---|
committer | skrll <skrll> | 2002-10-07 11:36:15 +0000 |
commit | 343cec010854dc463ecdbd87cdfdf8f547aea4d1 (patch) | |
tree | 70fda6bdca362ad939dff0c43eb33f35c0617948 /graphics | |
parent | 31ea7e7118027392971e012c569a9ded880aa4fc (diff) | |
download | pkgsrc-343cec010854dc463ecdbd87cdfdf8f547aea4d1.tar.gz |
Enable the SSE detection and checking stuff for NetBSD
Bump PKGREVISION.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/gmplayer/distinfo | 3 | ||||
-rw-r--r-- | graphics/mplayer-share/Makefile.common | 4 | ||||
-rw-r--r-- | graphics/mplayer-share/distinfo | 3 | ||||
-rw-r--r-- | graphics/mplayer-share/patches/patch-ad | 78 | ||||
-rw-r--r-- | graphics/mplayer/distinfo | 3 |
5 files changed, 86 insertions, 5 deletions
diff --git a/graphics/gmplayer/distinfo b/graphics/gmplayer/distinfo index 00f346db51e..77181e071ed 100644 --- a/graphics/gmplayer/distinfo +++ b/graphics/gmplayer/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.17 2002/10/01 13:57:04 dillo Exp $ +$NetBSD: distinfo,v 1.18 2002/10/07 11:36:17 skrll Exp $ SHA1 (mplayer/MPlayer-0.90pre8.tar.bz2) = f61ec2af22f65a402bf8bfe93bd248298acca30f Size (mplayer/MPlayer-0.90pre8.tar.bz2) = 2692566 bytes @@ -45,3 +45,4 @@ Size (mplayer/hwswskin.tar.bz2) = 20275 bytes SHA1 (patch-aa) = abc450482c760e70d9998f33afb005d6749de2b2 SHA1 (patch-ab) = e36a37c5d011319e0b02f30487ecf489f067f13d SHA1 (patch-ac) = 2541883d43c4eb07eafb4f2f62b93a3bcbc4aa50 +SHA1 (patch-ad) = 802ee4f99410482b82885e66ba18f547e4f648a0 diff --git a/graphics/mplayer-share/Makefile.common b/graphics/mplayer-share/Makefile.common index 361ac4cb3fc..f998c447f19 100644 --- a/graphics/mplayer-share/Makefile.common +++ b/graphics/mplayer-share/Makefile.common @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.common,v 1.12 2002/10/01 12:51:47 dillo Exp $ +# $NetBSD: Makefile.common,v 1.13 2002/10/07 11:36:17 skrll Exp $ MPLAYER_DIST_VERSION= 0.90pre8 -PKGREVISION= 1 +PKGREVISION= 2 # There is no need to change anything below here. diff --git a/graphics/mplayer-share/distinfo b/graphics/mplayer-share/distinfo index 4f620247684..ad8e0a4952f 100644 --- a/graphics/mplayer-share/distinfo +++ b/graphics/mplayer-share/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2002/10/01 12:51:47 dillo Exp $ +$NetBSD: distinfo,v 1.9 2002/10/07 11:36:18 skrll Exp $ SHA1 (mplayer/MPlayer-0.90pre8.tar.bz2) = f61ec2af22f65a402bf8bfe93bd248298acca30f Size (mplayer/MPlayer-0.90pre8.tar.bz2) = 2692566 bytes @@ -11,3 +11,4 @@ Size (mplayer/koi8r-font.tar.bz2) = 68817 bytes SHA1 (patch-aa) = abc450482c760e70d9998f33afb005d6749de2b2 SHA1 (patch-ab) = e36a37c5d011319e0b02f30487ecf489f067f13d SHA1 (patch-ac) = 2541883d43c4eb07eafb4f2f62b93a3bcbc4aa50 +SHA1 (patch-ad) = 802ee4f99410482b82885e66ba18f547e4f648a0 diff --git a/graphics/mplayer-share/patches/patch-ad b/graphics/mplayer-share/patches/patch-ad new file mode 100644 index 00000000000..a7fe489d7af --- /dev/null +++ b/graphics/mplayer-share/patches/patch-ad @@ -0,0 +1,78 @@ +$NetBSD: patch-ad,v 1.1 2002/10/07 11:36:18 skrll Exp $ + +--- cpudetect.c.orig Mon May 20 02:00:51 2002 ++++ cpudetect.c +@@ -13,6 +13,11 @@ CpuCaps gCpuCaps; + + #include <stdio.h> + ++#ifdef __NetBSD__ ++#include <sys/param.h> ++#include <setjmp.h> ++#endif ++ + #ifdef __FreeBSD__ + #include <sys/types.h> + #include <sys/sysctl.h> +@@ -146,7 +151,7 @@ void GetCpuCaps( CpuCaps *caps) + #endif + + /* FIXME: Does SSE2 need more OS support, too? */ +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) + if (caps->hasSSE) + check_os_katmai_support(); + if (!caps->hasSSE) +@@ -236,6 +241,15 @@ char *GetCpuFriendlyName(unsigned int re + #undef CPUID_STEPPING + + ++#ifdef __NetBSD__ ++jmp_buf sseCheckEnv; ++ ++void sseCheckHandler(int i) ++{ ++ longjmp(sseCheckEnv, 1); ++} ++#endif ++ + #if defined(__linux__) && defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) + static void sigill_handler_sse( int signal, struct sigcontext sc ) + { +@@ -292,6 +306,36 @@ static void check_os_katmai_support( voi + if (ret || !has_sse) + gCpuCaps.hasSSE=0; + ++#elif defined(__NetBSD__) ++#if __NetBSD_Version__ >= 105260000 ++ if ( gCpuCaps.hasSSE ) { ++ void (*oldHandler)(int); ++ ++ mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); ++ ++ oldHandler = signal(SIGILL, sseCheckHandler); ++ if (setjmp(sseCheckEnv)) { ++ gCpuCaps.hasSSE = 0; ++ } else { ++ __asm__ __volatile__ ( ++ "subl $0x10, %esp \n" ++ "movups %xmm0, (%esp) \n" ++ "emms \n" ++ "addl $0x10, %esp \n" ++ ); ++ } ++ signal(SIGILL, oldHandler); ++ ++ if ( gCpuCaps.hasSSE ) { ++ mp_msg(MSGT_CPUDETECT,MSGL_V, "no!\n" ); ++ } else { ++ mp_msg(MSGT_CPUDETECT,MSGL_V, "yes!\n" ); ++ } ++ } ++#else ++ gCpuCaps.hasSSE = 0 ++ mp_msg(MSGT_CPUDETECT,MSGL_WARN, "No OS support for SSE, disabling to be safe.\n" ); ++#endif + #elif defined(__linux__) + #if defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) + struct sigaction saved_sigill; diff --git a/graphics/mplayer/distinfo b/graphics/mplayer/distinfo index bf72a0468c8..c758138e889 100644 --- a/graphics/mplayer/distinfo +++ b/graphics/mplayer/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.20 2002/10/01 12:51:46 dillo Exp $ +$NetBSD: distinfo,v 1.21 2002/10/07 11:36:17 skrll Exp $ SHA1 (mplayer/MPlayer-0.90pre8.tar.bz2) = f61ec2af22f65a402bf8bfe93bd248298acca30f Size (mplayer/MPlayer-0.90pre8.tar.bz2) = 2692566 bytes SHA1 (patch-aa) = abc450482c760e70d9998f33afb005d6749de2b2 SHA1 (patch-ab) = e36a37c5d011319e0b02f30487ecf489f067f13d SHA1 (patch-ac) = 2541883d43c4eb07eafb4f2f62b93a3bcbc4aa50 +SHA1 (patch-ad) = 802ee4f99410482b82885e66ba18f547e4f648a0 |