You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

289 lines
7.8 KiB

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