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.

241 lines
5.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:=gstreamer1
  9. PKG_VERSION:=1.16.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
  13. PKG_HASH:=e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(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
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_CPE_ID:=cpe:/a:gstreamer_project:gstreamer
  20. PKG_INSTALL:=1
  21. PKG_BUILD_DEPENDS:=meson/host glib2/host
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. include ../../devel/meson/meson.mk
  25. define Package/gstreamer1/Default
  26. CATEGORY:=Multimedia
  27. SECTION:=multimedia
  28. TITLE:=GStreamer
  29. URL:=https://gstreamer.freedesktop.org/
  30. DEPENDS:= $(ICONV_DEPENDS) $(INTL_DEPENDS)
  31. endef
  32. define Package/gstreamer1/description/Default
  33. GStreamer open source multimedia framework
  34. endef
  35. GSTREAMER_CORE_LIBS:= \
  36. libgstreamer1 \
  37. libgst1check \
  38. libgst1controller \
  39. libgst1net
  40. define Package/gstreamer1
  41. $(call Package/gstreamer1/Default)
  42. TITLE+= (All libraries)
  43. DEPENDS:= $(foreach lib,$(GSTREAMER_CORE_LIBS),+$(lib))
  44. HIDDEN:=1
  45. endef
  46. define Package/gstreamer1-libs/description
  47. $(call Package/gstreamer1/description/Default)
  48. .
  49. This meta package contains only dependencies on the other GStreamer
  50. componenents.
  51. endef
  52. define Package/gstreamer1-libs
  53. $(call Package/gstreamer1/Default)
  54. TITLE+= core libraries
  55. DEPENDS+=+ALL:gstreamer1
  56. endef
  57. define Package/gstreamer1-libs/config
  58. menu "Select GStreamer libraries"
  59. depends on PACKAGE_gstreamer1-libs
  60. config gstreamer1-all
  61. bool "Include all GStreamer1 core libraries"
  62. select PACKAGE_gstreamer1
  63. comment "Libraries"
  64. $(foreach lib,$(GSTREAMER_CORE_LIBS), \
  65. config PACKAGE_$(lib)
  66. prompt "GStreamer core library $(lib)"
  67. )
  68. endmenu
  69. endef
  70. define Package/gstreamer1-utils
  71. $(call Package/gstreamer1/Default)
  72. TITLE+= utilities
  73. DEPENDS+= +libgstreamer1 +gstreamer1-libs
  74. endef
  75. define Package/gstreamer1-utils/description
  76. $(call Package/gstreamer1/description/Default)
  77. .
  78. This package contains the GStreamer utilities.
  79. endef
  80. define Package/libgstreamer1
  81. $(call Package/gstreamer1/Default)
  82. TITLE+= library (core)
  83. DEPENDS+= +glib2 +libpthread +libxml2
  84. HIDDEN:=1
  85. endef
  86. define Package/libgstreamer1/description
  87. $(call Package/gstreamer1/description/Default)
  88. .
  89. This package contains the GStreamer core library.
  90. endef
  91. GST_VERSION:=1.0
  92. MESON_ARGS += \
  93. -Dgst_debug=false \
  94. -Dgst_parse=true \
  95. -Dregistry=false \
  96. -Dtracer_hooks=false \
  97. -Dptp-helper-setuid-user=none \
  98. -Dextra-checks=false \
  99. -Doption-parsing=false \
  100. -Dpoisoning=false \
  101. -Dcheck=enabled \
  102. -Dlibunwind=disabled \
  103. -Dlibdw=disabled \
  104. -Ddbghelp=disabled \
  105. -Dbash-completion=disabled \
  106. -Dexamples=disabled \
  107. -Dbenchmarks=disabled \
  108. -Dtools=enabled \
  109. -Dgtk_doc=disabled \
  110. -Dintrospection=disabled \
  111. -Dnls=enabled \
  112. -Dgobject-cast-checks=disabled \
  113. -Dglib-asserts=disabled
  114. define Build/InstallDev
  115. $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
  116. ( cd $(PKG_INSTALL_DIR); $(CP) \
  117. ./usr/include/gstreamer-$(GST_VERSION)/* \
  118. $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
  119. )
  120. $(INSTALL_DIR) $(1)/usr/lib
  121. ( cd $(PKG_INSTALL_DIR); $(CP) \
  122. ./usr/lib/libgst*-$(GST_VERSION).so* \
  123. $(1)/usr/lib/ \
  124. )
  125. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  126. ( cd $(PKG_INSTALL_DIR); $(CP) \
  127. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  128. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  129. )
  130. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  131. ( cd $(PKG_INSTALL_DIR); $(CP) \
  132. ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
  133. $(1)/usr/lib/pkgconfig/ \
  134. )
  135. $(INSTALL_DIR) $(2)/share/aclocal
  136. ( cd $(PKG_INSTALL_DIR); $(CP) \
  137. ./usr/share/aclocal/* \
  138. $(2)/share/aclocal/ \
  139. )
  140. endef
  141. define Package/gstreamer1/install
  142. true
  143. endef
  144. define Package/gstreamer1-libs/install
  145. true
  146. endef
  147. define Package/gstreamer1-utils/install
  148. $(INSTALL_DIR) $(1)/usr/bin
  149. ( cd $(PKG_INSTALL_DIR); $(CP) \
  150. ./usr/bin/gst-launch* \
  151. ./usr/bin/gst-inspect* \
  152. ./usr/bin/gst-typefind* \
  153. $(1)/usr/bin/ \
  154. )
  155. endef
  156. define Package/libgstreamer1/install
  157. $(INSTALL_DIR) $(1)/usr/lib
  158. ( cd $(PKG_INSTALL_DIR); $(CP) \
  159. ./usr/lib/libgstbase-$(GST_VERSION).so.* \
  160. ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
  161. $(1)/usr/lib/ \
  162. )
  163. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  164. ( cd $(PKG_INSTALL_DIR); $(CP) \
  165. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  166. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  167. )
  168. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/gstreamer-$(GST_VERSION)/gst-plugin-scanner \
  169. $(1)/usr/lib/gstreamer-$(GST_VERSION)
  170. endef
  171. # 1: short name
  172. # 2: description
  173. # 3: dependencies on other gstreamer libraries (short name)
  174. # 4: dependencies on other packages
  175. define GstBuildLibrary
  176. define Package/libgst1$(1)
  177. $(call Package/gstreamer1/Default)
  178. TITLE+= $(2) library (core)
  179. DEPENDS+= +libgstreamer1 $$(foreach p,$(3),+libgst1$$(p)) $(4)
  180. HIDDEN:=1
  181. endef
  182. define Package/libgst1$(1)/description
  183. $(call Package/gstreamer1/description/Default)
  184. .
  185. This package contains the GStreamer $(2) library.
  186. endef
  187. define Package/libgst1$(1)/install
  188. $(INSTALL_DIR) $$(1)/usr/lib
  189. ( cd $(PKG_INSTALL_DIR); $(CP) \
  190. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  191. $$(1)/usr/lib/ \
  192. )
  193. endef
  194. $$(eval $$(call BuildPackage,libgst1$(1)))
  195. endef
  196. $(eval $(call GstBuildLibrary,check,check unit testing))
  197. $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
  198. $(eval $(call GstBuildLibrary,net,network classes))
  199. $(eval $(call BuildPackage,libgstreamer1))
  200. $(eval $(call BuildPackage,gstreamer1-libs))
  201. $(eval $(call BuildPackage,gstreamer1-utils))
  202. $(eval $(call BuildPackage,gstreamer1))