On Mon, Nov 01, 2010 at 11:29:25AM +0000, Christian Weisgerber wrote:
> Christian Weisgerber <na...@mips.inka.de> wrote:
> 
> > > Can you send a new diff with these fixes you have been sending:
> > >  - vorbis/tremor stuff with exceptions for arm + configure patch updated
> > >  - mp3lib as above
> > 
> > After mulling over the issue, I decided against bringing in libmpg123
> > and in favor of knocking out the ffmp3float decoder.
> 
> More tweaks.
> 
> * Make the sndio backend behave like the other ones: on encountering
>   a format it can't handle, such as floating point, set audio to a
>   standard format (S16NE) and mplayer will automatically insert a
>   conversion filter.  This allows ffmp3float to work and mirrors the
>   behavior on other platforms.
> 
> * There are in fact configure script options to disable individual
>   components of the included FFmpeg.  Use them to knock out common or
>   obvious floating point decoders on arm where a fall-back to an integer
>   decoder is available.

Good finds.

> I'm sorry, the space of possible configurations for this program is
> enormous, and we are stumbling around...

Yep, insanity.

To add to the above improvements:

 * add a note in README about broken mencoder muxers.
 * add '-OpenBSD' to version sting as suggested in mplayer's binary packaging
   guidelines.

How close is this to ready? Are your arm bits tested? x264 testing/polishing is
almost complete.

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/mplayer/Makefile,v
retrieving revision 1.174
diff -u -p -u -r1.174 Makefile
--- Makefile    24 Oct 2010 21:15:33 -0000      1.174
+++ Makefile    2 Nov 2010 00:07:56 -0000
@@ -1,19 +1,18 @@
 # $OpenBSD: Makefile,v 1.174 2010/10/24 21:15:33 ajacoutot Exp $
 
 # May not be hard to add more.
-ONLY_FOR_ARCHS=                amd64 i386 powerpc sparc64 arm mips64 mips64el
+ONLY_FOR_ARCHS=                amd64 arm i386 mips64 mips64el powerpc sparc64
 
 COMMENT=               movie player supporting many formats
 
-V=                     20100308
-V_DASHED=              2010-03-08
+V=                     20101024
+V_DASHED=              2010-10-24
 
 SUBST_VARS+=           PREFIX CONFDIR
 
 N=                     mplayer
 DISTNAME=              mplayer-export-snapshot-${V}
 PKGNAME=               ${N}-${V}
-REVISION=              5
 CATEGORIES=            x11 multimedia
 EXTRACT_SUFX=          .tar.bz2
 
@@ -26,19 +25,18 @@ PERMIT_PACKAGE_CDROM=       patents
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               a52 bz2 c cdda_interface cdda_paranoia crypto dca \
-                       dv dvdnavmini dvdread faac faad fribidi jpeg lcms \
-                       m mng mp3lame mpcdec ncurses ogg.>=5 orc-0.4 png \
-                       pthread schroedinger-1.0 sndio speex stdc++ theora \
-                       ungif util x264.>=3 xvidcore z
+
+WANTLIB=       bz2 c cdda_interface cdda_paranoia crypto \
+               dv dvdnavmini dvdread faac faad fribidi jpeg lcms \
+               m mng mp3lame mpcdec ncurses ogg.>=5 orc-0.4 png \
+               pthread schroedinger-1.0 sndio speex stdc++ theora \
+               ungif util vpx x264.>=5 xvidcore z
 
 # we use a snapshot
 MASTER_SITES=  http://theunixzoo.co.uk/distfiles/
 
 MAINTAINER=    Edd Barrett <e...@openbsd.org>
 
-DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
-
 MODULES+=      converters/libiconv
 
 LIB_DEPENDS=   ::graphics/png \
@@ -57,13 +55,12 @@ LIB_DEPENDS=        ::graphics/png \
                ::devel/fribidi \
                ::graphics/lcms \
                ::graphics/libmng \
-               ::audio/libdca \
                ::archivers/bzip2 \
                ::multimedia/schroedinger \
                ::audio/faad \
                ::audio/faac \
-               ::audio/liba52 \
-               ::multimedia/x264
+               :x264->=20101023:multimedia/x264 \
+               ::multimedia/libvpx
 
 BUILD_DEPENDS= ::net/livemedia \
                :rtunes->=0.8:audio/rtunes \
@@ -81,37 +78,60 @@ CONFDIR=    ${SYSCONFDIR}/mplayer
 
 USE_GMAKE=     Yes
 USE_GROFF =    Yes
+MAKE_ENV=      V=1     # turn on verbose ffmpeg build
 CONFIGURE_STYLE=simple
+
+# CONFIGURE_ARGS for misc stuff
+CONFIGURE_ARGS+=--confdir=${CONFDIR} \
+               --mandir=${LOCALBASE}/man \
+               --extra-cflags="-I${LOCALBASE}/include 
-I${LOCALBASE}/include/libpng" \
+               --extra-ldflags="-L${LOCALBASE}/lib" \
+               --extra-libs-mplayer="-lrtunes -lcrypto"
+
+# CONFIGURE_ARGS that disable internal stuff
 CONFIGURE_ARGS+=--disable-alsa \
                --disable-arts \
                --disable-esd \
                --disable-ossaudio \
-               --disable-nas \
-               --disable-liblzo \
-               --disable-caca \
                --disable-vidix \
-               --disable-smb \
                --disable-select \
-               --disable-langinfo \
-               --disable-openal \
-               --disable-libvorbis \
-               --disable-tremor \
-               --disable-mad \
                --disable-libcdio \
-               --disable-toolame \
                --disable-dvdread-internal \
                --disable-libdvdcss-internal \
-               --disable-faad-internal \
-               --disable-gui \
+               --disable-faad-internal
+# gui is not supported anymore and we have better ones in ports
+CONFIGURE_ARGS+=--disable-gui
+
+# CONFIGURE_ARGS that enable internal stuff
+CONFIGURE_ARGS+=--enable-menu
+
+# CONFIGURE_ARGS that disable external stuff
+CONFIGURE_ARGS+=--disable-smb \
+               --disable-liblzo \
+               --disable-nas \
+               --disable-caca \
+               --disable-langinfo \
+               --disable-mad \
+               --disable-openal \
+               --disable-libdca \
+               --disable-liba52 \
+               --disable-toolame \
                --disable-win32dll \
                --disable-ggi \
                --disable-libopenjpeg \
-               --enable-menu \
-               --confdir=${CONFDIR} \
-               --mandir=${LOCALBASE}/man \
-               --extra-cflags="-I${LOCALBASE}/include 
-I${LOCALBASE}/include/libpng" \
-               --extra-ldflags="-L${LOCALBASE}/lib" \
-               --extra-libs-mplayer="-lrtunes -lcrypto"
+               --disable-mpg123
+
+# internal tremor, external tremor, external libvorbis all conflict
+# we choose libvorbis to enable encoding to vorbis
+CONFIGURE_ARGS+=--disable-tremor
+.if ${MACHINE_ARCH:Marm}
+# ... except on arm, which has no floating point hardware
+CONFIGURE_ARGS+=--disable-libvorbis
+.else
+LIB_DEPENDS+=  ::audio/libvorbis
+WANTLIB+=      vorbisenc vorbis
+CONFIGURE_ARGS+=--disable-tremor-internal
+.endif
 
 CONFIGURE_ENV+=        TMPDIR="${WRKBUILD}"
 
@@ -127,15 +147,21 @@ CONFIGURE_ARGS+=--disable-altivec
 CONFIGURE_ARGS+=--enable-runtime-cpudetection
 .endif
 
-FLAVORS=       sdl debug no_x11 aa jack
-FLAVOR?=
-
-# again old binutils...
 .if ${MACHINE_ARCH:Marm}
