Import multimedia/gstreamer1-plugins version 1.0.7
[dports.git] / multimedia / gstreamer1-plugins / Makefile.common
1 # $FreeBSD: multimedia/gstreamer1-plugins/Makefile.common 316738 2013-04-28 17:53:47Z kwm $
2 #    $MCom: kwm/multimedia/gstreamer1-plugins/Makefile.common 11415 2013-04-26 22:58:21Z kwm $
3
4 BASE_GST_ALL_PLUGINS= \
5                 alsa \
6                 cdparanoia \
7                 ivorbis \
8                 libvisual \
9                 ogg \
10                 pango \
11                 theora \
12                 vorbis \
13                 x \
14                 xvideo
15
16 BAD_GST_ALL_PLUGINS+= \
17                 assrender \
18                 celt \
19                 curl \
20                 dts \
21                 faac \
22                 faad \
23                 flite \
24                 gme \
25                 gsm \
26                 libmms \
27                 modplug \
28                 mpeg2enc \
29                 mplex \
30                 opencv \
31                 resindvd \
32                 rtmp \
33                 schro \
34                 soundtouch \
35                 spandsp \
36                 zbar \
37
38 # plugins not yet ported to the 1.0 API, or not portable
39 BAD_GST_ALL_PLUGINS+= \
40                 apexsink \
41                 cdaudio \
42                 chromaprint \
43                 cog \
44                 decklink \
45                 directfb \
46                 dirac \
47                 eglgles \
48                 jasper \
49                 kate \
50                 ladspa \
51                 linsys \
52                 lv2 \
53                 mimic \
54                 mpg123 \
55                 musepack \
56                 musicbrainz \
57                 mythtv \
58                 nas \
59                 neon \
60                 ofa \
61                 openal \
62                 opensles \
63                 opus \
64                 pvr \
65                 rsvg \
66                 sdl \
67                 sndfile \
68                 sndio \
69                 spc \
70                 teletextdec \
71                 timidity \
72                 vdpau \
73                 voaacenc \
74                 voamrwbenc \
75                 wayland \
76                 swfdec \
77                 xvid
78
79 BAD_GST_NON_PLUGINS= \
80                 --enable-bz2 \
81                 --enable-dvb \
82                 --enable-shm \
83                 --enable-quicktime \
84                 --disable-gsettings \
85                 --disable-acm \
86                 --disable-android_media \
87                 --disable-apple_media \
88                 --disable-avc \
89                 --disable-dc1394 \
90                 --disable-dccp \
91                 --disable-direct3d9 \
92                 --disable-directdraw \
93                 --disable-directsound \
94                 --disable-fbdev \
95                 --disable-osx_video \
96                 --disable-uvch264 \
97                 --disable-vcd \
98                 --disable-wildmidi \
99                 --disable-wininet
100
101 GOOD_GST_ALL_PLUGINS+= \
102                 aalib \
103                 cairo \
104                 flac \
105                 gdk_pixbuf \
106                 jack \
107                 jpeg \
108                 libcaca \
109                 libdv \
110                 libpng \
111                 gst_v4l2 \
112                 shout2 \
113                 soup \
114                 speex \
115                 taglib \
116                 vpx \
117                 wavpack \
118                 x
119 #       xxx     pulse \
120
121 GOOD_GST_NON_PLUGINS=   \
122                 --disable-dv1394 \
123                 --disable-directsound \
124                 --disable-osx_audio \
125                 --disable-osx_video \
126                 --disable-sunaudio \
127                 --disable-waveform \
128                 --enable-bz2 \
129                 --enable-oss \
130                 --enable-oss4 \
131                 --enable-zlib
132
133 UGLY_GST_ALL_PLUGINS+= \
134                 a52dec \
135                 amrnb \
136                 amrwb \
137                 cdio \
138                 dvdread \
139                 lame \
140                 mad \
141                 mpeg2dec \
142                 sidplay \
143                 twolame \
144                 x264
145
146 UGLY_GST_NON_PLUGINS=
147
148 # Disable all plugins by default
149 .if ${DIST}=="base"
150 .for d in ${BASE_GST_ALL_PLUGINS}
151 CONFIGURE_ARGS+=        --disable-${d}
152 .endfor
153 .endif
154
155 .if ${DIST}=="bad"
156 .for d in ${BAD_GST_ALL_PLUGINS}
157 CONFIGURE_ARGS+=        --disable-${d}
158 .endfor
159 CONFIGURE_ARGS+= ${BAD_GST_NON_PLUGINS}
160 .endif
161
162 .if ${DIST}=="good"
163 .for d in ${GOOD_GST_ALL_PLUGINS}
164 CONFIGURE_ARGS+=        --disable-${d}
165 .endfor
166 CONFIGURE_ARGS+= ${GOOD_GST_NON_PLUGINS}
167 .endif
168
169 .if ${DIST}=="ugly"
170 .for d in ${UGLY_GST_ALL_PLUGINS}
171 CONFIGURE_ARGS+=        --disable-${d}
172 .endfor
173 CONFIGURE_ARGS+= ${UGLY_GST_NON_PLUGINS}
174 .endif
175
176 .if ${GST_PLUGIN}!="base" && ${GST_PLUGIN}!="bad" && \
177         ${GST_PLUGIN}!="good" && ${GST_PLUGIN}!="ugly"
178 CONFIGURE_ARGS+=        --enable-${GST_PLUGIN}
179 .endif
180
181 .if !defined(NO_GSTREAMER_COMMON)
182 GST_PLUGIN_SUFFIX?=     -${GST_PLUGIN}
183
184 # Enable the right plugin
185 CONFIGURE_ARGS:=${CONFIGURE_ARGS:S|--disable-${GST_PLUGIN}|--enable-${GST_PLUGIN}|}
186
187 GST_INC_DIR=            include/gstreamer-${VERSION}
188 GST_LIB_DIR=            lib/gstreamer-${VERSION}
189
190 # Auto create PLIST
191 PLIST=          ${NONEXISTENT}
192
193 # ------- plugins ---------
194
195 # a52dec
196 gst_a52dec_LIB_DEPENDS= a52:${PORTSDIR}/audio/liba52
197
198 # aalib
199 gst_aalib_LIB_DEPENDS=  aa:${PORTSDIR}/graphics/aalib
200 gst_aalib_PLIST_FILES=  ${GST_LIB_DIR}/libgstaasink.la \
201                         ${GST_LIB_DIR}/libgstaasink.so
202
203 # amrnb
204 gst_amrnb_LIB_DEPENDS=  opencore-amrnb:${PORTSDIR}/audio/opencore-amr
205 gst_amrnb_PLIST_FILES=  ${GST_LIB_DIR}/libgstamrnb.la \
206                         ${GST_LIB_DIR}/libgstamrnb.so \
207                         share/gstreamer-${VERSION}/presets/GstAmrnbEnc.prs
208 gst_amrnb_PLIST_DIRSTRY=share/gstreamer-${VERSION}/presets \
209                         share/gstreamer-${VERSION}
210
211 # amrwb
212 gst_amrwb_LIB_DEPENDS=  opencore-amrwb:${PORTSDIR}/audio/opencore-amr
213 gst_amrwb_GST_PLUGIN_DIR=       ext/amrwbdec
214 gst_amrwb_PLIST_FILES=  ${GST_LIB_DIR}/libgstamrwbdec.la \
215                         ${GST_LIB_DIR}/libgstamrwbdec.so
216
217 # assrender
218 gst_assrender_LIB_DEPENDS=      ass:${PORTSDIR}/multimedia/libass
219
220 # cairo
221 gst_cairo_LIB_DEPENDS=          cairo:${PORTSDIR}/graphics/cairo
222
223 # cdparanoia
224 gst_cdparanoia_LIB_DEPENDS=     cdda_interface:${PORTSDIR}/audio/cdparanoia
225
226 # cdio
227 gst_cdio_LIB_DEPENDS=   cdio:${PORTSDIR}/sysutils/libcdio
228
229 # celt
230 gst_celt_LIB_DEPENDS=   celt0:${PORTSDIR}/audio/celt
231
232 # curl
233 gst_curl_LIB_DEPENDS=   curl:${PORTSDIR}/ftp/curl
234
235 # dts
236 gst_dts_LIB_DEPENDS=    dca:${PORTSDIR}/multimedia/libdca
237 gst_dts_PLIST_FILES=    ${GST_LIB_DIR}/libgstdtsdec.la \
238                         ${GST_LIB_DIR}/libgstdtsdec.so
239
240 # libdv
241 gst_libdv_LIB_DEPENDS=          dv:${PORTSDIR}/multimedia/libdv
242 gst_libdv_GST_PLUGIN_DIR=       ext/dv
243 gst_libdv_PLIST_FILES=          ${GST_LIB_DIR}/libgstdv.la \
244                                 ${GST_LIB_DIR}/libgstdv.so
245
246 # dvdread
247 gst_dvdread_LIB_DEPENDS=dvdread:${PORTSDIR}/multimedia/libdvdread
248
249 # faac
250 gst_faac_LIB_DEPENDS=   faac:${PORTSDIR}/audio/faac
251
252 # faad
253 gst_faad_LIB_DEPENDS=   faad:${PORTSDIR}/audio/faad
254
255 # flac
256 gst_flac_LIB_DEPENDS=   FLAC:${PORTSDIR}/audio/flac
257
258 # flite
259 gst_flite_LIB_DEPENDS=  flite:${PORTSDIR}/audio/flite
260
261 # gdk_pixbuf
262 gst_gdk_pixbuf_USE_GNOME=       gdkpixbuf2
263 gst_gdk_pixbuf_PLIST_FILES=     ${GST_LIB_DIR}/libgstgdkpixbuf.la \
264                                 ${GST_LIB_DIR}/libgstgdkpixbuf.so
265
266 # gme
267 gst_gme_LIB_DEPENDS=    gme:${PORTSDIR}/audio/libgme
268
269 # gsm
270 gst_gsm_LIB_DEPENDS=    gsm:${PORTSDIR}/audio/gsm
271
272 # jack
273 gst_jack_LIB_DEPENDS=   jack:${PORTSDIR}/audio/jack
274
275 # jpeg
276 gst_jpeg_LIB_DEPENDS=   jpeg:${PORTSDIR}/graphics/jpeg
277
278 # lame
279 gst_lame_LIB_DEPENDS=   mp3lame:${PORTSDIR}/audio/lame
280
281 # libcaca
282 gst_libcaca_LIB_DEPENDS=        caca:${PORTSDIR}/graphics/libcaca
283 gst_libcaca_PLIST_FILES=        ${GST_LIB_DIR}/libgstcacasink.la \
284                                 ${GST_LIB_DIR}/libgstcacasink.so
285
286 # libmms
287 gst_libmms_LIB_DEPENDS= mms:${PORTSDIR}/net/libmms
288 gst_libmms_PLIST_FILES= ${GST_LIB_DIR}/libgstmms.so \
289                         ${GST_LIB_DIR}/libgstmms.la
290
291 # png
292 gst_libpng_LIB_DEPENDS= png15:${PORTSDIR}/graphics/png
293 gst_libpng_PLIST_FILES= ${GST_LIB_DIR}/libgstpng.la \
294                         ${GST_LIB_DIR}/libgstpng.so
295
296 # libvisual
297 gst_libvisual_LIB_DEPENDS=      visual-0.4:${PORTSDIR}/graphics/libvisual04
298
299 # mad
300 gst_mad_LIB_DEPENDS=    mad:${PORTSDIR}/audio/libmad
301
302 # modplug
303 gst_modplug_LIB_DEPENDS=        modplug:${PORTSDIR}/audio/libmodplug
304
305 # mpeg2enc
306 gst_mpeg2enc_LIB_DEPENDS=       mjpegutils-2.0:${PORTSDIR}/multimedia/mjpegtools
307
308 # mpeg2dec
309 gst_mpeg2dec_LIB_DEPENDS=       mpeg2:${PORTSDIR}/multimedia/libmpeg2
310
311 # ogg
312 gst_ogg_LIB_DEPENDS=    ogg:${PORTSDIR}/audio/libogg
313
314 # opencv
315 gst_opencv_LIB_DEPENDS= opencv_highgui:${PORTSDIR}/graphics/opencv
316
317 # opus
318 gst_opus_LIB_DEPENDS=   opus:${PORTSDIR}/audio/opus
319
320 # pango
321 gst_pango_USE_GNOME=    pango
322
323 # pulse
324 gst_pulse_LIB_DEPENDS=  pulse:${PORTSDIR}/audio/pulseaudio
325
326 # resindvd
327 gst_resindvd_BUILD_DEPENDS=     libdvdnav>=4.1.2:${PORTSDIR}/multimedia/libdvdnav
328 gst_resindvd_RUN_DEPENDS=       libdvdnav>=4.1.2:${PORTSDIR}/multimedia/libdvdnav
329
330 # rtmp
331 gst_rtmp_LIB_DEPENDS=   rtmp.0:${PORTSDIR}/multimedia/rtmpdump
332
333 # shout2
334 # keep the version to tell de difference between libshout and libshout2
335 gst_shout2_LIB_DEPENDS= shout.5:${PORTSDIR}/audio/libshout2
336
337 # sidplay
338 gst_sidplay_LIB_DEPENDS=        sidplay:${PORTSDIR}/audio/libsidplay
339 gst_sidplay_PLIST_FILES=        ${GST_LIB_DIR}/libgstsid.so \
340                                 ${GST_LIB_DIR}/libgstsid.la
341
342 # soundtouch
343 gst_soundtouch_LIB_DEPENDS=     SoundTouch:${PORTSDIR}/audio/soundtouch
344
345 # souphttpsrc
346 gst_soup_LIB_DEPENDS=   soup-2.4:${PORTSDIR}/devel/libsoup
347 gst_soup_GST_PLUGIN_DIR=ext/soup
348 gst_soup_PLIST_FILES=   ${GST_LIB_DIR}/libgstsouphttpsrc.la \
349                         ${GST_LIB_DIR}/libgstsouphttpsrc.so
350
351 # spandsp
352 # keep shlib version here, so we don't pick up the comms/spandsp port by accident.
353 gst_spandsp_LIB_DEPENDS=        spandsp.2:${PORTSDIR}/comms/spandsp-devel
354
355 # speex
356 gst_speex_LIB_DEPENDS=  speex:${PORTSDIR}/audio/speex
357
358 # schroedinger or schro for short
359 gst_schro_LIB_DEPENDS=          schroedinger-1.0:${PORTSDIR}/multimedia/schroedinger
360 gst_schro_GST_PLUGIN_DIR=       ext/schroedinger
361
362 # taglib
363 gst_taglib_LIB_DEPENDS= tag:${PORTSDIR}/audio/taglib
364
365 # theora
366 gst_theora_LIB_DEPENDS= theora:${PORTSDIR}/multimedia/libtheora
367
368 # twolame
369 gst_twolame_LIB_DEPENDS=        twolame:${PORTSDIR}/audio/twolame
370
371 # gst_v4l2
372 gst_gst_v4l2_BUILD_DEPENDS=     v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat
373 gst_gst_v4l2_LIB_DEPENDS=       v4l2:${PORTSDIR}/multimedia/libv4l
374 gst_gst_v4l2_RUN_DEPENDS=       webcamd:${PORTSDIR}/multimedia/webcamd
375 gst_gst_v4l2_PLIST_FILES=       ${GST_LIB_DIR}/libgstvideo4linux2.la \
376                                 ${GST_LIB_DIR}/libgstvideo4linux2.so
377 gst_gst_v4l2_GST_PLUGIN_DIR=    sys/v4l2
378
379 # vorbis
380 gst_vorbis_USE_GSTREAMER1=      ogg
381 gst_vorbis_LIB_DEPENDS= vorbis:${PORTSDIR}/audio/libvorbis
382
383 # vpx
384 gst_vpx_LIB_DEPENDS=    vpx:${PORTSDIR}/multimedia/libvpx
385
386 # X ximage and xvimage sinks aka output
387 .if ${DIST} == base
388 gst_x_USE_XORG=         x11 xv xext
389 gst_x_CONFIGURE_ARGS=   --enable-xvideo --enable-xshm
390 gst_x_GST_PLUGIN_DIR=   sys/ximage sys/xvimage
391 gst_x_PLIST_FILES=      ${GST_LIB_DIR}/libgstximagesink.la \
392                         ${GST_LIB_DIR}/libgstximagesink.so \
393                         ${GST_LIB_DIR}/libgstxvimagesink.la \
394                         ${GST_LIB_DIR}/libgstxvimagesink.so
395 .endif
396
397 .if ${DIST} == good
398 # Ximagesrc
399 gst_x_USE_XORG=         x11 xfixes xdamage xext
400 gst_x_CONFIGURE_ARGS=   --enable-x
401 gst_x_GST_PLUGIN_DIR=   sys/ximage
402 gst_x_PLIST_FILES=      ${GST_LIB_DIR}/libgstximagesrc.la \
403                         ${GST_LIB_DIR}/libgstximagesrc.so
404 .endif
405
406 # x264
407 gst_x264_LIB_DEPENDS=   x264:${PORTSDIR}/multimedia/x264
408 gst_x264_PLIST_FILES=   ${GST_LIB_DIR}/libgstx264.la \
409                         ${GST_LIB_DIR}/libgstx264.so \
410                         share/gstreamer-${VERSION}/presets/GstX264Enc.prs
411 gst_x264_PLIST_DIRSTRY= share/gstreamer-${VERSION}/presets \
412                         share/gstreamer-${VERSION}
413
414 # xvid
415 gst_xvid_LIB_DEPENDS=   xvidcore:${PORTSDIR}/multimedia/xvid
416
417 # wavpack
418 gst_wavpack_LIB_DEPENDS=        wavpack:${PORTSDIR}/audio/wavpack
419
420 # zbar
421 gst_zbar_LIB_DEPENDS=   zbar:${PORTSDIR}/graphics/zbar
422
423 .endif # NO_GSTREAMER_COMMON
424
425 .if !defined(NO_GSTREAMER_COMMON)
426 gst_${GST_PLUGIN}_BUILD_DEPENDS?=
427 gst_${GST_PLUGIN}_LIB_DEPENDS?=
428 gst_${GST_PLUGIN}_RUN_DEPENDS?=
429 gst_${GST_PLUGIN}_USE_XORG?=
430 gst_${GST_PLUGIN}_PLIST_FILES?= \
431                 ${GST_LIB_DIR}/libgst${GST_PLUGIN}${GST_PLIST_SUFFIX}.la \
432                 ${GST_LIB_DIR}/libgst${GST_PLUGIN}${GST_PLIST_SUFFIX}.so
433 gst_${GST_PLUGIN}_EXTRA_LIBS?=
434 gst_${GST_PLUGIN}_PREBUILD_DIR?=
435 gst_${GST_PLUGIN}_GST_PLUGIN_DIR?=      ext/${GST_PLUGIN}
436 gst_${GST_PLUGIN}_POSTBUILD_DIR?=
437 gst_${GST_PLUGIN}_USE_GNOME?=
438 gst_${GST_PLUGIN}_CONFIGURE_ENV?=
439 gst_${GST_PLUGIN}_GLIB_SCHEMAS?=
440 gst_${GST_PLUGIN}_CONFIGURE_ARGS?=
441 gst_${GST_PLUGIN}_USE_SDL?=
442 gst_${GST_PLUGIN}_USE_GSTREAMER1?=
443
444 BUILD_DEPENDS+= ${gst_${GST_PLUGIN}_BUILD_DEPENDS}
445 LIB_DEPENDS+=   ${gst_${GST_PLUGIN}_LIB_DEPENDS}
446 RUN_DEPENDS+=   ${gst_${GST_PLUGIN}_RUN_DEPENDS}
447 PLIST_FILES=    ${gst_${GST_PLUGIN}_PLIST_FILES}
448 PLIST_DIRS=     ${gst_${GST_PLUGIN}_PLIST_DIRS}
449 PLIST_DIRSTRY=  ${gst_${GST_PLUGIN}_PLIST_DIRSTRY}
450 EXTRA_LIBS+=    ${gst_${GST_PLUGIN}_EXTRA_LIBS}
451 USE_XORG+=      ${gst_${GST_PLUGIN}_USE_XORG}
452 USE_GNOME+=     ${gst_${GST_PLUGIN}_USE_GNOME}
453 CONFIGURE_ENV+= ${gst_${GST_PLUGIN}_CONFIGURE_ENV}
454
455 .if ${gst_${GST_PLUGIN}_GLIB_SCHEMAS}!=""
456 GLIB_SCHEMAS=   ${gst_${GST_PLUGIN}_GLIB_SCHEMAS}
457 .endif
458
459 CONFIGURE_ARGS+=        ${gst_${GST_PLUGIN}_CONFIGURE_ARGS}
460
461 .if ${gst_${GST_PLUGIN}_USE_SDL}!=""
462 USE_SDL=                ${gst_${GST_PLUGIN}_USE_SDL}
463 .endif
464
465 USE_GSTREAMER1+=        ${gst_${GST_PLUGIN}_USE_GSTREAMER1} ${DIST:base=yes}
466 GST_PREBUILD_DIR=       ${gst_${GST_PLUGIN}_GST_PREBUILD_DIR}
467 GST_PLUGIN_DIR=         ${gst_${GST_PLUGIN}_GST_PLUGIN_DIR}
468 GST_POSTBUILD_DIR=      ${gst_${GST_PLUGIN}_GST_POSTBUILD_DIR}
469
470 .if !target(do-build)
471 do-build:
472 .for dir in ${GST_PREBUILD_DIR} ${GST_PLUGIN_DIR} ${GST_POSTBUILD_DIR}
473         @cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
474                 ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
475 .endfor
476 .endif
477
478 .if !target(do-install)
479 do-install:
480 .for dir in ${GST_PLUGIN_DIR}
481         @cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
482                 ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}
483 .endfor
484 .endif
485 .endif