diff options
author | Arwed v. Merkatz | 2006-06-17 16:55:43 +0200 |
---|---|---|
committer | Arwed v. Merkatz | 2006-06-17 16:55:43 +0200 |
commit | 62d67b36ec2c9044fe0af6d0761ecda55b1f7565 (patch) | |
tree | 7620b16c4f1e422fbf9a4ec416be26a8a37d5e6d | |
parent | 629504aef16b5d88cb3bd36add33297054de7668 (diff) |
mplayer: sync from svk
-rwxr-xr-x | video/mplayer/BUILD | 5 | ||||
-rwxr-xr-x | video/mplayer/CONFIGURE | 2 | ||||
-rwxr-xr-x | video/mplayer/DEPENDS | 14 | ||||
-rwxr-xr-x | video/mplayer/DETAILS | 13 | ||||
-rwxr-xr-x | video/mplayer/DOWNLOAD | 47 | ||||
-rw-r--r-- | video/mplayer/HISTORY | 27 | ||||
-rwxr-xr-x | video/mplayer/PREPARE | 16 | ||||
-rwxr-xr-x | video/mplayer/PRE_BUILD | 5 | ||||
-rw-r--r-- | video/mplayer/mplayer_20060519.tar.bz2.sig | bin | 0 -> 536 bytes | |||
-rw-r--r-- | video/mplayer/patch-CVE-2006-1502 | 69 |
10 files changed, 171 insertions, 27 deletions
diff --git a/video/mplayer/BUILD b/video/mplayer/BUILD index 9b7edb6199..66651d9127 100755 --- a/video/mplayer/BUILD +++ b/video/mplayer/BUILD @@ -1,15 +1,14 @@ -invoke_gcc # needed so it actually uses gcc 3.4 OPTS="$OPTS --cc=gcc" && -if [ "$MPLAYER_CVS" != "y" ]; then +if [[ $MPLAYER_SVN = n ]]; then OPTS="$OPTS --enable-libavcodec" else OPTS="$OPTS --with-extraincdir=/usr/include/ffmpeg" fi && # remove --enable-old-gtk for 1.0pre7try2 as it doesn't know that option -if [ "$MPLAYER_GUI" = "gtk+" -a "$MPLAYER_CVS" = "n" ]; then +if [[ $MPLAYER_GUI = gtk+ && $MPLAYER_SVN = n ]]; then OPTS="${OPTS/--enable-old-gtk/}" fi && if [ "$MPLAYER_JOYSTICK" = "y" ]; then diff --git a/video/mplayer/CONFIGURE b/video/mplayer/CONFIGURE index 6095bca286..7e7ba10476 100755 --- a/video/mplayer/CONFIGURE +++ b/video/mplayer/CONFIGURE @@ -1,4 +1,4 @@ -if [ "$MPLAYER_CVS" == "y" ]; then +if [[ $MPLAYER_SVN = y ]]; then if [ "$GUI" == "y" ]; then config_query_list MPLAYER_GUI "What GUI do you want?" gtk+ gtk+2 none else diff --git a/video/mplayer/DEPENDS b/video/mplayer/DEPENDS index eb911a1359..29a33756b6 100755 --- a/video/mplayer/DEPENDS +++ b/video/mplayer/DEPENDS @@ -1,4 +1,4 @@ -if [ "$MPLAYER_CVS" == "n" ]; then +if [[ $MPLAYER_SVN = n ]]; then depends gcc34 fi && if [ "$MPLAYER_GUI" == "gtk+" ] @@ -9,12 +9,10 @@ then depends gtk+2 '--enable-gui' && depends mplayer-gui fi && -if [ "$MPLAYER_CVS" == "y" ]; then - depends CVS && - optional_depends ffmpeg-cvs \ - "--enable-libavcodec_so --enable-libavformat_so --enable-libpostproc_so" \ - "--disable-libavcodec_so --disable-libavformat_so --disable-libpostproc_so" \ - "for libavcodec audio/video decoders (you really want this)" && +if [[ $MPLAYER_SVN = y ]]; then + depends subversion && + optional_depends ffmpeg-svn \ + "--disable-libavcodec --enable-libavcodec_so --disable-libavformat --enable-libavformat_so --disable-libpostproc --enable-libpostproc_so --disable-libavutil --enable-libavutil_so" "" "to use system ffmpeg instead of internal one" && optional_depends libmpcdec "" "--disable-musepack" "for musepack (mpc) support" fi && @@ -36,7 +34,7 @@ optional_depends quicktime-codecs "" "--disable-qtx" "for some audio/video code optional_depends real-codecs "" "--disable-real" "to decode RealMedia files" "z-rejected" && optional_depends xanim-codecs "" "--disable-xanim" "for additional codecs (intel indeo, ...)" "z-rejected" && optional_depends xvid "" "--disable-xvid" "for encoding with the xvid codec (distribution in USA and Japan is forbidden)" && -if [ "$MPLAYER_CVS" == "y" ]; then +if [[ $MPLAYER_SVN = y ]]; then optional_depends twolame "" "--disable-twolame" "Twolame (MPEG layer 2 audio) support in mencoder" fi && diff --git a/video/mplayer/DETAILS b/video/mplayer/DETAILS index 761cd89e3b..ba67a85807 100755 --- a/video/mplayer/DETAILS +++ b/video/mplayer/DETAILS @@ -1,15 +1,15 @@ SPELL=mplayer -if [ "$MPLAYER_CVS" == "y" ]; then - if [ "$MPLAYER_CVS_AUTOUPDATE" == "y" ]; then +if [[ $MPLAYER_SVN = y ]]; then + if [[ $MPLAYER_SVN_AUTOUPDATE = y ]]; then VERSION=$(date +%Y%m%d) else - VERSION=cvs + VERSION=svn fi - SOURCE=$SPELL-cvs.tar.bz2 - SOURCE_URL[0]=cvs://:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer:main + SOURCE=$SPELL-svn.tar.bz2 + SOURCE_URL[0]=svn://svn.mplayerhq.hu/mplayer/trunk/:$SPELL-svn SOURCE_IGNORE=volatile FORCE_DOWNLOAD=on -SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-cvs +SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-svn else VERSION=1.0pre7try2 SOURCE=MPlayer-$VERSION.tar.bz2 @@ -19,6 +19,7 @@ else SOURCE_HASH=sha1:dcaced128167f15d094c9b63ca8b3dfd8f583e32 SOURCE_DIRECTORY=$BUILD_DIRECTORY/MPlayer-$VERSION GCC_VERSION=3.4 + SECURITY_PATCH=1 fi WEB_SITE=http://www.mplayerhq.hu LICENSE[0]=GPL diff --git a/video/mplayer/DOWNLOAD b/video/mplayer/DOWNLOAD new file mode 100755 index 0000000000..1a5913d098 --- /dev/null +++ b/video/mplayer/DOWNLOAD @@ -0,0 +1,47 @@ +function url_r_svn_crack() { + + URL=`url_strip_prefix "$1" svn` + R_SVN_ROOT=`echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#"` + local R_SVN_MODULE_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"` + R_SVN_MODULE=`echo $R_SVN_MODULE_TAG | cut -d : -f2` + local R_SVN_TAGNAME=`echo $R_SVN_MODULE_TAG | cut -d : -f3` + R_SVN_TAG=${R_SVN_TAGNAME:-HEAD} + +} + +if [[ $(url_get_prefix) != svn ]]; then + default_download + return $? +fi && +url_r_svn_crack ${SOURCE_URL} && +message "${MESSAGE_COLOR}Starting SVN checkout of" \ + "${FILE_COLOR}${SOURCE}${MESSAGE_COLOR}...${DEFAULT_COLOR}" && +if [[ -f $SOURCE_CACHE/${SOURCE} ]] +then + message "${MESSAGE_COLOR}Previous source found unpacking...${DEFAULT_COLOR}" && + tar -jxf $SOURCE_CACHE/${SOURCE} && + cd $R_SVN_MODULE && + message "${MESSAGE_COLOR}Running SVN update...${DEFAULT_COLOR}" && + svn \ + --non-interactive \ + update \ + -r${R_SVN_TAG} && + cd .. && + message "${MESSAGE_COLOR}Done...${DEFAULT_COLOR}" +else + message "${MESSAGE_COLOR}Running initial SVN checkout...${DEFAULT_COLOR}" && + svn \ + --non-interactive \ + checkout \ + -r${R_SVN_TAG} \ + svn://${R_SVN_ROOT} \ + ${R_SVN_MODULE} && + message "${MESSAGE_COLOR}Done...${DEFAULT_COLOR}" +fi && +message "${MESSAGE_COLOR}Generating tarball...${DEFAULT_COLOR}" && +tar -jcf \ + ${SOURCE} \ + ${R_SVN_MODULE} && +cp ${SOURCE} ${SOURCE_CACHE}/${SOURCE} && +rm ${SOURCE} && +message "${MESSAGE_COLOR}SVN Checkout complete...${DEFAULT_COLOR}" diff --git a/video/mplayer/HISTORY b/video/mplayer/HISTORY index cd919f4881..9d60f43bb4 100644 --- a/video/mplayer/HISTORY +++ b/video/mplayer/HISTORY @@ -1,3 +1,30 @@ +2006-06-12 Arwed v. Merkatz <v.merkatz@gmx.net> + * DOWNLOAD: fixed so it actually works with non-svn version + +2006-06-11 Arwed v. Merkatz <v.merkatz@gmx.net> + * PRE_BUILD, patch-CVS-2006-1502: security patch for bug #10883 + * DETAILS: SECURITY_PATCH=1 for the release version + +2006-06-05 Arwed v. Merkatz <v.merkatz@gmx.net> + * DETAILS: switched from snapshot to new svn checkout for the scm + version + * DOWNLOAD: added for svn download + * BUILD, CONFIGURE, DEPENDS, PREPARE, PRE_BUILD: changed variables + from MPLAYER_CVS* to MPLAYER_SVN* + * BUILD, PRE_BUILD: moved invoke_gcc call to PRE_BUILD + * DEPENDS: changed switches for ffmpeg-svn optional_depends, this is + required because the svn checkout includes a full copy of ffmpeg + svn + +2006-05-27 Arwed v. Merkatz <v.merkatz@gmx.net> + * DEPENDS: changed ffmpeg-cvs to ffmpeg-svn + +2006-05-24 Arwed v. Merkatz <v.merkatz@gmx.net> + * DETAILS: commented all cvs stuff, switch to a snapshot from + http://www.mplayerhq.hu/~rtogni/snapshots/ as the cvs server is + dead + * DEPENDS: commented dependency on CVS + 2006-03-30 Arwed v. Merkatz <v.merkatz@gmx.net> * cvs.Makefile.patch: updated diff --git a/video/mplayer/PREPARE b/video/mplayer/PREPARE index 44e80020b7..08386a5219 100755 --- a/video/mplayer/PREPARE +++ b/video/mplayer/PREPARE @@ -1,9 +1,9 @@ -config_query MPLAYER_CVS "Build CVS version?" ${CVS:-n} -# remove this and the above $CVS check from devel/test once this is in stable -# 2005-09-29 Arwed v. Merkatz -persistent_remove CVS -if [ "$MPLAYER_CVS" == "y" ]; then - config_query MPLAYER_CVS_AUTOUPDATE \ - "Update to the latest CVS on every cast?" \ - n +# changed CVS -> SVN, remove from test when it's in stable +# 2006-06-05 Arwed v. Merkatz +config_query MPLAYER_SVN "Build SVN version?" ${MPLAYER_CVS:-n} +if [[ $MPLAYER_SVN = y ]]; then + config_query MPLAYER_SVN_AUTOUPDATE \ + "Update to the latest SVN on every system-update?" \ + ${MPLAYER_CVS_AUTOUPDATE:-n} fi +persistent_remove MPLAYER_CVS MPLAYER_CVS_AUTOUPDATE diff --git a/video/mplayer/PRE_BUILD b/video/mplayer/PRE_BUILD index 5bf17c7fab..95ed6300e9 100755 --- a/video/mplayer/PRE_BUILD +++ b/video/mplayer/PRE_BUILD @@ -1,6 +1,7 @@ default_pre_build && +invoke_gcc && cd $SOURCE_DIRECTORY && -if [ "$MPLAYER_CVS" = "y" ]; then +if [[ $MPLAYER_SVN = y ]]; then patch Makefile $SCRIPT_DIRECTORY/cvs.Makefile.patch && if [ "$MPLAYER_GUI" == "gtk+" ]; then sedit "s|_gui=no|_gui=yes|" configure && @@ -10,6 +11,8 @@ if [ "$MPLAYER_CVS" = "y" ]; then fi else + # patch for bug #10883 + patch -p0 < $SCRIPT_DIRECTORY/patch-CVE-2006-1502 && # fixes bug #6833 patch Makefile $SCRIPT_DIRECTORY/Makefile.patch && patch -p1 < $SCRIPT_DIRECTORY/mplayer-headers.patch diff --git a/video/mplayer/mplayer_20060519.tar.bz2.sig b/video/mplayer/mplayer_20060519.tar.bz2.sig Binary files differnew file mode 100644 index 0000000000..874edfced3 --- /dev/null +++ b/video/mplayer/mplayer_20060519.tar.bz2.sig diff --git a/video/mplayer/patch-CVE-2006-1502 b/video/mplayer/patch-CVE-2006-1502 new file mode 100644 index 0000000000..4e9fe7e3cf --- /dev/null +++ b/video/mplayer/patch-CVE-2006-1502 @@ -0,0 +1,69 @@ +--- libmpdemux/aviheader.c.orig Tue Feb 22 17:24:18 2005 ++++ libmpdemux/aviheader.c Fri Apr 7 11:56:53 2006 +@@ -205,8 +205,10 @@ + break; } + case mmioFOURCC('i', 'n', 'd', 'x'): { + uint32_t i; +- unsigned msize = 0; + avisuperindex_chunk *s; ++ if(chunksize<=24){ ++ break; ++ } + priv->suidx_size++; + priv->suidx = realloc(priv->suidx, priv->suidx_size * sizeof (avisuperindex_chunk)); + s = &priv->suidx[priv->suidx_size-1]; +@@ -224,11 +226,18 @@ + + print_avisuperindex_chunk(s); + +- msize = sizeof (uint32_t) * s->wLongsPerEntry * s->nEntriesInUse; +- s->aIndex = malloc(msize); +- memset (s->aIndex, 0, msize); +- s->stdidx = malloc (s->nEntriesInUse * sizeof (avistdindex_chunk)); +- memset (s->stdidx, 0, s->nEntriesInUse * sizeof (avistdindex_chunk)); ++ if( ((chunksize/4)/s->wLongsPerEntry) < s->nEntriesInUse){ ++ mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk\n"); ++ s->nEntriesInUse = (chunksize/4)/s->wLongsPerEntry; ++ } ++ ++ // Check and fix this useless crap ++ if(s->wLongsPerEntry != sizeof (avisuperindex_entry)/4) { ++ mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk size: %u\n",s->wLongsPerEntry); ++ s->wLongsPerEntry = sizeof(avisuperindex_entry)/4; ++ } ++ s->aIndex = calloc(s->nEntriesInUse, sizeof (avisuperindex_entry)); ++ s->stdidx = calloc(s->nEntriesInUse, sizeof (avistdindex_chunk)); + + // now the real index of indices + for (i=0; i<s->nEntriesInUse; i++) { +@@ -636,6 +645,8 @@ + idx->dwChunkLength=len; + + c=stream_read_dword(demuxer->stream); ++ ++ if(!len) idx->dwFlags&=~AVIIF_KEYFRAME; + + // Fix keyframes for DivX files: + if(idxfix_divx) +--- libmpdemux/asfheader.c.orig Sat Dec 25 09:31:32 2004 ++++ libmpdemux/asfheader.c Fri Apr 7 11:55:29 2006 +@@ -189,7 +189,7 @@ + while ((pos = find_asf_guid(hdr, asf_stream_header_guid, pos, hdr_len)) >= 0) + { + ASF_stream_header_t *streamh = (ASF_stream_header_t *)&hdr[pos]; +- char *buffer; ++ uint8_t *buffer; + pos += sizeof(ASF_stream_header_t); + if (pos > hdr_len) goto len_err_out; + le2me_ASF_stream_header_t(streamh); +@@ -222,7 +222,9 @@ + asf_scrambling_h=buffer[0]; + asf_scrambling_w=(buffer[2]<<8)|buffer[1]; + asf_scrambling_b=(buffer[4]<<8)|buffer[3]; +- asf_scrambling_w/=asf_scrambling_b; ++ if(asf_scrambling_b>0){ ++ asf_scrambling_w/=asf_scrambling_b; ++ } + } else { + asf_scrambling_b=asf_scrambling_h=asf_scrambling_w=1; + } |