Hi, At first, thanks Klemens :) The ffmpeg+mpv build required no changes on macppc.
On Sun, 18 Nov 2018 00:40:54 +0100 Klemens Nanni wrote: > According to `port-lib-depends-check' the cd, dvd and v4l related > libraries where extra, so I blatantly removed them including their > LDEP. > > Since I don't have access to CD/DVD (readers), can anyone test mpv > with playing physical media? > I don't have DVDs, but cdda support will require to bring back libcdio, and reenable support. The diff at the bottom reintroduces it, and still works fine here. About macppc runtime: Audio is ok, but when playing videos with the default gl video output, it segfaults, here is a backtrace: --- (gdb) run Starting program: /usr/local/bin/mpv /tmp/test.mp4 Playing: /tmp/test.mp4 (+) Video --vid=1 (*) (h264 640x480 29.970fps) (+) Audio --aid=1 (*) (aac 2ch 44100Hz) Program received signal SIGSEGV, Segmentation fault. [Switching to thread 428485] 0x0e7cc09c in gl_video_init (ra=Cannot access memory at address 0xc51e93bc ) at ../video/out/gpu/video.c:3784 3784 { (gdb) bt full #0 0x0e7cc09c in gl_video_init (ra=Cannot access memory at address #0xc51e93bc ) at ../video/out/gpu/video.c:3784 p = (struct gl_video *) 0xe010101 opts = (struct gl_video_opts *) 0x1 #1 0x0e7e2670 in preinit (vo=0xb6f7e720) at ../video/out/vo_gpu.c:286 p = (struct gpu_priv *) 0xbe9bd0a0 alpha_mode = 3 opts = {allow_sw = 0, want_alpha = 0, debug = 0, probing = false, swapchain_depth = 3} __func__ = "preinit" #2 0xa17d9ab0 in _rthread_start (v=Variable "v" is not available. ) at /usr/src/lib/librthread/rthread.c:96 No locals. #3 0xa17d9ab0 in _rthread_start (v=Variable "v" is not available. ) at /usr/src/lib/librthread/rthread.c:96 No locals. Previous frame inner to this frame (corrupt stack?) --- Using '-vo sdl' allows OpenGL accelerated display, but has no fullscreen support (scaling is wrong). Some OpenGL infos: --- machdep.allowaperture=1 Extended renderer info (GLX_MESA_query_renderer): Max GLES1 profile version: 1.1 Max GLES[23] profile version: 2.0 OpenGL vendor string: X.Org R300 Project OpenGL renderer string: ATI RV350 OpenGL version string: 2.1 Mesa 17.3.9 OpenGL shading language version string: 1.20 OpenGL ES profile version string: OpenGL ES 2.0 Mesa 17.3.9 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16 --- Mplayer runs fine with its own gl backend, and all stuff using OpenGL i've installed work properly on this box. I've totally no idea on how to fix it, but i think we can't let mpv's default invocation generates a segfault, so the diff disables '-vo gl' support only for macpcc, implicitly using the old and working Xv video output by default instead. Charlène. Index: Makefile =================================================================== RCS file: /cvs/ports/multimedia/mpv/Makefile,v retrieving revision 1.44 diff -u -p -r1.44 Makefile --- Makefile 25 Nov 2018 10:09:25 -0000 1.44 +++ Makefile 28 Nov 2018 11:06:43 -0000 @@ -4,17 +4,16 @@ COMMENT = movie player based on MPlayer GH_ACCOUNT = mpv-player GH_PROJECT = mpv -GH_TAGNAME = v0.22.0 -REVISION = 5 +GH_TAGNAME = v0.29.1 CATEGORIES = multimedia x11 -HOMEPAGE = http://mpv.io/ +HOMEPAGE = https://mpv.io/ MAINTAINER = Dmitrij D. Czarkoff <czark...@openbsd.org> -WAF = ${WRKSRC}/waf-1.8.19 -MASTER_SITES0 = http://waf.io/ +WAF = ${WRKSRC}/waf-2.0.12 +MASTER_SITES0 = https://waf.io/ DISTFILES = ${DISTNAME}{${GH_TAGNAME}}${EXTRACT_SUFX} ${WAF:T}:0 EXTRACT_ONLY = ${DISTNAME}${EXTRACT_SUFX} @@ -22,14 +21,11 @@ EXTRACT_ONLY = ${DISTNAME}${EXTRACT_SUF PERMIT_PACKAGE_CDROM = patents PERMIT_PACKAGE_FTP = Yes -WANTLIB += EGL GL SDL2 X11 X11-xcb Xau Xdamage Xdmcp Xext Xfixes -WANTLIB += Xinerama Xrandr Xrender Xss Xv Xxf86vm ass avcodec -WANTLIB += avdevice avfilter avformat avresample avutil bluray -WANTLIB += c cdio cdio_cdda cdio_paranoia drm dvdnav dvdread expat -WANTLIB += fontconfig freetype fribidi gbm iconv jpeg lcms2 m -WANTLIB += opus postproc pthread sndio speex swresample -WANTLIB += swscale v4l2 v4lconvert vpx x264 x265 xcb xcb-dri2 -WANTLIB += xcb-glx z ${MODLUA_WANTLIB} +WANTLIB += ${MODLUA_WANTLIB} EGL GL SDL2 X11 X11-xcb Xau Xdamage Xdmcp Xext +WANTLIB += Xfixes Xinerama Xrandr Xrender Xss Xv Xxf86vm ass avcodec avdevice +WANTLIB += avfilter avformat avutil bluray c cdio cdio_cdda cdio_paranoia +WANTLIB += drm expat fontconfig freetype fribidi gbm iconv jpeg lcms2 m +WANTLIB += postproc pthread sndio swresample swscale xcb xcb-dri2 xcb-glx z MODULES = lang/lua \ lang/python @@ -39,7 +35,6 @@ BUILD_DEPENDS = audio/ladspa \ LIB_DEPENDS = audio/libcdio \ converters/libiconv \ - devel/libdvdread \ devel/sdl2 \ graphics/ffmpeg \ graphics/jpeg \ @@ -58,16 +53,14 @@ CONFIGURE_ARGS = --confloaddir=${SYSCONF --mandir=${LOCALBASE}/man \ --docdir=${LOCALBASE}/share/examples/mpv \ --zshdir=${LOCALBASE}/share/zsh/vendor-completions \ - --enable-encoding \ --enable-sndio \ --enable-sdl2 \ --enable-zsh-comp \ --disable-alsa \ --disable-caca \ - --disable-enca \ + --enable-cdda \ --disable-jack \ --disable-libarchive \ - --disable-libguess \ --disable-rubberband \ --disable-oss-audio \ --disable-openal \ @@ -78,15 +71,12 @@ CONFIGURE_ARGS = --confloaddir=${SYSCONF --disable-uchardet \ --disable-vaapi \ --disable-vaapi-glx \ - --disable-vaapi-hwaccel \ --disable-vaapi-x-egl \ --disable-vaapi-x11 \ --disable-vaapi-wayland \ --disable-vapoursynth \ --disable-vapoursynth-lazy \ --disable-vdpau \ - --disable-vdpau-hwaccel \ - --disable-videotoolbox-hwaccel \ --disable-videotoolbox-gl \ --disable-wayland @@ -102,11 +92,21 @@ WRKBUILD = ${WRKSRC}/${MACHINE_ARCH} CFLAGS += -march=i586 .endif +# mpv segfaults on macppc when playing videos with the default gl backend +# 0x0e7cc09c in gl_video_init (ra=Cannot access memory at address 0xc51e93bc +# ) at ../video/out/gpu/video.c:3784 +.if ${MACHINE_ARCH} == "powerpc" +CONFIGURE_ARGS += --disable-gl +.endif + DO_WAF = cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MODPY_BIN} \ ${WAF} ${MAKE_FLAGS} post-patch: cp ${DISTDIR}/${WAF:T} ${WAF} + +DO_WAF = cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${MODPY_BIN} ${WAF} ${MAKE_FLAGS} do-configure: ${DO_WAF} configure ${CONFIGURE_ARGS} Index: distinfo =================================================================== RCS file: /cvs/ports/multimedia/mpv/distinfo,v retrieving revision 1.19 diff -u -p -r1.19 distinfo --- distinfo 25 Nov 2016 15:02:43 -0000 1.19 +++ distinfo 28 Nov 2018 11:06:43 -0000 @@ -1,4 +1,4 @@ -SHA256 (mpv-0.22.0.tar.gz) = wPmsjw43o5HRkAezM++Hh8L0XXWg1EAcAJjN5SxQgvY= -SHA256 (waf-1.8.19) = LtVHGgjfJY+FV4dXYarWfoCy3IRkgtwRE1o1x3yRtLM= -SIZE (mpv-0.22.0.tar.gz) = 2822645 -SIZE (waf-1.8.19) = 100743 +SHA256 (mpv-0.29.1.tar.gz) = +fnUYdGZD5coZgtMyw6MtdzinMqmr1Z77EgbeSkcpiM= +SHA256 (waf-2.0.12) = CXnKh/RZKODXUgSasvQ76FUSSb5z3FVjuUTsVPiHHR8= +SIZE (mpv-0.29.1.tar.gz) = 3059503 +SIZE (waf-2.0.12) = 103377 Index: patches/patch-waftools_detections_compiler_py =================================================================== RCS file: /cvs/ports/multimedia/mpv/patches/patch-waftools_detections_compiler_py,v retrieving revision 1.1 diff -u -p -r1.1 patch-waftools_detections_compiler_py --- patches/patch-waftools_detections_compiler_py 10 Jul 2016 15:27:55 -0000 1.1 +++ patches/patch-waftools_detections_compiler_py 28 Nov 2018 11:06:43 -0000 @@ -1,7 +1,8 @@ $OpenBSD: patch-waftools_detections_compiler_py,v 1.1 2016/07/10 15:27:55 czarkoff Exp $ ---- waftools/detections/compiler.py.orig Fri Jul 8 14:14:10 2016 -+++ waftools/detections/compiler.py Fri Jul 8 14:14:33 2016 -@@ -41,9 +41,7 @@ def __add_generic_flags__(ctx): +Index: waftools/detections/compiler.py +--- waftools/detections/compiler.py.orig ++++ waftools/detections/compiler.py +@@ -42,9 +42,7 @@ def __add_generic_flags__(ctx): def __add_gcc_flags__(ctx): ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow", "-Wno-switch", "-Wparentheses", "-Wpointer-arith",