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.1 KiB

  1. #
  2. # Copyright (C) 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:=x264
  9. PKG_VERSION:=snapshot-20160815-2245-stable
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/
  13. PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>
  14. PKG_MD5SUM:=93fa596ea1b5513fec73e9de27589dd4
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. TARGET_CFLAGS+=-std=gnu99 -fPIC -O3 -ffast-math -I.
  21. MAKE_FLAGS+= LD="$(TARGET_CC) -o"
  22. # ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
  23. CPU_ASM_BLACKLIST:=arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale
  24. ifneq ($(CONFIG_TARGET_x86),)
  25. ifeq ($(CONFIG_YASM),y)
  26. CONFIGURE_VARS+= AS=yasm
  27. MAKE_FLAGS+= AS=yasm
  28. else
  29. CONFIGURE_VARS+= AS=
  30. MAKE_FLAGS+= AS=
  31. CONFIGURE_ARGS += --disable-asm
  32. endif
  33. endif
  34. ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(CONFIG_CPU_TYPE),$(CPU_ASM_BLACKLIST)),)
  35. CONFIGURE_VARS+= AS=
  36. MAKE_FLAGS+= AS=
  37. CONFIGURE_ARGS += --disable-asm
  38. endif
  39. CONFIGURE_ARGS += \
  40. --enable-shared \
  41. --enable-pic \
  42. --disable-cli
  43. define Package/libx264
  44. SECTION:=libs
  45. CATEGORY:=Libraries
  46. TITLE:=H264/AVC free codec library.
  47. DEPENDS:=+libpthread @BUILD_PATENTED
  48. URL:=http://www.videolan.org/developers/x264.html
  49. endef
  50. define Package/libx264/description
  51. x264 is a free software library for encoding
  52. video streams into the H.264/MPEG-4 AVC compression format.
  53. endef
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include/x264/
  56. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib/
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(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/libx264/install
  63. $(INSTALL_DIR) $(1)/usr/lib/
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  65. endef
  66. $(eval $(call BuildPackage,libx264))