Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jan 2011 11:37:37 +0000
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        Eygene Ryabinkin <rea@freebsd.org>
Cc:        riggs@rrr.de, Anton Shterenlikht <mexas@bristol.ac.uk>, freebsd-ports@freebsd.org
Subject:   Re: mplayer options patch
Message-ID:  <20110107113737.GB69904@mech-cluster241.men.bris.ac.uk>
In-Reply-To: <MKws6xL2clvIhh8rR9KC/WtQ8GE@QsmfhJNucgI88DfvPJdT1/nyboE>
References:  <20110107095816.GA64948@mech-cluster241.men.bris.ac.uk> <MKws6xL2clvIhh8rR9KC/WtQ8GE@QsmfhJNucgI88DfvPJdT1/nyboE>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 07, 2011 at 01:15:21PM +0300, Eygene Ryabinkin wrote:
> Fri, Jan 07, 2011 at 09:58:17AM +0000, Anton Shterenlikht wrote:
> > Error: Runtime CPU detection only works for x86, x86-64 and PPC!
> > 
> > Here's a patch:
> > 
> > --- Makefile	2010-12-03 03:38:31.000000000 +0000
> > +++ Makefile.new	2011-01-07 09:38:50.000000000 +0000
> > @@ -13,7 +13,7 @@
> >  .include "${.CURDIR}/Makefile.shared"
> >  
> >  OPTIONS=	DEBUG "Include debug symbols in mplayer's binaries" off
> > -OPTIONS+=	RTCPU "Allow runtime CPU detection" on
> > +OPTIONS+=	RTCPU "Allow runtime CPU detection" off
> >  OPTIONS+=	OCFLAGS "Use optimized compiler flags" on
> >  OPTIONS+=	IPV6 "Include inet6 network support" on
> >  OPTIONS+=	X11 "Enable X11 support for mplayer's video output" on
> > 
> > It would be better to make it conditional on ARCH, but
> > I don't know how to do it.
> 
> Please, try the following snippet:
> {{{
> .if ${ARCH} == "i386" || ${ARCH} == "amd64" || ${ARCH} == "powerpc"
> OPTIONS+=	RTCPU "Allow runtime CPU detection" on
> .else
> OPTIONS+=	RTCPU "Allow runtime CPU detection" off
> .endif
> }}}

good idea. Here's the full patch:


--- Makefile	2010-12-02 09:18:00.000000000 +0000
+++ Makefile.new	2011-01-07 11:16:56.000000000 +0000
@@ -13,7 +13,6 @@
 .include "${.CURDIR}/Makefile.shared"
 
 OPTIONS=	DEBUG "Include debug symbols in mplayer's binaries" off
-OPTIONS+=	RTCPU "Allow runtime CPU detection" on
 OPTIONS+=	OCFLAGS "Use optimized compiler flags" on
 OPTIONS+=	IPV6 "Include inet6 network support" on
 OPTIONS+=	X11 "Enable X11 support for mplayer's video output" on
@@ -75,6 +74,12 @@
 BROKEN=		Does not compile on sparc64
 .endif
 
+.if ${ARCH} == "i386" || ${ARCH} == "amd64" || ${ARCH} == "powerpc"
+OPTIONS+=       RTCPU "Allow runtime CPU detection" on
+.else
+OPTIONS+=       RTCPU "Allow runtime CPU detection" off
+.endif
+
 CONFIGURE_ARGS+=	--disable-ssse3 \
 			--disable-directfb \
 			--disable-faac \



-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110107113737.GB69904>