summaryrefslogtreecommitdiffstats
path: root/multimedia/gstreamer-plugins/Makefile.common
blob: ea2c4e76a76ee481b11df0f9092a2bca4374b4d0 (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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# base
BASE_GST_ALL_PLUGINS= \
        alsa \
        cdparanoia \
        gnomevfs \
        libvisual \
        ogg \
        pango \
        theora \
        vorbis
# bad
BAD_GST_ALL_PLUGINS+= \
        directfb \
        faac \
        faad \
        gsm \
        ivorbis \
        libmms \
        musepack \
        sdl \
        wavpack
# good
GOOD_GST_ALL_PLUGINS+= \
        aalib \
        cairo \
        dv \
        esd \
        flac \
        gconf \
        jpeg \
        ladspa \
        libcaca \
        libpng \
        raw1394 \
        shout2 \
        speex
# Ugly
UGLY_GST_ALL_PLUGINS+= \
        a52dec \
        amrnb \
        lame \
        mad \
        mpeg2dec \
        sidplay

.if 0 # SOME ONE MAKE THIS FREAKING WORK!!!!!
.if ${BASE_GST_ALL_PLUGINS:M${GST_PLUGIN}}!=""
EXTRACT_ONLY=${BASE_DISTFILE}
WRKSRC=${WRKDIR}/${BASE_DISTNAME}
.elif ${BAD_GST_ALL_PLUGINS:M${GST_PLUGIN}}!=""
EXTRACT_ONLY=${BAD_DISTFILE}
WRKSRC=${WRKDIR}/${BAD_DISTNAME}
.elif ${GOOD_GST_ALL_PLUGINS:M${GST_PLUGIN}}!=""
EXTRACT_ONLY=${GOOD_DISTFILE}
WRKSRC=${WRKDIR}/${GOOD_DISTNAME}
.elif ${UGLY_GST_ALL_PLUGINS:M${GST_PLUGIN}}!=""
EXTRACT_ONLY=${UGLY_DISTFILE}
WRKSRC=${WRKDIR}/${UGLY_DISTNAME}
.else
EXTRACT_ONLY=${BASE_DISTFILE}
WRKSRC=${WRKDIR}/${BASE_DISTNAME}
.endif
.endif

GST_ALL_PLUGINS=    ${BASE_GST_ALL_PLUGINS} ${BAD_GST_ALL_PLUGINS} \
            ${GOOD_GST_ALL_PLUGINS} ${UGLY_ALL_PLUGINS}

# Disable all plugins by default
.for d in ${GST_ALL_PLUGINS}
CONFIGURE_ARGS+=    --disable-${d}
.endfor
CONFIGURE_ARGS+=    --enable-${GST_PLUGIN}

CONFIGURE_ARGS+=--disable-tests \
        --disable-examples \
        --disable-amrnb \
        --disable-alsa \
        --disable-http \
        --enable-cdrom \
        --disable-gconf \
        --disable-gconftool \
        --disable-schemas-install \
        --enable-oss \
        --disable-osx_audio \
        --disable-osx_video \
        --disable-tarkin \
        --enable-static \
        --disable-sunaudio \
        --disable-gst_v4l \
        --disable-gst_v4l2 \
        --disable-xine \
        --enable-x \
        --enable-xshm \
        --enable-xvideo

# spc is broken a the moment
#.if (${ARCH} == "i386")
#BUILD_DEPENDS+=    nasm:${PORTSDIR}/devel/nasm
#CONFIGURE_ARGS+=--enable-spc
#PLIST_SUB+=    SPC=""
#.else
CONFIGURE_ARGS+=--disable-spc
PLIST_SUB+= SPC="@comment "
#.endif

.if ${GST_PLUGIN}!="base" && !defined(NO_GSTREAMER_COMMON)
GST_PLUGIN_SUFFIX?= -${GST_PLUGIN}

COMMENT=    Gstreamer ${GST_PLUGIN} plugin

# Enable the right plugin

CONFIGURE_ARGS:=${CONFIGURE_ARGS:S|--disable-${GST_PLUGIN}|--enable-${GST_PLUGIN}|}

# Build/Install directory. defaults to ext/${GST_PLUGIN}
#   few plugins are in sys/
GST_PLUGIN_DIR?=    ext/${GST_PLUGIN}

#
GST_LIB_DIR=        lib/gstreamer-${VERSION}

# Auto create PLIST
PLIST=      ${NONEXISTENT}
PLIST_FILES?=   ${GST_LIB_DIR}/libgst${GST_PLUGIN}${GST_PLIST_SUFFIX}.so

# hack around WRKSRC stuff near the top... fix me
DIST?=  good

# a52dec
.if ${GST_PLUGIN}=="a52dec"
LIB_DEPENDS+=   a52.0:${PORTSDIR}/audio/liba52
DIST=   ugly
.endif

# aalib
.if ${GST_PLUGIN}=="aalib"
LIB_DEPENDS+=   aa.1:${PORTSDIR}/graphics/aalib
PLIST_FILES=    ${GST_LIB_DIR}/libgstaasink.so
.endif

# cairo
.if ${GST_PLUGIN}=="cairo"
LIB_DEPENDS+=   cairo.2:${PORTSDIR}/graphics/cairo
.endif

# cdparanoia
.if ${GST_PLUGIN}=="cdparanoia"
LIB_DEPENDS+=   cdda_interface.0:${PORTSDIR}/audio/cdparanoia
EXTRA_LIBS+=    -lgstcdda-${VERSION}
DIST=   base
.endif

# dv
.if ${GST_PLUGIN}=="dv"
LIB_DEPENDS+=   dv.4:${PORTSDIR}/multimedia/libdv
.endif

# esound
.if ${GST_PLUGIN}=="esound"
USE_GNOME+= esound
GST_PLUGIN_DIR= ext/esd
PLIST_FILES=    ${GST_LIB_DIR}/libgstesd.so
.endif

# faac
.if ${GST_PLUGIN}=="faac"
LIB_DEPENDS+=   faac.0:${PORTSDIR}/audio/faac
DIST=   bad
.endif

# faad
.if ${GST_PLUGIN}=="faad"
LIB_DEPENDS+=   faad.0:${PORTSDIR}/audio/faad
DIST=   bad
.endif

# flac
.if ${GST_PLUGIN}=="flac"
LIB_DEPENDS+=   FLAC.7:${PORTSDIR}/audio/flac
.endif

# gconf
.if ${GST_PLUGIN}=="gconf"
USE_GNOME+= gconf2
GST_PLUGIN_DIR= ext/gconf \
        gconf
GCONF_SCHEMAS=  gstreamer-0.10.schemas
PLIST_FILES=    ${GST_LIB_DIR}/libgstgconfelements.so
.endif

# gnomevfs
.if ${GST_PLUGIN}=="gnomevfs"
USE_GNOME+= gnomevfs2
CONFIGURE_ARGS+=--enable-gnome_vfs
DIST=   base
.endif

# gsm
.if ${GST_PLUGIN}=="gsm"
LIB_DEPENDS+=   gsm.1:${PORTSDIR}/audio/gsm
DIST=   bad
.endif

# ivorbis
.if ${GST_PLUGIN}=="ivorbis"
LIB_DEPENDS+=   vorbisidec.1:${PORTSDIR}/audio/libtremor
DIST=   bad
.endif

# jpeg
.if ${GST_PLUGIN}=="jpeg"
LIB_DEPENDS+=   jpeg.9:${PORTSDIR}/graphics/jpeg
.endif

# ladspa
.if ${GST_PLUGIN}=="ladspa"
BUILD_DEPENDS+= ${LOCALBASE}/include/ladspa.h:${PORTSDIR}/audio/ladspa
.endif

# lame
.if ${GST_PLUGIN}=="lame"
LIB_DEPENDS+=   mp3lame.0:${PORTSDIR}/audio/lame
DIST=   ugly
.endif

# libcaca
.if ${GST_PLUGIN}=="libcaca"
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcaca.a:${PORTSDIR}/graphics/libcaca
PLIST_FILES=    ${GST_LIB_DIR}/libgstcacasink.so
.endif

# libmms
.if ${GST_PLUGIN}=="libmms"
LIB_DEPENDS+=   mms.0:${PORTSDIR}/net/libmms
PLIST_FILES=    ${GST_LIB_DIR}/libgstmms.so
DIST=   bad
.endif

# libpng and the snapshot plugin
.if ${GST_PLUGIN}=="libpng"
LIB_DEPENDS+=   png.5:${PORTSDIR}/graphics/png
GST_PLUGIN_DIR= ext/libpng
PLIST_FILES=    ${GST_LIB_DIR}/libgstpng.so
.endif

# libvisual
.if ${GST_PLUGIN}=="libvisual"
LIB_DEPENDS+=   visual.0:${PORTSDIR}/graphics/libvisual
DIST=   base
.endif

# mad
.if ${GST_PLUGIN}=="mad"
LIB_DEPENDS+=   mad.2:${PORTSDIR}/audio/libmad \
        id3tag.0:${PORTSDIR}/audio/libid3tag
DIST=   ugly
.endif

# mpeg2dec
.if ${GST_PLUGIN}=="mpeg2dec"
LIB_DEPENDS+=   mpeg2.0:${PORTSDIR}/multimedia/libmpeg2
DIST=   ugly
.endif

# musepack
.if ${GST_PLUGIN}=="musepack"
LIB_DEPENDS+=   mpcdec.3:${PORTSDIR}/audio/libmpcdec
DIST=   bad
.endif

# ogg
.if ${GST_PLUGIN}=="ogg"
LIB_DEPENDS+=   ogg.5:${PORTSDIR}/audio/libogg
EXTRA_LIBS+=    -lgstriff-${VERSION}
DIST=   base
.endif

# pango
.if ${GST_PLUGIN}=="pango"
USE_GNOME+= pango
DIST=   base
.endif

# sdl
.if ${GST_PLUGIN}=="sdl"
USE_SDL+=   sdl
GST_PLIST_SUFFIX=   videosink
DIST=   bad
.endif

# shout2
.if ${GST_PLUGIN}=="shout2"
LIB_DEPENDS+=   shout.5:${PORTSDIR}/audio/libshout2
.endif

# sidplay
.if ${GST_PLUGIN}=="sidplay"
LIB_DEPENDS+=   sidplay.1:${PORTSDIR}/audio/libsidplay
PLIST_FILES=    ${GST_LIB_DIR}/libgstsid.so
DIST=   ugly
.endif

# speex
.if ${GST_PLUGIN}=="speex"
LIB_DEPENDS+=   speex.3:${PORTSDIR}/audio/speex
.endif

# theora
.if ${GST_PLUGIN}=="theora"
LIB_DEPENDS+=   theora.1:${PORTSDIR}/multimedia/libtheora
DIST=   base
.endif

# vorbis
.if ${GST_PLUGIN}=="vorbis"
USE_GSTREAMER+= ogg
LIB_DEPENDS+=   vorbis.3:${PORTSDIR}/audio/libvorbis
EXTRA_LIBS+=    -lgsttag-${VERSION} -lgstaudio-${VERSION}
DIST=   base
.endif

# wavpack
.if ${GST_PLUGIN}=="wavpack"
LIB_DEPENDS+=   wavpack.0:${PORTSDIR}/audio/wavpack
DIST=   bad
.endif

.if ${DIST}=="base"
EXTRACT_ONLY=${BASE_DISTFILE}
WRKSRC=${WRKDIR}/${BASE_DISTNAME}
.elif ${DIST}=="bad"
EXTRACT_ONLY=${BAD_DISTFILE}
WRKSRC=${WRKDIR}/${BAD_DISTNAME}
.elif ${DIST}=="ugly"
EXTRACT_ONLY=${UGLY_DISTFILE}
WRKSRC=${WRKDIR}/${UGLY_DISTNAME}
.else
EXTRACT_ONLY=${GOOD_DISTFILE}
WRKSRC=${WRKDIR}/${GOOD_DISTNAME}
.endif

BUILD_DEPENDS+= gstreamer-plugins>=0.10.2:${PORTSDIR}/multimedia/gstreamer-plugins
RUN_DEPENDS+= gstreamer-plugins>=0.10.2:${PORTSDIR}/multimedia/gstreamer-plugins

do-build:
.for dir in ${GST_PREBUILD_DIR} ${GST_PLUGIN_DIR} ${GST_POSTBUILD_DIR}
    @cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
        ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
.endfor

do-install:
.for dir in ${GST_PLUGIN_DIR}
    @cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
        ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}
.endfor
.endif