mplayer options patch

2011-01-07 Thread Anton Shterenlikht
mplayer fails on ia64 portscluster:

Error: Runtime CPU detection only works for x86, x86-64 and PPC!

Here's a patch:

--- Makefile2010-12-03 03:38:31.0 +
+++ Makefile.new2011-01-07 09:38:50.0 +
@@ -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.


-- 
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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Eygene Ryabinkin
Fri, Jan 07, 2011 at 09:58:17AM +, 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.0 +
 +++ Makefile.new  2011-01-07 09:38:50.0 +
 @@ -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
}}}
-- 
Eygene Ryabinkin,,,^..^,,,
[ Life's unfair - but root password helps!   | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]


pgpFg3IMvCRy7.pgp
Description: PGP signature


Re: mplayer options patch

2011-01-07 Thread Anton Shterenlikht
On Fri, Jan 07, 2011 at 01:15:21PM +0300, Eygene Ryabinkin wrote:
 Fri, Jan 07, 2011 at 09:58:17AM +, Anton Shterenlikht wrote:
  Error: Runtime CPU detection only works for x86, x86-64 and PPC!
  
  Here's a patch:
  
  --- Makefile2010-12-03 03:38:31.0 +
  +++ Makefile.new2011-01-07 09:38:50.0 +
  @@ -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:


--- Makefile2010-12-02 09:18:00.0 +
+++ Makefile.new2011-01-07 11:16:56.0 +
@@ -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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Anonymous
Eygene Ryabinkin r...@freebsd.org writes:

 Fri, Jan 07, 2011 at 09:58:17AM +, 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.0 +
 +++ Makefile.new 2011-01-07 09:38:50.0 +
 @@ -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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Anton Shterenlikht
On Fri, Jan 07, 2011 at 02:41:21PM +0300, Anonymous wrote:
 Eygene Ryabinkin r...@freebsd.org writes:
 
  Fri, Jan 07, 2011 at 09:58:17AM +, 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.0 +
  +++ Makefile.new   2011-01-07 09:38:50.0 +
  @@ -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 bsd.port.pre.mk,
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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Anonymous
Anton Shterenlikht me...@bristol.ac.uk writes:

   $ 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 bsd.port.pre.mk,
 see my previous post. It seems to work.

bsd.port.pre.mk starts after OPTIONS were already parsed.
Try to check

  $ make rmconfig
  $ make -V WITH_RTCPU ARCH=sparc64
  true
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Anton Shterenlikht
On Fri, Jan 07, 2011 at 03:00:39PM +0300, Anonymous wrote:
 Anton Shterenlikht me...@bristol.ac.uk writes:
 
$ 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 bsd.port.pre.mk,
  see my previous post. It seems to work.
 
 bsd.port.pre.mk starts after OPTIONS were already parsed.
 Try to check
 
   $ make rmconfig
   $ make -V WITH_RTCPU ARCH=sparc64
   true

# make rmconfig
=== Removing user-configured options for mplayer-1.0.r20101106
rmdir: /var/db/ports/mplayer: Directory not empty
*** Error code 1 (ignored)
# make -V WITH_RTCPU ARCH=sparc64

# make -V WITH_RTCPU ARCH=ia64

# 


those are empty lines of output.


On my ia64 I get in the dialog:

*skip*
   | |[ ] LIBLZOEnable external liblzo library  
  | |  
   | |[ ] JOYSTICK  Enable joystick support 
  | |  
   | |[ ] V4L   Enable Video4Linux TV support   
  | |  
   | |[ ] RTCPU Allow runtime CPU detection 
  | |  
   
+-++-+  
   |   [  OK  ]   Cancel
|  
   
++

-- 
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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Anonymous
Anton Shterenlikht me...@bristol.ac.uk writes:

 On Fri, Jan 07, 2011 at 03:00:39PM +0300, Anonymous wrote:
 Anton Shterenlikht me...@bristol.ac.uk writes:
 
$ 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 bsd.port.pre.mk,
  see my previous post. It seems to work.
 
 bsd.port.pre.mk starts after OPTIONS were already parsed.
 Try to check
 
   $ make rmconfig
   $ make -V WITH_RTCPU ARCH=sparc64
   true

 # make rmconfig
 === Removing user-configured options for mplayer-1.0.r20101106
 rmdir: /var/db/ports/mplayer: Directory not empty
 *** Error code 1 (ignored)
 # make -V WITH_RTCPU ARCH=sparc64

 # make -V WITH_RTCPU ARCH=ia64

 # 

My bad, I forgot to remove RTCPU when added the ifdef.

  $ make -V WITH_RTCPU ARCH=sparc64

  $ make -V WITHOUT_RTCPU ARCH=sparc64

  $ make -V CONFIGURE_ARGS ARCH=sparc64 | fgrep run
  ... --enable-runtime-cpudetection ... ${_LATE_CONFIGURE_ARGS}

It's not only for sparc64, there is no WITH/WITHOUT_RTPCU for i386.
But the configure option still works

  .if !defined(WITHOUT_RTCPU)
  CONFIGURE_ARGS+=--enable-runtime-cpudetection
  .endif
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Anton Shterenlikht
On Fri, Jan 07, 2011 at 03:28:44PM +0300, Anonymous wrote:
 Anton Shterenlikht me...@bristol.ac.uk writes:
 
  On Fri, Jan 07, 2011 at 03:00:39PM +0300, Anonymous wrote:
  Anton Shterenlikht me...@bristol.ac.uk writes:
  
 $ 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 bsd.port.pre.mk,
   see my previous post. It seems to work.
  
  bsd.port.pre.mk starts after OPTIONS were already parsed.
  Try to check
  
$ make rmconfig
$ make -V WITH_RTCPU ARCH=sparc64
true
 
  # make rmconfig
  === Removing user-configured options for mplayer-1.0.r20101106
  rmdir: /var/db/ports/mplayer: Directory not empty
  *** Error code 1 (ignored)
  # make -V WITH_RTCPU ARCH=sparc64
 
  # make -V WITH_RTCPU ARCH=ia64
 
  # 
 
 My bad, I forgot to remove RTCPU when added the ifdef.
 
   $ make -V WITH_RTCPU ARCH=sparc64
 
   $ make -V WITHOUT_RTCPU ARCH=sparc64
 
   $ make -V CONFIGURE_ARGS ARCH=sparc64 | fgrep run
   ... --enable-runtime-cpudetection ... ${_LATE_CONFIGURE_ARGS}
 
 It's not only for sparc64, there is no WITH/WITHOUT_RTPCU for i386.
 But the configure option still works
 
   .if !defined(WITHOUT_RTCPU)
   CONFIGURE_ARGS+=--enable-runtime-cpudetection
   .endif

I don't think I need to change any other options from 
the current default to make it build and run on my ia64.

So if this patch seems reasonable, can somebody submit it?

many thanks
anton


--- Makefile2010-12-02 09:18:00.0 +
+++ Makefile.new2011-01-07 11:16:56.0 +
@@ -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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: mplayer options patch

2011-01-07 Thread Eygene Ryabinkin
Fri, Jan 07, 2011 at 01:32:39PM +, Anton Shterenlikht wrote:
 I don't think I need to change any other options from 
 the current default to make it build and run on my ia64.
 
 So if this patch seems reasonable, can somebody submit it?
 
 many thanks
 anton
 
 
 --- Makefile  2010-12-02 09:18:00.0 +
 +++ Makefile.new  2011-01-07 11:16:56.0 +
 @@ -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

Having thinked about it for a while, I wonder if we need to have
RTCPU knob on non-{i386,amd64,powerpc}?  From the one hand, the
knob isn't functional, so it is redundant, because mplayer will
refuse to build.  On the other hand, once mplayer will gain the
ability to make run-time CPU detection on other platforms, this
knob will be usable again and it will be good to add it to the
relevant architectures.

I think that this should be left to the maintainers decision.
Please, submit a PR that describes the problem and contains
the patch.  If submitting PR is something you hadn't done before,
please, take a look at
  
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/problem-reports/article.html

You can add me to the X-GNATS-Notify header -- I'll take the PR
and once/if Thomas will approve it, I'll commit the modifications.
-- 
Eygene Ryabinkin,,,^..^,,,
[ Life's unfair - but root password helps!   | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]


pgpRMftPbUoMb.pgp
Description: PGP signature