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.

74 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2014-2016 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:=opus
  9. PKG_VERSION:=1.3.1
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://archive.mozilla.org/pub/opus
  13. PKG_HASH:=65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d
  14. PKG_MAINTAINER:=Ted Hess <thess@kitchensync.net>, Ian Leonard <antonlacon@gmail.com>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:opus-codec:opus
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libopus
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=OPUS Audio Codec
  25. URL:=https://opus-codec.org
  26. endef
  27. define Package/libopus/description
  28. Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
  29. unmatched for interactive speech and music transmission over the Internet, but
  30. is also intended for storage and streaming applications.
  31. endef
  32. CONFIGURE_ARGS+= \
  33. --disable-doc \
  34. --disable-extra-programs
  35. ifeq ($(CONFIG_SOFT_FLOAT),y)
  36. CONFIGURE_ARGS+= \
  37. --enable-fixed-point
  38. endif
  39. ifneq ($(findstring neon,$(CONFIG_CPU_TYPE))$(findstring aarch64,$(CONFIG_ARCH)),)
  40. CONFIGURE_ARGS+= \
  41. --enable-fixed-point
  42. endif
  43. CPU_ASM_BLACKLIST:=xscale arm926ej-s
  44. ifneq ($(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
  45. CONFIGURE_ARGS+= --disable-asm
  46. endif
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/include
  49. $(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so* $(1)/usr/lib/
  52. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opus.pc $(1)/usr/lib/pkgconfig/
  54. endef
  55. define Package/libopus/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopus.so.* $(1)/usr/lib/
  58. endef
  59. $(eval $(call BuildPackage,libopus))