1
0

Makefile 8.2 KB

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