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