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.

88 lines
2.3 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-20180401-2245
  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_HASH:=657a915497a5b0ffed3598988657395358cf4dc961db14aebd918b7ffb7c5364
  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:=$(filter-out -O%,$(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. # AMD Geode LX and i486 do not have SSE
  24. CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale \
  25. mips32 24kc 34kc 74kc octeon mips64
  26. ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
  27. CONFIGURE_VARS+= AS=
  28. MAKE_FLAGS+= AS=
  29. CONFIGURE_ARGS += --disable-asm
  30. else
  31. ifneq ($(CONFIG_TARGET_x86),)
  32. ifeq ($(CONFIG_NASM),y)
  33. CONFIGURE_VARS+= AS=nasm
  34. MAKE_FLAGS+= AS=nasm
  35. else
  36. CONFIGURE_VARS+= AS=
  37. MAKE_FLAGS+= AS=
  38. CONFIGURE_ARGS += --disable-asm
  39. endif
  40. endif
  41. endif
  42. CONFIGURE_ARGS += \
  43. --enable-shared \
  44. --enable-pic \
  45. --enable-strip \
  46. --disable-cli \
  47. --disable-avs \
  48. --disable-ffms \
  49. --disable-lsmash
  50. define Package/libx264
  51. SECTION:=libs
  52. CATEGORY:=Libraries
  53. TITLE:=H264/AVC free codec library.
  54. DEPENDS:=+libpthread @BUILD_PATENTED
  55. URL:=http://www.videolan.org/developers/x264.html
  56. endef
  57. define Package/libx264/description
  58. x264 is a free software library for encoding
  59. video streams into the H.264/MPEG-4 AVC compression format.
  60. endef
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/include/x264/
  63. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  64. $(INSTALL_DIR) $(1)/usr/lib/
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  66. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  67. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
  68. endef
  69. define Package/libx264/install
  70. $(INSTALL_DIR) $(1)/usr/lib/
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  72. endef
  73. $(eval $(call BuildPackage,libx264))