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.

324 lines
10 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gst1-plugins-base
  9. PKG_VERSION:=1.18.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base
  13. PKG_HASH:=1ba654d7de30f7284b4c7071b32f881b609733ce02ab6d9d9ea29386a036c641
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
  15. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
  16. Ted Hess <thess@kitschensync.net>
  17. PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
  18. PKG_LICENSE_FILES:=COPYING.LIB COPYING
  19. PKG_CPE_ID:=cpe:/a:gstreamer:gst-plugins-base
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. include ../../devel/meson/meson.mk
  24. PKG_CONFIG_DEPENDS:= \
  25. CONFIG_PACKAGE_gst1-mod-alsa \
  26. CONFIG_PACKAGE_gst1-mod-app \
  27. CONFIG_PACKAGE_gst1-mod-audioconvert \
  28. CONFIG_PACKAGE_gst1-mod-audiorate \
  29. CONFIG_PACKAGE_gst1-mod-audioresample \
  30. CONFIG_PACKAGE_gst1-mod-audiotestsrc \
  31. CONFIG_PACKAGE_gst1-mod-playback \
  32. CONFIG_PACKAGE_gst1-mod-gio \
  33. CONFIG_PACKAGE_gst1-mod-ogg \
  34. CONFIG_PACKAGE_gst1-mod-opus \
  35. CONFIG_PACKAGE_gst1-mod-tcp \
  36. CONFIG_PACKAGE_gst1-mod-theora \
  37. CONFIG_PACKAGE_gst1-mod-typefind \
  38. CONFIG_PACKAGE_gst1-mod-videoconvert \
  39. CONFIG_PACKAGE_gst1-mod-videorate \
  40. CONFIG_PACKAGE_gst1-mod-videoscale \
  41. CONFIG_PACKAGE_gst1-mod-videotestsrc \
  42. CONFIG_PACKAGE_gst1-mod-volume \
  43. CONFIG_PACKAGE_gst1-mod-vorbis \
  44. CONFIG_PACKAGE_libgst1app
  45. GST_BASE_LIBS:=
  46. GST_BASE_MODULES:=
  47. define Package/gstreamer1-base/Default
  48. CATEGORY:=Multimedia
  49. SECTION:=multimedia
  50. TITLE:=GStreamer
  51. URL:=https://gstreamer.freedesktop.org/
  52. DEPENDS:= +libgstreamer1 $(ICONV_DEPENDS)
  53. endef
  54. define Package/gstreamer1-base/description/Default
  55. GStreamer open source multimedia framework
  56. endef
  57. define Package/gst1-plugins-base
  58. $(call Package/gstreamer1-base/Default)
  59. TITLE+= plugins collection (base)
  60. DEPENDS+= $(GST_DEPENDS)
  61. HIDDEN:=1
  62. endef
  63. define Package/gts1-plugins-base/description
  64. $(call Package/gstreamer1-base/description/Default)
  65. .
  66. This meta package contains only dependencies to the other libraries and
  67. plugins from the base plugins collection.
  68. endef
  69. define Package/gstreamer1-plugins-base
  70. $(call Package/gstreamer1-base/Default)
  71. TITLE+= plugins collection (base)
  72. DEPENDS:=+ALL:gst1-plugins-base +gstreamer1-libs
  73. endef
  74. define Package/gstreamer1-plugins-base/config
  75. menu "Select GStreamer base modules and libraries"
  76. depends on PACKAGE_gstreamer1-plugins-base
  77. config gst1-plugins-base-all
  78. bool "Include all GStreamer base plugins"
  79. select PACKAGE_gst1-plugins-base
  80. comment "Modules"
  81. $(foreach mod,$(GST_BASE_MODULES), \
  82. config PACKAGE_gst1-mod-$(mod)
  83. prompt "GStreamer $(mod) module"
  84. )
  85. comment "Libraries"
  86. $(foreach lib,$(GST_BASE_LIBS), \
  87. config PACKAGE_libgst1$(lib)
  88. prompt "GStreamer $(lib) library"
  89. )
  90. endmenu
  91. endef
  92. GST_COND_SELECT = -D$(1)=$(if $(CONFIG_PACKAGE_gst1-mod-$(1)),en,dis)abled
  93. GST_VERSION:=1.0
  94. MESON_ARGS += \
  95. -Daudioresample_format=int \
  96. -Dgl=disabled \
  97. \
  98. $(call GST_COND_SELECT,adder) \
  99. $(call GST_COND_SELECT,app) \
  100. $(call GST_COND_SELECT,audioconvert) \
  101. $(call GST_COND_SELECT,audiomixer) \
  102. $(call GST_COND_SELECT,audiorate) \
  103. $(call GST_COND_SELECT,audioresample) \
  104. $(call GST_COND_SELECT,audiotestsrc) \
  105. $(call GST_COND_SELECT,compositor) \
  106. $(call GST_COND_SELECT,encoding) \
  107. $(call GST_COND_SELECT,gio) \
  108. $(call GST_COND_SELECT,overlaycomposition) \
  109. $(call GST_COND_SELECT,pbtypes) \
  110. $(call GST_COND_SELECT,playback) \
  111. $(call GST_COND_SELECT,rawparse) \
  112. $(call GST_COND_SELECT,subparse) \
  113. $(call GST_COND_SELECT,tcp) \
  114. -Dtypefind=$(if $(CONFIG_PACKAGE_gst1-mod-typefindfunctions),en,dis)abled \
  115. $(call GST_COND_SELECT,videoconvert) \
  116. $(call GST_COND_SELECT,videorate) \
  117. $(call GST_COND_SELECT,videoscale) \
  118. $(call GST_COND_SELECT,videotestsrc) \
  119. $(call GST_COND_SELECT,volume) \
  120. \
  121. $(call GST_COND_SELECT,alsa) \
  122. $(call GST_COND_SELECT,cdparanoia) \
  123. $(call GST_COND_SELECT,libvisual) \
  124. $(call GST_COND_SELECT,ogg) \
  125. $(call GST_COND_SELECT,opus) \
  126. $(call GST_COND_SELECT,pango) \
  127. $(call GST_COND_SELECT,theora) \
  128. $(call GST_COND_SELECT,tremor) \
  129. -Dtremor=$(if $(CONFIG_PACKAGE_gst1-mod-ivorbisdec),en,dis)abled \
  130. $(call GST_COND_SELECT,vorbis) \
  131. -Dx11=disabled \
  132. -Dxshm=disabled \
  133. -Dxvideo=disabled \
  134. \
  135. -Dexamples=disabled \
  136. -Dtests=disabled \
  137. -Dtools=disabled \
  138. -Dintrospection=disabled \
  139. -Dnls=enabled \
  140. -Dorc=disabled \
  141. -Dgobject-cast-checks=disabled \
  142. -Dglib-asserts=disabled \
  143. -Dglib-checks=disabled \
  144. -Ddoc=disabled
  145. define Build/InstallDev
  146. $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
  147. ( cd $(PKG_INSTALL_DIR); $(CP) \
  148. ./usr/include/gstreamer-$(GST_VERSION)/* \
  149. $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
  150. )
  151. $(INSTALL_DIR) $(1)/usr/lib
  152. ( cd $(PKG_INSTALL_DIR); $(CP) \
  153. ./usr/lib/libgst*-$(GST_VERSION).so* \
  154. $(1)/usr/lib/ \
  155. )
  156. if [ -d $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/ ]; then \
  157. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION); \
  158. ( cd $(PKG_INSTALL_DIR); $(FIND) \
  159. ./usr/lib/gstreamer-$(GST_VERSION)/ -name libgst*.so -print0 | \
  160. xargs --null --no-run-if-empty $(CP) \
  161. --target-directory=$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  162. ) \
  163. fi
  164. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  165. ( cd $(PKG_INSTALL_DIR); $(CP) \
  166. ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
  167. $(1)/usr/lib/pkgconfig/ \
  168. )
  169. endef
  170. define Package/gst1-plugins-base/install
  171. true
  172. endef
  173. define Package/gstreamer1-plugins-base/install
  174. true
  175. endef
  176. # 1: short name
  177. # 2: description
  178. # 3: dependencies on other gstreamer libraries (short name)
  179. # 4: dependencies on other packages
  180. define GstBuildLibrary
  181. GST_DEPENDS += +libgst1$(1)
  182. GST_BASE_LIBS+= $(1)
  183. define Package/libgst1$(1)
  184. $(call Package/gstreamer1-base/Default)
  185. TITLE+= $(2) library (base)
  186. DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $(4)
  187. HIDDEN:=1
  188. endef
  189. define Package/libgst1$(1)/description
  190. $(call Package/gstreamer1-base/description/Default)
  191. .
  192. This package contains the GStreamer $(2) library.
  193. endef
  194. define Package/libgst1$(1)/install
  195. $(INSTALL_DIR) $$(1)/usr/lib
  196. ( cd $(PKG_INSTALL_DIR); $(CP) \
  197. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  198. $$(1)/usr/lib/ \
  199. )
  200. endef
  201. $$(eval $$(call BuildPackage,libgst1$(1)))
  202. endef
  203. $(eval $(call GstBuildLibrary,allocators,allocators,,))
  204. $(eval $(call GstBuildLibrary,app,app,,))
  205. $(eval $(call GstBuildLibrary,audio,audio,tag,))
  206. $(eval $(call GstBuildLibrary,fft,FFT,,))
  207. $(eval $(call GstBuildLibrary,pbutils,utils,audio tag video,))
  208. $(eval $(call GstBuildLibrary,riff,RIFF media,audio tag,,))
  209. $(eval $(call GstBuildLibrary,rtp,RTP,,))
  210. $(eval $(call GstBuildLibrary,rtsp,RTSP,,))
  211. $(eval $(call GstBuildLibrary,sdp,SDP,rtp,))
  212. $(eval $(call GstBuildLibrary,tag,tag support,,))
  213. $(eval $(call GstBuildLibrary,video,video,,))
  214. # 1: short name
  215. # 2: description
  216. # 3: dependencies on other gstreamer libraries (short name)
  217. # 4: dependencies on other gstreamer plugins (short name)
  218. # 5: dependencies on other packages
  219. define GstBuildPlugin
  220. GST_DEPENDS += +gst1-mod-$(1)
  221. GST_BASE_MODULES+= $(1)
  222. define Package/gst1-mod-$(1)
  223. $(call Package/gstreamer1-base/Default)
  224. TITLE+= $(2) plugin (base)
  225. DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $$(foreach p,$(4),+gst1-mod-$$(p)) $(5)
  226. HIDDEN:=1
  227. endef
  228. define Package/gst1-mod-$(1)/description
  229. $(call Package/gstreamer1-base/description/Default)
  230. .
  231. This package contains the GStreamer $(2) plugin.
  232. endef
  233. define Package/gst1-mod-$(1)/install
  234. $(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
  235. ( cd $(PKG_INSTALL_DIR); $(CP) \
  236. ./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
  237. $$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  238. )
  239. endef
  240. $$(eval $$(call BuildPackage,gst1-mod-$(1)))
  241. endef
  242. $(eval $(call GstBuildPlugin,adder,adder,audio,,))
  243. $(eval $(call GstBuildPlugin,app,app,app,,))
  244. $(eval $(call GstBuildPlugin,audioconvert,audio format conversion,audio,,))
  245. $(eval $(call GstBuildPlugin,audiomixer,audio mixing,audio,,))
  246. $(eval $(call GstBuildPlugin,audiorate,audio rate adjusting,audio tag,,))
  247. $(eval $(call GstBuildPlugin,audioresample,audio resampling,audio tag,,))
  248. $(eval $(call GstBuildPlugin,audiotestsrc,audio test,audio tag controller,,))
  249. $(eval $(call GstBuildPlugin,compositor,video compositor,video,,))
  250. $(eval $(call GstBuildPlugin,encoding,encoding plugin,pbutils video,,))
  251. $(eval $(call GstBuildPlugin,gio,GIO,,,))
  252. $(eval $(call GstBuildPlugin,overlaycomposition,overlay composition,video,,))
  253. $(eval $(call GstBuildPlugin,pbtypes,pbtypes,video,,))
  254. $(eval $(call GstBuildPlugin,playback,playback,pbutils,,))
  255. $(eval $(call GstBuildPlugin,subparse,subparse,video,,))
  256. $(eval $(call GstBuildPlugin,rawparse,parse raw media,audio video,,))
  257. $(eval $(call GstBuildPlugin,tcp,TCP,net,,))
  258. $(eval $(call GstBuildPlugin,typefindfunctions,'typefind' functions,audio pbutils tag video,,))
  259. $(eval $(call GstBuildPlugin,videoconvert,video format conversion,video,,))
  260. $(eval $(call GstBuildPlugin,videorate,Adjusts video frames,video,,))
  261. $(eval $(call GstBuildPlugin,videoscale,Resizes video,video,,))
  262. $(eval $(call GstBuildPlugin,videotestsrc,video test,video,,+liboil))
  263. $(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil))
  264. $(eval $(call GstBuildPlugin,alsa,ALSA audio source/sink,audio tag,,+alsa-lib))
  265. $(eval $(call GstBuildPlugin,ivorbisdec,Integer Vorbis decoder plugin for devices without floating point,audio tag,,+libvorbisidec))
  266. #$(eval $(call GstBuildPlugin,cdparanoia,cdparanoia,,+libcdparanoia))
  267. #$(eval $(call GstBuildPlugin,libvisual,libvisual audio visualization,,+libvisual))
  268. $(eval $(call GstBuildPlugin,ogg,ogg parser muxer demuxer,riff tag pbutils video,,+libogg))
  269. $(eval $(call GstBuildPlugin,opus,OPUS audio codec,pbutils video,,+libopus))
  270. #$(eval $(call GstBuildPlugin,pango,Pango text rendering and overlay plugin,,+pango))
  271. $(eval $(call GstBuildPlugin,theora,Theora,tag video,,+libogg +libtheora))
  272. $(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis))
  273. $(eval $(call BuildPackage,gstreamer1-plugins-base))
  274. $(eval $(call BuildPackage,gst1-plugins-base))