Merge pull request #2874 from dibdot/adblock
[feed/packages.git] / multimedia / gst1-plugins-base / Makefile
1 #
2 # Copyright (C) 2008-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gst1-plugins-base
11 PKG_VERSION:=1.6.2
12 PKG_RELEASE:=1
13
14 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
15
16 PKG_LICENSE:=LGPLv2 GPLv2
17 PKG_LICENSE_FILES:=COPYING.LIB COPYING
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
20 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
21 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-base/
22 PKG_MD5SUM:=f530fbbe287edce79c55a37bd1a39fe2
23
24 PKG_BUILD_DEPENDS:= libgstreamer1
25 PKG_CONFIG_DEPENDS:= \
26 CONFIG_PACKAGE_gst1-mod-alsa \
27 CONFIG_PACKAGE_gst1-mod-app \
28 CONFIG_PACKAGE_gst1-mod-audioconvert \
29 CONFIG_PACKAGE_gst1-mod-audiorate \
30 CONFIG_PACKAGE_gst1-mod-audioresample \
31 CONFIG_PACKAGE_gst1-mod-audiotestsrc \
32 CONFIG_PACKAGE_gst1-mod-gio \
33 CONFIG_PACKAGE_gst1-mod-ogg \
34 CONFIG_PACKAGE_gst1-mod-tcp \
35 CONFIG_PACKAGE_gst1-mod-theora \
36 CONFIG_PACKAGE_gst1-mod-videoconvert \
37 CONFIG_PACKAGE_gst1-mod-videotestsrc \
38 CONFIG_PACKAGE_gst1-mod-volume \
39 CONFIG_PACKAGE_gst1-mod-vorbis \
40 CONFIG_PACKAGE_libgst1app \
41
42 PKG_FIXUP:=autoreconf
43 PKG_INSTALL:=1
44
45 include $(INCLUDE_DIR)/package.mk
46 include $(INCLUDE_DIR)/nls.mk
47
48 GST_BASE_LIBS:=
49 GST_BASE_MODULES:=
50
51 define Package/gstreamer1-base/Default
52 CATEGORY:=Multimedia
53 SECTION:=multimedia
54 TITLE:=GStreamer
55 URL:=http://gstreamer.freedesktop.org/
56 DEPENDS:= +libgstreamer1 $(ICONV_DEPENDS)
57 endef
58
59 define Package/gstreamer1-base/description/Default
60 GStreamer open source multimedia framework
61 endef
62
63
64 define Package/gst1-plugins-base
65 $(call Package/gstreamer1-base/Default)
66 TITLE+= plugins collection (base)
67 DEPENDS+= $(GST_DEPENDS)
68 HIDDEN:=1
69 endef
70
71 define Package/gts1-plugins-base/description
72 $(call Package/gstreamer1-base/description/Default)
73 .
74 This meta package contains only dependencies to the other libraries and
75 plugins from the base plugins collection.
76 endef
77
78 define Package/gstreamer1-plugins-base
79 $(call Package/gstreamer1-base/Default)
80 TITLE+= plugins collection (base)
81 DEPENDS:=+ALL:gst1-plugins-base +gstreamer1-libs
82 endef
83
84 define Package/gstreamer1-plugins-base/config
85 menu "Select GStreamer base modules and libraries"
86 depends on PACKAGE_gstreamer1-plugins-base
87
88
89 config gst1-plugins-base-all
90 bool "Include all GStreamer base plugins"
91 select PACKAGE_gst1-plugins-base
92
93 comment "Modules"
94
95 $(foreach mod,$(GST_BASE_MODULES), \
96 config PACKAGE_gst1-mod-$(mod)
97 prompt "GStreamer $(mod) module"
98
99 )
100
101 comment "Libraries"
102
103 $(foreach lib,$(GST_BASE_LIBS), \
104 config PACKAGE_libgst1$(lib)
105 prompt "GStreamer $(lib) library"
106
107 )
108
109 endmenu
110
111 endef
112
113 GST_COND_SELECT = $(patsubst %,$(if $(CONFIG_PACKAGE_gst1-mod-$(1)),--enable,--disable)-%,$(1))
114
115 GST_VERSION:=1.0
116
117 CONFIGURE_ARGS += \
118 --disable-debug \
119 --disable-examples \
120 \
121 $(call GST_COND_SELECT,alsa) \
122 $(call GST_COND_SELECT,app) \
123 $(call GST_COND_SELECT,audioconvert) \
124 $(call GST_COND_SELECT,audiorate) \
125 $(call GST_COND_SELECT,audioresample) \
126 $(call GST_COND_SELECT,audiotestsrc) \
127 --disable-cdparanoia \
128 --disable-freetypetest \
129 $(call GST_COND_SELECT,gio) \
130 --disable-libvisual \
131 $(call GST_COND_SELECT,ogg) \
132 --disable-pango \
133 --disable-subparse \
134 $(call GST_COND_SELECT,tcp) \
135 $(call GST_COND_SELECT,theora) \
136 $(call GST_COND_SELECT,videorate) \
137 $(call GST_COND_SELECT,videoscale) \
138 $(call GST_COND_SELECT,videoconvert) \
139 $(call GST_COND_SELECT,videotestsrc) \
140 $(call GST_COND_SELECT,volume) \
141 $(call GST_COND_SELECT,vorbis) \
142 --disable-x \
143 --disable-xshm \
144 --disable-xvideo \
145 \
146 --without-libiconv-prefix \
147 --without-libintl-prefix \
148 --without-x \
149 \
150 --with-audioresample-format=int \
151
152 EXTRA_LDFLAGS+= \
153 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
154 $(if $(ICONV_FULL),-liconv) \
155
156 define Build/InstallDev
157 $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
158 ( cd $(PKG_INSTALL_DIR); $(CP) \
159 ./usr/include/gstreamer-$(GST_VERSION)/* \
160 $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
161 )
162 $(INSTALL_DIR) $(1)/usr/lib
163 ( cd $(PKG_INSTALL_DIR); $(CP) \
164 ./usr/lib/libgst*-$(GST_VERSION).{la,so*} \
165 $(1)/usr/lib/ \
166 )
167 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
168 ( cd $(PKG_INSTALL_DIR); $(CP) \
169 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
170 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
171 )
172 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
173 ( cd $(PKG_INSTALL_DIR); $(CP) \
174 ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
175 $(1)/usr/lib/pkgconfig/ \
176 )
177 endef
178
179
180 define Package/gst1-plugins-base/install
181 true
182 endef
183
184 define Package/gstreamer1-plugins-base/install
185 true
186 endef
187
188 # 1: short name
189 # 2: description
190 # 3: dependencies on other gstreamer libraries (short name)
191 # 4: dependencies on other packages
192 define GstBuildLibrary
193
194 GST_DEPENDS += +libgst1$(1)
195
196 GST_BASE_LIBS+= $(1)
197
198 define Package/libgst1$(1)
199 $(call Package/gstreamer1-base/Default)
200 TITLE+= $(2) library (base)
201 DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $(4)
202 HIDDEN:=1
203 endef
204
205 define Package/libgst1$(1)/description
206 $(call Package/gstreamer1-base/description/Default)
207 .
208 This package contains the GStreamer $(2) library.
209 endef
210
211 define Package/libgst1$(1)/install
212 $(INSTALL_DIR) $$(1)/usr/lib
213 ( cd $(PKG_INSTALL_DIR); $(CP) \
214 ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
215 $$(1)/usr/lib/ \
216 )
217 endef
218
219 $$(eval $$(call BuildPackage,libgst1$(1)))
220 endef
221
222 $(eval $(call GstBuildLibrary,allocators,allocators,,))
223 $(eval $(call GstBuildLibrary,app,app,,))
224 $(eval $(call GstBuildLibrary,audio,audio,tag,))
225 $(eval $(call GstBuildLibrary,fft,FFT,,))
226 $(eval $(call GstBuildLibrary,pbutils,utils,audio tag video,))
227 $(eval $(call GstBuildLibrary,riff,RIFF media,audio tag,,))
228 $(eval $(call GstBuildLibrary,rtp,RTP,,))
229 $(eval $(call GstBuildLibrary,rtsp,RTSP,,))
230 $(eval $(call GstBuildLibrary,sdp,SDP,,))
231 $(eval $(call GstBuildLibrary,tag,tag support,,))
232 $(eval $(call GstBuildLibrary,video,video,,))
233
234 # 1: short name
235 # 2: description
236 # 3: dependencies on other gstreamer libraries (short name)
237 # 4: dependencies on other gstreamer plugins (short name)
238 # 5: dependencies on other packages
239 define GstBuildPlugin
240
241 GST_DEPENDS += +gst1-mod-$(1)
242
243 GST_BASE_MODULES+= $(1)
244
245 define Package/gst1-mod-$(1)
246 $(call Package/gstreamer1-base/Default)
247 TITLE+= $(2) plugin (base)
248 DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $$(foreach p,$(4),+gst1-mod-$$(p)) $(5)
249 HIDDEN:=1
250 endef
251
252 define Package/gst1-mod-$(1)/description
253 $(call Package/gstreamer1-base/description/Default)
254 .
255 This package contains the GStreamer $(2) plugin.
256 endef
257
258 define Package/gst1-mod-$(1)/install
259 $(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
260 ( cd $(PKG_INSTALL_DIR); $(CP) \
261 ./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
262 $$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
263 )
264 endef
265
266 $$(eval $$(call BuildPackage,gst1-mod-$(1)))
267 endef
268
269 $(eval $(call GstBuildPlugin,alsa,ALSA,audio tag,,+alsa-lib))
270 $(eval $(call GstBuildPlugin,app,app,app,,))
271 $(eval $(call GstBuildPlugin,audioconvert,audio format conversion,audio,,))
272 $(eval $(call GstBuildPlugin,audiorate,audio rate adjusting,audio tag,,))
273 $(eval $(call GstBuildPlugin,audioresample,audio resampling,audio tag,,))
274 $(eval $(call GstBuildPlugin,audiotestsrc,audio test,audio tag controller,,))
275 $(eval $(call GstBuildPlugin,playback,media decoder (v2),pbutils,,))
276 $(eval $(call GstBuildPlugin,gio,GIO,,,))
277 $(eval $(call GstBuildPlugin,ogg,Ogg,riff tag pbutils video,,+libogg))
278 $(eval $(call GstBuildPlugin,tcp,TCP,net,,))
279 $(eval $(call GstBuildPlugin,theora,Theora,tag video,,+libogg +libtheora))
280 $(eval $(call GstBuildPlugin,typefindfunctions,'typefind' functions,audio pbutils tag video,,))
281 $(eval $(call GstBuildPlugin,videoconvert,video format conversion,video,,))
282 $(eval $(call GstBuildPlugin,videorate,Adjusts video frames,video,,))
283 $(eval $(call GstBuildPlugin,videoscale,Resizes video,video,,))
284 $(eval $(call GstBuildPlugin,videotestsrc,video test,video,,+liboil))
285 $(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil))
286 $(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis))
287
288 $(eval $(call BuildPackage,gstreamer1-plugins-base))
289 $(eval $(call BuildPackage,gst1-plugins-base))