blob: f95fb0c41e6c680a9a006e1ac7dc1682756c8057 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "H.264/MPEG-4 AVC video encoder"
2DESCRIPTION = "A free software library and application for encoding video streams into the H.264/MPEG-4 AVC format."
3HOMEPAGE = "http://www.videolan.org/developers/x264.html"
4
5LICENSE = "GPLv2"
6LICENSE_FLAGS = "commercial"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
8
Brad Bishop316dfdd2018-06-25 12:45:53 -04009DEPENDS = "nasm-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011SRC_URI = "git://github.com/mirror/x264;branch=stable \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012 file://don-t-default-to-cortex-a9-with-neon.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 file://Fix-X32-build-by-disabling-asm.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014 "
Brad Bishop316dfdd2018-06-25 12:45:53 -040015UPSTREAM_CHECK_COMMITS = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060017SRCREV = "544c61f082194728d0391fb280a6e138ba320a96"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060019PV = "r3039+git${SRCPV}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
21S = "${WORKDIR}/git"
22
Brad Bishop19323692019-04-05 15:28:33 -040023inherit lib_package pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
25X264_DISABLE_ASM = ""
Brad Bishop19323692019-04-05 15:28:33 -040026X264_DISABLE_ASM_x86 = "--disable-asm"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027X264_DISABLE_ASM_armv4 = "--disable-asm"
28X264_DISABLE_ASM_armv5 = "--disable-asm"
29X264_DISABLE_ASM_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030X264_DISABLE_ASM_mipsarch = "${@bb.utils.contains("TUNE_FEATURES", "r6", "", "--disable-asm", d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
32EXTRA_OECONF = '--prefix=${prefix} \
33 --host=${HOST_SYS} \
34 --libdir=${libdir} \
35 --cross-prefix=${TARGET_PREFIX} \
36 --sysroot=${STAGING_DIR_TARGET} \
37 --enable-shared \
38 --enable-static \
39 --disable-lavf \
40 --disable-swscale \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050041 --disable-opencl \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042 --enable-pic \
43 ${X264_DISABLE_ASM} \
44 '
45
46do_configure() {
Brad Bishop316dfdd2018-06-25 12:45:53 -040047 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
48 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049 ./configure ${EXTRA_OECONF}
50}
51
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052do_install() {
53 oe_runmake install DESTDIR=${D}
54}
55
Brad Bishop6e60e8b2018-02-01 10:27:11 -050056AS[unexport] = "1"