-CONFIGURE_ARGS+=--disable-mp3lib
+# disable common floating point decoders that have integer alternatives
+CONFIGURE_ARGS+=--disable-mp3lib \
+               --disable-decoder=mp3on4float \
+               --disable-decoder=mp3adufloat \
+               --disable-decoder=mp3float \
+               --disable-decoder=mp2float \
+               --disable-decoder=vorbis
+# again old binutils...
 CONFIGURE_ARGS+=--target=generic-openbsd
 .endif
 
+FLAVORS=       sdl debug no_x11 aa jack
+FLAVOR?=
+
 .if ${FLAVOR:L:Mno_x11}
 CONFIGURE_ARGS+=--disable-gl \
                --disable-xv \
@@ -157,7 +183,8 @@ CONFIGURE_ARGS+=--disable-sdl
 .endif
 
 .if ${FLAVOR:L:Mdebug}
-CONFIGURE_ARGS+=--enable-debug=3
+CONFIGURE_ARGS+=--enable-debug=3 \
+               --disable-sighandler
 .endif
 
 .if ${FLAVOR:L:Maa}
@@ -181,6 +208,7 @@ CONFIGURE_ARGS+=--disable-jack
 
 NO_REGRESS=    Yes
 
+# copy in sndio backend from jake
 post-extract:
        @cp ${FILESDIR}/ao_rtunes.c ${FILESDIR}/ao_sndio.c ${WRKSRC}/libao2
        @cp ${FILESDIR}/ai_sndio.c ${WRKSRC}/stream
@@ -189,9 +217,10 @@ post-extract:
 pre-configure:
        ${SUBST_CMD} ${WRKSRC}/DOCS/xml/configure
 
+
+# Put a version.h in place so svn is not a BUILD_DEPEND
+# (see version.sh for how this was supposed to work).
 post-configure:
-       # Put a version.h in place so svn is not a BUILD_DEPEND
-       # (see version.sh for how this was supposed to work).
        cp ${FILESDIR}/version.h ${WRKDIST}/version.h
 
 post-build:
@@ -200,6 +229,7 @@ post-build:
 DOCDIR =       ${PREFIX}/share/doc/mplayer
 EXAMPLEDIR =   ${PREFIX}/share/examples/mplayer
 
+# install docs
 post-install:
        ${INSTALL_DATA_DIR} ${DOCDIR}
        ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
