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.

245 lines
5.9 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.18.5
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
  13. PKG_HASH:=55862232a63459bbf56abebde3085ca9aec211b478e891dacea4d6df8cafe80a
  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:=glib2/host gettext-full/host
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. include $(INCLUDE_DIR)/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=true \
  96. -Dtracer_hooks=false \
  97. -Dptp-helper-setuid-user=none \
  98. -Dptp-helper-setuid-group=none \
  99. -Doption-parsing=true \
  100. -Dpoisoning=false \
  101. -Dmemory-alignment=malloc \
  102. -Dcheck=enabled \
  103. -Dlibunwind=disabled \
  104. -Dlibdw=disabled \
  105. -Ddbghelp=disabled \
  106. -Dbash-completion=disabled \
  107. -Dcoretracers=disabled \
  108. -Dexamples=disabled \
  109. -Dbenchmarks=disabled \
  110. -Dtools=enabled \
  111. -Dgtk_doc=disabled \
  112. -Dintrospection=disabled \
  113. -Dnls=enabled \
  114. -Dgobject-cast-checks=disabled \
  115. -Dglib-asserts=disabled \
  116. -Dextra-checks=disabled \
  117. -Ddoc=disabled
  118. define Build/InstallDev
  119. $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
  120. ( cd $(PKG_INSTALL_DIR); $(CP) \
  121. ./usr/include/gstreamer-$(GST_VERSION)/* \
  122. $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
  123. )
  124. $(INSTALL_DIR) $(1)/usr/lib
  125. ( cd $(PKG_INSTALL_DIR); $(CP) \
  126. ./usr/lib/libgst*-$(GST_VERSION).so* \
  127. $(1)/usr/lib/ \
  128. )
  129. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  130. ( cd $(PKG_INSTALL_DIR); $(CP) \
  131. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  132. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  133. )
  134. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  135. ( cd $(PKG_INSTALL_DIR); $(CP) \
  136. ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
  137. $(1)/usr/lib/pkgconfig/ \
  138. )
  139. $(INSTALL_DIR) $(2)/share/aclocal
  140. ( cd $(PKG_INSTALL_DIR); $(CP) \
  141. ./usr/share/aclocal/* \
  142. $(2)/share/aclocal/ \
  143. )
  144. endef
  145. define Package/gstreamer1/install
  146. true
  147. endef
  148. define Package/gstreamer1-libs/install
  149. true
  150. endef
  151. define Package/gstreamer1-utils/install
  152. $(INSTALL_DIR) $(1)/usr/bin
  153. ( cd $(PKG_INSTALL_DIR); $(CP) \
  154. ./usr/bin/gst-launch* \
  155. ./usr/bin/gst-inspect* \
  156. ./usr/bin/gst-typefind* \
  157. $(1)/usr/bin/ \
  158. )
  159. endef
  160. define Package/libgstreamer1/install
  161. $(INSTALL_DIR) $(1)/usr/lib
  162. ( cd $(PKG_INSTALL_DIR); $(CP) \
  163. ./usr/lib/libgstbase-$(GST_VERSION).so.* \
  164. ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
  165. $(1)/usr/lib/ \
  166. )
  167. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  168. ( cd $(PKG_INSTALL_DIR); $(CP) \
  169. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  170. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  171. )
  172. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/gstreamer-$(GST_VERSION)/gst-plugin-scanner \
  173. $(1)/usr/lib/gstreamer-$(GST_VERSION)
  174. endef
  175. # 1: short name
  176. # 2: description
  177. # 3: dependencies on other gstreamer libraries (short name)
  178. # 4: dependencies on other packages
  179. define GstBuildLibrary
  180. define Package/libgst1$(1)
  181. $(call Package/gstreamer1/Default)
  182. TITLE+= $(2) library (core)
  183. DEPENDS+= +libgstreamer1 $$(foreach p,$(3),+libgst1$$(p)) $(4)
  184. HIDDEN:=1
  185. endef
  186. define Package/libgst1$(1)/description
  187. $(call Package/gstreamer1/description/Default)
  188. .
  189. This package contains the GStreamer $(2) library.
  190. endef
  191. define Package/libgst1$(1)/install
  192. $(INSTALL_DIR) $$(1)/usr/lib
  193. ( cd $(PKG_INSTALL_DIR); $(CP) \
  194. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  195. $$(1)/usr/lib/ \
  196. )
  197. endef
  198. $$(eval $$(call BuildPackage,libgst1$(1)))
  199. endef
  200. $(eval $(call GstBuildLibrary,check,check unit testing))
  201. $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
  202. $(eval $(call GstBuildLibrary,net,network classes))
  203. $(eval $(call BuildPackage,libgstreamer1))
  204. $(eval $(call BuildPackage,gstreamer1-libs))
  205. $(eval $(call BuildPackage,gstreamer1-utils))
  206. $(eval $(call BuildPackage,gstreamer1))