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.

305 lines
8.8 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.16.2
  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:=b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a
  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,ogg) \
  124. $(call GST_COND_SELECT,opus) \
  125. $(call GST_COND_SELECT,pango) \
  126. $(call GST_COND_SELECT,theora) \
  127. $(call GST_COND_SELECT,vorbis) \
  128. -Dx11=disabled \
  129. -Dxshm=disabled \
  130. -Dxvideo=disabled \
  131. \
  132. -Dexamples=disabled \
  133. -Dtests=disabled \
  134. -Dtools=disabled \
  135. -Dgtk_doc=disabled \
  136. -Dintrospection=disabled \
  137. -Dnls=enabled \
  138. -Dorc=disabled \
  139. -Dgobject-cast-checks=disabled \
  140. -Dglib-asserts=disabled \
  141. -Dglib-checks=disabled
  142. define Build/InstallDev
  143. $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
  144. ( cd $(PKG_INSTALL_DIR); $(CP) \
  145. ./usr/include/gstreamer-$(GST_VERSION)/* \
  146. $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
  147. )
  148. $(INSTALL_DIR) $(1)/usr/lib
  149. ( cd $(PKG_INSTALL_DIR); $(CP) \
  150. ./usr/lib/libgst*-$(GST_VERSION).so* \
  151. $(1)/usr/lib/ \
  152. )
  153. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  154. ( cd $(PKG_INSTALL_DIR); $(CP) \
  155. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  156. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  157. )
  158. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  159. ( cd $(PKG_INSTALL_DIR); $(CP) \
  160. ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
  161. $(1)/usr/lib/pkgconfig/ \
  162. )
  163. endef
  164. define Package/gst1-plugins-base/install
  165. true
  166. endef
  167. define Package/gstreamer1-plugins-base/install
  168. true
  169. endef
  170. # 1: short name
  171. # 2: description
  172. # 3: dependencies on other gstreamer libraries (short name)
  173. # 4: dependencies on other packages
  174. define GstBuildLibrary
  175. GST_DEPENDS += +libgst1$(1)
  176. GST_BASE_LIBS+= $(1)
  177. define Package/libgst1$(1)
  178. $(call Package/gstreamer1-base/Default)
  179. TITLE+= $(2) library (base)
  180. DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $(4)
  181. HIDDEN:=1
  182. endef
  183. define Package/libgst1$(1)/description
  184. $(call Package/gstreamer1-base/description/Default)
  185. .
  186. This package contains the GStreamer $(2) library.
  187. endef
  188. define Package/libgst1$(1)/install
  189. $(INSTALL_DIR) $$(1)/usr/lib
  190. ( cd $(PKG_INSTALL_DIR); $(CP) \
  191. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  192. $$(1)/usr/lib/ \
  193. )
  194. endef
  195. $$(eval $$(call BuildPackage,libgst1$(1)))
  196. endef
  197. $(eval $(call GstBuildLibrary,allocators,allocators,,))
  198. $(eval $(call GstBuildLibrary,app,app,,))
  199. $(eval $(call GstBuildLibrary,audio,audio,tag,))
  200. $(eval $(call GstBuildLibrary,fft,FFT,,))
  201. $(eval $(call GstBuildLibrary,pbutils,utils,audio tag video,))
  202. $(eval $(call GstBuildLibrary,riff,RIFF media,audio tag,,))
  203. $(eval $(call GstBuildLibrary,rtp,RTP,,))
  204. $(eval $(call GstBuildLibrary,rtsp,RTSP,,))
  205. $(eval $(call GstBuildLibrary,sdp,SDP,rtp,))
  206. $(eval $(call GstBuildLibrary,tag,tag support,,))
  207. $(eval $(call GstBuildLibrary,video,video,,))
  208. # 1: short name
  209. # 2: description
  210. # 3: dependencies on other gstreamer libraries (short name)
  211. # 4: dependencies on other gstreamer plugins (short name)
  212. # 5: dependencies on other packages
  213. define GstBuildPlugin
  214. GST_DEPENDS += +gst1-mod-$(1)
  215. GST_BASE_MODULES+= $(1)
  216. define Package/gst1-mod-$(1)
  217. $(call Package/gstreamer1-base/Default)
  218. TITLE+= $(2) plugin (base)
  219. DEPENDS+= $$(foreach p,$(3),+libgst1$$(p)) $$(foreach p,$(4),+gst1-mod-$$(p)) $(5)
  220. HIDDEN:=1
  221. endef
  222. define Package/gst1-mod-$(1)/description
  223. $(call Package/gstreamer1-base/description/Default)
  224. .
  225. This package contains the GStreamer $(2) plugin.
  226. endef
  227. define Package/gst1-mod-$(1)/install
  228. $(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
  229. ( cd $(PKG_INSTALL_DIR); $(CP) \
  230. ./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
  231. $$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  232. )
  233. endef
  234. $$(eval $$(call BuildPackage,gst1-mod-$(1)))
  235. endef
  236. $(eval $(call GstBuildPlugin,alsa,ALSA,audio tag,,+alsa-lib))
  237. $(eval $(call GstBuildPlugin,app,app,app,,))
  238. $(eval $(call GstBuildPlugin,audioconvert,audio format conversion,audio,,))
  239. $(eval $(call GstBuildPlugin,audiorate,audio rate adjusting,audio tag,,))
  240. $(eval $(call GstBuildPlugin,audioresample,audio resampling,audio tag,,))
  241. $(eval $(call GstBuildPlugin,audiotestsrc,audio test,audio tag controller,,))
  242. $(eval $(call GstBuildPlugin,playback,media decoder (v2),pbutils,,))
  243. $(eval $(call GstBuildPlugin,gio,GIO,,,))
  244. $(eval $(call GstBuildPlugin,ogg,Ogg,riff tag pbutils video,,+libogg))
  245. $(eval $(call GstBuildPlugin,opus,OPUS plugin library,pbutils video,,+libopus))
  246. $(eval $(call GstBuildPlugin,tcp,TCP,net,,))
  247. $(eval $(call GstBuildPlugin,theora,Theora,tag video,,+libogg +libtheora))
  248. $(eval $(call GstBuildPlugin,typefindfunctions,'typefind' functions,audio pbutils tag video,,))
  249. $(eval $(call GstBuildPlugin,videoconvert,video format conversion,video,,))
  250. $(eval $(call GstBuildPlugin,videorate,Adjusts video frames,video,,))
  251. $(eval $(call GstBuildPlugin,videoscale,Resizes video,video,,))
  252. $(eval $(call GstBuildPlugin,videotestsrc,video test,video,,+liboil))
  253. $(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil))
  254. $(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis))
  255. $(eval $(call BuildPackage,gstreamer1-plugins-base))
  256. $(eval $(call BuildPackage,gst1-plugins-base))