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.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.2.3
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  12. PKG_LICENSE:=LGPLv2 GPLv2
  13. PKG_LICENSE_FILE:=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:=17aeabfbcd232526f50c9bee375f1b97
  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. /bin/true
  153. endef
  154. # 1: short name
  155. # 2: description
  156. # 3: dependencies on other gstreamer libraries (short name)
  157. # 4: dependencies on other packages
  158. define GstBuildLibrary
  159. GST_DEPENDS += +libgst1$(1)
  160. GST_BASE_LIBS+= $(1)
  161. define Package/libgst1$(1)
  162. $(call Package/gstreamer1-base/Default)
  163. TITLE+= $(2) library (base)
  164. DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $(4)
  165. HIDDEN:=1
  166. endef
  167. define Package/libgst1$(1)/description
  168. $(call Package/gstreamer1-base/description/Default)
  169. .
  170. This package contains the GStreamer $(2) library.
  171. endef
  172. define Package/libgst1$(1)/install
  173. $(INSTALL_DIR) $$(1)/usr/lib
  174. ( cd $(PKG_INSTALL_DIR); $(CP) \
  175. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  176. $$(1)/usr/lib/ \
  177. )
  178. endef
  179. $$(eval $$(call BuildPackage,libgst1$(1)))
  180. endef
  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,videotestsrc,video test,video,,+liboil))
  232. $(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil))
  233. $(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis))
  234. $(eval $(call BuildPackage,gstreamer1-plugins-base))
  235. $(eval $(call BuildPackage,gst1-plugins-base))