blob: 2a94f80ab0ac72ae0886c9415f74f19345bf742c (
plain)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
# $NetBSD: options.mk,v 1.15 2020/04/29 15:11:10 nia Exp $
# Global and legacy options
PKG_OPTIONS_OPTIONAL_GROUPS= ssl
PKG_OPTIONS_GROUP.ssl= gnutls mbedtls openssl
PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg4
PKG_SUPPORTED_OPTIONS= ass av1 bluray doc fdk-aac fontconfig freetype jack \
lame libvpx opencore-amr opus pulseaudio rpi rtmp \
speex tesseract theora vorbis x11 x264 x265 xvid
PKG_SUGGESTED_OPTIONS= ass av1 bluray freetype fontconfig gnutls lame \
libvpx opus speex theora vorbis x11 x264 x265 xvid
PKG_OPTIONS_LEGACY_OPTS+= xcb:x11
PLIST_VARS+= doc
# Add VDPAU if it is available
.include "../../multimedia/libvdpau/available.mk"
.if ${VDPAU_AVAILABLE} == "yes"
PKG_SUPPORTED_OPTIONS+= vdpau
PKG_SUGGESTED_OPTIONS+= vdpau
.endif
# Add VAAPI if it is available
.include "../../multimedia/libva/available.mk"
.if ${VAAPI_AVAILABLE} == "yes"
PKG_SUPPORTED_OPTIONS+= vaapi
PKG_SUGGESTED_OPTIONS+= vaapi
.endif
.include "../../mk/bsd.options.mk"
# Fontconfig
.if !empty(PKG_OPTIONS:Mfontconfig)
CONFIGURE_ARGS+= --enable-fontconfig
.include "../../fonts/fontconfig/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-fontconfig
.endif
# freetype option
.if !empty(PKG_OPTIONS:Mfreetype)
CONFIGURE_ARGS+= --enable-libfreetype
.include "../../graphics/freetype2/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libfreetype
.endif
# ass option
.if !empty(PKG_OPTIONS:Mass)
CONFIGURE_ARGS+= --enable-libass
.include "../../multimedia/libass/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libass
.endif
# av1 option
.if !empty(PKG_OPTIONS:Mav1)
CONFIGURE_ARGS+= --enable-libaom
BUILDLINK_API_DEPENDS.libaom+= libaom>=1.0.0nb1
.include "../../multimedia/libaom/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libaom
.endif
# doc option
.if !empty(PKG_OPTIONS:Mdoc)
PLIST.doc= yes
USE_TOOLS+= texi2html
CONFIGURE_ARGS+= --enable-htmlpages
.else
CONFIGURE_ARGS+= --disable-htmlpages
.endif
# Fraunhofer FDK AAC codec support
.if !empty(PKG_OPTIONS:Mfdk-aac)
RESTRICTED= ffmpeg built with fdk-aac combines GPL and GPL-incompatible code
NO_BIN_ON_CDROM= ${RESTRICTED}
NO_BIN_ON_FTP= ${RESTRICTED}
CONFIGURE_ARGS+= --enable-libfdk_aac
CONFIGURE_ARGS+= --enable-nonfree
.include "../../audio/fdk-aac/buildlink3.mk"
.endif
# GnuTLS support
.if !empty(PKG_OPTIONS:Mgnutls)
CONFIGURE_ARGS+= --enable-gnutls
.include "../../security/gnutls/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-gnutls
.endif
# mbedTLS support
.if !empty(PKG_OPTIONS:Mmbedtls)
CONFIGURE_ARGS+= --enable-mbedtls
# Apache License 2.0 is incompatible with (L)GPL versions before 3
CONFIGURE_ARGS+= --enable-version3
ADDITIONAL_LICENSE+= AND gnu-lgpl-v3
.include "../../security/mbedtls/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-mbedtls
.endif
# opencore-amr option
.if !empty(PKG_OPTIONS:Mopencore-amr)
CONFIGURE_ARGS+= --enable-libopencore-amrnb
CONFIGURE_ARGS+= --enable-libopencore-amrwb
# Apache License 2.0 is incompatible with (L)GPL versions before 3
CONFIGURE_ARGS+= --enable-version3
ADDITIONAL_LICENSE+= AND gnu-lgpl-v3
.include "../../audio/opencore-amr/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libopencore-amrnb
CONFIGURE_ARGS+= --disable-libopencore-amrwb
.endif
# OpenSSL support
.if !empty(PKG_OPTIONS:Mopenssl)
CONFIGURE_ARGS+= --enable-nonfree
CONFIGURE_ARGS+= --enable-openssl
.include "../../security/openssl/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-openssl
.endif
# jack option
.if !empty(PKG_OPTIONS:Mjack)
CONFIGURE_ARGS+= --enable-libjack
.include "../../audio/jack/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libjack
.endif
# pulseaudio option
.if !empty(PKG_OPTIONS:Mpulseaudio)
CONFIGURE_ARGS+= --enable-libpulse
.include "../../audio/pulseaudio/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libpulse
.endif
# RTMP support via librtmp
.if !empty(PKG_OPTIONS:Mrtmp)
CONFIGURE_ARGS+= --enable-librtmp
.include "../../net/rtmpdump/buildlink3.mk"
.endif
# OCR filter using Tesseract
.if !empty(PKG_OPTIONS:Mtesseract)
CONFIGURE_ARGS+= --enable-libtesseract
.include "../../graphics/tesseract/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libtesseract
.endif
# OGG Theora support
.if !empty(PKG_OPTIONS:Mtheora)
CONFIGURE_ARGS+= --enable-libtheora
.include "../../multimedia/libtheora/buildlink3.mk"
.endif
# OGG Vorbis support
.if !empty(PKG_OPTIONS:Mvorbis)
CONFIGURE_ARGS+= --enable-libvorbis
.include "../../audio/libvorbis/buildlink3.mk"
.endif
# LAME MP3 encoder
.if !empty(PKG_OPTIONS:Mlame)
# "lame-3.98" isn't compatible with "ffmpeg" which breaks audio encoding.
BUILDLINK_ABI_DEPENDS.lame+= lame>=3.98.2nb1
CONFIGURE_ARGS+= --enable-libmp3lame
.include "../../audio/lame/buildlink3.mk"
.endif
# OPUS support
.if !empty(PKG_OPTIONS:Mopus)
CONFIGURE_ARGS+= --enable-libopus
.include "../../audio/libopus/buildlink3.mk"
.endif
# Speex support
.if !empty(PKG_OPTIONS:Mspeex)
CONFIGURE_ARGS+= --enable-libspeex
.include "../../audio/speex/buildlink3.mk"
.endif
# Raspberry Pi support
.if !empty(PKG_OPTIONS:Mrpi)
CONFIGURE_ARGS+= --disable-xvmc
CONFIGURE_ARGS+= --enable-omx-rpi
CONFIGURE_ARGS+= --enable-mmal
SUBST_CLASSES+= vc
SUBST_STAGE.vc= pre-configure
SUBST_MESSAGE.vc= Fixing path to VideoCore libraries.
SUBST_FILES.vc= configure
SUBST_SED.vc+= -e 's;-isystem/opt/vc;-I${PREFIX};g'
SUBST_SED.vc+= -e 's;/opt/vc;${PREFIX};g'
.include "../../misc/raspberrypi-userland/buildlink3.mk"
.endif
# XviD support
.if !empty(PKG_OPTIONS:Mxvid)
CONFIGURE_ARGS+= --enable-libxvid
.include "../../multimedia/xvidcore/buildlink3.mk"
.endif
# x264 support
.if !empty(PKG_OPTIONS:Mx264)
# ABI change between 20090326 and 20100201
BUILDLINK_API_DEPENDS.x264-devel+= x264-devel>=20111207
CONFIGURE_ARGS+= --enable-libx264
.include "../../multimedia/x264-devel/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libx264
.endif
# x265 support
.if !empty(PKG_OPTIONS:Mx265)
CONFIGURE_ARGS+= --enable-libx265
.include "../../multimedia/x265/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libx265
.endif
# VDPAU support
.if !empty(PKG_OPTIONS:Mvdpau) && !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+= --enable-vdpau
.include "../../multimedia/libvdpau/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-vdpau
.endif
# VAAPI support
.if !empty(PKG_OPTIONS:Mvaapi) && !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+= --enable-vaapi
.include "../../multimedia/libva/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-vaapi
.endif
# VPX support
.if !empty(PKG_OPTIONS:Mlibvpx)
CONFIGURE_ARGS+= --enable-libvpx
.include "../../multimedia/libvpx/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libvpx
.endif
# X11 screen capture support using libxcb
.if !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+= --enable-libxcb
CONFIGURE_ARGS+= --enable-libxcb-shape
CONFIGURE_ARGS+= --enable-libxcb-shm
CONFIGURE_ARGS+= --enable-libxcb-xfixes
.include "../../x11/libxcb/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libxcb
.endif
# Bluray support
.if !empty(PKG_OPTIONS:Mbluray)
CONFIGURE_ARGS+= --enable-libbluray
.include "../../multimedia/libbluray/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-libbluray
.endif
|