@@ -207,6 +237,5 @@ post-install:
                ${EXAMPLEDIR}
        ${INSTALL_DATA} ${WRKDIST}/etc/example.conf ${EXAMPLEDIR}/mplayer.conf
        ${INSTALL_DATA} ${WRKDIST}/DOCS/HTML/en/*.html ${DOCDIR}
-       ${INSTALL_DATA} ${FILESDIR}/README.OpenBSD ${DOCDIR}
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/mplayer/distinfo,v
retrieving revision 1.33
diff -u -p -u -r1.33 distinfo
--- distinfo    26 May 2010 21:29:56 -0000      1.33
+++ distinfo    2 Nov 2010 00:07:56 -0000
@@ -1,5 +1,5 @@
-MD5 (mplayer-export-snapshot-20100308.tar.bz2) = y/60A+FbzhccShluFskeGg==
-RMD160 (mplayer-export-snapshot-20100308.tar.bz2) = 
WCGSDqQH6Sde3of6xFvrwgjcgFE=
-SHA1 (mplayer-export-snapshot-20100308.tar.bz2) = nSMSY1qcl0fo38VKZrYQyUYXI8U=
-SHA256 (mplayer-export-snapshot-20100308.tar.bz2) = 
TOzg0vR+1cRwIPNklgFuIpiEGe1TaNULKLMRV7ZWfWc=
-SIZE (mplayer-export-snapshot-20100308.tar.bz2) = 8870973
+MD5 (mplayer-export-snapshot-20101024.tar.bz2) = F797FlNAF1eu01Goo2VXNw==
+RMD160 (mplayer-export-snapshot-20101024.tar.bz2) = 
S9533qXXp0k7Y5TXnXHbk4yfRBs=
+SHA1 (mplayer-export-snapshot-20101024.tar.bz2) = iGBuBIpI6dKVOxdmJ4HKyatTHUM=
+SHA256 (mplayer-export-snapshot-20101024.tar.bz2) = 
BbFJxSzFbQ2CpHSGr0b5UAGLJ0wu8VqHCMvBsvy5uJE=
+SIZE (mplayer-export-snapshot-20101024.tar.bz2) = 9998106
Index: files/README.OpenBSD
===================================================================
RCS file: files/README.OpenBSD
diff -N files/README.OpenBSD
--- files/README.OpenBSD        6 Aug 2010 20:05:18 -0000       1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-Possible issues with using MPlayer on OpenBSD:
-
-all arches:
-  The GUI is deprecated so we stripped it from the build. You can use
-  x11/gnome-mplayer or x11/smplayer instead.
-
-i386:
-  win32 codecs were disabled in OpenBSD's build, as the open-source codecs
-  are now of decent quality.
-
-arm:
-  You may encounter slow video output.  In this case you can disable
-  the X.Org screen rotation in /etc/X11/xorg.conf. Depending on the
-  video you are playing you may want to pass the -framedrop or the
-  -hardframedrop option to mplayer.
-
-  In order to improve vorbis performance on ARM, try using the tremor codec.
-  This can be achieved using '-ac tremor'.
-
-See the package description for a list of FLAVORs and their meaning.
Index: files/ao_sndio.c
===================================================================
RCS file: /cvs/ports/x11/mplayer/files/ao_sndio.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 ao_sndio.c
--- files/ao_sndio.c    24 Aug 2010 14:55:30 -0000      1.5
+++ files/ao_sndio.c    2 Nov 2010 00:07:56 -0000
@@ -157,8 +157,10 @@ static int init(int rate, int channels, 
                ac3 = 1;
                break;
        default:
-               mp_msg(MSGT_AO, MSGL_ERR, "ao2: unsupported format\n");
-               return 0;
+               mp_msg(MSGT_AO, MSGL_V, "ao2: unsupported format\n");
+               par.bits = 16;
+               par.sig = 1;
+               par.le = SIO_LE_NATIVE;
        }
        par.rate = rate;
        par.pchan = channels;
Index: files/version.h
===================================================================
RCS file: /cvs/ports/x11/mplayer/files/version.h,v
retrieving revision 1.1
diff -u -p -u -r1.1 version.h
--- files/version.h     26 May 2010 21:29:56 -0000      1.1
+++ files/version.h     2 Nov 2010 00:07:56 -0000
@@ -1,2 +1,2 @@
-#define VERSION "SVN-r30866"
-#define MP_TITLE "%s "VERSION" (C) 2000-2010 MPlayer Team\n"
+#define VERSION "SVN-r32528"
+#define MP_TITLE "%s "VERSION"-OpenBSD (C) 2000-2010 MPlayer Team\n"
Index: patches/patch-DOCS_man_en_mplayer_1
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-DOCS_man_en_mplayer_1,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-DOCS_man_en_mplayer_1
--- patches/patch-DOCS_man_en_mplayer_1 26 May 2010 21:29:56 -0000      1.3
+++ patches/patch-DOCS_man_en_mplayer_1 2 Nov 2010 00:07:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.3 2010/05/26 21:29:56 jakemsr Exp $
---- DOCS/man/en/mplayer.1.orig Fri Mar  5 23:13:08 2010
-+++ DOCS/man/en/mplayer.1      Mon Mar  8 14:28:41 2010
-@@ -1296,7 +1296,7 @@ May be negative.
+--- DOCS/man/en/mplayer.1.orig Sat Oct 23 22:09:45 2010
++++ DOCS/man/en/mplayer.1      Sun Oct 24 10:36:58 2010
+@@ -1390,7 +1390,7 @@ May be negative.
  .
  .TP
  .B \-cdrom\-device <path to device>
@@ -10,7 +10,7 @@ $OpenBSD: patch-DOCS_man_en_mplayer_1,v 
  .
  .TP
  .B \-channels <number> (also see \-af channels)
-@@ -11474,11 +11474,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi
+@@ -11821,11 +11821,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg file.avi
  .PP
  .B Play DTS-CD with passthrough:
  .nf
Index: patches/patch-DOCS_xml_configure
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-DOCS_xml_configure,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-DOCS_xml_configure
--- patches/patch-DOCS_xml_configure    26 May 2010 21:29:56 -0000      1.2
+++ patches/patch-DOCS_xml_configure    2 Nov 2010 00:07:56 -0000
@@ -1,39 +1,48 @@
 $OpenBSD: patch-DOCS_xml_configure,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
---- DOCS/xml/configure.orig    Sun Dec 13 15:48:20 2009
-+++ DOCS/xml/configure Wed May 19 10:14:40 2010
-@@ -18,7 +18,8 @@ for _try_catalog in \
+--- DOCS/xml/configure.orig    Wed Jul 28 11:00:56 2010
++++ DOCS/xml/configure Thu Oct 28 01:08:35 2010
+@@ -16,7 +16,8 @@ for try_catalog in \
    /usr/lib/sgml/catalog \
    /usr/local/lib/sgml/catalog \
    /usr/share/docbook-xml42/catalog.xml \
 -  /usr/share/sgml/docbook/xmlcatalog
 +  /usr/share/sgml/docbook/xmlcatalog \
-+  ${PREFIX}/share/sgml/catalog
++  ${LOCALBASE}/share/sgml/catalog
  do
-   if test -f "$_try_catalog"
-   then
-@@ -49,6 +50,7 @@ for _try_chunk_xsl in \
+   if test -f "$try_catalog"; then
+     catalog=$try_catalog
+@@ -45,6 +46,7 @@ for try_chunk_xsl in \
    /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \
    /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \
    /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \
-+  ${PREFIX}/share/xsl/docbook/html/chunk.xsl
++  ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl
  
  do
-   if test -f "$_try_chunk_xsl"
-@@ -78,6 +80,7 @@ for _try_docbook_xsl in \
+   if test -f "$try_chunk_xsl"; then
+@@ -72,6 +74,7 @@ for try_docbook_xsl in \
    /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \
    /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \
    /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \
-+  ${PREFIX}/share/xsl/docbook/html/docbook.xsl
++  ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl
  
  do
-   if test -f "$_try_docbook_xsl"
-@@ -135,7 +138,8 @@ for _try_dtd in \
+   if test -f "$try_docbook_xsl"; then
+@@ -126,7 +129,8 @@ for try_dtd in \
    /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \
    /usr/share/docbook-xml*/docbookx.dtd \
    /opt/local/share/xml/docbook*/*/docbookx.dtd \
 -  /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd
 +  /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd \
-+  ${PREFIX}/share/xml/docbook/*/docbookx.dtd
++  ${LOCALBASE}/share/xml/docbook/*/docbookx.dtd
  do
-   if test -f "$_try_dtd"
-   then
+   if test -f "$try_dtd"; then
+     dtd=$try_dtd
+@@ -169,7 +173,7 @@ echo "Looking for a valid XSLT processor..."
+ if xsltproc --version > /dev/null 2>&1; then
+   if test -z "$fake_chunk_xsl"; then
+     echo "Found xsltproc. If it works, it's probably the best choice."
+-    xsltcommand="xsltproc $catalog_opts -o \$\$1 \$\$2 \$\$3"
++    xsltcommand="xsltproc $catalog_opts -o \$$1 \$$2 \$$3"
+   else
+     echo "Found xsltproc but no stylesheets on your system."
+     echo "xsltproc is unusable without stylesheets."
Index: patches/patch-DOCS_xml_en_cd-dvd_xml
===================================================================
RCS file: patches/patch-DOCS_xml_en_cd-dvd_xml
diff -N patches/patch-DOCS_xml_en_cd-dvd_xml
--- patches/patch-DOCS_xml_en_cd-dvd_xml        11 Oct 2009 13:36:23 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-DOCS_xml_en_cd-dvd_xml,v 1.1 2009/10/11 13:36:23 edd Exp $
---- DOCS/xml/en/cd-dvd.xml.orig        Mon Jul 13 19:08:41 2009
-+++ DOCS/xml/en/cd-dvd.xml     Mon Jul 13 19:10:04 2009
-@@ -202,8 +202,8 @@ For the complete list of available options, please rea
- Syntax for a standard Video CD (VCD) is as follows:
- <screen>mplayer vcd://<replaceable>&lt;track&gt;</replaceable> [-cdrom-device 
<replaceable>&lt;device&gt;</replaceable>]</screen>
- Example:
--<screen>mplayer vcd://2 -cdrom-device /dev/hdc</screen>
--The default VCD device is <filename>/dev/cdrom</filename>. If your setup
-+<screen>mplayer vcd://2 -cdrom-device /dev/rcd1c</screen>
-+The default VCD device is <filename>/dev/rcd0c</filename>. If your setup
- differs, make a symlink or specify the correct device on the command line
- with the <option>-cdrom-device</option> option.
- </para>
Index: patches/patch-DOCS_xml_en_usage_xml
===================================================================
RCS file: patches/patch-DOCS_xml_en_usage_xml
diff -N patches/patch-DOCS_xml_en_usage_xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-DOCS_xml_en_usage_xml 2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- DOCS/xml/en/usage.xml.orig Tue Oct 26 12:49:00 2010
++++ DOCS/xml/en/usage.xml      Tue Oct 26 12:50:35 2010
+@@ -452,7 +452,7 @@ syntax is the same, except that you need to use dvdnav
+ </para>
+ 
+ <para>
+-The default DVD device is <filename>/dev/dvd</filename>. If your setup
++The default DVD device is <filename>/dev/rcd0c</filename>. If your setup
+ differs, make a symlink or specify the correct device on the command
+ line with the <option>-dvd-device</option> option.
+ </para>
+@@ -527,7 +527,7 @@ Syntax for a standard Video CD (VCD) is as follows:
+ <screen>mplayer vcd://<replaceable>&lt;track&gt;</replaceable> [-cdrom-device 
<replaceable>&lt;device&gt;</replaceable>]</screen>
+ Example:
+ <screen>mplayer vcd://2 -cdrom-device /dev/hdc</screen>
+-The default VCD device is <filename>/dev/cdrom</filename>. If your setup
++The default VCD device is <filename>/dev/rcd0c</filename>. If your setup
+ differs, make a symlink or specify the correct device on the command line
+ with the <option>-cdrom-device</option> option.
+ </para>
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-Makefile,v
retrieving revision 1.20
diff -u -p -u -r1.20 patch-Makefile
--- patches/patch-Makefile      26 May 2010 21:29:56 -0000      1.20
+++ patches/patch-Makefile      2 Nov 2010 00:07:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Makefile,v 1.20 2010/05/26 21:29:56 jakemsr Exp $
---- Makefile.orig      Fri Mar  5 23:13:08 2010
-+++ Makefile   Mon Mar  8 21:24:09 2010
-@@ -28,6 +28,7 @@ include config.mak
+--- Makefile.orig      Fri Oct 22 21:39:43 2010
++++ Makefile   Sun Oct 24 10:38:28 2010
+@@ -26,6 +26,7 @@ include config.mak
  SRCS_AUDIO_INPUT-$(ALSA1X)           += stream/ai_alsa1x.c
  SRCS_AUDIO_INPUT-$(ALSA9)            += stream/ai_alsa.c
  SRCS_AUDIO_INPUT-$(OSS)              += stream/ai_oss.c
@@ -9,15 +9,15 @@ $OpenBSD: patch-Makefile,v 1.20 2010/05/
  SRCS_COMMON-$(AUDIO_INPUT)           += $(SRCS_AUDIO_INPUT-yes)
  SRCS_COMMON-$(BITMAP_FONT)           += libvo/font_load.c
  SRCS_COMMON-$(CDDA)                  += stream/stream_cdda.c \
-@@ -627,6 +628,7 @@ SRCS_MPLAYER-$(S3FB)          += libvo/vo_s3fb.c
- SRCS_MPLAYER-$(SDL)           += libao2/ao_sdl.c libvo/vo_sdl.c
+@@ -623,6 +624,7 @@ SRCS_MPLAYER-$(S3FB)          += libvo/vo_s3fb.c
+ SRCS_MPLAYER-$(SDL)           += libao2/ao_sdl.c libvo/vo_sdl.c 
libvo/sdl_common.c
  SRCS_MPLAYER-$(SGIAUDIO)      += libao2/ao_sgi.c
  SRCS_MPLAYER-$(SUNAUDIO)      += libao2/ao_sun.c
 +SRCS_MPLAYER-$(SNDIO)         += libao2/ao_sndio.c
  SRCS_MPLAYER-$(SVGA)          += libvo/vo_svga.c
  SRCS_MPLAYER-$(TDFXFB)        += libvo/vo_tdfxfb.c
  SRCS_MPLAYER-$(TDFXVID)       += libvo/vo_tdfx_vid.c
-@@ -689,7 +691,8 @@ SRCS_MPLAYER = command.c \
+@@ -686,7 +688,8 @@ SRCS_MPLAYER = command.c \
                 libvo/video_out.c \
                 libvo/vo_mpegpes.c \
                 libvo/vo_null.c \
@@ -27,18 +27,7 @@ $OpenBSD: patch-Makefile,v 1.20 2010/05/
  
  
  SRCS_MENCODER-$(FAAC)             += libmpcodecs/ae_faac.c
-@@ -901,7 +904,9 @@ version.h: version.sh
- # Make sure all generated header files are created.
- codec-cfg.d codec-cfg.o: codecs.conf.h
- $(DEPS) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h
--$(call ADDSUFFIXES,.d .o,mpcommon vobsub stream/stream_cddb stream/network 
libmpdemux/muxer_avi gui/win32/gui osdep/mplayer.rc): version.h
-+#$(call ADDSUFFIXES,.d .o,mpcommon vobsub stream/stream_cddb stream/network 
libmpdemux/muxer_avi gui/win32/gui osdep/mplayer.rc): version.h
-+# OpenBSD - don't run version.sh, it requres SVN, see post-configure
-+$(call ADDSUFFIXES,.d .o,mpcommon vobsub stream/stream_cddb stream/network 
libmpdemux/muxer_avi gui/win32/gui osdep/mplayer.rc): 
- 
- libdvdcss/%:   CFLAGS := -Ilibdvdcss -D__USE_UNIX98 -D_GNU_SOURCE 
-DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)
- libdvdnav/%:   CFLAGS := -Ilibdvdnav -D__USE_UNIX98 -D_GNU_SOURCE 
-DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)
-@@ -912,7 +917,16 @@ loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_N
+@@ -906,7 +909,16 @@ loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_N
  #loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
  loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
  
Index: patches/patch-command_c
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-command_c,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-command_c
--- patches/patch-command_c     26 May 2010 21:29:56 -0000      1.2
+++ patches/patch-command_c     2 Nov 2010 00:07:56 -0000
@@ -1,12 +1,12 @@
-$OpenBSD: patch-command_c,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
---- command.c.orig     Sat Jan 30 23:24:23 2010
-+++ command.c  Mon Mar  8 14:28:42 2010
-@@ -3167,7 +3167,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
-       case MP_CMD_RUN:
+$OpenBSD$
+--- command.c.orig     Sun Oct 24 11:11:25 2010
++++ command.c  Sun Oct 24 11:11:43 2010
+@@ -3379,7 +3379,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
+         case MP_CMD_RUN:
  #ifndef __MINGW32__
-           if (!fork()) {
--              execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, NULL);
-+              execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, (char *)NULL);
-               exit(0);
-           }
+             if (!fork()) {
+-                execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, NULL);
++                execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, (char *) NULL);
+                 exit(0);
+             }
  #endif
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-configure,v
retrieving revision 1.56
diff -u -p -u -r1.56 patch-configure
--- patches/patch-configure     26 May 2010 21:29:56 -0000      1.56
+++ patches/patch-configure     2 Nov 2010 00:07:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-configure,v 1.56 2010/05/26 21:29:56 jakemsr Exp $
---- configure.orig     Thu Mar  4 14:46:44 2010
-+++ configure  Mon Mar  8 21:09:42 2010
-@@ -423,6 +423,7 @@ Audio output:
+--- configure.orig     Thu Oct 21 19:35:56 2010
++++ configure  Sun Oct 31 02:12:36 2010
+@@ -461,6 +461,7 @@ Audio output:
    --disable-nas          disable NAS audio output [autodetect]
    --disable-sgiaudio     disable SGI audio output [autodetect]
    --disable-sunaudio     disable Sun audio output [autodetect]
@@ -9,7 +9,7 @@ $OpenBSD: patch-configure,v 1.56 2010/05
    --disable-kai          disable KAI audio output [autodetect]
    --disable-dart         disable DART audio output [autodetect]
    --disable-win32waveout disable Windows waveout audio output [autodetect]
-@@ -665,6 +666,7 @@ _xf86keysym=auto
+@@ -698,6 +699,7 @@ _xf86keysym=auto
  _mlib=no #broken, thus disabled
  _sgiaudio=auto
  _sunaudio=auto
@@ -17,7 +17,7 @@ $OpenBSD: patch-configure,v 1.56 2010/05
  _alsa=auto
  _fastmemcpy=yes
  hardcoded_tables=no
-@@ -1098,6 +1100,8 @@ for ac_option do
+@@ -1126,6 +1128,8 @@ for ac_option do
    --disable-mlib)       _mlib=no        ;;
    --enable-sunaudio)    _sunaudio=yes   ;;
    --disable-sunaudio)   _sunaudio=no    ;;
@@ -26,7 +26,7 @@ $OpenBSD: patch-configure,v 1.56 2010/05
    --enable-sgiaudio)    _sgiaudio=yes   ;;
    --disable-sgiaudio)   _sgiaudio=no    ;;
    --enable-alsa)        _alsa=yes       ;;
-@@ -1434,7 +1438,7 @@ if test -z "$_target" ; then
+@@ -1446,7 +1450,7 @@ if test -z "$_target" ; then
        sh3|sh4|sh4a) host_arch=sh ;;
        s390) host_arch=s390 ;;
        s390x) host_arch=s390x ;;
@@ -35,7 +35,7 @@ $OpenBSD: patch-configure,v 1.56 2010/05
        vax) host_arch=vax ;;
        xtensa*) host_arch=xtensa ;;
        *) host_arch=UNKNOWN ;;
-@@ -2456,7 +2460,7 @@ cat > $TMPC << EOF
+@@ -2476,7 +2480,7 @@ cat > $TMPC << EOF
  int ff_extern;
  EOF
  cc_check -c || die "Symbol mangling check failed."
@@ -44,15 +44,40 @@ $OpenBSD: patch-configure,v 1.56 2010/05
  extern_prefix=${sym%%ff_extern*}
  def_extern_asm="#define EXTERN_ASM $extern_prefix"
  def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
-@@ -3205,6 +3209,7 @@ if test "$_struct_sockaddr_storage" = auto; then
- #if HAVE_WINSOCK2_H
- #include <winsock2.h>
- #else
-+#include <stdlib.h>
- #include <sys/socket.h>
- #endif
- int main(void) { struct sockaddr_storage sas; return 0; }
-@@ -3613,7 +3618,7 @@ int main(void) { pthread_t tid; return pthread_create(
+@@ -2535,7 +2539,7 @@ elif test -z "$CFLAGS" ; then
+   elif test "$cc_vendor" != "gnu" ; then
+     CFLAGS="-O2 $_march $_mcpu $_pipe"
+   else
+-    CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
++    CFLAGS="$_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
+     WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith 
-Wredundant-decls"
+     extra_ldflags="$extra_ldflags -ffast-math"
+   fi
+@@ -2817,8 +2821,11 @@ echores "$ibm_asm"
+ def_gnu_as='#define HAVE_GNU_AS 0'
+ gnu_as=no
+ echocheck "GNU assembler"
+-inline_asm_check '".macro m n\n\\n:.int 0\n.endm\nm x"' &&
+-  gnu_as=yes && def_gnu_as='#define HAVE_GNU_AS 1'
++# OpenBSD - some altivec stuff causes build failures, fix from kili
++if ! ppc; then
++      inline_asm_check '".macro m n\n\\n:.int 0\n.endm\nm x"' &&
++        gnu_as=yes && def_gnu_as='#define HAVE_GNU_AS 1'
++fi
+ echores "$gnu_as"
+ 
+ fi
+@@ -3436,7 +3443,8 @@ if test "$_memalign" = yes ; then
+ else
+   def_memalign='#define HAVE_MEMALIGN 0'
+   def_map_memalign='#define memalign(a, b) malloc(b)'
+-  darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
++  # OpenBSD - prevent CONFIG_MEMALIGN_HACK which causes exit crash
++  #darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
+ fi
+ echores "$_memalign"
+ 
+@@ -3543,7 +3551,7 @@ int main(void) { pthread_t tid; return pthread_create(
  EOF
  _pthreads=no
  if ! hpux ; then
@@ -61,16 +86,16 @@ $OpenBSD: patch-configure,v 1.56 2010/05
      # for crosscompilation, we cannot execute the program, be happy if we can 
link statically
      cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && 
_ld_pthread="$_ld_tmp" && _pthreads=yes && break
    done
-@@ -4892,6 +4897,8 @@ if test "$_aa" = yes ; then
+@@ -4664,6 +4672,8 @@ if test "$_aa" = yes ; then
    def_aa='#define CONFIG_AA 1'
    if cygwin ; then
      libs_mplayer="$libs_mplayer $(aalib-config --libs | cut -d " " -f 2,5,6)"
 +  else
 +    libs_mplayer="$libs_mplayer $(aalib-config --libs)"
    fi
-   _vomodules="aa $_vomodules"
+   vomodules="aa $vomodules"
  else
-@@ -5188,14 +5195,14 @@ int main(void) {
+@@ -4873,14 +4883,14 @@ int main(void) {
    return !p_ver || p_ver[0] == 0;
  }
  EOF
@@ -87,15 +112,7 @@ $OpenBSD: patch-configure,v 1.56 2010/05
  else
    def_mng='#undef CONFIG_MNG'
  fi
-@@ -5823,6 +5830,7 @@ fi
- if test "$_jack" = yes ; then
-   def_jack='#define CONFIG_JACK 1'
-   _aomodules="jack $_aomodules"
-+  libs_mplayer="$libs_mplayer $(pkg-config --libs jack)"
- else
-   _noaomodules="jack $_noaomodules"
- fi
-@@ -5985,6 +5993,26 @@ fi
+@@ -5691,6 +5701,26 @@ fi
  echores "$_sunaudio"
  
  
@@ -122,62 +139,46 @@ $OpenBSD: patch-configure,v 1.56 2010/05
  def_mlib='#define CONFIG_MLIB 0'
  if sunos; then
  echocheck "Sun mediaLib"
-@@ -6100,7 +6128,7 @@ elif dragonfly ; then
- elif freebsd ; then
-   default_cdrom_device="/dev/acd0"
- elif openbsd ; then
--  default_cdrom_device="/dev/rcd0a"
-+  default_cdrom_device="/dev/rcd0c"
- elif sunos ; then
-   default_cdrom_device="/vol/dev/aliases/cdrom0"
-   # Modern Solaris versions use HAL instead of the vold daemon, the volfs
-@@ -6169,8 +6197,9 @@ elif test "$_dvdread" = auto ; then
- #include <dvdread/nav_read.h>
- int main(void) { return 0; }
- EOF
--    _dvdreadcflags=$($_dvdreadconfig --cflags)
--    _dvdreadlibs=$($_dvdreadconfig --libs)
+@@ -5860,8 +5890,9 @@ if test "$_dvdread_internal" = auto ; then
+ elif test "$_dvdread" = auto ; then
+   _dvdread=no
+   if test "$_dl" = yes; then
+-    _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
+-    _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
 +# OpenBSD - we do not use dvdread-config, picked up anyway without
-+#    _dvdreadcflags=$($_dvdreadconfig --cflags)
-+#    _dvdreadlibs=$($_dvdreadconfig --libs)
-     if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE64_SOURCE \
-       $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
++#    _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
++#    _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
+     if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs 
$_ld_dl ; then
        _dvdread=yes
-@@ -6848,7 +6877,7 @@ if test "$_libdca" = auto ; then
- #include <dts.h>
- int main(void) { dts_init(0); return 0; }
- EOF
+       extra_cflags="$extra_cflags $_dvdreadcflags"
+@@ -6347,7 +6378,7 @@ elif test "$_libvorbis" = yes ; then
+   def_vorbis='#define CONFIG_OGGVORBIS 1'
+   codecmodules="libvorbis $codecmodules"
+   res_comment="libvorbis"
+-  extra_ldflags="$extra_ldflags -lvorbis -logg"
++  extra_ldflags="$extra_ldflags -lvorbisenc -lvorbis -logg"
+   libavencoders="$libavencoders LIBVORBIS_ENCODER"
+ else
+   _vorbis=no
+@@ -6547,7 +6578,7 @@ echores "$_libmpeg2"
+ echocheck "libdca support"
+ if test "$_libdca" = auto ; then
+   _libdca=no
 -  for _ld_dca in -ldca -ldts ; do
 +  for _ld_dca in -ldca; do
-     cc_check $_ld_dca $_ld_lm && extra_ldflags="$extra_ldflags $_ld_dca" \
-       && _libdca=yes && break
-   done
-@@ -6898,7 +6927,7 @@ int main(void) { unsigned long x, y; faacEncOpen(48000
- EOF
-   _faac=no
-   for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
--    cc_check -O4 $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder 
$_ld_faac" && _faac=yes && break
-+    cc_check $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder $_ld_faac" && 
_faac=yes && break
+     statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm &&
+       extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break
    done
- fi
- if test "$_faac" = yes ; then
-@@ -7899,6 +7928,15 @@ if test "$_tv_v4l2" = auto ; then
- int main(void) { return 0; }
- EOF
-     cc_check && _tv_v4l2=yes
-+  else
-+    cat > $TMPC <<EOF
-+#include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <sys/videoio.h>
-+int main(void) { return 0; }
-+EOF
-+    cc_check && _tv_v4l2=yes
+@@ -7448,6 +7479,8 @@ if test "$_tv_v4l2" = auto ; then
+   _tv_v4l2=no
+   if test "$_tv" = yes && linux ; then
+     header_check linux/videodev2.h && _tv_v4l2=yes
++  elif test "$_tv" = yes && openbsd ; then
++    header_check sys/videoio.h && _tv_v4l2=yes
    fi
  fi
  if test "$_tv_v4l2" = yes ; then
-@@ -8637,6 +8675,7 @@ SPEEX = $_speex
+@@ -8158,6 +8191,7 @@ SPEEX = $_speex
  STREAM_CACHE = $_stream_cache
  SGIAUDIO = $_sgiaudio
  SUNAUDIO = $_sunaudio
@@ -185,7 +186,7 @@ $OpenBSD: patch-configure,v 1.56 2010/05
  SVGA = $_svga
  TDFXFB = $_tdfxfb
  TDFXVID = $_tdfxvid
-@@ -9026,6 +9065,7 @@ $def_ossaudio_devmixer
+@@ -8540,6 +8574,7 @@ $def_ossaudio_devmixer
  $def_pulse
  $def_sgiaudio
  $def_sunaudio
Index: patches/patch-ffmpeg_libavcodec_Makefile
===================================================================
RCS file: patches/patch-ffmpeg_libavcodec_Makefile
diff -N patches/patch-ffmpeg_libavcodec_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ffmpeg_libavcodec_Makefile    2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,35 @@
+$OpenBSD$
+--- ffmpeg/libavcodec/Makefile.orig    Sat Oct  2 10:51:26 2010
++++ ffmpeg/libavcodec/Makefile Sun Oct 24 13:08:08 2010
+@@ -692,3 +692,31 @@ $(SUBDIR)motionpixels.o: $(SUBDIR)motionpixels_tables.
+ $(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h
+ $(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h
+ endif
++
++ifdef ARCH_X86_32
++ifeq (,$(findstring -O,$(CFLAGS)))
++x86/dsputil_mmx.o: CFLAGS += -O
++x86/flacdsp_mmx.o: CFLAGS += -O
++x86/fft_3dn.o: CFLAGS += -O
++x86/fft_3dn2.o: CFLAGS += -O
++x86/mlpdsp.o: CFLAGS += -O
++x86/snowdsp_mmx.o: CFLAGS += -O
++h264.o: CFLAGS += -O
++h264_cabac.o: CFLAGS += -O
++h264_parser.o: CFLAGS += -O
++cabac.o: CFLAGS += -O
++endif
++# OpenBSD -- otherwise we run out of registers, eg:
++# "cabac.h:527: error: can't find a register in class..."
++x86/dsputil_mmx.o: CFLAGS += -fomit-frame-pointer
++x86/flacdsp_mmx.o: CFLAGS += -fomit-frame-pointer
++x86/fft_3dn.o: CFLAGS += -fomit-frame-pointer
++x86/fft_3dn2.o: CFLAGS += -fomit-frame-pointer
++x86/mlpdsp.o: CFLAGS += -fomit-frame-pointer
++x86/snowdsp_mmx.o: CFLAGS += -fomit-frame-pointer
++h264.o: CFLAGS += -fomit-frame-pointer
++h264_cabac.o: CFLAGS += -fomit-frame-pointer
++h264_parser.o: CFLAGS += -fomit-frame-pointer
++cabac.o: CFLAGS += -fomit-frame-pointer
++endif
++
Index: patches/patch-ffmpeg_libavcodec_x86_vp56_arith_h
===================================================================
RCS file: patches/patch-ffmpeg_libavcodec_x86_vp56_arith_h
diff -N patches/patch-ffmpeg_libavcodec_x86_vp56_arith_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ffmpeg_libavcodec_x86_vp56_arith_h    2 Nov 2010 00:07:56 
-0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- ffmpeg/libavcodec/x86/vp56_arith.h.orig    Mon Oct 25 23:11:14 2010
++++ ffmpeg/libavcodec/x86/vp56_arith.h Mon Oct 25 23:12:00 2010
+@@ -24,7 +24,7 @@
+ #ifndef AVCODEC_X86_VP56_ARITH_H
+ #define AVCODEC_X86_VP56_ARITH_H
+ 
+-#if HAVE_FAST_CMOV
++#if HAVE_FAST_CMOV && !ARCH_X86_64
+ #define vp56_rac_get_prob vp56_rac_get_prob
+ static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
+ {
Index: patches/patch-ffmpeg_libavutil_x86_cpu_h
===================================================================
RCS file: patches/patch-ffmpeg_libavutil_x86_cpu_h
diff -N patches/patch-ffmpeg_libavutil_x86_cpu_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ffmpeg_libavutil_x86_cpu_h    2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- ffmpeg/libavutil/x86_cpu.h.orig    Mon Oct 25 23:02:43 2010
++++ ffmpeg/libavutil/x86_cpu.h Mon Oct 25 23:03:10 2010
+@@ -71,7 +71,7 @@ typedef int x86_reg;
+ #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
+ #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
+ 
+-#if ARCH_X86_64 && defined(PIC)
++#if ARCH_X86_64 // && defined(PIC)
+ #    define BROKEN_RELOCATIONS 1
+ #endif
+ 
Index: patches/patch-ffmpeg_libswscale_Makefile
===================================================================
RCS file: patches/patch-ffmpeg_libswscale_Makefile
diff -N patches/patch-ffmpeg_libswscale_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ffmpeg_libswscale_Makefile    2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- ffmpeg/libswscale/Makefile.orig    Sun Oct 24 13:08:24 2010
++++ ffmpeg/libswscale/Makefile Sun Oct 24 13:09:41 2010
+@@ -21,3 +21,12 @@ DIRS = bfin mlib ppc sparc x86
+ 
+ include $(SUBDIR)../subdir.mak
+ $(SUBDIR)swscale-test$(EXESUF): ELIBS = -lavcore
++
++ifdef ARCH_X86_32
++ifeq (,$(findstring -O,$(CFLAGS)))
++x86/yuv2rgb_mmx.o: CFLAGS += -O
++endif
++# OpenBSD: Again - we run out of registers otherwise
++x86/yuv2rgb_mmx.o: CFLAGS += -fomit-frame-pointer
++endif
++
Index: patches/patch-libavcodec_Makefile
===================================================================
RCS file: patches/patch-libavcodec_Makefile
diff -N patches/patch-libavcodec_Makefile
--- patches/patch-libavcodec_Makefile   26 May 2010 21:29:56 -0000      1.9
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-$OpenBSD: patch-libavcodec_Makefile,v 1.9 2010/05/26 21:29:56 jakemsr Exp $
-
-Anything requiring cabac.h will only build with -O -fomit-frame-pointer.
-
---- libavcodec/Makefile.orig   Mon Mar  8 04:33:02 2010
-+++ libavcodec/Makefile        Mon Mar 22 15:20:40 2010
-@@ -729,6 +729,45 @@ CLEANFILES = sin_tables.c cos_tables.c *_tables.h *_ta
- 
- include $(SUBDIR)../subdir.mak
- 
-+ifdef ARCH_X86_32
-+ifeq (,$(findstring -O,$(CFLAGS)))
-+x86/dsputil_mmx.o: CFLAGS += -O
-+x86/flacdsp_mmx.o: CFLAGS += -O
-+x86/fft_3dn.o: CFLAGS += -O
-+x86/fft_3dn2.o: CFLAGS += -O
-+x86/mlpdsp.o: CFLAGS += -O
-+x86/snowdsp_mmx.o: CFLAGS += -O
-+h264.o: CFLAGS += -O
-+h264_parser.o: CFLAGS += -O
-+h264_loopfilter.o: CFLAGS += -O
-+h264_direct.o: CFLAGS += -O
-+h264_sei.o: CFLAGS += -O
-+h264_ps.o: CFLAGS += -O
-+h264_refs.o: CFLAGS += -O
-+h264_cavlc.o: CFLAGS += -O
-+h264_cabac.o: CFLAGS += -O
-+svq3.o: CFLAGS += -O
-+cabac.o: CFLAGS += -O
-+endif
-+x86/dsputil_mmx.o: CFLAGS += -fomit-frame-pointer
-+x86/flacdsp_mmx.o: CFLAGS += -fomit-frame-pointer
-+x86/fft_3dn.o: CFLAGS += -fomit-frame-pointer
-+x86/fft_3dn2.o: CFLAGS += -fomit-frame-pointer
-+x86/mlpdsp.o: CFLAGS += -fomit-frame-pointer
-+x86/snowdsp_mmx.o: CFLAGS += -fomit-frame-pointer
-+h264.o: CFLAGS += -fomit-frame-pointer
-+h264_parser.o: CFLAGS += -fomit-frame-pointer
-+h264_loopfilter.o: CFLAGS += -fomit-frame-pointer
-+h264_direct.o: CFLAGS += -fomit-frame-pointer
-+h264_sei.o: CFLAGS += -fomit-frame-pointer
-+h264_ps.o: CFLAGS += -fomit-frame-pointer
-+h264_refs.o: CFLAGS += -fomit-frame-pointer
-+h264_cavlc.o: CFLAGS += -fomit-frame-pointer
-+h264_cabac.o: CFLAGS += -fomit-frame-pointer
-+svq3.o: CFLAGS += -fomit-frame-pointer
-+cabac.o: CFLAGS += -fomit-frame-pointer
-+endif
-+
- $(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
- 
- $(SUBDIR)cos_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)
Index: patches/patch-libavutil_x86_cpu_h
===================================================================
RCS file: patches/patch-libavutil_x86_cpu_h
diff -N patches/patch-libavutil_x86_cpu_h
--- patches/patch-libavutil_x86_cpu_h   11 Oct 2009 13:36:23 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libavutil_x86_cpu_h,v 1.2 2009/10/11 13:36:23 edd Exp $
---- libavutil/x86_cpu.h.orig   Wed Jul 29 20:37:28 2009
-+++ libavutil/x86_cpu.h        Wed Jul 29 20:37:58 2009
-@@ -69,7 +69,7 @@ typedef int x86_reg;
- #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
- #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
- 
--#if ARCH_X86_64 && defined(PIC)
-+#if ARCH_X86_64 /* && defined(PIC) */
- #    define BROKEN_RELOCATIONS 1
- #endif
- 
Index: patches/patch-libmenu_menu_console_c
===================================================================
RCS file: patches/patch-libmenu_menu_console_c
diff -N patches/patch-libmenu_menu_console_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libmenu_menu_console_c        2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- libmenu/menu_console.c.orig        Sun Oct 24 11:11:55 2010
++++ libmenu/menu_console.c     Sun Oct 24 11:12:56 2010
+@@ -321,7 +321,7 @@ static int run_shell_cmd(menu_t* menu, char* cmd) {
+     dup2(in[0],0);
+     dup2(out[1],1);
+     dup2(err[1],2);
+-    execl("/bin/sh","sh","-c",cmd,(void*)NULL);
++    execl("/bin/sh","sh","-c",cmd,(char *) NULL);
+     fprintf(errf,"exec failed : %s\n",strerror(errno));
+     exit(1);
+   }
Index: patches/patch-libmpcodecs_ad_faad_c
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-libmpcodecs_ad_faad_c,v
retrieving revision 1.4
diff -u -p -u -r1.4 patch-libmpcodecs_ad_faad_c
--- patches/patch-libmpcodecs_ad_faad_c 26 May 2010 21:29:56 -0000      1.4
+++ patches/patch-libmpcodecs_ad_faad_c 2 Nov 2010 00:07:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.4 2010/05/26 21:29:56 jakemsr Exp $
---- libmpcodecs/ad_faad.c.orig Wed Feb 17 21:36:00 2010
-+++ libmpcodecs/ad_faad.c      Mon Mar  8 14:37:50 2010
-@@ -83,7 +83,7 @@ static int aac_probe(unsigned char *buffer, int len)
+--- libmpcodecs/ad_faad.c.orig Wed Sep  8 18:38:52 2010
++++ libmpcodecs/ad_faad.c      Sun Oct 24 10:39:37 2010
+@@ -84,7 +84,7 @@ static int aac_probe(unsigned char *buffer, int len)
  
  static int init(sh_audio_t *sh)
  {
@@ -10,7 +10,7 @@ $OpenBSD: patch-libmpcodecs_ad_faad_c,v 
    unsigned char faac_channels;
    int faac_init, pos = 0;
    faac_hdec = faacDecOpen();
-@@ -164,7 +164,7 @@ static int init(sh_audio_t *sh)
+@@ -197,7 +197,7 @@ static int init(sh_audio_t *sh)
      return 0;
    } else {
      mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", 
sh->a_in_buffer_len); // XXX: remove or move to debug!
@@ -19,7 +19,7 @@ $OpenBSD: patch-libmpcodecs_ad_faad_c,v 
      // 8 channels is aac channel order #7.
      sh->channels = faac_channels == 7 ? 8 : faac_channels;
      if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
