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.

287 lines
7.9 KiB

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