Index: branches/2015Q3/multimedia/mplayer2/Makefile =================================================================== --- branches/2015Q3/multimedia/mplayer2/Makefile (revision 395575) +++ branches/2015Q3/multimedia/mplayer2/Makefile (revision 395576) @@ -1,304 +1,305 @@ # $FreeBSD$ PORTNAME= mplayer2 PORTVERSION= ${MPLAYER2_PORT_VERSION} -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= multimedia audio MASTER_SITES= LOCAL/gblach/ MAINTAINER= cpm@fbsd.es COMMENT= Advanced general-purpose video player LICENSE= GPLv2 LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \ libfreetype.so:${PORTSDIR}/print/freetype2 \ libdvdread.so:${PORTSDIR}/multimedia/libdvdread BUILD_DEPENDS= ffmpeg:${PORTSDIR}/multimedia/ffmpeg \ python3:${PORTSDIR}/lang/python3 \ rst2man:${PORTSDIR}/textproc/py-docutils RUN_DEPENDS= ffmpeg:${PORTSDIR}/multimedia/ffmpeg USES= cpe gmake iconv ncurses pkgconfig tar:xz HAS_CONFIGURE= yes CONFIGURE_ENV= TMPDIR="${WRKSRC}" CONFIGURE_ARGS= --cc=${CC} \ --extra-libs='-lavresample ${PORTAUDIOLIB}' \ --mandir=${PREFIX}/man \ --enable-libavresample \ --disable-alsa \ --disable-liba52 \ --disable-directfb \ --disable-faad \ --disable-mng \ --disable-libdca \ --disable-xvid \ --disable-mpg123 \ --disable-musepack MAKE_ARGS+= BINDIR=${STAGEDIR}${PREFIX}/bin \ CONFDIR=${STAGEDIR}${PREFIX}/etc/mplayer MPLAYER2_SNAPSHOT_DATE= 2013-04-28 MPLAYER2_PORT_VERSION= 2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g} OPTIONS_DEFINE= DEBUG RTC IPV6 SMB LIBBLURAY DV THEORA \ X11 XINERAMA OPENGL SDL VDPAU GIF CACA \ MAD SPEEX CDIO LADSPA REALPLAYER \ JACK PULSEAUDIO PORTAUDIO ASS LIRC OPTIONS_DEFAULT=X11 ASS .if !defined(PACKAGE_BUILDING) OPTIONS_DEFINE+= WIN32 OPTIONS_DEFAULT+= WIN32 .endif RTC_DESC= Enable kernel realtime clock timing ASS_DESC= Enable ASS/SSA subtitle rendering WIN32_DESC= Enable win32 codec set on the IA32 arch REALPLAYER_DESC=Enable realplayer plugin SUB_FILES= pkg-message CONFLICTS= mplayer-1.* .include .if ${ARCH} == "sparc64" BROKEN= Does not compile on sparc64 .endif WITH_CDROM_DEVICE?= /dev/cd0 #On i386, gcc runs out of general purpose registers when #trying to compile a debug version with the default flags. .if ${PORT_OPTIONS:MDEBUG} .if ${ARCH} == "i386" DEBUG_FLAGS= -g -O -fomit-frame-pointer .endif .else .if defined(PACKAGE_BUILDING) CONFIGURE_ARGS+= --enable-runtime-cpudetection CFLAGS+= -O2 -fomit-frame-pointer .else CONFIGURE_ENV+= CPPFLAGS= CFLAGS= LDFLAGS= .endif .endif .if ${PORT_OPTIONS:MIPV6} CATEGORIES+= ipv6 .else CONFIGURE_ARGS+= --disable-inet6 .endif .if ${PORT_OPTIONS:MGIF} LIB_DEPENDS+= libgif.so:${PORTSDIR}/graphics/giflib +CONFIGURE_ARGS+= --enable-gif .else CONFIGURE_ARGS+= --disable-gif .endif .if ${PORT_OPTIONS:MMAD} LIB_DEPENDS+= libmad.so:${PORTSDIR}/audio/libmad .else CONFIGURE_ARGS+= --disable-mad .endif .if ${PORT_OPTIONS:MDV} LIB_DEPENDS+= libdv.so:${PORTSDIR}/multimedia/libdv .else CONFIGURE_ARGS+= --disable-libdv .endif .if ${PORT_OPTIONS:MTHEORA} LIB_DEPENDS+= libtheora.so:${PORTSDIR}/multimedia/libtheora .else CONFIGURE_ARGS+= --disable-theora .endif .if ${PORT_OPTIONS:MSPEEX} LIB_DEPENDS+= libspeex.so:${PORTSDIR}/audio/speex .else CONFIGURE_ARGS+= --disable-speex .endif .if ${PORT_OPTIONS:MJACK} LIB_DEPENDS+= libjack.so:${PORTSDIR}/audio/jack .else CONFIGURE_ARGS+= --disable-jack .endif .if ${PORT_OPTIONS:MPULSEAUDIO} LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio .else CONFIGURE_ARGS+= --disable-pulse .endif .if ${PORT_OPTIONS:MPORTAUDIO} LIB_DEPENDS+= libportaudio.so:${PORTSDIR}/audio/portaudio PORTAUDIOLIB= -lportaudio .else CONFIGURE_ARGS+= --disable-portaudio .endif .if ${PORT_OPTIONS:MLIBBLURAY} LIB_DEPENDS+= libbluray.so:${PORTSDIR}/multimedia/libbluray .else CONFIGURE_ARGS+= --disable-bluray .endif .if ${PORT_OPTIONS:MSMB} LIB_DEPENDS+= libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient .else CONFIGURE_ARGS+= --disable-smb .endif .if ${PORT_OPTIONS:MCDIO} LIB_DEPENDS+= libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia .else CONFIGURE_ARGS+= --disable-libcdio .endif .if ${PORT_OPTIONS:MLADSPA} RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa .else CONFIGURE_ARGS+= --disable-ladspa .endif .if ${ARCH} == "i386" || ${ARCH} == "amd64" .if ${PORT_OPTIONS:MWIN32} && !defined(PACKAGE_BUILDING) && ${ARCH} == "i386" CODEC_PORT= ${PORTSDIR}/multimedia/win32-codecs CODEC_DETECTION_FILE!= ${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT} CONFIGURE_ARGS+= --codecsdir=${LOCALBASE}/lib/win32 .else CONFIGURE_ARGS+= --disable-win32dll --disable-qtx .endif .endif # ARCH == i386/amd64 .if ${PORT_OPTIONS:MREALPLAYER} RUN_DEPENDS+= realplay:${PORTSDIR}/multimedia/linux-realplayer BUILD_DEPENDS+= realplay:${PORTSDIR}/multimedia/linux-realplayer .else CONFIGURE_ARGS+= --disable-real .endif #.if ${PORT_OPTIONS:MV4L} #BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat #LIB_DEPENDS+= libv4l2.so:${PORTSDIR}/multimedia/libv4l #CONFIGURE_ARGS+= --enable-tv-v4l2 #EXTRA_LIBS+= -lv4l2 #.else CONFIGURE_ARGS+= --disable-tv-v4l2 #.endif #.if defined(EXTRA_LIBS) #CONFIGURE_ARGS+= --extra-libs="${EXTRA_LIBS}" #.endif .if ${PORT_OPTIONS:MASS} LIB_DEPENDS+= libass.so:${PORTSDIR}/multimedia/libass .else CONFIGURE_ARGS+= --disable-libass --disable-enca .endif .if ${PORT_OPTIONS:MX11} USE_XORG= x11 xv xxf86vm .if ${PORT_OPTIONS:MOPENGL} USE_XORG+= glproto LIB_DEPENDS+= libGL.so:${PORTSDIR}/graphics/libGL .else CONFIGURE_ARGS+= --disable-gl .endif .if ${PORT_OPTIONS:MXINERAMA} USE_XORG+= xinerama xineramaproto .else CONFIGURE_ARGS+= --disable-xinerama .endif .else #WITHOUT_X11 CONFIGURE_ARGS+= --disable-x11 .endif .if ${PORT_OPTIONS:MVDPAU} LIB_DEPENDS+= libvdpau.so:${PORTSDIR}/multimedia/libvdpau .else CONFIGURE_ARGS+= --disable-vdpau .endif .if ${PORT_OPTIONS:MRTC} BUILD_DEPENDS+= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc RUN_DEPENDS+= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc CONFIGURE_ARGS+= --enable-rtc .else CONFIGURE_ARGS+= --disable-rtc .endif .if ${PORT_OPTIONS:MCACA} LIB_DEPENDS+= libcaca.so:${PORTSDIR}/graphics/libcaca .else CONFIGURE_ARGS+= --disable-caca .endif .if ${PORT_OPTIONS:MLIRC} LIB_DEPENDS+= liblirc_client.so:${PORTSDIR}/comms/lirc .else CONFIGURE_ARGS+= --disable-lirc .endif .if ${PORT_OPTIONS:MSDL} USE_SDL= sdl .else CONFIGURE_ARGS+= --disable-sdl .endif .if defined(WITH_KERN_HZ) DEFAULT_KERN_HZ=${WITH_KERN_HZ} .else DEFAULT_KERN_HZ=1024 .endif pre-everything:: @${ECHO_MSG} "N - O - T - E" @${ECHO_MSG} "" @${ECHO_MSG} "There are some knobs which *can* *not* be selected via the" @${ECHO_MSG} "OPTIONS framework. You might want to check the Makefile in" @${ECHO_MSG} "order to learn more about them." post-patch: .if ${OSVERSION} >= 900010 @${REINPLACE_CMD} -e \ '/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} .endif @${REINPLACE_CMD} \ -e 's|/dev/acd0|${WITH_CDROM_DEVICE}|' \ -e 's|/usr/local|${LOCALBASE}|' \ -e 's|-lbz2|/usr/lib/libbz2.so|' \ -e 's|-lncurses|/usr/lib/libncurses.so|' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} @${FIND} -E ${WRKSRC} -type f \ -iregex ".*(configure|.sh|Makefile)" -print0 | \ ${XARGS} -x -0 -n 10 \ ${REINPLACE_CMD} -E \ -e 's|[[:space:]]gcc[-[:digit:]\.]+| ${CC}|' \ -e 's|[[:space:]]gcc| ${CC}|' \ -e 's|\$$\(CC\)|${CC}|' \ -e 's|/usr/X11R6|${LOCALBASE}|' @${FIND} ${WRKSRC}/DOCS/man -name "mplayer.1" | ${XARGS} ${REINPLACE_CMD} -E -e \ 's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \ s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g ; \ s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g' .if ${PORT_OPTIONS:MRTC} @${REINPLACE_CMD} -e \ 's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \ ${WRKSRC}/mplayer.c .endif post-install: @${INSTALL_DATA} ${WRKSRC}/etc/example.conf \ ${STAGEDIR}${PREFIX}/etc/mplayer/mplayer.conf.sample .for conf in codecs input @${INSTALL_DATA} ${WRKSRC}/etc/${conf}.conf \ ${STAGEDIR}${PREFIX}/etc/mplayer/${conf}.conf.sample .endfor .include Index: branches/2015Q3/multimedia/mplayer2/files/patch-libmpdemux-demux_gif.c =================================================================== --- branches/2015Q3/multimedia/mplayer2/files/patch-libmpdemux-demux_gif.c (revision 395575) +++ branches/2015Q3/multimedia/mplayer2/files/patch-libmpdemux-demux_gif.c (revision 395576) @@ -1,19 +1,86 @@ ---- libmpdemux/demux_gif.c.orig 2012-12-31 00:26:50.000000000 +0100 -+++ libmpdemux/demux_gif.c 2012-12-31 00:30:54.000000000 +0100 -@@ -44,6 +44,16 @@ +--- libmpdemux/demux_gif.c.orig 2013-07-09 16:33:16 UTC ++++ libmpdemux/demux_gif.c +@@ -93,14 +93,14 @@ static int demux_gif_fill_buffer(demuxer - #define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F') + while (type != IMAGE_DESC_RECORD_TYPE) { + if (DGifGetRecordType(gif, &type) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return 0; // oops + } + if (type == TERMINATE_RECORD_TYPE) + return 0; // eof + if (type == SCREEN_DESC_RECORD_TYPE) { + if (DGifGetScreenDesc(gif) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return 0; // oops + } + } +@@ -108,7 +108,7 @@ static int demux_gif_fill_buffer(demuxer + int code; + unsigned char *p = NULL; + if (DGifGetExtension(gif, &code, &p) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return 0; // oops + } + if (code == 0xF9) { +@@ -137,7 +137,7 @@ static int demux_gif_fill_buffer(demuxer + comments[length] = 0; + printf("%s", comments); + if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return 0; // oops + } + } +@@ -145,7 +145,7 @@ static int demux_gif_fill_buffer(demuxer + } + while (p != NULL) { + if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return 0; // oops + } + } +@@ -153,7 +153,7 @@ static int demux_gif_fill_buffer(demuxer + } -+static void PrintGifError(void) -+{ -+ char *Err = GifErrorString(); -+ -+ if (Err != NULL) -+ fprintf(stderr, "\nGIF-LIB error: %s.\n", Err); -+ else -+ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError()); -+} -+ - #ifndef CONFIG_GIF_TVT_HACK - // not supported by certain versions of the library - static int my_read_gif(GifFileType *gif, uint8_t *buf, int len) + if (DGifGetImageDesc(gif) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + return 0; // oops + } + +@@ -166,7 +166,7 @@ static int demux_gif_fill_buffer(demuxer + memset(dp->buffer, gif->SBackGroundColor, priv->w * priv->h); + + if (DGifGetLine(gif, buf, len) == GIF_ERROR) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + free(buf); + return 0; // oops + } +@@ -256,10 +256,10 @@ static demuxer_t* demux_open_gif(demuxer + lseek(demuxer->stream->fd, 0, SEEK_SET); + gif = DGifOpenFileHandle(demuxer->stream->fd); + #else +- gif = DGifOpen(demuxer->stream, my_read_gif); ++ gif = DGifOpen(demuxer->stream, my_read_gif, NULL); + #endif + if (!gif) { +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + free(priv); + return NULL; + } +@@ -301,7 +301,7 @@ static void demux_close_gif(demuxer_t* d + gif_priv_t *priv = demuxer->priv; + if (!priv) return; + if (priv->gif && DGifCloseFile(priv->gif) == GIF_ERROR) +- PrintGifError(); ++ printf("%s\n", GifErrorString(GIF_ERROR)); + free(priv->refimg); + free(priv); + } Index: branches/2015Q3/multimedia/mplayer2/files/patch-libvo_vo_gif89a.c =================================================================== --- branches/2015Q3/multimedia/mplayer2/files/patch-libvo_vo_gif89a.c (nonexistent) +++ branches/2015Q3/multimedia/mplayer2/files/patch-libvo_vo_gif89a.c (revision 395576) @@ -0,0 +1,117 @@ +--- libvo/vo_gif89a.c.orig 2013-07-09 16:33:16 UTC ++++ libvo/vo_gif89a.c +@@ -44,13 +44,13 @@ + * entire argument being interpretted as the filename. + */ + +-#include +- + #include + #include + #include + #include + ++#include ++ + #include "config.h" + #include "subopt-helper.h" + #include "video_out.h" +@@ -69,6 +69,15 @@ static const vo_info_t info = { + + const LIBVO_EXTERN(gif89a) + ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++#define EGifOpenFileName(a, b) EGifOpenFileName(a, b, NULL) ++#define MakeMapObject GifMakeMapObject ++#define FreeMapObject GifFreeMapObject ++#define QuantizeBuffer GifQuantizeBuffer ++#if defined GIFLIB_MINOR && GIFLIB_MINOR >= 1 ++#define EGifCloseFile(a) EGifCloseFile(a, NULL) ++#endif ++#endif + + // how many frames per second we are aiming for during output. + static float target_fps; +@@ -92,6 +101,8 @@ static uint32_t img_width; + static uint32_t img_height; + // image data for slice rendering + static uint8_t *slice_data = NULL; ++// pointer for whole frame rendering ++static uint8_t *frame_data = NULL; + // reduced image data for flip_page + static uint8_t *reduce_data = NULL; + // reduced color map for flip_page +@@ -156,7 +167,7 @@ static int config(uint32_t s_width, uint + uint32_t d_height, uint32_t flags, char *title, + uint32_t format) + { +-#ifdef CONFIG_GIF_4 ++#if defined CONFIG_GIF_4 || GIFLIB_MAJOR >= 5 + // these are control blocks for the gif looping extension. + char LB1[] = "NETSCAPE2.0"; + char LB2[] = { 1, 0, 0 }; +@@ -185,23 +196,25 @@ static int config(uint32_t s_width, uint + return 1; + } + ++ new_gif = EGifOpenFileName(gif_filename, 0); ++ if (new_gif == NULL) { ++ mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename); ++ return 1; ++ } ++ ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++ EGifSetGifVersion(new_gif, 1); ++#elif defined CONFIG_GIF_4 + // the EGifSetGifVersion line causes segfaults in certain + // earlier versions of libungif. i don't know exactly which, + // but certainly in all those before v4. if you have problems, + // you need to upgrade your gif library. +-#ifdef CONFIG_GIF_4 + EGifSetGifVersion("89a"); + #else + mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Your version of libungif needs to be upgraded.\n"); + mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Some functionality has been disabled.\n"); + #endif + +- new_gif = EGifOpenFileName(gif_filename, 0); +- if (new_gif == NULL) { +- mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename); +- return 1; +- } +- + slice_data = malloc(img_width * img_height * 3); + if (slice_data == NULL) { + mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: malloc failed.\n"); +@@ -231,7 +244,12 @@ static int config(uint32_t s_width, uint + + // set the initial width and height info. + EGifPutScreenDesc(new_gif, s_width, s_height, 256, 0, reduce_cmap); +-#ifdef CONFIG_GIF_4 ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++ EGifPutExtensionLeader(new_gif, 0xFF); ++ EGifPutExtensionBlock(new_gif, 11, LB1); ++ EGifPutExtensionBlock(new_gif, 3, LB2); ++ EGifPutExtensionTrailer(new_gif); ++#elif defined CONFIG_GIF_4 + // version 3 of libungif does not support multiple control blocks. + // looping requires multiple control blocks. + // therefore, looping is only enabled for v4 and up. +@@ -311,7 +329,8 @@ static void flip_page(void) + + static int draw_frame(uint8_t *src[]) + { +- return 1; ++ frame_data = src[0]; ++ return 0; + } + + static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y) +@@ -370,6 +389,7 @@ static void uninit(void) + // set the pointers back to null. + new_gif = NULL; + gif_filename = NULL; ++ frame_data = NULL; + slice_data = NULL; + reduce_data = NULL; + reduce_cmap = NULL; Property changes on: branches/2015Q3/multimedia/mplayer2/files/patch-libvo_vo_gif89a.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2015Q3 =================================================================== --- branches/2015Q3 (revision 395575) +++ branches/2015Q3 (revision 395576) Property changes on: branches/2015Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r395460