-@@ -293,7 +293,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
+@@ -327,7 +327,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
      } else {
        /* XXX: samples already multiplied by channels! */
        mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%ld 
Bytes)!\n",
Index: patches/patch-libpostproc_Makefile
===================================================================
RCS file: patches/patch-libpostproc_Makefile
diff -N patches/patch-libpostproc_Makefile
--- patches/patch-libpostproc_Makefile  11 Oct 2009 13:36:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-libpostproc_Makefile,v 1.1 2009/10/11 13:36:23 edd Exp $
---- libpostproc/Makefile.orig  Mon Apr  7 14:16:31 2008
-+++ libpostproc/Makefile       Mon Jul 20 17:37:07 2009
-@@ -8,3 +8,10 @@ HEADERS = postprocess.h
- OBJS = postprocess.o
- 
- include $(SUBDIR)../subdir.mak
-+
-+ifdef ARCH_X86_32
-+ifeq (,$(findstring -O,$(CFLAGS)))
-+postprocess.o: CFLAGS += -O
-+endif
-+postprocess.o: CFLAGS += -fomit-frame-pointer
-+endif
Index: patches/patch-libswscale_Makefile
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-libswscale_Makefile,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-libswscale_Makefile
--- patches/patch-libswscale_Makefile   26 May 2010 21:29:56 -0000      1.2
+++ patches/patch-libswscale_Makefile   2 Nov 2010 00:07:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-libswscale_Makefile,v 1.2 2010/05/26 21:29:56 jakemsr Exp $
---- libswscale/Makefile.orig   Wed Jan 27 00:25:23 2010
-+++ libswscale/Makefile        Mon Mar  8 14:28:42 2010
-@@ -21,3 +21,10 @@ TESTPROGS = colorspace swscale
+--- libswscale/Makefile.orig   Sun Aug  8 19:14:43 2010
++++ libswscale/Makefile        Sun Oct 24 10:40:01 2010
+@@ -20,4 +20,11 @@ TESTPROGS = colorspace swscale
  DIRS = bfin mlib ppc sparc x86
  
  include $(SUBDIR)../subdir.mak
