From owner-freebsd-ports@FreeBSD.ORG Fri Jan 7 11:49:25 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FFB31065700; Fri, 7 Jan 2011 11:49:25 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0109B8FC15; Fri, 7 Jan 2011 11:49:25 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1PbAot-0006n7-Ql; Fri, 07 Jan 2011 11:49:24 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PbAot-0006rX-Hf; Fri, 07 Jan 2011 11:49:23 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4) with ESMTP id p07BnN44070313; Fri, 7 Jan 2011 11:49:23 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4/Submit) id p07BnNhO070312; Fri, 7 Jan 2011 11:49:23 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Fri, 7 Jan 2011 11:49:23 +0000 From: Anton Shterenlikht To: Anonymous Message-ID: <20110107114923.GA70063@mech-cluster241.men.bris.ac.uk> References: <20110107095816.GA64948@mech-cluster241.men.bris.ac.uk> <86lj2xhrfi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86lj2xhrfi.fsf@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: riggs@rrr.de, Anton Shterenlikht , freebsd-ports@freebsd.org, Eygene Ryabinkin Subject: Re: mplayer options patch X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2011 11:49:25 -0000 On Fri, Jan 07, 2011 at 02:41:21PM +0300, Anonymous wrote: > Eygene Ryabinkin writes: > > > 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 > > }}} > > > ARCH is not defined before bsd.port.options.mk. Try to set it > > .if !defined(ARCH) > ARCH ?= ${MACHINE} # uname -p == hw.machine > .endif > > or there'd be an error > > $ make config > "Makefile", line 16: Malformed conditional (${ARCH} == "i386" || ${ARCH} == "amd64" || ${ARCH} == "powerpc") > "Makefile", line 18: if-less else > "Makefile", line 20: if-less endif > make: fatal errors encountered -- cannot continue I put Eygene's snippet after .include , see my previous post. It seems to work. -- 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