summaryrefslogtreecommitdiff
path: root/multimedia/mplayer-share
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/mplayer-share')
-rw-r--r--multimedia/mplayer-share/Makefile3
-rw-r--r--multimedia/mplayer-share/Makefile.common4
-rw-r--r--multimedia/mplayer-share/distinfo40
-rw-r--r--multimedia/mplayer-share/options.mk7
-rw-r--r--multimedia/mplayer-share/patches/patch-CVE-2014-461049
-rw-r--r--multimedia/mplayer-share/patches/patch-aa88
-rw-r--r--multimedia/mplayer-share/patches/patch-an10
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_Makefile15
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_configure58
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_asm.S33
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_simple__idct__arm.S13
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_libvpxenc.c28
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_x86_ac3dsp_init.c78
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_common.h27
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_opencl.c15
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86__cpu.h18
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_asm.h18
-rw-r--r--multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_cpu.c20
-rw-r--r--multimedia/mplayer-share/patches/patch-gui_interface.c14
-rw-r--r--multimedia/mplayer-share/patches/patch-gui_wm_ws.c23
-rw-r--r--multimedia/mplayer-share/patches/patch-libmpdemux_demux__gif.c103
-rw-r--r--multimedia/mplayer-share/patches/patch-libvo_vo__corevideo.h10
-rw-r--r--multimedia/mplayer-share/patches/patch-libvo_vo__gif89a.c31
-rw-r--r--multimedia/mplayer-share/patches/patch-stream_stream__dvdnav.c8
-rw-r--r--multimedia/mplayer-share/patches/patch-sub_osd.c8
-rw-r--r--multimedia/mplayer-share/patches/patch-sub_subreader.c14
26 files changed, 411 insertions, 324 deletions
diff --git a/multimedia/mplayer-share/Makefile b/multimedia/mplayer-share/Makefile
index 480843e32fe..bac5487f7f0 100644
--- a/multimedia/mplayer-share/Makefile
+++ b/multimedia/mplayer-share/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.47 2015/08/17 17:11:26 wiz Exp $
+# $NetBSD: Makefile,v 1.48 2015/11/21 09:47:23 leot Exp $
.include "Makefile.common"
PKGNAME= mplayer-share-${MPLAYER_VERSION}
-PKGREVISION= 10
COMMENT= Documentation used by mplayer and gmplayer
DEPENDS+= mplayer-fonts-[0-9]*:../../fonts/mplayer-fonts
diff --git a/multimedia/mplayer-share/Makefile.common b/multimedia/mplayer-share/Makefile.common
index c6e236d2f10..438c4a44016 100644
--- a/multimedia/mplayer-share/Makefile.common
+++ b/multimedia/mplayer-share/Makefile.common
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.common,v 1.54 2014/11/20 01:41:22 jmcneill Exp $
+# $NetBSD: Makefile.common,v 1.55 2015/11/21 09:47:23 leot Exp $
# used by multimedia/gmplayer/Makefile
# used by multimedia/mencoder/Makefile
# used by multimedia/mplayer/Makefile
-MPLAYER_VERSION= 1.1.1
+MPLAYER_VERSION= 1.2
DISTNAME= MPlayer-${MPLAYER_VERSION}
diff --git a/multimedia/mplayer-share/distinfo b/multimedia/mplayer-share/distinfo
index f3902a312f5..ff5d9a721b2 100644
--- a/multimedia/mplayer-share/distinfo
+++ b/multimedia/mplayer-share/distinfo
@@ -1,22 +1,28 @@
-$NetBSD: distinfo,v 1.88 2015/04/05 08:27:08 dsainty Exp $
+$NetBSD: distinfo,v 1.89 2015/11/21 09:47:23 leot Exp $
-SHA1 (mplayer/MPlayer-1.1.1.tar.xz) = ba2f3bd1442d04b17b0143680850273d928689c1
-RMD160 (mplayer/MPlayer-1.1.1.tar.xz) = 745b3fdf684ba7614dbec2a7143188b7c9cca3a1
-Size (mplayer/MPlayer-1.1.1.tar.xz) = 11202492 bytes
-SHA1 (patch-CVE-2014-4610) = 855276c8e301494942a03e13712cc53615d8f4d5
-SHA1 (patch-aa) = abe6709d87c0a1b4f4da15e93a5bc4d923ed0793
+SHA1 (mplayer/MPlayer-1.2.tar.xz) = 64fad840dfae466ab5ef3be2b6c74058892cd981
+RMD160 (mplayer/MPlayer-1.2.tar.xz) = 6d4c83370affbc7a1f79e59af8d78a2346a2b846
+SHA512 (mplayer/MPlayer-1.2.tar.xz) = ac10dd4facd0d8fbc3454a3a2eae0e0d2ed76fa60f30ebd6f8495632e4541af712ab2d005e88bc2baa8302ccb98d63ba80a051db80d2b76ac928a2bd779b47aa
+Size (mplayer/MPlayer-1.2.tar.xz) = 13019196 bytes
+SHA1 (patch-aa) = 81383178c34b89c2e2eb6132e379294ca1f824f3
SHA1 (patch-ae) = 286f5ac075ea4123a1a6276f97e02a4dda9b3e67
-SHA1 (patch-an) = a1d16ce7a4ff5a2071a7bac1b6836dc197b849e4
-SHA1 (patch-ffmpeg_libavcodec_arm_asm.S) = dfe8670bcbb6e6dc17b65bf6459b9550da06f73f
-SHA1 (patch-ffmpeg_libavcodec_arm_simple__idct__arm.S) = 7ffa3a0dc52afe28a6c184a72586a1392719d885
-SHA1 (patch-ffmpeg_libavutil_x86__cpu.h) = ea2c6e179840c7746930848b751b6fd1dcd67e90
-SHA1 (patch-gui_interface.c) = b5b1b2da84aaa7555e9ff8b75186684e2439717d
+SHA1 (patch-an) = 330c427e30b686165fda15a85b730a3f53e0d217
+SHA1 (patch-ffmpeg_Makefile) = c42d63935e824bd4006b40575b3e56e1645a32d2
+SHA1 (patch-ffmpeg_configure) = 43adffa6ff6a781875950a20adeb837b4eafd9b7
+SHA1 (patch-ffmpeg_libavcodec_libvpxenc.c) = 85fb37d2cf8361faa649b41fc6c36ac261314d39
+SHA1 (patch-ffmpeg_libavcodec_x86_ac3dsp_init.c) = bbf84edc6b74721e31c0952b461131eac4499026
+SHA1 (patch-ffmpeg_libavutil_common.h) = 20fe12a85d253caeeca90e09fcecdc929d2d9e34
+SHA1 (patch-ffmpeg_libavutil_opencl.c) = 5146acb650e699f1e1d05efa4575cec825b7c2eb
+SHA1 (patch-ffmpeg_libavutil_x86_asm.h) = 4010a5f5a7fd6e22c81f7e56fde5f0a474ad89e2
+SHA1 (patch-ffmpeg_libavutil_x86_cpu.c) = a298feb778bc1d50e1abf4c0b56b9db97ab13c42
+SHA1 (patch-gui_interface.c) = 04c347b6cb0a54132e6b089142c8ed282f583a1c
+SHA1 (patch-gui_wm_ws.c) = cdffd469d7b1fcc63016fa506d53304b24624235
SHA1 (patch-libao2_ao_sun.c) = ce7042b394b9b8c051597c734b70290c8bf0a8d5
-SHA1 (patch-libmpdemux_demux__gif.c) = 4efec4ea1fe395e24760530e532d3251c64a8fb8
-SHA1 (patch-libvo_vo__corevideo.h) = 2d0b1702363227363343a29060a7b027ce96b5bb
-SHA1 (patch-libvo_vo__gif89a.c) = 88e20df5ea5d5f294d312dddab08cb0e40fb8483
+SHA1 (patch-libmpdemux_demux__gif.c) = 6c7f6d0a89835b64eecead148597bb277be38fd9
+SHA1 (patch-libvo_vo__corevideo.h) = c29a24266edb6727dda68a378fac413b5b0ab7ec
+SHA1 (patch-libvo_vo__gif89a.c) = f7ee649bebef4b7f3fd4659613f61667109ee825
SHA1 (patch-stream_dvb_tune.c) = 46cb5fb4700d7da5ed997dd468033c1edbe9be03
SHA1 (patch-stream_dvbin.h) = ee4f74eb786100e7cc62be228d73ce29d88638d1
-SHA1 (patch-stream_stream__dvdnav.c) = 25215d7764fe481f7cec85b30dc554aeda448fd0
-SHA1 (patch-sub_osd.c) = 00dceec6ddd10d5ccb6561a18663fe1ca0635be5
-SHA1 (patch-sub_subreader.c) = dc653c1e1cc9583a7e0998b4000e87859a4753a0
+SHA1 (patch-stream_stream__dvdnav.c) = 6f7e54629b32c83de8e4b31fe414b78f6043e0e8
+SHA1 (patch-sub_osd.c) = 95f1bc1c20f181720a2a073acbb3abdde3921608
+SHA1 (patch-sub_subreader.c) = 3ec0d3824b6e9fe34cb33e9463d833868f0b03c1
diff --git a/multimedia/mplayer-share/options.mk b/multimedia/mplayer-share/options.mk
index 22eedfb1786..a0ac006a279 100644
--- a/multimedia/mplayer-share/options.mk
+++ b/multimedia/mplayer-share/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.52 2015/04/05 08:27:08 dsainty Exp $
+# $NetBSD: options.mk,v 1.53 2015/11/21 09:47:23 leot Exp $
.if defined(PKGNAME) && empty(PKGNAME:Mmplayer-share*)
@@ -167,10 +167,8 @@ CONFIGURE_ARGS+= --enable-libdv
CONFIGURE_ARGS+= --disable-libdv
.endif
-CONFIGURE_ARGS+= --disable-dvdread-internal
.if !empty(PKG_OPTIONS:Mdvdread)
CONFIGURE_ARGS+= --enable-dvdread
-CONFIGURE_ARGS+= --with-dvdread-config=${BUILDLINK_PREFIX.libdvdread}/bin/dvdread-config
. include "../../multimedia/libdvdread/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-dvdread
@@ -178,7 +176,6 @@ CONFIGURE_ARGS+= --disable-dvdread
.if !empty(PKG_OPTIONS:Mdvdnav)
CONFIGURE_ARGS+= --enable-dvdnav
-CONFIGURE_ARGS+= --with-dvdnav-config=${BUILDLINK_PREFIX.libdvdnav}/bin/dvdnav-config
. include "../../multimedia/libdvdnav/buildlink3.mk"
#CFLAGS+= -I${BUILDLINK_PREFIX.libdvdnav}/include/dvdnav
.else
@@ -326,7 +323,7 @@ CONFIGURE_ARGS+= --disable-vidix
.endif
.if !empty(PKG_OPTIONS:Mvorbis)
-CONFIGURE_ARGS+= --enable-libvorbis
+. include "../../audio/libvorbis/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libvorbis
.endif
diff --git a/multimedia/mplayer-share/patches/patch-CVE-2014-4610 b/multimedia/mplayer-share/patches/patch-CVE-2014-4610
deleted file mode 100644
index 958071865bf..00000000000
--- a/multimedia/mplayer-share/patches/patch-CVE-2014-4610
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD: patch-CVE-2014-4610,v 1.1 2014/06/27 15:58:44 drochner Exp $
-
-from ffmpeg 1.2.6->1.2.7
-
---- ffmpeg/libavutil/lzo.c.orig 2014-06-27 15:38:28.000000000 +0000
-+++ ffmpeg/libavutil/lzo.c
-@@ -20,6 +20,7 @@
- */
-
- #include "avutil.h"
-+#include "avassert.h"
- #include "common.h"
- /// Avoid e.g. MPlayers fast_memcpy, it slows things down here.
- #undef memcpy
-@@ -62,7 +63,13 @@ static inline int get_byte(LZOContext *c
- static inline int get_len(LZOContext *c, int x, int mask) {
- int cnt = x & mask;
- if (!cnt) {
-- while (!(x = get_byte(c))) cnt += 255;
-+ while (!(x = get_byte(c))) {
-+ if (cnt >= INT_MAX - 1000) {
-+ c->error |= AV_LZO_ERROR;
-+ break;
-+ }
-+ cnt += 255;
-+ }
- cnt += mask + x;
- }
- return cnt;
-@@ -88,6 +95,7 @@ static inline int get_len(LZOContext *c,
- static inline void copy(LZOContext *c, int cnt) {
- register const uint8_t *src = c->in;
- register uint8_t *dst = c->out;
-+ av_assert0(cnt >= 0);
- if (cnt > c->in_end - src) {
- cnt = FFMAX(c->in_end - src, 0);
- c->error |= AV_LZO_INPUT_DEPLETED;
-@@ -119,9 +127,9 @@ static inline void memcpy_backptr(uint8_
- * thus creating a repeating pattern with a period length of back.
- */
- static inline void copy_backptr(LZOContext *c, int back, int cnt) {
-- register const uint8_t *src = &c->out[-back];
- register uint8_t *dst = c->out;
-- if (src < c->out_start || src > dst) {
-+ av_assert0(cnt > 0);
-+ if (dst - c->out_start < back) {
- c->error |= AV_LZO_INVALID_BACKPTR;
- return;
- }
diff --git a/multimedia/mplayer-share/patches/patch-aa b/multimedia/mplayer-share/patches/patch-aa
index 25fa6c940d5..9286d9c14a2 100644
--- a/multimedia/mplayer-share/patches/patch-aa
+++ b/multimedia/mplayer-share/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.32 2015/04/05 08:27:08 dsainty Exp $
+$NetBSD: patch-aa,v 1.33 2015/11/21 09:47:23 leot Exp $
o Handle properly sh3 and evbarm ports on NetBSD.
o Fix CPU family detection on NetBSD with /proc mounted with "-o linux"
@@ -8,12 +8,21 @@ o Add necessary libs for aalib support even if the aa option is turned on with
--enable-aa.
o Add support for dvb capture on NetBSD.
---- configure.orig 2012-05-22 14:01:51.000000000 -0400
-+++ configure 2013-01-11 22:15:07.000000000 -0500
-@@ -1519,8 +1519,9 @@
- alpha) host_arch=alpha ;;
+--- configure.orig 2015-10-02 20:29:04.000000000 +0000
++++ configure
+@@ -1640,7 +1640,7 @@ else
+ cc_name=$cc_name_tmp
+ echocheck "$_cc version"
+ cc_vendor=gnu
+- cc_version=$($_cc -dumpversion 2>&1)
++ cc_version=$( ( $_cc -dumpversion | sed -e 's/-nb[0-9]//' ) 2>&1 )
+ case $cc_version in
+ 2.96*)
+ cc_fail=yes
+@@ -1717,8 +1717,9 @@ if test -z "$_target" ; then
sun4*|sparc*) host_arch=sparc ;;
parisc*|hppa*|9000*) host_arch=hppa ;;
+ aarch64*) host_arch=aarch64 ;;
- arm*|zaurus|cats) host_arch=arm ;;
- sh3|sh4|sh4a) host_arch=sh ;;
+ arm*|zaurus|cats|evbarm) host_arch=arm ;;
@@ -22,16 +31,7 @@ o Add support for dvb capture on NetBSD.
s390) host_arch=s390 ;;
s390x) host_arch=s390x ;;
*mips*) host_arch=mips ;;
-@@ -1674,7 +1675,7 @@
- cc_name=$cc_name_tmp
- echocheck "$_cc version"
- cc_vendor=gnu
-- cc_version=$($_cc -dumpversion 2>&1)
-+ cc_version=$( ( $_cc -dumpversion | sed -e 's/-nb[0-9]//' ) 2>&1 )
- case $cc_version in
- 2.96*)
- cc_fail=yes
-@@ -1798,7 +1799,7 @@
+@@ -1930,7 +1931,7 @@ if x86 ; then
# gather more CPU information
pname=$($_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -n 1)
pvendor=$($_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
@@ -40,7 +40,7 @@ o Add support for dvb capture on NetBSD.
pmodel=$($_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
pstepping=$($_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -n 1)
-@@ -2274,7 +2275,12 @@
+@@ -2446,7 +2447,12 @@ case "$host_arch" in
test $_fast_clz = "auto" && _fast_clz=yes
;;
@@ -54,16 +54,37 @@ o Add support for dvb capture on NetBSD.
arch='sh4'
iproc='sh4'
;;
-@@ -2591,7 +2597,7 @@
- # Checking for CFLAGS
+@@ -2783,23 +2789,23 @@ fi # if darwin && test "$cc_vendor" = "g
_install_strip="-s"
- if test "$_profile" != "" || test "$_debug" != "" ; then
-- CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile"
-+ CFLAGS="$CFLAGS $_debug $_profile"
- WARNFLAGS="-W -Wall"
- _install_strip=
- elif test -z "$CFLAGS" ; then
-@@ -4288,7 +4294,11 @@
+ if test -z "$CFLAGS" || test "$_profile" != "" || test "$_debug" != ""; then
+ if test "$cc_vendor" = "intel" ; then
+- CFLAGS="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer"
++ CFLAGS="$CFLAGS -fomit-frame-pointer"
+ WARNFLAGS="-wd167 -wd556 -wd144"
+ elif test "$cc_vendor" = "sun" ; then
+- CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
++ CFLAGS="$CFLAGS -xc99 -xregs=frameptr"
+ elif test "$cc_vendor" = "clang"; then
+- CFLAGS="-O2 $_march $_pipe"
++ CFLAGS="$CFLAGS"
+ elif test "$cc_vendor" != "gnu" ; then
+- CFLAGS="-O2 $_march $_mcpu $_pipe"
++ CFLAGS="$CFLAGS"
+ else
+- CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
++ CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer"
+ WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security"
+ WARN_CFLAGS="-Werror-implicit-function-declaration"
+ extra_ldflags="$extra_ldflags -ffast-math"
+ fi
+
+ if test "$_profile" != "" || test "$_debug" != ""; then
+- CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile"
++ CFLAGS="$CFLAGS $_debug $_profile"
+ WARNFLAGS="-W -Wall $WARNFLAGS"
+ _install_strip=
+ fi
+@@ -4591,7 +4597,11 @@ if test "$_x11" = auto && test "$_x11_he
-L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/X11R6/lib64 \
-L/usr/lib ; do
if netbsd; then
@@ -76,7 +97,7 @@ o Add support for dvb capture on NetBSD.
else
ld_tmp="$I -lXext -lX11 $ld_pthread"
fi
-@@ -4669,6 +4679,8 @@
+@@ -4994,6 +5004,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)"
@@ -85,7 +106,7 @@ o Add support for dvb capture on NetBSD.
fi
vomodules="aa $vomodules"
else
-@@ -4756,7 +4768,6 @@
+@@ -5081,7 +5093,6 @@ EOF
extra_cflags="$extra_cflags $inc_tmp" && break
done
fi
@@ -93,7 +114,7 @@ o Add support for dvb capture on NetBSD.
if test "$_dvb" = yes ; then
_dvbin=yes
inputmodules="dvb $inputmodules"
-@@ -4765,14 +4776,29 @@
+@@ -5090,14 +5101,29 @@ if test "$_dvb" = yes ; then
aomodules="mpegpes(dvb) $aomodules"
vomodules="mpegpes(dvb) $vomodules"
else
@@ -129,14 +150,3 @@ o Add support for dvb capture on NetBSD.
if darwin; then
-@@ -7764,8 +7790,8 @@
- cflags_libdvdnav="-Ilibdvdnav"
- inputmodules="dvdnav(internal) $inputmodules"
- else
-- extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
-- extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
-+ extra_cflags="$extra_cflags $($_pkg_config --cflags dvdnav)"
-+ extra_ldflags="$extra_ldflags $($_pkg_config --libs dvdnav)"
- inputmodules="dvdnav $inputmodules"
- fi
- else
diff --git a/multimedia/mplayer-share/patches/patch-an b/multimedia/mplayer-share/patches/patch-an
index d53a6e2a62f..59582e70280 100644
--- a/multimedia/mplayer-share/patches/patch-an
+++ b/multimedia/mplayer-share/patches/patch-an
@@ -1,10 +1,10 @@
-$NetBSD: patch-an,v 1.4 2012/06/11 21:55:34 wiz Exp $
+$NetBSD: patch-an,v 1.5 2015/11/21 09:47:23 leot Exp $
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=751
Please also see: pkg/20549.
---- stream/vcd_read_fbsd.h.orig 2011-05-07 21:32:50.000000000 +0000
+--- stream/vcd_read_fbsd.h.orig 2013-12-02 13:53:03.000000000 +0000
+++ stream/vcd_read_fbsd.h
@@ -63,9 +63,8 @@ typedef struct mp_vcd_priv_st {
vcd_tocentry entry;
@@ -15,9 +15,9 @@ Please also see: pkg/20549.
#endif
+ cdsector_t buf;
struct ioc_toc_header tochdr;
+ unsigned int track;
} mp_vcd_priv_t;
-
-@@ -236,8 +235,8 @@ vcd_read(mp_vcd_priv_t* vcd, char *mem)
+@@ -237,8 +236,8 @@ vcd_read(mp_vcd_priv_t* vcd, char *mem)
sc.cmd[9] = 1 << 4; // user data only
sc.cmd[10] = 0; // no subchannel
sc.cmdlen = 12;
@@ -28,7 +28,7 @@ Please also see: pkg/20549.
sc.senselen = sizeof(sc.sense);
sc.flags = SCCMD_READ;
sc.timeout = 10000;
-@@ -254,9 +253,9 @@ vcd_read(mp_vcd_priv_t* vcd, char *mem)
+@@ -255,9 +254,9 @@ vcd_read(mp_vcd_priv_t* vcd, char *mem)
#else
if (pread(vcd->fd,&vcd->buf,VCD_SECTOR_SIZE,vcd_get_msf(vcd)*VCD_SECTOR_SIZE)
!= VCD_SECTOR_SIZE) return 0; // EOF?
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_Makefile b/multimedia/mplayer-share/patches/patch-ffmpeg_Makefile
new file mode 100644
index 00000000000..ca342dc1ec9
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_Makefile
@@ -0,0 +1,15 @@
+$NetBSD: patch-ffmpeg_Makefile,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+--- ffmpeg/Makefile.orig 2012-09-28 01:37:35.000000000 +0000
++++ ffmpeg/Makefile
+@@ -139,8 +139,8 @@ install-progs: install-progs-yes $(PROGS
+
+ install-data: $(DATA_FILES) $(EXAMPLES_FILES)
+ $(Q)mkdir -p "$(DATADIR)/examples"
+- $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
+- $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
++ $(INSTALL) -c -m 644 $(DATA_FILES) "$(DATADIR)"
++ $(INSTALL) -c -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
+
+ uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
+
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_configure b/multimedia/mplayer-share/patches/patch-ffmpeg_configure
new file mode 100644
index 00000000000..6550c33e410
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_configure
@@ -0,0 +1,58 @@
+$NetBSD: patch-ffmpeg_configure,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+--- ffmpeg/configure.orig 2015-06-19 20:47:55.000000000 +0000
++++ ffmpeg/configure
+@@ -4197,6 +4197,11 @@ case $target_os in
+ ;;
+ netbsd)
+ disable symver
++ # NetBSD/macppc *really* needs PIC enabled. ffmpeg has repeatedly
++ # broken time and time again because PIC support has been removed
++ # from architectures that need it. So, if you touch this, please
++ # be careful and make sure that your changes work.
++ test "${subarch}" != "x86_32" && enable pic
+ oss_indev_extralibs="-lossaudio"
+ oss_outdev_extralibs="-lossaudio"
+ enabled gcc || check_ldflags -Wl,-zmuldefs
+@@ -4602,10 +4607,13 @@ check_cc <<EOF && enable attribute_may_a
+ union { int x; } __attribute__((may_alias)) x;
+ EOF
+
+-check_cc <<EOF || die "endian test failed"
+-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
++check_exec <<EOF || enable bigendian
++int main()
++{
++ long one = 1;
++ return !(*((char *)(&one)));
++}
+ EOF
+-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
+
+ if ! enabled ppc64 || enabled bigendian; then
+ disable vsx
+@@ -5426,6 +5434,7 @@ enabled xmm_clobber_test &&
+ -Wl,--wrap,sws_scale ||
+ disable xmm_clobber_test
+
++if false; then
+ echo "X{};" > $TMPV
+ if test_ldflags -Wl,--version-script,$TMPV; then
+ append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
+@@ -5438,6 +5447,7 @@ __asm__(".symver ff_foo,av_foo@VERSION")
+ void ff_foo(void) {}
+ EOF
+ fi
++fi
+
+ if [ -z "$optflags" ]; then
+ if enabled small; then
+@@ -6041,7 +6051,7 @@ Version: $version
+ Requires: $(enabled shared || echo $requires)
+ Requires.private: $(enabled shared && echo $requires)
+ Conflicts:
+-Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs)
++Libs: -L\${libdir} -Wl,-R\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs)
+ Libs.private: $(enabled shared && echo $libs)
+ Cflags: -I\${includedir}
+ EOF
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_asm.S b/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_asm.S
deleted file mode 100644
index 99d847b9b5d..00000000000
--- a/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_asm.S
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-ffmpeg_libavcodec_arm_asm.S,v 1.1 2015/03/24 14:27:20 joerg Exp $
-
---- ffmpeg/libavcodec/arm/asm.S.orig 2015-03-23 19:38:11.000000000 +0000
-+++ ffmpeg/libavcodec/arm/asm.S
-@@ -64,7 +64,11 @@ ELF .eabi_attribute 25, \val
- .macro function name, export=0
- .macro endfunc
- ELF .size \name, . - \name
-+#ifdef __ARM_DWARF_EH__
-+ .cfi_endproc
-+#else
- .endfunc
-+#endif
- .purgem endfunc
- .endm
- .text
-@@ -72,10 +76,15 @@ ELF .size \name, . - \name
- .if \export
- .global EXTERN_ASM\name
- EXTERN_ASM\name:
-+ .else
-+\name:
- .endif
- ELF .type \name, %function
-+#ifdef __ARM_DWARF_EH__
-+ .cfi_startproc
-+#else
- .func \name
--\name:
-+#endif
- .endm
-
- .macro const name, align=2
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_simple__idct__arm.S b/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_simple__idct__arm.S
deleted file mode 100644
index 8331eff0c09..00000000000
--- a/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_arm_simple__idct__arm.S
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ffmpeg_libavcodec_arm_simple__idct__arm.S,v 1.1 2015/03/24 14:27:20 joerg Exp $
-
---- ffmpeg/libavcodec/arm/simple_idct_arm.S.orig 2015-03-23 19:55:14.000000000 +0000
-+++ ffmpeg/libavcodec/arm/simple_idct_arm.S
-@@ -489,7 +489,7 @@ __end_bef_a_evaluation:
- sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3)
- add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0)
- bal __end_a_evaluation
--
-+endfunc
-
- .align
- __constant_ptr__: @@ see #defines at the beginning of the source code for values.
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_libvpxenc.c b/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_libvpxenc.c
new file mode 100644
index 00000000000..3321d9ecce5
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_libvpxenc.c
@@ -0,0 +1,28 @@
+$NetBSD: patch-ffmpeg_libavcodec_libvpxenc.c,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+Fix build with libvpx version 1.5.0 and newer. Fix taken from here:
+
+http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=6540fe04a3f9a11ba7084a49b3ee5fa2fc5b32ab#patch1
+
+--- ffmpeg/libavcodec/libvpxenc.c.orig 2015-09-09 02:17:45.000000000 +0100
++++ ffmpeg/libavcodec/libvpxenc.c 2015-11-20 18:25:02.000000000 +0000
+@@ -104,19 +104,11 @@
+
+ /** String mappings for enum vp8e_enc_control_id */
+ static const char *const ctlidstr[] = {
+- [VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY",
+- [VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE",
+- [VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE",
+- [VP8E_SET_ROI_MAP] = "VP8E_SET_ROI_MAP",
+- [VP8E_SET_ACTIVEMAP] = "VP8E_SET_ACTIVEMAP",
+- [VP8E_SET_SCALEMODE] = "VP8E_SET_SCALEMODE",
+ [VP8E_SET_CPUUSED] = "VP8E_SET_CPUUSED",
+ [VP8E_SET_ENABLEAUTOALTREF] = "VP8E_SET_ENABLEAUTOALTREF",
+ [VP8E_SET_NOISE_SENSITIVITY] = "VP8E_SET_NOISE_SENSITIVITY",
+- [VP8E_SET_SHARPNESS] = "VP8E_SET_SHARPNESS",
+ [VP8E_SET_STATIC_THRESHOLD] = "VP8E_SET_STATIC_THRESHOLD",
+ [VP8E_SET_TOKEN_PARTITIONS] = "VP8E_SET_TOKEN_PARTITIONS",
+- [VP8E_GET_LAST_QUANTIZER] = "VP8E_GET_LAST_QUANTIZER",
+ [VP8E_SET_ARNR_MAXFRAMES] = "VP8E_SET_ARNR_MAXFRAMES",
+ [VP8E_SET_ARNR_STRENGTH] = "VP8E_SET_ARNR_STRENGTH",
+ [VP8E_SET_ARNR_TYPE] = "VP8E_SET_ARNR_TYPE",
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_x86_ac3dsp_init.c b/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_x86_ac3dsp_init.c
new file mode 100644
index 00000000000..4b894f6bc7a
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_libavcodec_x86_ac3dsp_init.c
@@ -0,0 +1,78 @@
+$NetBSD: patch-ffmpeg_libavcodec_x86_ac3dsp_init.c,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+Fix from PR pkg/48680
+
+--- ffmpeg/libavcodec/x86/ac3dsp_init.c.orig 2014-06-02 23:18:54.000000000 +0200
++++ ffmpeg/libavcodec/x86/ac3dsp_init.c 2014-06-14 21:27:55.000000000 +0200
+@@ -84,11 +84,11 @@
+ "shufps $0, %%xmm6, %%xmm6 \n" \
+ "shufps $0, %%xmm7, %%xmm7 \n" \
+ "1: \n" \
+- "movaps (%0, %2), %%xmm0 \n" \
+- "movaps (%0, %3), %%xmm1 \n" \
+- "movaps (%0, %4), %%xmm2 \n" \
+- "movaps (%0, %5), %%xmm3 \n" \
+- "movaps (%0, %6), %%xmm4 \n" \
++ "movups (%0, %2), %%xmm0 \n" \
++ "movups (%0, %3), %%xmm1 \n" \
++ "movups (%0, %4), %%xmm2 \n" \
++ "movups (%0, %5), %%xmm3 \n" \
++ "movups (%0, %6), %%xmm4 \n" \
+ "mulps %%xmm5, %%xmm0 \n" \
+ "mulps %%xmm6, %%xmm1 \n" \
+ "mulps %%xmm5, %%xmm2 \n" \
+@@ -99,8 +99,8 @@
+ "addps %%xmm3, %%xmm0 \n" \
+ "addps %%xmm4, %%xmm2 \n" \
+ mono("addps %%xmm2, %%xmm0 \n") \
+- "movaps %%xmm0, (%0, %2) \n" \
+- stereo("movaps %%xmm2, (%0, %3) \n") \
++ "movups %%xmm0, (%0, %2) \n" \
++ stereo("movups %%xmm2, (%0, %3) \n") \
+ "add $16, %0 \n" \
+ "jl 1b \n" \
+ : "+&r"(i) \
+@@ -120,24 +120,26 @@
+ "mov %5, %2 \n" \
+ "1: \n" \
+ "mov -%c7(%6, %2, %c8), %3 \n" \
+- "movaps (%3, %0), %%xmm0 \n" \
++ "movups (%3, %0), %%xmm0 \n" \
+ stereo("movaps %%xmm0, %%xmm1 \n") \
+ "mulps %%xmm4, %%xmm0 \n" \
+ stereo("mulps %%xmm5, %%xmm1 \n") \
+ "2: \n" \
+ "mov (%6, %2, %c8), %1 \n" \
+- "movaps (%1, %0), %%xmm2 \n" \
++ "movups (%1, %0), %%xmm2 \n" \
+ stereo("movaps %%xmm2, %%xmm3 \n") \
+- "mulps (%4, %2, 8), %%xmm2 \n" \
+- stereo("mulps 16(%4, %2, 8), %%xmm3 \n") \
++ "movups (%4, %2, 8), %%xmm4 \n" \
++ "mulps %%xmm4, %%xmm2 \n" \
++ stereo("movups 16(%4, %2, 8), %%xmm4 \n") \
++ stereo("mulps %%xmm4, %%xmm3 \n") \
+ "addps %%xmm2, %%xmm0 \n" \
+ stereo("addps %%xmm3, %%xmm1 \n") \
+ "add $4, %2 \n" \
+ "jl 2b \n" \
+ "mov %5, %2 \n" \
+ stereo("mov (%6, %2, %c8), %1 \n") \
+- "movaps %%xmm0, (%3, %0) \n" \
+- stereo("movaps %%xmm1, (%1, %0) \n") \
++ "movups %%xmm0, (%3, %0) \n" \
++ stereo("movups %%xmm1, (%1, %0) \n") \
+ "add $16, %0 \n" \
+ "jl 1b \n" \
+ : "+&r"(i), "=&r"(j), "=&r"(k), "=&r"(m) \
+@@ -180,8 +182,8 @@
+ "movss 4(%2, %0), %%xmm5 \n"
+ "shufps $0, %%xmm4, %%xmm4 \n"
+ "shufps $0, %%xmm5, %%xmm5 \n"
+- "movaps %%xmm4, (%1, %0, 4) \n"
+- "movaps %%xmm5, 16(%1, %0, 4) \n"
++ "movups %%xmm4, (%1, %0, 4) \n"
++ "movups %%xmm5, 16(%1, %0, 4) \n"
+ "jg 1b \n"
+ : "+&r"(j)
+ : "r"(matrix_simd), "r"(matrix)
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_common.h b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_common.h
new file mode 100644
index 00000000000..70f07d6b1ea
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_common.h
@@ -0,0 +1,27 @@
+$NetBSD: patch-ffmpeg_libavutil_common.h,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+--- ffmpeg/libavutil/common.h.orig 2013-01-06 21:53:29.000000000 +0000
++++ ffmpeg/libavutil/common.h
+@@ -39,6 +39,22 @@
+ #include "version.h"
+ #include "libavutil/avconfig.h"
+
++#if defined(__cplusplus)
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__)
++#undef _STDINT_H_
++#undef _SYS_STDINT_H_
++#undef _STDINT_H
++#undef _GCC_WRAP_STDINT_H
++#ifndef __STDC_CONSTANT_MACROS
++#define __STDC_CONSTANT_MACROS
++#endif
++#include <stdint.h>
++#endif /* FreeBSD | OpenBSD | linux */
++#if defined(__DragonFly__) || defined(__NetBSD__)
++#include <machine/int_const.h>
++#endif /* DragonFly | NetBSD */
++#endif /* __cplusplus */
++
+ #if AV_HAVE_BIGENDIAN
+ # define AV_NE(be, le) (be)
+ #else
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_opencl.c b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_opencl.c
new file mode 100644
index 00000000000..2ffc8101a98
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_opencl.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ffmpeg_libavutil_opencl.c,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+Fix undeclared identifier error.
+
+--- ffmpeg/libavutil/opencl.c.orig 2015-03-16 19:26:04.000000000 +0000
++++ ffmpeg/libavutil/opencl.c
+@@ -423,7 +423,7 @@ cl_program av_opencl_compile(const char
+ cl_program program = NULL;
+
+ LOCK_OPENCL;
+- for (i = 0; i < opencl_ctx.kernel_code_count; i++) {
++ for (int i = 0; i < opencl_ctx.kernel_code_count; i++) {
+ // identify a program using a unique name within the kernel source
+ ptr = av_stristr(opencl_ctx.kernel_code[i].kernel_string, program_name);
+ if (ptr && !opencl_ctx.kernel_code[i].is_compiled) {
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86__cpu.h b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86__cpu.h
deleted file mode 100644
index df9f342d66d..00000000000
--- a/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86__cpu.h
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ffmpeg_libavutil_x86__cpu.h,v 1.1 2014/06/27 12:56:16 jperkin Exp $
-
-Disable certain optimisations on SunOS.
-
---- ffmpeg/libavutil/x86_cpu.h.orig 2013-05-05 18:11:42.000000000 +0000
-+++ ffmpeg/libavutil/x86_cpu.h
-@@ -68,7 +68,11 @@ typedef int32_t x86_reg;
- typedef int x86_reg;
- #endif
-
-+#ifdef __sun
-+#define HAVE_7REGS 0
-+#else
- #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
-+#endif
- #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
-
- #if ARCH_X86_64 && defined(PIC)
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_asm.h b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_asm.h
new file mode 100644
index 00000000000..64d0b1ab42c
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_asm.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-ffmpeg_libavutil_x86_asm.h,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+avoid SunOS regset.h definition for REG_SP
+
+--- ffmpeg/libavutil/x86/asm.h.orig 2014-08-17 13:33:17.000000000 +0000
++++ ffmpeg/libavutil/x86/asm.h
+@@ -27,6 +27,11 @@
+ typedef struct xmm_reg { uint64_t a, b; } xmm_reg;
+ typedef struct ymm_reg { uint64_t a, b, c, d; } ymm_reg;
+
++/* avoid SunOS regset.h definition for REG_SP */
++#if defined (__sun) && defined (REG_SP)
++#undef REG_SP
++#endif
++
+ #if ARCH_X86_64
+ # define OPSIZE "q"
+ # define REG_a "rax"
diff --git a/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_cpu.c b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_cpu.c
new file mode 100644
index 00000000000..e986e14c6cd
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-ffmpeg_libavutil_x86_cpu.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-ffmpeg_libavutil_x86_cpu.c,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+--- ffmpeg/libavutil/x86/cpu.c.orig 2014-03-23 22:07:55.000000000 +0000
++++ ffmpeg/libavutil/x86/cpu.c
+@@ -116,6 +116,7 @@ int ff_get_cpu_flags_x86(void)
+ #if HAVE_SSE
+ if (std_caps & (1 << 25))
+ rval |= AV_CPU_FLAG_SSE;
++#if !defined(__GNUC__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
+ if (std_caps & (1 << 26))
+ rval |= AV_CPU_FLAG_SSE2;
+ if (ecx & 1)
+@@ -138,6 +139,7 @@ int ff_get_cpu_flags_x86(void)
+ }
+ }
+ #endif /* HAVE_AVX */
++#endif /* gcc >= 4.2 */
+ #endif /* HAVE_SSE */
+ }
+ if (max_std_level >= 7) {
diff --git a/multimedia/mplayer-share/patches/patch-gui_interface.c b/multimedia/mplayer-share/patches/patch-gui_interface.c
index cb7ee203e7b..f2be8aa870b 100644
--- a/multimedia/mplayer-share/patches/patch-gui_interface.c
+++ b/multimedia/mplayer-share/patches/patch-gui_interface.c
@@ -1,18 +1,18 @@
-$NetBSD: patch-gui_interface.c,v 1.2 2015/04/05 08:27:08 dsainty Exp $
+$NetBSD: patch-gui_interface.c,v 1.3 2015/11/21 09:47:23 leot Exp $
Add missing global variable to avoid link error.
If DVD support is compiled in, dvd_angle is provided by stream_dvd.c
instead.
---- gui/interface.c.orig 2012-05-21 20:46:25.000000000 +0200
-+++ gui/interface.c 2014-10-09 16:10:41.000000000 +0200
-@@ -54,6 +54,8 @@
-
+--- gui/interface.c.orig 2015-09-08 21:02:40.000000000 +0000
++++ gui/interface.c
+@@ -61,6 +61,8 @@
+ #include "stream/stream.h"
#ifdef CONFIG_DVDREAD
#include "stream/stream_dvd.h"
+#else
+int dvd_angle = 1;
#endif
-
- guiInterface_t guiInfo = {
+ #include "sub/font_load.h"
+ #include "sub/sub.h"
diff --git a/multimedia/mplayer-share/patches/patch-gui_wm_ws.c b/multimedia/mplayer-share/patches/patch-gui_wm_ws.c
new file mode 100644
index 00000000000..0b87da63bf2
--- /dev/null
+++ b/multimedia/mplayer-share/patches/patch-gui_wm_ws.c
@@ -0,0 +1,23 @@
+$NetBSD: patch-gui_wm_ws.c,v 1.1 2015/11/21 09:47:23 leot Exp $
+
+Correctly display the GUI avoiding the following errors:
+
+ [ws] An X11 error has occurred!
+ [ws] Error code: 145 - BadShmSeg (invalid shared segment parameter)
+ [ws] Request code: 139 (minor code: 3)
+ [ws] MPlayer module: vo_check_events
+
+Imported also upstream:
+
+ http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2015-November/073183.html
+
+--- gui/wm/ws.c.orig 2015-08-01 07:44:07.000000000 +0000
++++ gui/wm/ws.c
+@@ -1322,6 +1322,7 @@ void wsImageCreate(wsWindow *win, int w,
+ win->xImage->data = win->Shminfo.shmaddr;
+ win->Shminfo.readOnly = False;
+ XShmAttach(wsDisplay, &win->Shminfo);
++ XSync(wsDisplay, False);
+ shmctl(win->Shminfo.shmid, IPC_RMID, 0);
+ } else
+ #endif
diff --git a/multimedia/mplayer-share/patches/patch-libmpdemux_demux__gif.c b/multimedia/mplayer-share/patches/patch-libmpdemux_demux__gif.c
index 5648ac319d3..c52d64ff85e 100644
--- a/multimedia/mplayer-share/patches/patch-libmpdemux_demux__gif.c
+++ b/multimedia/mplayer-share/patches/patch-libmpdemux_demux__gif.c
@@ -1,13 +1,14 @@
-$NetBSD: patch-libmpdemux_demux__gif.c,v 1.2 2014/05/16 09:49:06 wiz Exp $
+$NetBSD: patch-libmpdemux_demux__gif.c,v 1.3 2015/11/21 09:47:23 leot Exp $
* Fix build with giflib 5.1.
---- libmpdemux/demux_gif.c.orig 2010-12-12 10:37:15.000000000 +0000
+--- libmpdemux/demux_gif.c.orig 2014-10-05 02:39:08.000000000 +0000
+++ libmpdemux/demux_gif.c
-@@ -45,6 +45,18 @@ typedef struct {
+@@ -44,6 +44,18 @@ typedef struct {
+ } gif_priv_t;
#define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F')
-
++
+/* from util/qprintf.c of giflib 5.0.4 */
+void
+PrintGifError(int ErrorCode)
@@ -19,93 +20,15 @@ $NetBSD: patch-libmpdemux_demux__gif.c,v 1.2 2014/05/16 09:49:06 wiz Exp $
+ else
+ fprintf(stderr, "GIF-LIB undefined error %d.\n", ErrorCode);
+}
-+
- #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)
-@@ -94,14 +106,14 @@ static int demux_gif_fill_buffer(demuxer
-
- while (type != IMAGE_DESC_RECORD_TYPE) {
- if (DGifGetRecordType(gif, &type) == GIF_ERROR) {
-- PrintGifError();
-+ PrintGifError(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();
-+ PrintGifError(gif->Error);
- return 0; // oops
- }
- }
-@@ -109,7 +121,7 @@ static int demux_gif_fill_buffer(demuxer
- int code;
- unsigned char *p = NULL;
- if (DGifGetExtension(gif, &code, &p) == GIF_ERROR) {
-- PrintGifError();
-+ PrintGifError(gif->Error);
- return 0; // oops
- }
- if (code == 0xF9) {
-@@ -138,7 +150,7 @@ static int demux_gif_fill_buffer(demuxer
- comments[length] = 0;
- printf("%s", comments);
- if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) {
-- PrintGifError();
-+ PrintGifError(gif->Error);
- return 0; // oops
- }
- }
-@@ -146,7 +158,7 @@ static int demux_gif_fill_buffer(demuxer
- }
- while (p != NULL) {
- if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) {
-- PrintGifError();
-+ PrintGifError(gif->Error);
- return 0; // oops
- }
- }
-@@ -154,7 +166,7 @@ static int demux_gif_fill_buffer(demuxer
- }
-
- if (DGifGetImageDesc(gif) == GIF_ERROR) {
-- PrintGifError();
-+ PrintGifError(gif->Error);
- return 0; // oops
- }
-@@ -167,7 +179,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();
-+ PrintGifError(gif->Error);
- free(buf);
- return 0; // oops
- }
-@@ -257,10 +269,10 @@ static demuxer_t* demux_open_gif(demuxer
- lseek(demuxer->stream->fd, 0, SEEK_SET);
- gif = DGifOpenFileHandle(demuxer->stream->fd);
+ #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
+ #define DGifOpen(a, b) DGifOpen(a, b, NULL)
+@@ -70,7 +82,7 @@ static void print_gif_error(GifFileType
#else
-- gif = DGifOpen(demuxer->stream, my_read_gif);
-+ gif = DGifOpen(demuxer->stream, my_read_gif, NULL);
- #endif
- if (!gif) {
-- PrintGifError();
-+ PrintGifError(gif->Error);
- free(priv);
- return NULL;
- }
-@@ -301,8 +313,8 @@ static void demux_close_gif(demuxer_t* d
+ static void print_gif_error(GifFileType *gif)
{
- gif_priv_t *priv = demuxer->priv;
- if (!priv) return;
-- if (priv->gif && DGifCloseFile(priv->gif) == GIF_ERROR)
-- PrintGifError();
-+ if (priv->gif && DGifCloseFile(priv->gif, NULL) == GIF_ERROR)
-+ PrintGifError(priv->gif->Error);
- free(priv->refimg);
- free(priv);
+- PrintGifError();
++ PrintGifError(gif->Error);
}
+ #endif
+
diff --git a/multimedia/mplayer-share/patches/patch-libvo_vo__corevideo.h b/multimedia/mplayer-share/patches/patch-libvo_vo__corevideo.h
index 994d78b354c..9249e0ae740 100644
--- a/multimedia/mplayer-share/patches/patch-libvo_vo__corevideo.h
+++ b/multimedia/mplayer-share/patches/patch-libvo_vo__corevideo.h
@@ -1,17 +1,17 @@
-$NetBSD: patch-libvo_vo__corevideo.h,v 1.1 2014/06/24 12:03:42 wiz Exp $
+$NetBSD: patch-libvo_vo__corevideo.h,v 1.2 2015/11/21 09:47:23 leot Exp $
Apparently Apple have moved things around. Explicitly include the GL headers
for Mavericks SDK.
---- libvo/vo_corevideo.h.orig 2014-06-24 11:24:53.000000000 +0000
+--- libvo/vo_corevideo.h.orig 2013-10-30 18:51:33.000000000 +0000
+++ libvo/vo_corevideo.h
-@@ -26,6 +26,9 @@
+@@ -26,7 +26,9 @@
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
#import <Carbon/Carbon.h>
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
-+#import <OpenGL/gl.h>
+ #import <OpenGL/gl.h>
+#endif
+ #import "osx_objc_common.h"
// MPlayer OS X VO Protocol
- @protocol MPlayerOSXVOProto
diff --git a/multimedia/mplayer-share/patches/patch-libvo_vo__gif89a.c b/multimedia/mplayer-share/patches/patch-libvo_vo__gif89a.c
index c783c0f3560..c888c90113a 100644
--- a/multimedia/mplayer-share/patches/patch-libvo_vo__gif89a.c
+++ b/multimedia/mplayer-share/patches/patch-libvo_vo__gif89a.c
@@ -1,27 +1,18 @@
-$NetBSD: patch-libvo_vo__gif89a.c,v 1.2 2014/05/16 09:49:06 wiz Exp $
+$NetBSD: patch-libvo_vo__gif89a.c,v 1.3 2015/11/21 09:47:23 leot Exp $
* Fix build with giflib 5.1.
---- libvo/vo_gif89a.c.orig 2011-05-07 10:59:11.000000000 +0000
+--- libvo/vo_gif89a.c.orig 2014-10-05 02:39:08.000000000 +0000
+++ libvo/vo_gif89a.c
@@ -44,6 +44,7 @@
* entire argument being interpretted as the filename.
*/
+#include <stddef.h>
- #include <gif_lib.h>
-
#include <stdio.h>
-@@ -196,7 +197,7 @@ static int config(uint32_t s_width, uint
- mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Some functionality has been disabled.\n");
- #endif
-
-- new_gif = EGifOpenFileName(gif_filename, 0);
-+ new_gif = EGifOpenFileName(gif_filename, 0, NULL);
- if (new_gif == NULL) {
- mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename);
- return 1;
-@@ -215,7 +216,7 @@ static int config(uint32_t s_width, uint
+ #include <stdlib.h>
+ #include <string.h>
+@@ -227,7 +228,7 @@ static int config(uint32_t s_width, uint
return 1;
}
@@ -30,7 +21,7 @@ $NetBSD: patch-libvo_vo__gif89a.c,v 1.2 2014/05/16 09:49:06 wiz Exp $
if (reduce_cmap == NULL) {
free(slice_data); slice_data = NULL;
free(reduce_data); reduce_data = NULL;
-@@ -267,7 +268,7 @@ static int gif_reduce(int width, int hei
+@@ -284,7 +285,7 @@ static int gif_reduce(int width, int hei
}
R = Ra; G = Ga; B = Ba;
@@ -39,15 +30,7 @@ $NetBSD: patch-libvo_vo__gif89a.c,v 1.2 2014/05/16 09:49:06 wiz Exp $
}
static void flip_page(void)
-@@ -358,14 +359,14 @@ static void uninit(void)
- MPLAYER_VERSION, VO_GIF_REVISION,
- "joey@nicewarrior.org");
- EGifPutComment(new_gif, temp);
-- EGifCloseFile(new_gif); // also frees gif storage space.
-+ EGifCloseFile(new_gif, NULL); // also frees gif storage space.
- }
-
- // free our allocated ram
+@@ -377,7 +378,7 @@ static void uninit(void)
free(gif_filename);
free(slice_data);
free(reduce_data);
diff --git a/multimedia/mplayer-share/patches/patch-stream_stream__dvdnav.c b/multimedia/mplayer-share/patches/patch-stream_stream__dvdnav.c
index 0469bb5b309..dfa432d57d8 100644
--- a/multimedia/mplayer-share/patches/patch-stream_stream__dvdnav.c
+++ b/multimedia/mplayer-share/patches/patch-stream_stream__dvdnav.c
@@ -1,10 +1,10 @@
-$NetBSD: patch-stream_stream__dvdnav.c,v 1.1 2015/04/05 08:27:08 dsainty Exp $
+$NetBSD: patch-stream_stream__dvdnav.c,v 1.2 2015/11/21 09:47:23 leot Exp $
Build against libdvdnav 5.0 API.
---- stream/stream_dvdnav.c.orig 2015-04-02 19:11:45.639187166 +1300
-+++ stream/stream_dvdnav.c 2015-04-02 19:15:31.431196527 +1300
-@@ -737,13 +737,13 @@
+--- stream/stream_dvdnav.c.orig 2014-10-24 23:01:02.000000000 +0000
++++ stream/stream_dvdnav.c
+@@ -721,13 +721,13 @@ static int mp_dvdnav_get_aid_from_format
format = dvdnav_audio_stream_format(priv->dvdnav, lg);
switch(format) {
diff --git a/multimedia/mplayer-share/patches/patch-sub_osd.c b/multimedia/mplayer-share/patches/patch-sub_osd.c
index 59332121cb0..21ab7a29cac 100644
--- a/multimedia/mplayer-share/patches/patch-sub_osd.c
+++ b/multimedia/mplayer-share/patches/patch-sub_osd.c
@@ -1,11 +1,11 @@
-$NetBSD: patch-sub_osd.c,v 1.2 2012/06/11 21:55:34 wiz Exp $
+$NetBSD: patch-sub_osd.c,v 1.3 2015/11/21 09:47:23 leot Exp $
XXX: OS X support
---- sub/osd.c.orig 2010-10-27 17:53:24.000000000 +0000
+--- sub/osd.c.orig 2012-09-02 21:17:03.000000000 +0000
+++ sub/osd.c
-@@ -29,6 +29,11 @@
- #include <inttypes.h>
+@@ -31,6 +31,11 @@
+ #include "libmpcodecs/img_format.h"
#include "cpudetect.h"
+#if ARCH_X86 && defined(__APPLE__)
diff --git a/multimedia/mplayer-share/patches/patch-sub_subreader.c b/multimedia/mplayer-share/patches/patch-sub_subreader.c
index 50c1cc1b40f..82fda640692 100644
--- a/multimedia/mplayer-share/patches/patch-sub_subreader.c
+++ b/multimedia/mplayer-share/patches/patch-sub_subreader.c
@@ -1,11 +1,11 @@
-$NetBSD: patch-sub_subreader.c,v 1.2 2012/06/11 21:55:34 wiz Exp $
+$NetBSD: patch-sub_subreader.c,v 1.3 2015/11/21 09:47:23 leot Exp $
Call isspace(3) with unsigned char, instead of char, to handle
non-ASCII characters properly.
---- sub/subreader.c.orig 2012-05-21 19:17:55.000000000 +0000
+--- sub/subreader.c.orig 2014-05-27 19:22:12.000000000 +0000
+++ sub/subreader.c
-@@ -94,10 +94,10 @@ static int eol(char p) {
+@@ -96,10 +96,10 @@ static int eol(char p) {
/* Remove leading and trailing space */
static void trail_space(char *s) {
int i = 0;
@@ -18,7 +18,7 @@ non-ASCII characters properly.
}
static char *stristr(const char *haystack, const char *needle) {
-@@ -742,7 +742,7 @@ static subtitle *sub_read_line_pjs(strea
+@@ -785,7 +785,7 @@ static subtitle *sub_read_line_pjs(strea
if (!stream_read_line (st, line, LINE_LEN, utf16))
return NULL;
/* skip spaces */
@@ -27,7 +27,7 @@ non-ASCII characters properly.
/* allow empty lines at the end of the file */
if (*s==0)
return NULL;
-@@ -795,7 +795,7 @@ static subtitle *sub_read_line_mpsub(str
+@@ -838,7 +838,7 @@ static subtitle *sub_read_line_mpsub(str
else return current;
}
p=line;
@@ -36,7 +36,7 @@ non-ASCII characters properly.
if (eol(*p) && num > 0) return current;
if (eol(*p)) return NULL;
-@@ -1830,18 +1830,18 @@ char * strreplace( char * in,char * what
+@@ -1877,18 +1877,18 @@ char * strreplace( char * in,char * what
static void strcpy_trim(char *d, const char *s)
{
// skip leading whitespace
@@ -58,7 +58,7 @@ non-ASCII characters properly.
s++;
}
if (*s == 0) break;
-@@ -1885,7 +1885,7 @@ static void strcpy_get_ext(char *d, cons
+@@ -1932,7 +1932,7 @@ static void strcpy_get_ext(char *d, cons
static int whiteonly(const char *s)
{
while (*s) {