@@ -12,3 +12,4 @@ $OpenBSD: patch-libswscale_Makefile,v 1.
 +endif
 +x86/yuv2rgb_mmx.o: CFLAGS += -fomit-frame-pointer
 +endif
+ $(SUBDIR)swscale-test$(EXESUF): ELIBS = -lavcore
Index: patches/patch-mplayer_c
===================================================================
RCS file: patches/patch-mplayer_c
diff -N patches/patch-mplayer_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-mplayer_c     2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- mplayer.c.orig     Sun Oct 24 11:13:11 2010
++++ mplayer.c  Sun Oct 24 11:13:29 2010
+@@ -852,7 +852,7 @@ static void exit_sighandler(int x){
+           char spid[20];
+           snprintf(spid, sizeof(spid), "%i", getppid());
+           getch2_disable(); // allow terminal to work properly with gdb
+-          if (execlp("gdb", "gdb", prog_path, spid, "-ex", "bt", NULL) == -1)
++          if (execlp("gdb", "gdb", prog_path, spid, "-ex", "bt", (char *) 
NULL) == -1)
+             mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
+         } else if (gdb_pid < 0)
+           mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");
Index: patches/patch-stream_tvi_bsdbt848_c
===================================================================
RCS file: /cvs/ports/x11/mplayer/patches/patch-stream_tvi_bsdbt848_c,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-stream_tvi_bsdbt848_c
--- patches/patch-stream_tvi_bsdbt848_c 26 May 2010 21:29:56 -0000      1.3
+++ patches/patch-stream_tvi_bsdbt848_c 2 Nov 2010 00:07:56 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.3 2010/05/26 21:29:56 jakemsr Exp $
---- stream/tvi_bsdbt848.c.orig Sat Jan 30 14:26:47 2010
-+++ stream/tvi_bsdbt848.c      Wed May 19 15:25:37 2010
+--- stream/tvi_bsdbt848.c.orig Mon Sep 13 19:09:29 2010
++++ stream/tvi_bsdbt848.c      Sun Oct 24 10:40:01 2010
 @@ -54,9 +54,10 @@
  #include <signal.h>
  #include <string.h>
