multimedia/mpv: convert to USES=meson after bc9f898a9c

This commit is contained in:
Jan Beich 2022-10-16 15:23:52 +00:00
parent bc9f898a9c
commit 1d89ec25be
4 changed files with 57 additions and 78 deletions

View File

@ -1,10 +1,9 @@
PORTNAME= mpv
DISTVERSIONPREFIX= v
DISTVERSION= 0.35.0
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= multimedia audio wayland
MASTER_SITES= https://waf.io/:waf
DISTFILES= ${WAF_RELEASE}${EXTRACT_SUFX}:waf
MAINTAINER= multimedia@FreeBSD.org
COMMENT= Free and open-source general-purpose video player
@ -17,28 +16,18 @@ BUILD_DEPENDS= ffmpeg>=4.0.2,1:multimedia/ffmpeg
LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
libass.so:multimedia/libass
USES= compiler:c11 cpe desktop-file-utils iconv jpeg localbase:ldflags \
pkgconfig python:build tar:bz2 waf
USES= compiler:c11 cpe desktop-file-utils iconv jpeg \
meson pkgconfig python:build shebangfix tar:bz2
USE_LDCONFIG= yes
SHEBANG_FILES= *.py TOOLS/*.py
USE_GITHUB= yes
GH_ACCOUNT= mpv-player
# Keep in sync with bootstrap.py to avoid regressions
WAF_CMD= ${WRKDIR}/${WAF_RELEASE}/waf-light
WAF_RELEASE= waf-2.0.20
CONFIGURE_ENV= BIN_PYTHON="${PYTHON_CMD}"
CONFIGURE_ARGS= --docdir="${EXAMPLESDIR}" \
--htmldir="${DOCSDIR}/html" \
--mandir="${MANPREFIX}/man" \
--disable-debug-build \
--disable-optimize \
--disable-pdf \
--disable-rubberband \
--disable-shaderc \
--disable-vapoursynth \
--enable-libmpv-shared
MESON_ARGS= -Dpdf-build=disabled \
-Drubberband=disabled \
-Dshaderc=disabled \
-Dvapoursynth=disabled \
-Dlibmpv=true
CONFLICTS_INSTALL= ${PORTNAME}034
@ -72,129 +61,123 @@ VO_DESC= Video Output
AO_DESC= Audio Output
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_CONFIGURE_OFF= --disable-alsa
ALSA_MESON_ENABLED= alsa
ARCHIVE_USES= libarchive
ARCHIVE_CONFIGURE_ON= --enable-libarchive
ARCHIVE_MESON_ENABLED= libarchive
CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca
CACA_CONFIGURE_OFF= --disable-caca
CACA_MESON_ENABLED= caca
CDIO_LIB_DEPENDS= libcdio_paranoia.so:sysutils/libcdio-paranoia
CDIO_CONFIGURE_ON= --enable-cdda
CDIO_MESON_ENABLED= cdda
DOCS_BUILD_DEPENDS= rst2html:textproc/py-docutils
DOCS_CONFIGURE_ON= --enable-html
DOCS_MESON_ENABLED= html-build
DVDNAV_LIB_DEPENDS= libdvdnav.so:multimedia/libdvdnav \
libdvdread.so:multimedia/libdvdread
DVDNAV_CONFIGURE_ON= --enable-dvdnav
DVDNAV_LIB_DEPENDS= libdvdnav.so:multimedia/libdvdnav
DVDNAV_MESON_ENABLED= dvdnav
JACK_LIB_DEPENDS= libjack.so:audio/jack
JACK_CONFIGURE_OFF= --disable-jack
JACK_MESON_ENABLED= jack
LCMS2_LIB_DEPENDS= liblcms2.so:graphics/lcms2
LCMS2_CONFIGURE_OFF= --disable-lcms2
LCMS2_MESON_ENABLED= lcms2
LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray
LIBBLURAY_CONFIGURE_ON= --enable-libbluray
LIBBLURAY_CONFIGURE_OFF= --disable-libbluray
LIBBLURAY_MESON_ENABLED= libbluray
LUA_USES= lua:51-52
LUA_CONFIGURE_ON= --lua=${LUA_VER_STR}fbsd
LUA_MESON_ON= -Dlua=lua-${LUA_VER}
LUAJIT_USES= luajit
LUAJIT_CONFIGURE_ON= --lua=luajit
LUAJIT_MESON_ON= -Dlua=luajit
LUA_NONE_CONFIGURE_ON= --disable-lua
LUA_NONE_MESON_ON= -Dlua=disabled
MANPAGES_BUILD_DEPENDS= rst2man:textproc/py-docutils
MANPAGES_CONFIGURE_OFF= --disable-manpage
MANPAGES_MESON_ENABLED= manpage-build
MUJS_LIB_DEPENDS= libmujs.so:lang/mujs
MUJS_CONFIGURE_ON= --enable-javascript
MUJS_CONFIGURE_OFF= --disable-javascript
MUJS_MESON_ENABLED= javascript
NVDEC_BUILD_DEPENDS= ${LOCALBASE}/include/ffnvcodec/dynlink_loader.h:multimedia/ffnvcodec-headers
NVDEC_CONFIGURE_OFF= --disable-cuda-hwaccel
NVDEC_RUN_DEPENDS= ${LOCALBASE}/include/ffnvcodec/dynlink_loader.h:multimedia/ffnvcodec-headers
NVDEC_MESON_ENABLED= cuda-hwaccel
OPENAL_CONFIGURE_ENABLE= openal
OPENAL_USES= openal
OPENAL_MESON_ENABLED= openal
OPENAL_LDFLAGS= ${_OPENAL_LDFLAGS_${ARCH}}
_OPENAL_LDFLAGS_i386= -Wl,-znotext
OPENGL_USES= gl
OPENGL_USE= GL=egl,gbm
OPENGL_CONFIGURE_OFF= --disable-gl
OPENGL_MESON_ENABLED= gl
PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire
PIPEWIRE_CONFIGURE_OFF= --disable-pipewire
PIPEWIRE_MESON_ENABLED= pipewire
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF= --disable-pulse
PULSEAUDIO_MESON_ENABLED= pulse
SDL_USES= sdl
SDL_USE= SDL=sdl2
SDL_CONFIGURE_ON= --enable-sdl2
SDL_MESON_ENABLED= sdl2
SIXEL_LIB_DEPENDS= libsixel.so:graphics/libsixel
SIXEL_CONFIGURE_OFF= --disable-sixel
SIXEL_MESON_ENABLED= sixel
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
SNDIO_CONFIGURE_ON= --enable-sndio
SNDIO_CONFIGURE_OFF= --disable-sndio
SNDIO_MESON_ENABLED= sndio
TEST_CONFIGURE_ON= --enable-tests
TEST_MESON_TRUE= tests
UCHARDET_LIB_DEPENDS= libuchardet.so:textproc/uchardet
UCHARDET_CONFIGURE_OFF= --disable-uchardet
UCHARDET_MESON_ENABLED= uchardet
V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/dvb/dmx.h:multimedia/v4l_compat
V4L_CONFIGURE_ON= --enable-dvbin
V4L_MESON_ENABLED= dvbin
VAAPI_LIB_DEPENDS= libva.so:multimedia/libva
VAAPI_CONFIGURE_OFF= --disable-vaapi
VAAPI_MESON_ENABLED= vaapi
VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau
VDPAU_CONFIGURE_OFF= --disable-vdpau
VDPAU_MESON_ENABLED= vdpau
VULKAN_BUILD_DEPENDS= ${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers
VULKAN_LIB_DEPENDS= libplacebo.so:graphics/libplacebo \
libvulkan.so:graphics/vulkan-loader
VULKAN_CONFIGURE_OFF= --disable-vulkan --disable-libplacebo
VULKAN_MESON_ENABLED= vulkan libplacebo
WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.15:graphics/wayland-protocols \
${LOCALBASE}/include/linux/input-event-codes.h:devel/evdev-proto
WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \
libwayland-cursor.so:graphics/wayland \
libxkbcommon.so:x11/libxkbcommon
WAYLAND_CONFIGURE_OFF= --disable-wayland
WAYLAND_RUN_DEPENDS= wayland-protocols>=1.15:graphics/wayland-protocols # pkg-config
WAYLAND_MESON_ENABLED= wayland
WAYLAND_IMPLIES= OPENGL
X11_USES= gnome xorg
X11_USE= XORG=x11,xext,xinerama,xorgproto,xpresent,xrandr,xscrnsaver,xv,xxf86vm
X11_CONFIGURE_OFF= --disable-x11
X11_MESON_ENABLED= x11
YTDLP_RUN_DEPENDS= yt-dlp:www/yt-dlp
YTDL_RUN_DEPENDS= youtube-dl:www/youtube_dl
ZIMG_LIB_DEPENDS= libzimg.so:graphics/sekrit-twc-zimg
ZIMG_CONFIGURE_OFF= --disable-zimg
ZIMG_MESON_ENABLED= zimg
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MVAAPI} && ${PORT_OPTIONS:MWAYLAND}
CONFIGURE_ARGS+= --enable-vaapi-wayland
MESON_ARGS+= -Dvaapi-wayland=enabled
LIB_DEPENDS+= libva-wayland.so:multimedia/libva
.else
CONFIGURE_ARGS+= --disable-vaapi-wayland
MESON_ARGS+= -Dvaapi-wayland=disabled
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/pkgconfig/mpv.pc|data/pkgconfig/mpv.pc|g' \
${WRKSRC}/wscript_build.py
post-patch-MANPAGES-on:
@${FIND} ${WRKSRC}/DOCS/man -name '*.rst' | ${XARGS} ${REINPLACE_CMD} \
-e 's|/usr/local|${PREFIX}|g'

View File

@ -1,15 +0,0 @@
--- libmpv/mpv.def.orig 2017-12-25 20:44:17 UTC
+++ libmpv/mpv.def
@@ -1,3 +1,5 @@
+__progname
+environ
mpv_client_api_version
mpv_client_name
mpv_command
@@ -43,4 +45,4 @@ mpv_terminate_destroy
mpv_unobserve_property
mpv_wait_async_requests
mpv_wait_event
-mpv_wakeup
\ No newline at end of file
+mpv_wakeup

View File

@ -0,0 +1,11 @@
--- meson.build.orig 2022-10-21 15:12:08 UTC
+++ meson.build
@@ -1674,7 +1674,7 @@ if get_option('cplayer')
conf_files = ['etc/mpv.conf', 'etc/input.conf',
'etc/mplayer-input.conf', 'etc/restore-old-bindings.conf']
- install_data(conf_files, install_dir: join_paths(datadir, 'doc', 'mpv'))
+ install_data(conf_files, install_dir: join_paths(datadir, 'examples', 'mpv'))
bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
install_data('etc/mpv.bash-completion', install_dir: bash_install_dir, rename: 'mpv')

View File

@ -17,7 +17,7 @@ share/icons/hicolor/32x32/apps/mpv.png
share/icons/hicolor/64x64/apps/mpv.png
share/icons/hicolor/scalable/apps/mpv.svg
share/icons/hicolor/symbolic/apps/mpv-symbolic.svg
%%PORTDOCS%%%%DOCSDIR%%/html/mpv.html
%%PORTDOCS%%%%DOCSDIR%%/mpv.html
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/input.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mplayer-input.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mpv.conf