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.

81 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2008-2015 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:=libvpx
  9. PKG_VERSION:=1.5.0
  10. PKG_RELEASE:=1
  11. PKG_REV:=v$(PKG_VERSION)
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
  13. PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=$(PKG_REV)
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  18. PKG_LICENSE:=BSD-3-Clause
  19. PKG_LICENSE_FILES:=LICENSE
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libvpx
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=libvpx
  26. URL:=http://www.webmproject.org/
  27. DEPENDS:=+libpthread
  28. ABI_VERSION:=$(PKG_VERSION)
  29. endef
  30. define Package/libvpx/description
  31. libvpx is a VP8/VP9 Codec SDK.
  32. endef
  33. CONFIGURE_ARGS = \
  34. --target=generic-gnu \
  35. --prefix=$(CONFIGURE_PREFIX) \
  36. --libdir=/usr/lib \
  37. --enable-static \
  38. --enable-shared \
  39. --disable-examples \
  40. --disable-docs \
  41. --disable-unit-tests \
  42. # Add --enable-small as openwrt gcc flags are overwritten
  43. ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
  44. CONFIGURE_ARGS += --enable-small
  45. endif
  46. # libvpx expects gcc as linker but uses $LD if provided
  47. # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
  48. CONFIGURE_VARS += \
  49. CROSS=$(GNU_TARGET_NAME) \
  50. LD="$(TARGET_CC)" \
  51. MAKE_FLAGS += \
  52. 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))