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.

70 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2017 Daniel Engberg <daniel.engberg.lists@pyret.net>
  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:=fdk-aac
  9. PKG_VERSION:=0.1.5-20171030
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net>
  12. PKG_LICENSE:=Fraunhofer-FDK-AAC-for-Android
  13. PKG_LICENSE_FILES:=NOTICE
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL=https://github.com/mstorsjo/fdk-aac/
  16. PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=1e3515e03e2dbdbd48dacc31ef75d25c201a4c51
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  19. PKG_MIRROR_HASH:=80ac4644e07d5101f8e17e73df3dba4c69e143f5f9054ac3a201fb44a5fec8d0
  20. PKG_FIXUP:=autoreconf
  21. PKG_CONFIG_DEPENDS:= CONFIG_FDK-AAC_OPTIMIZE_SPEED
  22. ifeq ($(CONFIG_FDK-AAC_OPTIMIZE_SPEED),y)
  23. TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS))
  24. TARGET_CFLAGS += $(TARGET_CFLAGS) -O2 -flto
  25. TARGET_CXXFLAGS := $(filter-out -Os,$(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
  31. SECTION:=sound
  32. CATEGORY:=Sound
  33. DEPENDS:=@BUILD_PATENTED
  34. TITLE:=Fraunhofer FDK AAC Codec Library
  35. URL:=https://sourceforge.net/projects/opencore-amr/
  36. endef
  37. define Package/fdk-aac/description
  38. Port of the Fraunhofer FDK AAC Codec Library for Android
  39. endef
  40. define Package/fdk-aac/config
  41. source "$(SOURCE)/Config.in"
  42. endef
  43. define Package/fdk-aac/install
  44. $(INSTALL_DIR) $(1)/usr/lib/
  45. $(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/
  46. endef
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/include/fdk-aac
  49. $(CP) $(PKG_BUILD_DIR)/libAACdec/include/aacdecoder_lib.h $(1)/usr/include/fdk-aac
  50. $(CP) $(PKG_BUILD_DIR)/libAACenc/include/aacenc_lib.h $(1)/usr/include/fdk-aac
  51. $(CP) $(PKG_BUILD_DIR)/libSYS/include/FDK_audio.h $(1)/usr/include/fdk-aac
  52. $(CP) $(PKG_BUILD_DIR)/libSYS/include/genericStds.h $(1)/usr/include/fdk-aac
  53. $(CP) $(PKG_BUILD_DIR)/libSYS/include/machine_type.h $(1)/usr/include/fdk-aac
  54. $(INSTALL_DIR) $(1)/usr/lib/
  55. $(CP) $(PKG_BUILD_DIR)/.libs/*.{la,so*} $(1)/usr/lib/
  56. endef
  57. $(eval $(call BuildPackage,fdk-aac))