On Sun, 6 Mar 2011, Edd Barrett wrote: > On Sat, Mar 05, 2011 at 09:13:02PM +0000, Edd Barrett wrote: > > Yah, attached an old diff. > > README: Add $Id$ and fix typo:
We don't use $Id$. Please use the usual OpenBSD tag. Also add an empty line between the tag and the title of the readme otherwise it becomes unreadable when expended. Thanks. > Index: Makefile > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/Makefile,v > retrieving revision 1.181 > diff -u -p -r1.181 Makefile > --- Makefile 12 Feb 2011 10:49:36 -0000 1.181 > +++ Makefile 5 Mar 2011 20:47:40 -0000 > @@ -5,19 +5,15 @@ ONLY_FOR_ARCHS = alpha amd64 arm i386 mi > > COMMENT = movie player supporting many formats > > -V = 20101024 > -V_DASHED = 2010-10-24 > +V = 20110303 > > SUBST_VARS += PREFIX CONFDIR > > +# Distfiles must be hand-rolled, see README > N = mplayer > -DISTNAME = mplayer-export-snapshot-${V} > +DISTNAME = mplayer-${V} > PKGNAME = ${N}-${V} > -REVISION = 2 > CATEGORIES = x11 multimedia > -EXTRACT_SUFX = .tar.bz2 > - > -WRKDIST = ${WRKDIR}/mplayer-export-${V_DASHED} > > HOMEPAGE = http://www.mplayerhq.hu/ > > @@ -28,8 +24,8 @@ PERMIT_DISTFILES_CDROM = Yes > PERMIT_DISTFILES_FTP = Yes > > 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 \ > + dv faac fribidi jpeg lcms \ > + m mng mp3lame ncurses ogg>=5 orc-0.4 png \ > pthread schroedinger-1.0>=2.0 sndio speex stdc++ \ > theora ungif util vpx x264>=5 xvidcore z > > @@ -58,7 +54,6 @@ LIB_DEPENDS = graphics/png \ > graphics/libmng \ > archivers/bzip2 \ > multimedia/schroedinger>=1.0.10 \ > - audio/faad \ > audio/faac \ > multimedia/x264>=20101023 \ > multimedia/libvpx > @@ -97,10 +92,12 @@ CONFIGURE_ARGS += --disable-alsa \ > --disable-sunaudio \ > --disable-vidix \ > --disable-select \ > - --disable-libcdio \ > - --disable-dvdread-internal \ > - --disable-libdvdcss-internal \ > - --disable-faad-internal > + --disable-libcdio > +# seems stable dvdnav does not work with a new mplayer. > +# if they make a release in the future, maybe we can pull that in, > +# but for now we have to use the internal one. > +# --disable-dvdread-internal \ > +# --disable-libdvdcss-internal \ > # gui is not supported anymore and we have better ones in ports > CONFIGURE_ARGS += --disable-gui > > @@ -122,7 +119,8 @@ CONFIGURE_ARGS += --disable-smb \ > --disable-ggi \ > --disable-libopenjpeg \ > --disable-mpg123 \ > - --disable-librtmp > + --disable-librtmp \ > + --disable-faad > > # internal tremor, external tremor, external libvorbis all conflict > # we choose libvorbis to enable encoding to vorbis > @@ -219,12 +217,6 @@ post-extract: > # subst PREFIX in a patch, careful with update-patches! > 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: > - cp ${FILESDIR}/version.h ${WRKDIST}/version.h > > post-build: > @cd ${WRKSRC}/DOCS/xml && ${MAKE_PROGRAM} > Index: README > =================================================================== > RCS file: README > diff -N README > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ README 6 Mar 2011 02:39:38 -0000 > @@ -0,0 +1,49 @@ > +$Id$ > +Porting notes for MPlayer > +========================= > + > +In addition to the comments in Makefile, porters should also read these > +notes: > + > +Selecting Codec Implementations > +------------------------------- > + > +As a general rule, we prefer to use FFMPEG implementations, but only if > +they are good quality. If this is the case, try not to pull in external > +codec libraries for the same codec. > + > +There is an exception to this rule, which is where an external library > +provides an encoder and decoder, and there is a decoder for the given > +codec in FFMPEG, but no encoder; in such a case, go ahead and link the > +external library so that users can encode with mencoder. > + > +Be aware that some hardware lacks a floating point unit (ARM for > +example). On these architectures, you should select integer decoders > +where possible. Eg. Tremor instead of Vorbis. > + > +FFMPEG OGG Demuxer Bug > +---------------------- > + > +The pkg/README details a bug in the FFMPEG Ogg demuxer; You can test the > +existence of this bug with this URL: > +http://icecast.version6.net:8888/okul.ogg > + > +When a song ends, mplayer will stall saying it cannot fill the cache. > + > +Rolling a Distfile > +------------------ > + > +MPlayer used to include the ffmpeg source, however, now the configure > +script checks it out from git, which we don't want to do. Moving targets > +will break and we don't want git as a BUILD_DEPEND. > + > +Therefore we do this: > + > +svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer-YYYYMMDD > +cd mplayer-YYYYMMDD > +echo "XXXXX-snapshot" > snapshot_version (where XXXXX is the svn revision) > +git clone --depth 1 git://git.videolan.org/ffmpeg.git ffmpeg > +find . -name '.svn' | xargs rm -Rf > +find . -name '.git' | xargs rm -Rf > +cd .. > +tar zcvf mplayer-YYYYMMDD.tar.gz mplayer-YYYYMMDD > Index: distinfo > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/distinfo,v > retrieving revision 1.34 > diff -u -p -r1.34 distinfo > --- distinfo 8 Nov 2010 21:25:44 -0000 1.34 > +++ distinfo 3 Mar 2011 14:37:23 -0000 > @@ -1,5 +1,5 @@ > -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 > +MD5 (mplayer-20110303.tar.gz) = SLUrfejErk4/7dmUlG3cCA== > +RMD160 (mplayer-20110303.tar.gz) = ruJZJUdm8z9UEQ8B5ApzCdrPfew= > +SHA1 (mplayer-20110303.tar.gz) = HTXGnV6Zj3uIoNWV9CweZzOECBg= > +SHA256 (mplayer-20110303.tar.gz) = > 3S1050/VRsJHUay1bnJ8OBfirgKteqDsE91QitNeeUQ= > +SIZE (mplayer-20110303.tar.gz) = 11923153 > Index: files/version.h > =================================================================== > RCS file: files/version.h > diff -N files/version.h > --- files/version.h 8 Nov 2010 21:25:44 -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,2 +0,0 @@ > -#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/openbsd/ports/x11/mplayer/patches/patch-DOCS_man_en_mplayer_1,v > retrieving revision 1.4 > diff -u -p -r1.4 patch-DOCS_man_en_mplayer_1 > --- patches/patch-DOCS_man_en_mplayer_1 8 Nov 2010 21:25:44 -0000 > 1.4 > +++ patches/patch-DOCS_man_en_mplayer_1 3 Mar 2011 13:28:50 -0000 > @@ -1,7 +1,7 @@ > $OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.4 2010/11/08 21:25:44 edd Exp $ > ---- 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. > +--- DOCS/man/en/mplayer.1.orig Thu Mar 3 12:35:03 2011 > ++++ DOCS/man/en/mplayer.1 Thu Mar 3 13:22:00 2011 > +@@ -1366,7 +1366,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) > -@@ -11821,11 +11821,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg > file.avi > +@@ -11879,11 +11879,11 @@ mplayer \-vo zr2 \-vf scale=352:288,zrmjpeg > file.avi > .PP > .B Play DTS-CD with passthrough: > .nf > Index: patches/patch-Makefile > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/patches/patch-Makefile,v > retrieving revision 1.21 > diff -u -p -r1.21 patch-Makefile > --- patches/patch-Makefile 8 Nov 2010 21:25:44 -0000 1.21 > +++ patches/patch-Makefile 3 Mar 2011 13:28:42 -0000 > @@ -1,15 +1,15 @@ > $OpenBSD: patch-Makefile,v 1.21 2010/11/08 21:25:44 edd Exp $ > ---- Makefile.orig Fri Oct 22 21:39:43 2010 > -+++ Makefile Sun Oct 24 10:38:28 2010 > +--- Makefile.orig Thu Mar 3 12:35:16 2011 > ++++ Makefile Thu Mar 3 13:22:00 2011 > @@ -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 > +SRCS_AUDIO_INPUT-$(SNDIO) += stream/ai_sndio.c > SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes) > - SRCS_COMMON-$(BITMAP_FONT) += libvo/font_load.c > + SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c > SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \ > -@@ -623,6 +624,7 @@ SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c > +@@ -585,6 +586,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 > @@ -17,17 +17,17 @@ $OpenBSD: patch-Makefile,v 1.21 2010/11/ > SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c > SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c > SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c > -@@ -686,7 +688,8 @@ SRCS_MPLAYER = command.c \ > - libvo/video_out.c \ > +@@ -648,7 +650,8 @@ SRCS_MPLAYER = command.c \ > libvo/vo_mpegpes.c \ > libvo/vo_null.c \ > + sub/spuenc.c \ > - $(SRCS_MPLAYER-yes) > + $(SRCS_MPLAYER-yes) \ > -+ libao2/ao_rtunes.c > ++ libao2/ao_rtunes.c > > > SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c > -@@ -906,7 +909,16 @@ loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_N > +@@ -864,7 +867,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/openbsd/ports/x11/mplayer/patches/patch-command_c,v > retrieving revision 1.3 > diff -u -p -r1.3 patch-command_c > --- patches/patch-command_c 8 Nov 2010 21:25:44 -0000 1.3 > +++ patches/patch-command_c 3 Mar 2011 13:08:23 -0000 > @@ -1,7 +1,7 @@ > $OpenBSD: patch-command_c,v 1.3 2010/11/08 21:25:44 edd Exp $ > ---- 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) > +--- command.c.orig Thu Jan 27 20:51:11 2011 > ++++ command.c Mon Jan 31 14:18:31 2011 > +@@ -3375,7 +3375,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) > case MP_CMD_RUN: > #ifndef __MINGW32__ > if (!fork()) { > Index: patches/patch-configure > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/patches/patch-configure,v > retrieving revision 1.57 > diff -u -p -r1.57 patch-configure > --- patches/patch-configure 8 Nov 2010 21:25:44 -0000 1.57 > +++ patches/patch-configure 3 Mar 2011 13:28:42 -0000 > @@ -1,7 +1,7 @@ > $OpenBSD: patch-configure,v 1.57 2010/11/08 21:25:44 edd Exp $ > ---- configure.orig Thu Oct 21 10:35:56 2010 > -+++ configure Sat Nov 6 13:41:02 2010 > -@@ -461,6 +461,7 @@ Audio output: > +--- configure.orig Thu Mar 3 12:37:30 2011 > ++++ configure Thu Mar 3 13:25:12 2011 > +@@ -510,6 +510,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.57 2010/11 > --disable-kai disable KAI audio output [autodetect] > --disable-dart disable DART audio output [autodetect] > --disable-win32waveout disable Windows waveout audio output [autodetect] > -@@ -698,6 +699,7 @@ _xf86keysym=auto > +@@ -745,6 +746,7 @@ _xf86keysym=auto > _mlib=no #broken, thus disabled > _sgiaudio=auto > _sunaudio=auto > @@ -17,7 +17,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > _alsa=auto > _fastmemcpy=yes > hardcoded_tables=no > -@@ -1126,6 +1128,8 @@ for ac_option do > +@@ -1169,6 +1171,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.57 2010/11 > --enable-sgiaudio) _sgiaudio=yes ;; > --disable-sgiaudio) _sgiaudio=no ;; > --enable-alsa) _alsa=yes ;; > -@@ -1446,7 +1450,7 @@ if test -z "$_target" ; then > +@@ -1489,7 +1493,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.57 2010/11 > vax) host_arch=vax ;; > xtensa*) host_arch=xtensa ;; > *) host_arch=UNKNOWN ;; > -@@ -2157,7 +2161,7 @@ case "$host_arch" in > +@@ -2200,7 +2204,7 @@ case "$host_arch" in > arch='sparc' > iproc='sparc' > if test "$host_arch" = "sparc64" ; then > @@ -44,7 +44,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > proc='ultrasparc' > def_fast_64bit='#define HAVE_FAST_64BIT 1' > elif sunos ; then > -@@ -2476,7 +2480,7 @@ cat > $TMPC << EOF > +@@ -2519,7 +2523,7 @@ cat > $TMPC << EOF > int ff_extern; > EOF > cc_check -c || die "Symbol mangling check failed." > @@ -53,7 +53,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > extern_prefix=${sym%%ff_extern*} > def_extern_asm="#define EXTERN_ASM $extern_prefix" > def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\"" > -@@ -2535,7 +2539,7 @@ elif test -z "$CFLAGS" ; then > +@@ -2578,7 +2582,7 @@ elif test -z "$CFLAGS" ; then > elif test "$cc_vendor" != "gnu" ; then > CFLAGS="-O2 $_march $_mcpu $_pipe" > else > @@ -62,7 +62,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith > -Wredundant-decls" > extra_ldflags="$extra_ldflags -ffast-math" > fi > -@@ -2817,8 +2821,11 @@ echores "$ibm_asm" > +@@ -2860,8 +2864,11 @@ echores "$ibm_asm" > def_gnu_as='#define HAVE_GNU_AS 0' > gnu_as=no > echocheck "GNU assembler" > @@ -76,7 +76,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > echores "$gnu_as" > > fi > -@@ -3436,7 +3443,8 @@ if test "$_memalign" = yes ; then > +@@ -3480,7 +3487,8 @@ if test "$_memalign" = yes ; then > else > def_memalign='#define HAVE_MEMALIGN 0' > def_map_memalign='#define memalign(a, b) malloc(b)' > @@ -86,7 +86,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > fi > echores "$_memalign" > > -@@ -3543,7 +3551,7 @@ int main(void) { pthread_t tid; return pthread_create( > +@@ -3585,7 +3593,7 @@ int main(void) { pthread_t tid; return pthread_create( > EOF > _pthreads=no > if ! hpux ; then > @@ -95,7 +95,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > # 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 > -@@ -4664,6 +4672,8 @@ if test "$_aa" = yes ; then > +@@ -4661,6 +4669,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)" > @@ -104,24 +104,31 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > fi > vomodules="aa $vomodules" > else > -@@ -4873,14 +4883,14 @@ int main(void) { > - return !p_ver || p_ver[0] == 0; > - } > - EOF > -- if cc_check -lmng -lz $_ld_lm ; then > -+ if cc_check -lmng -llcms -ljpeg -lz -lm $_ld_lm ; then > - _mng=yes > - fi > +@@ -4846,7 +4856,7 @@ fi > + echores "$_png" > + if test "$_png" = yes ; then > + def_png='#define CONFIG_PNG 1' > +- extra_ldflags="$extra_ldflags -lpng -lz" > ++ extra_ldflags="$extra_ldflags -lpng -lz -lm" > + else > + def_png='#undef CONFIG_PNG' > + fi > +@@ -4854,12 +4864,12 @@ fi > + echocheck "MNG support" > + if test "$_mng" = auto ; then > + _mng=no > +- return_statement_check libmng.h 'const char * p_ver = mng_version_text()' > '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng=yes > ++ return_statement_check libmng.h 'const char * p_ver = mng_version_text()' > '!p_ver || p_ver[0] == 0' -llcms -ljpeg -lmng -lz $_ld_lm && _mng=yes > fi > echores "$_mng" > if test "$_mng" = yes ; then > def_mng='#define CONFIG_MNG 1' > - extra_ldflags="$extra_ldflags -lmng -lz" > -+ extra_ldflags="$extra_ldflags -lmng -llcms -ljpeg -lz -lm" > ++ extra_ldflags="$extra_ldflags -lmng -llcms -lz -ljpeg $_ld_m" > else > def_mng='#undef CONFIG_MNG' > fi > -@@ -5691,6 +5701,26 @@ fi > +@@ -5663,6 +5673,26 @@ fi > echores "$_sunaudio" > > > @@ -148,7 +155,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > def_mlib='#define CONFIG_MLIB 0' > if sunos; then > echocheck "Sun mediaLib" > -@@ -5860,8 +5890,9 @@ if test "$_dvdread_internal" = auto ; then > +@@ -5832,8 +5862,9 @@ if test "$_dvdread_internal" = auto ; then > elif test "$_dvdread" = auto ; then > _dvdread=no > if test "$_dl" = yes; then > @@ -160,16 +167,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs > $_ld_dl ; then > _dvdread=yes > 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" > +@@ -6521,7 +6552,7 @@ echores "$_libmpeg2" > echocheck "libdca support" > if test "$_libdca" = auto ; then > _libdca=no > @@ -178,16 +176,16 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm && > extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break > done > -@@ -7448,6 +7479,8 @@ if test "$_tv_v4l2" = auto ; then > +@@ -7360,6 +7391,8 @@ if test "$_tv_v4l2" = auto ; then > _tv_v4l2=no > if test "$_tv" = yes && linux ; then > - header_check linux/videodev2.h && _tv_v4l2=yes > + header_check_broken sys/time.h 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 > -@@ -8158,6 +8191,7 @@ SPEEX = $_speex > +@@ -8069,6 +8102,7 @@ SPEEX = $_speex > STREAM_CACHE = $_stream_cache > SGIAUDIO = $_sgiaudio > SUNAUDIO = $_sunaudio > @@ -195,7 +193,7 @@ $OpenBSD: patch-configure,v 1.57 2010/11 > SVGA = $_svga > TDFXFB = $_tdfxfb > TDFXVID = $_tdfxvid > -@@ -8540,6 +8574,7 @@ $def_ossaudio_devmixer > +@@ -8445,6 +8479,7 @@ $def_ossaudio_devmixer > $def_pulse > $def_sgiaudio > $def_sunaudio > Index: patches/patch-ffmpeg_libavcodec_Makefile > =================================================================== > RCS file: > /cvs/openbsd/ports/x11/mplayer/patches/patch-ffmpeg_libavcodec_Makefile,v > retrieving revision 1.1 > diff -u -p -r1.1 patch-ffmpeg_libavcodec_Makefile > --- patches/patch-ffmpeg_libavcodec_Makefile 8 Nov 2010 21:25:44 -0000 > 1.1 > +++ patches/patch-ffmpeg_libavcodec_Makefile 3 Mar 2011 13:28:42 -0000 > @@ -1,7 +1,7 @@ > $OpenBSD: patch-ffmpeg_libavcodec_Makefile,v 1.1 2010/11/08 21:25:44 edd Exp > $ > ---- 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. > +--- ffmpeg/libavcodec/Makefile.orig Thu Mar 3 12:37:41 2011 > ++++ ffmpeg/libavcodec/Makefile Thu Mar 3 13:22:00 2011 > +@@ -712,3 +712,31 @@ $(SUBDIR)motionpixels.o: $(SUBDIR)motionpixels_tables. > $(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h > $(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h > endif > Index: patches/patch-ffmpeg_libavcodec_vorbis_dec_c > =================================================================== > RCS file: patches/patch-ffmpeg_libavcodec_vorbis_dec_c > diff -N patches/patch-ffmpeg_libavcodec_vorbis_dec_c > --- patches/patch-ffmpeg_libavcodec_vorbis_dec_c 12 Feb 2011 10:49:37 > -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,126 +0,0 @@ > -$OpenBSD: patch-ffmpeg_libavcodec_vorbis_dec_c,v 1.1 2011/02/12 10:49:37 > jasper Exp $ > - > -Security fixes for CVE-2010-4704, CVE-2010-4705 and CVE-2011-0480. > -From upstream git commits: > - 3dde66752d59dfdd0f3727efd66e7202b3c75078 > - 366d919016a679d3955f6fe5278fa7ce4f47b81e > - 13184036a6b1b1d4b61c91118c0896e9ad4634c3 > - 925aa96915b8143017cb63418cb709b992c59065 > - > ---- ffmpeg/libavcodec/vorbis_dec.c.orig Tue Aug 31 00:34:09 2010 > -+++ ffmpeg/libavcodec/vorbis_dec.c Thu Feb 10 18:26:28 2011 > -@@ -61,8 +61,8 @@ typedef struct vorbis_floor0_s vorbis_floor0; > - typedef struct vorbis_floor1_s vorbis_floor1; > - struct vorbis_context_s; > - typedef > --uint_fast8_t (* vorbis_floor_decode_func) > -- (struct vorbis_context_s *, vorbis_floor_data *, float *); > -+int (* vorbis_floor_decode_func) > -+ (struct vorbis_context_s *, vorbis_floor_data *, float *); > - typedef struct { > - uint_fast8_t floor_type; > - vorbis_floor_decode_func decode; > -@@ -459,11 +459,11 @@ static int vorbis_parse_setup_hdr_tdtransforms(vorbis_ > - > - // Process floors part > - > --static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc, > -- vorbis_floor_data *vfu, float > *vec); > -+static int vorbis_floor0_decode(vorbis_context *vc, > -+ vorbis_floor_data *vfu, float *vec); > - static void create_map(vorbis_context *vc, uint_fast8_t floor_number); > --static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, > -- vorbis_floor_data *vfu, float > *vec); > -+static int vorbis_floor1_decode(vorbis_context *vc, > -+ vorbis_floor_data *vfu, float *vec); > - static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) > - { > - GetBitContext *gb = &vc->gb; > -@@ -483,6 +483,7 @@ static int vorbis_parse_setup_hdr_floors(vorbis_contex > - if (floor_setup->floor_type == 1) { > - int maximum_class = -1; > - uint_fast8_t rangebits; > -+ uint_fast32_t rangemax; > - uint_fast16_t floor1_values = 2; > - > - floor_setup->decode = vorbis_floor1_decode; > -@@ -534,8 +535,15 @@ static int vorbis_parse_setup_hdr_floors(vorbis_contex > - > - > - rangebits = get_bits(gb, 4); > -+ rangemax = (1 << rangebits); > -+ if (rangemax > vc->blocksize[1] / 2) { > -+ av_log(vc->avccontext, AV_LOG_ERROR, > -+ "Floor value is too large for blocksize: %d (%d)\n", > -+ rangemax, vc->blocksize[1] / 2); > -+ return -1; > -+ } > - floor_setup->data.t1.list[0].x = 0; > -- floor_setup->data.t1.list[1].x = (1 << rangebits); > -+ floor_setup->data.t1.list[1].x = rangemax; > - > - for (j = 0; j < floor_setup->data.t1.partitions; ++j) { > - for (k = 0; k < > floor_setup->data.t1.class_dimensions[floor_setup->data.t1.partition_class[j]]; > ++k, ++floor1_values) { > -@@ -653,7 +661,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_cont > - res_setup->partition_size = get_bits(gb, 24) + 1; > - /* Validations to prevent a buffer overflow later. */ > - if (res_setup->begin>res_setup->end || > -- res_setup->end > vc->avccontext->channels * vc->blocksize[1] / > (res_setup->type == 2 ? 1 : 2) || > -+ res_setup->end > vc->avccontext->channels * vc->blocksize[1] / > 2 || > - (res_setup->end-res_setup->begin) / res_setup->partition_size > > V_MAX_PARTITIONS) { > - av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: > type, begin, end, size, blocksize: %"PRIdFAST16", %"PRIdFAST32", > %"PRIdFAST32", %u, %"PRIdFAST32"\n", res_setup->type, res_setup->begin, > res_setup->end, res_setup->partition_size, vc->blocksize[1] / 2); > - return -1; > -@@ -1015,8 +1023,8 @@ static av_cold int vorbis_decode_init(AVCodecContext * > - > - // Read and decode floor > - > --static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc, > -- vorbis_floor_data *vfu, float *vec) > -+static int vorbis_floor0_decode(vorbis_context *vc, > -+ vorbis_floor_data *vfu, float *vec) > - { > - vorbis_floor0 *vf = &vfu->t0; > - float *lsp = vf->lsp; > -@@ -1040,6 +1048,9 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_contex > - } > - AV_DEBUG("floor0 dec: booknumber: %u\n", book_idx); > - codebook = vc->codebooks[vf->book_list[book_idx]]; > -+ /* Invalid codebook! */ > -+ if (!codebook.codevectors) > -+ return -1; > - > - while (lsp_len<vf->order) { > - int vec_off; > -@@ -1125,8 +1136,8 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_contex > - return 0; > - } > - > --static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, > -- vorbis_floor_data *vfu, float *vec) > -+static int vorbis_floor1_decode(vorbis_context *vc, > -+ vorbis_floor_data *vfu, float *vec) > - { > - vorbis_floor1 *vf = &vfu->t1; > - GetBitContext *gb = &vc->gb; > -@@ -1502,13 +1513,20 @@ static int vorbis_parse_audio_packet(vorbis_context > *v > - > - for (i = 0; i < vc->audio_channels; ++i) { > - vorbis_floor *floor; > -+ int ret; > - if (mapping->submaps > 1) { > - floor = &vc->floors[mapping->submap_floor[mapping->mux[i]]]; > - } else { > - floor = &vc->floors[mapping->submap_floor[0]]; > - } > - > -- no_residue[i] = floor->decode(vc, &floor->data, ch_floor_ptr); > -+ ret = floor->decode(vc, &floor->data, ch_floor_ptr); > -+ > -+ if (ret < 0) { > -+ av_log(vc->avccontext, AV_LOG_ERROR, "Invalid codebook in > vorbis_floor_decode.\n"); > -+ return -1; > -+ } > -+ no_residue[i] = ret; > - ch_floor_ptr += blocksize / 2; > - } > - > Index: patches/patch-ffmpeg_libswscale_Makefile > =================================================================== > RCS file: > /cvs/openbsd/ports/x11/mplayer/patches/patch-ffmpeg_libswscale_Makefile,v > retrieving revision 1.1 > diff -u -p -r1.1 patch-ffmpeg_libswscale_Makefile > --- patches/patch-ffmpeg_libswscale_Makefile 8 Nov 2010 21:25:44 -0000 > 1.1 > +++ patches/patch-ffmpeg_libswscale_Makefile 5 Mar 2011 13:22:58 -0000 > @@ -1,11 +1,9 @@ > $OpenBSD: patch-ffmpeg_libswscale_Makefile,v 1.1 2010/11/08 21:25:44 edd Exp > $ > ---- 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 > +--- ffmpeg/libswscale/Makefile.orig Fri Mar 4 18:35:06 2011 > ++++ ffmpeg/libswscale/Makefile Fri Mar 4 18:35:21 2011 > +@@ -1,5 +1,13 @@ > + include $(SUBDIR)../config.mak > > - include $(SUBDIR)../subdir.mak > - $(SUBDIR)swscale-test$(EXESUF): ELIBS = -lavcore > -+ > +ifdef ARCH_X86_32 > +ifeq (,$(findstring -O,$(CFLAGS))) > +x86/yuv2rgb_mmx.o: CFLAGS += -O > @@ -14,3 +12,6 @@ $OpenBSD: patch-ffmpeg_libswscale_Makefi > +x86/yuv2rgb_mmx.o: CFLAGS += -fomit-frame-pointer > +endif > + > + NAME = swscale > + FFLIBS = avutil > + > Index: patches/patch-libmpcodecs_ad_faad_c > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/patches/patch-libmpcodecs_ad_faad_c,v > retrieving revision 1.5 > diff -u -p -r1.5 patch-libmpcodecs_ad_faad_c > --- patches/patch-libmpcodecs_ad_faad_c 8 Nov 2010 21:25:44 -0000 > 1.5 > +++ patches/patch-libmpcodecs_ad_faad_c 3 Mar 2011 13:08:23 -0000 > @@ -1,7 +1,7 @@ > $OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.5 2010/11/08 21:25:44 edd Exp $ > ---- 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) > +--- libmpcodecs/ad_faad.c.orig Sat Jan 1 14:27:41 2011 > ++++ libmpcodecs/ad_faad.c Mon Jan 31 14:18:31 2011 > +@@ -79,7 +79,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(); > -@@ -197,7 +197,7 @@ static int init(sh_audio_t *sh) > +@@ -171,7 +171,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; > -@@ -327,7 +327,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char * > +@@ -301,7 +301,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-mplayer_c > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/patches/patch-mplayer_c,v > retrieving revision 1.10 > diff -u -p -r1.10 patch-mplayer_c > --- patches/patch-mplayer_c 8 Nov 2010 21:25:44 -0000 1.10 > +++ patches/patch-mplayer_c 3 Mar 2011 13:28:42 -0000 > @@ -1,7 +1,7 @@ > $OpenBSD: patch-mplayer_c,v 1.10 2010/11/08 21:25:44 edd Exp $ > ---- 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){ > +--- mplayer.c.orig Thu Mar 3 12:35:16 2011 > ++++ mplayer.c Thu Mar 3 13:23:39 2011 > +@@ -815,7 +815,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 > Index: patches/patch-unrar_exec_c > =================================================================== > RCS file: patches/patch-unrar_exec_c > diff -N patches/patch-unrar_exec_c > --- patches/patch-unrar_exec_c 8 Nov 2010 21:25:44 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,16 +0,0 @@ > -$OpenBSD: patch-unrar_exec_c,v 1.1 2010/11/08 21:25:44 edd Exp $ > ---- 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/README > =================================================================== > RCS file: /cvs/openbsd/ports/x11/mplayer/pkg/README,v > retrieving revision 1.1 > diff -u -p -r1.1 README > --- pkg/README 8 Nov 2010 21:25:44 -0000 1.1 > +++ pkg/README 5 Mar 2011 14:45:13 -0000 > @@ -9,6 +9,11 @@ all arches: > Mencoder is not expected to do a good job of multiplexing into container > formats other than AVI or MPEG. > > + ffmpeg's ogg demuxer is broken for ogg streams. If mplayer says "cache > + not filling" when a song changes, you have been bitten by this bug. > + You can try '-demuxer ogg' as a workaround (or try using ogg123 from > + the vorbis-tools package). > + > i386: > win32 codecs were disabled in OpenBSD's build, as the open-source codecs > are now of decent quality. > > -- Antoine