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.

80 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. # Copyright (C) 2016 Luiz Angelo Daros de Luca
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=libvpx
  10. PKG_VERSION:=1.11.0
  11. PKG_RELEASE:=$(AUTORELEASE)
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
  14. PKG_MIRROR_HASH:=495e1f6d389d1c3b613a97927df7750aa499c649fd11eec6e1c9dcf5f403f134
  15. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  16. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  17. PKG_LICENSE:=BSD-3-Clause
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_CPE_ID:=cpe:/a:john_koleszar:libvpx
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION))))
  22. PKG_INSTALL:=1
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/libvpx
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=libvpx
  28. URL:=https://www.webmproject.org/
  29. DEPENDS:=+libpthread
  30. ABI_VERSION:=$(PKG_ABI_VERSION)
  31. endef
  32. define Package/libvpx/description
  33. libvpx is a VP8/VP9 Codec SDK.
  34. endef
  35. CONFIGURE_ARGS = \
  36. --target=generic-gnu \
  37. --prefix=$(CONFIGURE_PREFIX) \
  38. --libdir=/usr/lib \
  39. --enable-static \
  40. --enable-shared \
  41. --disable-examples \
  42. --disable-docs \
  43. --disable-unit-tests \
  44. # Add --enable-small as openwrt gcc flags are overwritten
  45. ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
  46. CONFIGURE_ARGS += --enable-small
  47. endif
  48. # libvpx expects gcc as linker but uses $LD if provided
  49. # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
  50. CONFIGURE_VARS := $(filter-out LD=%,$(CONFIGURE_VARS)) LD="$(TARGET_CC)" \
  51. CROSS=$(GNU_TARGET_NAME)
  52. MAKE_FLAGS := $(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC)"
  53. define Build/InstallDev
  54. $(INSTALL_DIR) $(1)/usr/include/vpx/
  55. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
  56. $(INSTALL_DIR) $(1)/usr/lib/
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  59. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  60. endef
  61. define Package/libvpx/install
  62. $(INSTALL_DIR) $(1)/usr/lib/
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  64. endef
  65. $(eval $(call BuildPackage,libvpx))