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
1.9 KiB

  1. #
  2. # Copyright (C) 2008-2014 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.3.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. endef
  29. define Package/libvpx/description
  30. libvpx is a VP8/VP9 Codec SDK.
  31. endef
  32. CONFIGURE_ARGS = \
  33. --target=generic-gnu \
  34. --prefix=$(CONFIGURE_PREFIX) \
  35. --libdir=/usr/lib \
  36. --enable-static \
  37. --enable-shared \
  38. --disable-examples \
  39. --disable-docs \
  40. --disable-unit-tests \
  41. # Add --enable-small as openwrt gcc flags are overwritten
  42. ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
  43. CONFIGURE_ARGS += --enable-small
  44. endif
  45. # libvpx expects gcc as linker but uses $LD if provided
  46. # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
  47. CONFIGURE_VARS += \
  48. CROSS=$(GNU_TARGET_NAME) \
  49. LD="$(TARGET_CC)" \
  50. MAKE_FLAGS += \
  51. LD="$(TARGET_CC)" \
  52. define Build/InstallDev
  53. $(INSTALL_DIR) $(1)/usr/include/vpx/
  54. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
  55. $(INSTALL_DIR) $(1)/usr/lib/
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  58. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  59. endef
  60. define Package/libvpx/install
  61. $(INSTALL_DIR) $(1)/usr/lib/
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  63. endef
  64. $(eval $(call BuildPackage,libvpx))