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.

104 lines
2.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=fdk-aac
  7. PKG_VERSION:=2.0.1
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v$(PKG_VERSION)?
  11. PKG_HASH:=a4142815d8d52d0e798212a5adea54ecf42bcd4eec8092b37a8cb615ace91dc6
  12. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  13. PKG_LICENSE:=Fraunhofer-FDK-AAC-for-Android
  14. PKG_LICENSE_FILES:=NOTICE
  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_CONFIG_DEPENDS:= CONFIG_FDK-AAC_OPTIMIZE_SPEED
  19. ifeq ($(BUILD_VARIANT),free)
  20. PATCH_DIR:=./patches-free
  21. endif
  22. ifeq ($(CONFIG_FDK-AAC_OPTIMIZE_SPEED),y)
  23. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
  24. TARGET_CFLAGS += $(TARGET_CFLAGS) -O2 -flto
  25. TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS))
  26. TARGET_CXXFLAGS += $(TARGET_CXXFLAGS) -O2 -flto
  27. TARGET_LDFLAGS += $(TARGET_LDFLAGS) -flto
  28. endif
  29. include $(INCLUDE_DIR)/package.mk
  30. define Package/fdk-aac/Default
  31. SECTION:=sound
  32. CATEGORY:=Sound
  33. TITLE:=Fraunhofer FDK AAC Codec Library
  34. URL:=https://sourceforge.net/projects/opencore-amr/
  35. endef
  36. define Package/fdk-aac/Default/description
  37. Port of the Fraunhofer FDK AAC Codec Library for Android
  38. endef
  39. define Package/fdk-aac/Default/config
  40. source "$(SOURCE)/Config.in"
  41. endef
  42. define Package/fdk-aac
  43. $(call Package/fdk-aac/Default)
  44. DEPENDS:=@BUILD_PATENTED
  45. VARIANT:=nonfree
  46. endef
  47. define Package/fdk-aac/description
  48. $(call Package/fdk-aac/Default/description)
  49. This is the full patent encumbered version.
  50. endef
  51. define Package/fdk-aac/config
  52. $(call Package/fdk-aac/Default/config)
  53. endef
  54. define Package/fdk-aac-free
  55. $(call Package/fdk-aac/Default)
  56. VARIANT:=free
  57. endef
  58. define Package/fdk-aac-free/description
  59. $(call Package/fdk-aac/Default/description)
  60. This is the free version that only supports LC-AAC.
  61. endef
  62. define Package/fdk-aac-free/config
  63. $(call Package/fdk-aac/Default/config)
  64. endef
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/fdk-aac $(1)/usr/include
  68. $(INSTALL_DIR) $(1)/usr/lib/
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdk-aac.{la,so*} $(1)/usr/lib/
  70. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdk-aac.pc $(1)/usr/lib/pkgconfig/
  72. endef
  73. define Package/fdk-aac/install
  74. $(INSTALL_DIR) $(1)/usr/lib/
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdk-aac.so* $(1)/usr/lib/
  76. endef
  77. define Package/fdk-aac-free/install
  78. $(INSTALL_DIR) $(1)/usr/lib/
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdk-aac.so* $(1)/usr/lib/
  80. endef
  81. $(eval $(call BuildPackage,fdk-aac))
  82. $(eval $(call BuildPackage,fdk-aac-free))