@@ -31,7 +31,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 
  
  #include "libaf/af_format.h"
  #include "libmpcodecs/img_format.h"
-@@ -106,7 +111,13 @@ typedef struct {
+@@ -106,7 +111,13 @@ typedef struct priv {
  /* Audio */
      char *dspdev;
      int dspready;
@@ -45,7 +45,7 @@ $OpenBSD: patch-stream_tvi_bsdbt848_c,v 
      int dspsamplesize;
      int dspstereo;
      int dspspeed;
-@@ -114,6 +125,9 @@ typedef struct {
+@@ -114,6 +125,9 @@ typedef struct priv {
      int dspframesize;
      int dsprate;
      long long dspbytesread;
Index: patches/patch-unrar_exec_c
===================================================================
RCS file: patches/patch-unrar_exec_c
diff -N patches/patch-unrar_exec_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-unrar_exec_c  2 Nov 2010 00:07:56 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- unrar_exec.c.orig  Sun Oct 24 11:15:56 2010
++++ unrar_exec.c       Sun Oct 24 11:16:11 2010
+@@ -66,10 +66,10 @@ static FILE* launch_pipe(pid_t *apid, const char *exec
+                 || open("/dev/null", O_WRONLY) != 2)
+             _exit(EXIT_FAILURE);
+         if (action == UNRAR_LIST)
+-            execl(executable, executable, "v", archive, NULL);
++            execl(executable, executable, "v", archive, (char *) NULL);
+         else if (action == UNRAR_EXTRACT)
+             execl(executable, executable, "p", "-inul", "-p-",
+-                  archive,filename,NULL);
++                  archive,filename, (char *) NULL);
+         mp_msg(MSGT_GLOBAL, MSGL_ERR, "UnRAR: Cannot execute %s\n", 
executable);
+         _exit(EXIT_FAILURE);
+     }
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/mplayer/pkg/PLIST,v
retrieving revision 1.26
diff -u -p -u -r1.26 PLIST
--- pkg/PLIST   6 Aug 2010 20:05:18 -0000       1.26
+++ pkg/PLIST   2 Nov 2010 00:07:57 -0000
@@ -8,13 +8,12 @@
 @man man/man1/mplayer.1
 share/doc/mplayer/
 share/doc/mplayer/MPlayer.html
-share/doc/mplayer/README.OpenBSD
 share/doc/mplayer/aalib.html
 share/doc/mplayer/advaudio-channels.html
 share/doc/mplayer/advaudio-surround.html
 share/doc/mplayer/advaudio-volume.html
-share/doc/mplayer/advaudio.html
 share/doc/mplayer/aspect.html
+share/doc/mplayer/blinkenlights.html
 share/doc/mplayer/bsd.html
 share/doc/mplayer/bugreports.html
 share/doc/mplayer/bugreports_advusers.html
@@ -25,14 +24,12 @@ share/doc/mplayer/bugreports_security.ht
 share/doc/mplayer/bugreports_what.html
 share/doc/mplayer/bugreports_where.html
 share/doc/mplayer/caca.html
-share/doc/mplayer/cd-dvd.html
 share/doc/mplayer/codec-installation.html
 share/doc/mplayer/commandline.html
 share/doc/mplayer/control.html
 share/doc/mplayer/dfbmga.html
 share/doc/mplayer/dga.html
 share/doc/mplayer/directfb.html
-share/doc/mplayer/drives.html
 share/doc/mplayer/dummy.html
 share/doc/mplayer/dvd.html
 share/doc/mplayer/edl.html
@@ -68,14 +65,11 @@ share/doc/mplayer/menc-feat-xvid.html
 share/doc/mplayer/mencoder.html
 share/doc/mplayer/mga_vid.html
 share/doc/mplayer/mpeg_decoders.html
-share/doc/mplayer/mtrr.html
+share/doc/mplayer/networksync.html
 share/doc/mplayer/opengl.html
-share/doc/mplayer/other.html
 share/doc/mplayer/ports.html
-share/doc/mplayer/radio-input.html
 share/doc/mplayer/radio.html
 share/doc/mplayer/rtc.html
-share/doc/mplayer/sdl.html
 share/doc/mplayer/skin-file.html
 share/doc/mplayer/skin-fonts.html
 share/doc/mplayer/skin-gui.html
@@ -90,7 +84,6 @@ share/doc/mplayer/tdfx_vid.html
 share/doc/mplayer/tdfxfb.html
 share/doc/mplayer/tv-input.html
 share/doc/mplayer/tv-teletext.html
-share/doc/mplayer/tv.html
 share/doc/mplayer/tvout.html
 share/doc/mplayer/unix.html
 share/doc/mplayer/usage.html
@@ -101,6 +94,8 @@ share/doc/mplayer/vidix.html
 share/doc/mplayer/windows.html
 share/doc/mplayer/x11.html
 share/doc/mplayer/xv.html
+share/doc/mplayer/zr.html
+share/doc/pkg-readmes/mplayer-20101024${FLAVORS}
 share/examples/mplayer/
 @sample ${CONFDIR}/
 share/examples/mplayer/codecs.conf
Index: pkg/README
===================================================================
RCS file: pkg/README
diff -N pkg/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/README  2 Nov 2010 00:07:57 -0000
@@ -0,0 +1,22 @@
+Possible issues with using MPlayer on OpenBSD:
+
+all arches:
+  The GUI is deprecated so we stripped it from the build. You can use
+  x11/gnome-mplayer or x11/smplayer instead.
+
+  Mencoder is not expected to mux well to anything other than avi or mpeg.
+
+i386:
+  win32 codecs were disabled in OpenBSD's build, as the open-source codecs
+  are now of decent quality.
+
+arm:
+  You may encounter slow video output.  In this case you can disable
+  the X.Org screen rotation in /etc/X11/xorg.conf. Depending on the
+  video you are playing you may want to pass the -framedrop or the
+  -hardframedrop option to mplayer.
+
+  In order to improve vorbis performance on ARM, try using the tremor codec.
+  This can be achieved using '-ac tremor'.
+
+See the package description for a list of FLAVORs and their meaning.

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply via email to