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.

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