Mk/Uses/iconv: support iconv+
[dports.git] / Mk / bsd.gstreamer.mk
1 #-*- tab-width: 4; -*-
2 # ex:ts=4
3 #
4 # bsd.gstreamer.mk - Support for gstreamer-plugins-based ports.
5 #
6 # Created by: Michael Johnson <ahze@FreeBSD.org>
7 #
8 # $FreeBSD: Mk/bsd.gstreamer.mk 325107 2013-08-21 11:24:07Z kwm $
9 #    $MCom: ports/Mk/bsd.gstreamer.mk,v 1.56 2013/01/15 21:43:45 kwm Exp $
10
11 .if !defined(_POSTMKINCLUDED) && !defined(Gstreamer_Pre_Include)
12
13 Gstreamer_Include_MAINTAINER=   multimedia@FreeBSD.org
14 Gstreamer_Pre_Include=          bsd.gstreamer.mk
15
16 .endif
17
18 # Ports can use the following:
19 #
20 # For Gstreamer 0.10:
21 #   USE_GSTREAMER=      lame faac ffmpeg
22 #
23 # For Gstreamer 1.x the same rules apply but instead of 
24 #   USE_GSTREAMER=, USE_GSTREAMER1= is used.
25 #
26 # If you want to use USE_GSTREAMER after <bsd.port.pre.mk>
27 # you must follow one of the examples listed below
28 #
29 #       .include <bsd.port.options.mk>
30 #       .if defined(WITH_VORBIS)
31 #       USE_GSTREAMER=  vorbis
32 #       .endif
33 #
34 # or
35 #       USE_GSTREAMER=  yes
36 #       .include <bsd.port.options.mk>
37 #       .if defined(WITH_FAAD)
38 #       USE_GSTREAMER+= faad
39 #       .endif
40 #       .include <bsd.port.pre.mk>
41 #
42 #       USE_GSTREAMER=yes will always add a dependency to
43 #               gstreamer-plugins
44 #
45 #       The use of WANT_GSTREAMER=yes should be discouraged.
46 #
47 # "Normal" dependencies and variables
48 #
49
50 GSTREAMER_PORT=         ${PORTSDIR}/multimedia/gstreamer-plugins
51 _GST_LIB_BASE=          ${LOCALBASE}/lib/gstreamer-${GST_VERSION}
52 GST_VERSION=            0.10
53 GST_MINOR_VERSION=      .0
54 GST_SHLIB_VERSION=      1
55
56 GSTREAMER1_PORT=        ${PORTSDIR}/multimedia/gstreamer1-plugins
57 _GST1_LIB_BASE=         ${LOCALBASE}/lib/gstreamer-${GST1_VERSION}
58 GST1_VERSION=           1.0
59 GST1_MINOR_VERSION=     .0
60 GST1_SHLIB_VERSION=     0
61 GST1_MINIMAL_VERSION=   .8
62
63 #
64 # missing base: alsa ivorbisdec
65 # missing good: pulseaudio(need newer pulse version)
66 # missing ugly: -
67 # missing bad: openal
68
69 # These are the current supported gstreamer-plugins modules:
70 # Supported plugins by both 0.10 and 1.0.
71 _GSTREAMER_PLUGINS= \
72                 a52dec aalib amrnb amrwbdec cairo cdio \
73                 cdparanoia dts dv faac faad flac flite \
74                 gdkpixbuf gme gsm jack jpeg lame libcaca \
75                 libmms libvisual mad mpeg2dec mpeg2enc neon ogg \
76                 opencv opus pango resindvd schroedinger \
77                 shout2 sidplay soundtouch soup speex taglib \
78                 theora twolame v4l2 vorbis wavpack x264
79
80 # plugins only in 0.10
81 .if defined(USE_GSTREAMER)
82 _GSTREAMER_PLUGINS+= \
83                 annodex bz2 cdaudio dvd esound ffmpeg fluendo-mp3 \
84                 fluendo-mpegdemux gconf gio gl gnomevfs gnonlin hal \
85                 ladspa libpng mm mp3 musepack nas pulse python qt4 \
86                 sdl sndfile spc vdpau vp8 xvid
87 .endif
88
89 # plugins only in 1.0
90 .if defined(USE_GSTREAMER1)
91 _GSTREAMER_PLUGINS+= \
92                 assrender celt curl dvdread libav modplug png rtmp spandsp vpx \
93                 x ximagesrc zbar
94 .endif
95
96 # other plugins
97 _USE_GSTREAMER_ALL=     bad core good ugly yes ${_GSTREAMER_PLUGINS}
98
99 #--------------------------------------------------------------------------#
100
101 core_DEPENDS=   multimedia/gstreamer-plugins-core
102
103 yes_DEPENDS=    multimedia/gstreamer-plugins
104 yes_NAME=       gstreamer-plugins
105 yes_NAME10=     gstreamer1-plugins
106 yes_GST_PREFIX= # empty
107
108 #-- audio plugins section -------------------------------------------------#
109
110 # Audio Plugins Section
111 a52dec_DEPENDS= audio/gstreamer-plugins-a52dec
112
113 amrnb_DEPENDS=  audio/gstreamer-plugins-amrnb
114
115 amrwbdec_DEPENDS=       audio/gstreamer-plugins-amrwbdec
116
117 artsd_DEPENDS=  audio/gstreamer-plugins-artsd
118
119 audiofile_DEPENDS=      audio/gstreamer-plugins-audiofile
120
121 celt_DEPENDS=           audio/gstreamer-plugins-celt
122
123 cdaudio_DEPENDS=        audio/gstreamer-plugins-cdaudio
124
125 cdparanoia_DEPENDS=     audio/gstreamer-plugins-cdparanoia
126
127 esound_DEPENDS= audio/gstreamer-plugins-esound
128
129 faac_DEPENDS=   audio/gstreamer-plugins-faac
130
131 faad_DEPENDS=   audio/gstreamer-plugins-faad
132
133 flac_DEPENDS=   audio/gstreamer-plugins-flac
134
135 flite_DEPENDS=  audio/gstreamer-plugins-flite
136
137 fluendo-mp3_DEPENDS=    audio/gstreamer-plugins-fluendo-mp3
138
139 gme_DEPENDS=    audio/gstreamer-plugins-gme
140
141 gsm_DEPENDS=    audio/gstreamer-plugins-gsm
142
143 hal_DEPENDS=    sysutils/gstreamer-plugins-hal
144
145 jack_DEPENDS=   audio/gstreamer-plugins-jack
146
147 ladspa_DEPENDS= audio/gstreamer-plugins-ladspa
148
149 lame_DEPENDS=   audio/gstreamer-plugins-lame
150
151 mad_DEPENDS=    audio/gstreamer-plugins-mad
152
153 mikmod_DEPENDS= audio/gstreamer-plugins-mikmod
154
155 modplug_DEPENDS=        audio/gstreamer-plugins-modplug
156
157 mp3_DEPENDS=    audio/gstreamer-plugins-mp3
158
159 musepack_DEPENDS=       audio/gstreamer-plugins-musepack
160
161 nas_DEPENDS=    audio/gstreamer-plugins-nas
162
163 neon_DEPENDS=   www/gstreamer-plugins-neon
164
165 ogg_DEPENDS=    audio/gstreamer-plugins-ogg
166
167 opus_DEPENDS=   audio/gstreamer-plugins-opus
168
169 polyp_DEPENDS=  audio/gstreamer-plugins-polyp
170
171 pulse_DEPENDS=  audio/gstreamer-plugins-pulse
172
173 shout_DEPENDS=  audio/gstreamer-plugins-shout
174
175 shout2_DEPENDS= audio/gstreamer-plugins-shout2
176
177 sidplay_DEPENDS=        audio/gstreamer-plugins-sidplay
178
179 smoothwave_DEPENDS=     audio/gstreamer-plugins-smoothwave
180
181 sndfile_DEPENDS=        audio/gstreamer-plugins-sndfile
182
183 soundtouch_DEPENDS=     audio/gstreamer-plugins-soundtouch
184
185 spc_DEPENDS=    audio/gstreamer-plugins-spc
186
187 speex_DEPENDS=  audio/gstreamer-plugins-speex
188
189 taglib_DEPENDS= audio/gstreamer-plugins-taglib
190
191 twolame_DEPENDS=        audio/gstreamer-plugins-twolame
192
193 vorbis_DEPENDS= audio/gstreamer-plugins-vorbis
194
195 wavpack_DEPENDS=        audio/gstreamer-plugins-wavpack
196
197 #-- comms plugin section --------------------------------------------------#
198
199 spandsp_DEPENDS=        comms/gstreamer-plugins-spandsp
200
201 #-- devel plugin section --------------------------------------------------#
202
203 gconf_DEPENDS=  devel/gstreamer-plugins-gconf
204
205 gio_DEPENDS=    devel/gstreamer-plugins-gio
206
207 gnomevfs_DEPENDS=       devel/gstreamer-plugins-gnomevfs
208
209 sdl_DEPENDS=    devel/gstreamer-plugins-sdl
210
211 soup_DEPENDS=   devel/gstreamer-plugins-soup
212
213 #-- ftp plugin section ----------------------------------------------------#
214
215 curl_DEPENDS=   ftp/gstreamer-plugins-curl
216
217 #-- graphics plugin section -----------------------------------------------#
218
219 aalib_DEPENDS=  graphics/gstreamer-plugins-aalib
220
221 annodex_DEPENDS=        multimedia/gstreamer-plugins-annodex
222
223 assrender_DEPENDS=      multimedia/gstreamer-plugins-assrender
224
225 cairo_DEPENDS=  graphics/gstreamer-plugins-cairo
226
227 gdkpixbuf_DEPENDS=      graphics/gstreamer-plugins-gdkpixbuf
228
229 gl_DEPENDS=             graphics/gstreamer-plugins-gl
230
231 hermes_DEPENDS= graphics/gstreamer-plugins-hermes
232
233 jpeg_DEPENDS=   graphics/gstreamer-plugins-jpeg
234
235 libcaca_DEPENDS=        graphics/gstreamer-plugins-libcaca
236
237 libmng_DEPENDS= graphics/gstreamer-plugins-libmng
238
239 libpng_DEPENDS= graphics/gstreamer-plugins-libpng
240
241 libvisual_DEPENDS=      graphics/gstreamer-plugins-libvisual
242
243 opencv_DEPENDS= graphics/gstreamer-plugins-opencv
244
245 png_DEPENDS=    graphics/gstreamer-plugins-png
246
247 zbar_DEPENDS=   graphics/gstreamer-plugins-zbar
248
249 #-- multimedia plugins section --------------------------------------------#
250
251 bad_DEPENDS=    multimedia/gstreamer-plugins-bad
252
253 bz2_DEPENDS=    multimedia/gstreamer-plugins-bz2
254
255 dvdread_DEPENDS=        multimedia/gstreamer-plugins-dvdread
256
257 ffmpeg_DEPENDS= multimedia/gstreamer-ffmpeg
258 ffmpeg_GST_PREFIX=      gstreamer-
259 ffmpeg_GST_SUFX=        # empty
260 ffmpeg_GST_VERSION=     0.10.0
261
262 fluendo-mpegdemux_DEPENDS=      multimedia/gstreamer-plugins-fluendo-mpegdemux
263
264 dts_DEPENDS=    multimedia/gstreamer-plugins-dts
265
266 dv_DEPENDS=     multimedia/gstreamer-plugins-dv
267
268 dvd_DEPENDS=    multimedia/gstreamer-plugins-dvd
269
270 good_DEPENDS=   multimedia/gstreamer-plugins-good
271
272 gnonlin_DEPENDS=        multimedia/gstreamer-plugins-gnonlin
273
274 libav_DEPENDS=          multimedia/gstreamer-libav
275 libav_GST_PREFIX=       gstreamer1-
276 libav_GST_SUFX=         # empty
277 libav_GST_VERSION=      1.0.0
278
279 libfame_DEPENDS=        multimedia/gstreamer-plugins-libfame
280
281 mm_DEPENDS=     multimedia/gstreamermm
282 mm_GST_PREFIX=  gstreamer
283 mm_GST_SUFX=    # empty
284 mm_GST_VERSION= 0.9.4
285
286 mpeg2dec_DEPENDS=       multimedia/gstreamer-plugins-mpeg2dec
287
288 mpeg2enc_DEPENDS=       multimedia/gstreamer-plugins-mpeg2enc
289
290 mplex_DEPENDS=  multimedia/gstreamer-plugins-mplex
291
292 qt4_DEPENDS=    multimedia/gstreamer-qt4
293 qt4_GST_PREFIX= gstreamer-
294
295 rtmp_DEPENDS=   multimedia/gstreamer1-plugins-rtmp
296
297 v4l2_DEPENDS=   multimedia/gstreamer-plugins-v4l2
298
299 vp8_DEPENDS=    multimedia/gstreamer-plugins-vp8
300
301 vpx_DEPENDS=    multimedia/gstreamer-plugins-vpx
302
303 # XXX: This is a quick solution for ports with USE_GSTREAMER=python
304 #      but without USE_PYTHON.
305 PYTHON_PKGNAMEPREFIX?=  py*-
306
307 python_DEPENDS= multimedia/py-gstreamer
308 python_NAME=    gstreamer
309 python_GST_PREFIX=      ${PYTHON_PKGNAMEPREFIX}
310 python_GST_SUFX=        # empty
311 python_GST_VERSION=     0.10.4
312
313 resindvd_DEPENDS=       multimedia/gstreamer-plugins-resindvd
314
315 schroedinger_DEPENDS=   multimedia/gstreamer-plugins-schroedinger
316
317 theora_DEPENDS= multimedia/gstreamer-plugins-theora
318
319 ugly_DEPENDS=   multimedia/gstreamer-plugins-ugly
320
321 vdpau_DEPENDS=  multimedia/gstreamer-plugins-vdpau
322
323 x264_DEPENDS=   multimedia/gstreamer-plugins-x264
324
325 xvid_DEPENDS=   multimedia/gstreamer-plugins-xvid
326
327
328 #-- Net Plugins Section ---------------------------------------------------#
329
330 libmms_DEPENDS= net/gstreamer-plugins-libmms
331
332 #-- sysutils plugins section ----------------------------------------------#
333
334 cdio_DEPENDS=   sysutils/gstreamer-plugins-cdio
335
336 #-- x11 plugins section ---------------------------------------------------#
337
338 x_DEPENDS=      x11/gstreamer-plugins-x
339
340 ximagesrc_DEPENDS=      x11/gstreamer-plugins-ximagesrc
341
342 #-- x11-toolkits plugins section ------------------------------------------#
343
344 pango_DEPENDS=  x11-toolkits/gstreamer-plugins-pango
345
346 #--------------------------------------------------------------------------#
347
348 .if defined(_POSTMKINCLUDED) && !defined(Gstreamer_Post_Include)
349 Gstreamer_Post_Include= bsd.gstreamer.mk
350
351 .if (defined (USE_GSTREAMER) && defined(USE_GSTREAMER1))
352 IGNORE= USE_GSTREAMER and USE_GSTREAMER1 can't be used together
353 .endif
354
355 .if defined(USE_GSTREAMER)
356 .for ext in ${USE_GSTREAMER}
357 ${ext}_GST_PREFIX?=     gstreamer-plugins-
358 ${ext}_GST_VERSION?=    ${GST_VERSION}${GST_MINOR_VERSION}
359 ${ext}_NAME?=           ${ext}
360 . if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_DEPENDS})
361 BUILD_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME}>=${${ext}_GST_VERSION}:${PORTSDIR}/${${ext}_DEPENDS}
362 RUN_DEPENDS+=   ${${ext}_GST_PREFIX}${${ext}_NAME}>=${${ext}_GST_VERSION}:${PORTSDIR}/${${ext}_DEPENDS}
363 . else
364 IGNORE= cannot install: unknown gstreamer ${GST_VERSION} plugin -- ${ext}
365 . endif
366 .endfor
367 .endif
368
369 .if defined(USE_GSTREAMER1)
370 .for ext in ${USE_GSTREAMER1}
371 ${ext}_GST_PREFIX?=     gstreamer1-plugins-
372 ${ext}_GST_VERSION?=    ${GST1_VERSION}${GST1_MINIMAL_VERSION}
373 ${ext}_NAME10?=         ${ext}
374 ${ext}_GST_DEPENDS?=    ${${ext}_DEPENDS:S,gstreamer-,gstreamer1-,}
375 . if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_GST_DEPENDS})
376 BUILD_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME10}>=${${ext}_GST_VERSION}:${PORTSDIR}/${${ext}_GST_DEPENDS}
377 RUN_DEPENDS+=   ${${ext}_GST_PREFIX}${${ext}_NAME10}>=${${ext}_GST_VERSION}:${PORTSDIR}/${${ext}_GST_DEPENDS}
378 . else
379 IGNORE= cannot install: unknown gstreamer ${GST1_VERSION} plugin -- ${ext}
380 . endif
381 .endfor
382 .endif
383
384 # The End
385 .endif