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.

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