kumquat-buildroot/package/x264/x264.mk

70 lines
1.8 KiB
Makefile
Raw Normal View History

################################################################################
#
# x264
#
################################################################################
X264_VERSION = 7d0ff22e8c96de126be9d3de4952edd6d1b75a8c
X264_SITE = git://git.videolan.org/x264.git
X264_LICENSE = GPL-2.0+
X264_DEPENDENCIES = host-pkgconf
X264_LICENSE_FILES = COPYING
X264_INSTALL_STAGING = YES
X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale
ifeq ($(BR2_i386)$(BR2_x86_64),y)
# nasm needed for assembly files
X264_DEPENDENCIES += host-nasm
X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm"
package/x264: Fix aarch64 support, bump version The current x264 revision fails to include asm code from common/aarch64 which is needed by packages linking to x264, like ffmpeg: Quoting http://autobuild.buildroot.net/results/189/189f215bcbc510cd292c0f337fe6b39979f01813//ffmpeg-2.7.2/config.log /home/test/autobuild/instance-3/output/host/usr/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libx264.so: undefined reference to `x264_deblock_h_chroma_422_intra_neon' Function "chroma_422_intra_neon" is defined in x264/common/aarch64/deblock-a.S. The code in x264/common/aarch64/* is only compiled if an assembler was found: http://git.videolan.org/?p=x264.git;a=blob;f=Makefile;h=6193c5936939fda36f9a2e00c734223318ccda14;hb=HEAD#l134 To allow this add BR2_aarch64 as an assembler-enabled arch. This however breaks compilation due to broken NEON detection: "no NEON support, try adding -mfpu=neon to CFLAGS If you really want to run on such a CPU, configure with --disable-asm." The bug was fixed upstream Jul, 25th, 2015: http://git.videolan.org/?p=x264.git;a=commit;h=73ae2d11d472d0eb3b7c218dc1659db32f649b14 When we already have to do a version bump let's take the latest one ;) Fixes http://autobuild.buildroot.net/results/90a/90ae4b2fa8a6cff0f18abea2b1c45282afe99e4b/ http://autobuild.buildroot.net/results/109/109686cbc8327e62f757db576cfff49c490b52ae/ http://autobuild.buildroot.net/results/189/189f215bcbc510cd292c0f337fe6b39979f01813/ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-08-30 13:53:21 +02:00
else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y)
# We need to pass gcc as AS, because the ARM assembly files have to be
# preprocessed
X264_CONF_ENV += AS="$(TARGET_CC)"
else
X264_CONF_OPTS += --disable-asm
endif
ifeq ($(BR2_STATIC_LIBS),)
X264_CONF_OPTS += --enable-pic --enable-shared
endif
ifeq ($(BR2_PACKAGE_X264_CLI),)
X264_CONF_OPTS += --disable-cli
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
X264_CONF_OPTS += --disable-thread
endif
# Even though the configure script is not generated by autoconf, x264
# uses config.sub/config.guess, so we want up-to-date versions of
# them.
X264_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
# the configure script is not generated by autoconf
define X264_CONFIGURE_CMDS
(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \
--prefix=/usr \
--host="$(GNU_TARGET_NAME)" \
--cross-prefix="$(TARGET_CROSS)" \
--disable-ffms \
--enable-static \
--disable-opencl \
$(X264_CONF_OPTS) \
)
endef
define X264_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
define X264_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
endef
define X264_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
endef
$(eval $(generic-package))