blob: 72b192be3bf4afa3936f895d3fab81500f6d2bd6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
# Created by: Grzegorz Blach <gblach@FreeBSD.org>
# $FreeBSD$
PORTNAME= mpv
PORTVERSION= 0.10.0
DISTVERSIONPREFIX= v
PORTEPOCH= 1
CATEGORIES= multimedia audio
MAINTAINER= cpm@fbsd.es
COMMENT= Free and open-source general-purpose video player
LICENSE= GPLv2
LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
BUILD_DEPENDS= rst2man:${PORTSDIR}/textproc/py-docutils
USE_GITHUB= yes
GH_ACCOUNT= mpv-player waf-project:waf
GH_PROJECT= waf:waf
GH_TAGNAME= waf-1.8.12:waf
WAF_CMD= ${WRKSRC_waf}/waf-light
USES= compiler:c11 desktop-file-utils iconv pkgconfig python:build waf
USE_LDCONFIG= yes
CPPFLAGS+= -I.. -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --docdir=${EXAMPLESDIR} \
--mandir=${MANPREFIX}/man \
--prefix=${PREFIX} \
--disable-debug-build \
--disable-optimize \
--disable-pdf \
--enable-libmpv-shared
OPTIONS_DEFINE= ASS BS2B DOCS ENCA LADSPA LCMS2 \
LIBGUESS LUAJIT UCHARDET ZSH
OPTIONS_DEFAULT= ASS DVDREAD DVDNAV ENCA X11
OPTIONS_GROUP= IN VO AO
OPTIONS_GROUP_IN= CDIO DVDREAD DVDNAV LIBBLURAY V4L SMB
OPTIONS_GROUP_VO= CACA OPENGL VAAPI VDPAU X11 XINERAMA
OPTIONS_GROUP_AO= ALSA JACK PULSEAUDIO
OPTIONS_SUB= yes
ASS_DESC= ASS/SSA subtitle and OSD rendering
BS2B_DESC= Enable Bauer Stereophonic-to-Binaural DSP support
DVDREAD_DESC= DVD Playback support
DVDNAV_DESC= DVD menu navigation
ENCA_DESC= Enable encoding detection support
LIBGUESS_DESC= Enable high-speed character set detection support
LUAJIT_DESC= Use LuaJIT instead of Lua scripting language support
UCHARDET_DESC= Use UCHARDET instead ENCA support
IN_DESC= Input
VO_DESC= Video Output
AO_DESC= Audio Output
ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
ALSA_CONFIGURE_OFF= --disable-alsa
ASS_LIB_DEPENDS= libass.so:${PORTSDIR}/multimedia/libass
ASS_CONFIGURE_OFF= --disable-libass
BS2B_LIB_DEPENDS= libbs2b.so:${PORTSDIR}/audio/libbs2b
BS2B_CONFIGURE_OFF= --disable-libbs2b
CACA_LIB_DEPENDS= libcaca.so:${PORTSDIR}/graphics/libcaca
CACA_CONFIGURE_OFF= --disable-caca
CDIO_LIB_DEPENDS= libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia
CDIO_CONFIGURE_OFF= --disable-cdda
DVDNAV_LIB_DEPENDS= libdvdnav.so:${PORTSDIR}/multimedia/libdvdnav
DVDNAV_CONFIGURE_OFF= --disable-dvdnav
DVDREAD_LIB_DEPENDS= libdvdread.so:${PORTSDIR}/multimedia/libdvdread
DVDREAD_CONFIGURE_OFF= --disable-dvdread
ENCA_LIB_DEPENDS= libenca.so:${PORTSDIR}/converters/enca
ENCA_CONFIGURE_OFF= --disable-enca
JACK_LIB_DEPENDS= libjack.so:${PORTSDIR}/audio/jack
JACK_CONFIGURE_OFF= --disable-jack
LADSPA_BUILD_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa
LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa
LADSPA_CONFIGURE_OFF= --disable-ladspa
LCMS2_LIB_DEPENDS= liblcms2.so:${PORTSDIR}/graphics/lcms2
LCMS2_CONFIGURE_OFF= --disable-lcms2
LIBBLURAY_LIB_DEPENDS= libbluray.so:${PORTSDIR}/multimedia/libbluray
LIBBLURAY_CONFIGURE_OFF= --disable-libbluray
LIBGUESS_LIB_DEPENDS= libguess.so:${PORTSDIR}/textproc/libguess
LIBGUESS_CONFIGURE_OFF= --disable-libguess
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:${PORTSDIR}/lang/luajit
LUAJIT_USES_OFF= lua
LUAJIT_CONFIGURE_ON= --lua=luajit
LUAJIT_CONFIGURE_OFF= --lua=${LUA_VER_STR}fbsd
OPENGL_USE= GL=gl
OPENGL_CONFIGURE_OFF= --disable-gl
OPENGL_IMPLIES= X11
PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF= --disable-pulse
SMB_LIB_DEPENDS= libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
SMB_CONFIGURE_OFF= --disable-libsmbclient
UCHARDET_LIB_DEPENDS= libuchardet.so:${PORTSDIR}/textproc/uchardet
UCHARDET_CONFIGURE_OFF= --disable-uchardet
V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
V4L_LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l
V4L_CONFIGURE_OFF= --disable-tv-v4l2
VAAPI_LIB_DEPENDS= libva.so:${PORTSDIR}/multimedia/libva
VAAPI_CONFIGURE_OFF= --disable-vaapi
VDPAU_LIB_DEPENDS= libvdpau.so:${PORTSDIR}/multimedia/libvdpau
VDPAU_CONFIGURE_OFF= --disable-vdpau
X11_USE= XORG=x11,xv,xxf86vm
X11_CONFIGURE_OFF= --disable-x11
XINERAMA_USE= XORG=xinerama,xineramaproto
XINERAMA_CONFIGURE_OFF= --disable-xinerama
XINERAMA_IMPLIES= X11
ZSH_USES= perl5
ZSH_USE= PERL5=build
ZSH_CONFIGURE_ENABLE= zsh-comp
.include <bsd.port.options.mk>
# Fix crash on i386
.if ${ARCH} == "i386"
CFLAGS:= ${CFLAGS:N-O*} -O0
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/pkgconfig/mpv.pc|data/pkgconfig/mpv.pc|g' \
${WRKSRC}/wscript_build.py
@${FIND} ${WRKSRC}/DOCS/man -name '*.rst' | ${XARGS} ${REINPLACE_CMD} \
-e 's|/usr/local|${PREFIX}|g'
post-stage:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mpv
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmpv.so
.include <bsd.port.mk>
|