generic-poky/meta/recipes-multimedia/libav/libav.inc

132 lines
4.4 KiB
PHP
Raw Normal View History

libav: add from meta-oe, update and tweak Changes from the meta-oe recipe: * Update stable recipe to 0.8.8 * Update git recipe to the tag for 9.8 (for now) * Switch over to a tarball for the release version recipe * Add LICENSE_FLAGS = "commercial" * Set SUMMARY instead of DESCRIPTION * Add yasm-native to DEPENDS since there is now a recipe for it * Remove libvpx from DEPENDS and add a PACKAGECONFIG option for it, disabled by default since it wasn't actually being enabled * Add a PACKAGECONFIG option for x11 to enable/disable x11grab, and add the proper DEPENDS if so (still defaults to enabled) * Add a number of other PACKAGECONFIG options, replacing some old comments as well as offering the ability to disable x264. * Hide text relocation warning when building for i586 (PIC can't be enabled for 32-bit x86). * Drop PR Notes for the git recipe: * This hasn't been able to be built recently in meta-oe since there was a circular dependency between libav and libpostproc. libpostproc is part of libav 0.8.x but was split out in 9+ and is not needed at all anymore by libav itself, so this dependency was removed. * Additionally the recipe was filtering out the option to enable libpostproc but this option wasn't being added by the inc file and thus the filter wasn't doing anything, so I dropped this as well. (From OE-Core rev: 9a670f780b1f1204d426017ff9a95842ad85800e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-05 16:47:39 +00:00
SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
HOMEPAGE = "http://libav.org/"
SECTION = "libs"
LICENSE = "GPLv2+"
LICENSE_FLAGS = "commercial"
# Provides ffmpeg compat, see http://libav.org/about.html
PROVIDES = "ffmpeg"
ARM_INSTRUCTION_SET = "arm"
DEPENDS = "virtual/libsdl zlib libogg libvorbis libtheora yasm-native"
INC_PR = "r8"
inherit autotools pkgconfig
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
EXTRA_FFCONF ?= ""
PACKAGECONFIG ??= "bzip2 x264 ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
libav: add from meta-oe, update and tweak Changes from the meta-oe recipe: * Update stable recipe to 0.8.8 * Update git recipe to the tag for 9.8 (for now) * Switch over to a tarball for the release version recipe * Add LICENSE_FLAGS = "commercial" * Set SUMMARY instead of DESCRIPTION * Add yasm-native to DEPENDS since there is now a recipe for it * Remove libvpx from DEPENDS and add a PACKAGECONFIG option for it, disabled by default since it wasn't actually being enabled * Add a PACKAGECONFIG option for x11 to enable/disable x11grab, and add the proper DEPENDS if so (still defaults to enabled) * Add a number of other PACKAGECONFIG options, replacing some old comments as well as offering the ability to disable x264. * Hide text relocation warning when building for i586 (PIC can't be enabled for 32-bit x86). * Drop PR Notes for the git recipe: * This hasn't been able to be built recently in meta-oe since there was a circular dependency between libav and libpostproc. libpostproc is part of libav 0.8.x but was split out in 9+ and is not needed at all anymore by libav itself, so this dependency was removed. * Additionally the recipe was filtering out the option to enable libpostproc but this option wasn't being added by the inc file and thus the filter wasn't doing anything, so I dropped this as well. (From OE-Core rev: 9a670f780b1f1204d426017ff9a95842ad85800e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-05 16:47:39 +00:00
PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto"
EXTRA_OECONF = " \
--enable-shared \
--enable-pthreads \
--enable-gpl \
--enable-avfilter \
\
--cross-prefix=${TARGET_PREFIX} \
--prefix=${prefix} \
\
--enable-avserver \
--enable-avplay \
--enable-libtheora \
--enable-libvorbis \
--arch=${TARGET_ARCH} \
--target-os="linux" \
--enable-cross-compile \
--extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
--extra-ldflags="${TARGET_LDFLAGS}" \
--sysroot="${STAGING_DIR_TARGET}" \
--enable-hardcoded-tables \
${EXTRA_FFCONF} \
--libdir=${libdir} \
--shlibdir=${libdir} \
libav: add from meta-oe, update and tweak Changes from the meta-oe recipe: * Update stable recipe to 0.8.8 * Update git recipe to the tag for 9.8 (for now) * Switch over to a tarball for the release version recipe * Add LICENSE_FLAGS = "commercial" * Set SUMMARY instead of DESCRIPTION * Add yasm-native to DEPENDS since there is now a recipe for it * Remove libvpx from DEPENDS and add a PACKAGECONFIG option for it, disabled by default since it wasn't actually being enabled * Add a PACKAGECONFIG option for x11 to enable/disable x11grab, and add the proper DEPENDS if so (still defaults to enabled) * Add a number of other PACKAGECONFIG options, replacing some old comments as well as offering the ability to disable x264. * Hide text relocation warning when building for i586 (PIC can't be enabled for 32-bit x86). * Drop PR Notes for the git recipe: * This hasn't been able to be built recently in meta-oe since there was a circular dependency between libav and libpostproc. libpostproc is part of libav 0.8.x but was split out in 9+ and is not needed at all anymore by libav itself, so this dependency was removed. * Additionally the recipe was filtering out the option to enable libpostproc but this option wasn't being added by the inc file and thus the filter wasn't doing anything, so I dropped this as well. (From OE-Core rev: 9a670f780b1f1204d426017ff9a95842ad85800e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-05 16:47:39 +00:00
"
do_configure() {
# We don't have TARGET_PREFIX-pkgconfig
sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure
mkdir -p ${B}
cd ${B}
${S}/configure ${EXTRA_OECONF}
sed -i -e s:Os:O4:g ${B}/config.h
}
do_install_append() {
install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
}
FFMPEG_LIBS = "libavcodec libavdevice libavformat \
libavutil libpostproc libswscale libavfilter"
PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
RSUGGESTS_${PN} = "mplayer"
FILES_${PN} = "${bindir}"
FILES_${PN}-dev = "${includedir}/${PN}"
FILES_${PN}-vhook = "${libdir}/vhook"
FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug"
FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset"
LEAD_SONAME = "libavcodec.so"
FILES_${PN}-dev = "${includedir}"
python populate_packages_prepend() {
av_libdir = d.expand('${libdir}')
av_pkgconfig = d.expand('${libdir}/pkgconfig')
# Runtime package
do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
output_pattern='lib%s',
description='libav %s library',
extra_depends='',
prepend=True,
allow_links=True)
# Development packages (-dev, -staticdev)
do_split_packages(d, av_libdir, '^lib(.*)\.so$',
output_pattern='lib%s-dev',
description='libav %s development package',
extra_depends='${PN}-dev',
prepend=True,
allow_links=True)
do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
output_pattern='lib%s-dev',
description='libav %s development package',
extra_depends='${PN}-dev',
prepend=True)
do_split_packages(d, av_libdir, '^lib(.*)\.a$',
output_pattern='lib%s-staticdev',
description='libav %s development package - static library',
extra_depends='${PN}-dev',
prepend=True,
allow_links=True)
if d.getVar('TARGET_ARCH', True) == 'i586':
# libav can't be build with -fPIC for 32-bit x86
pkgs = d.getVar('PACKAGES', True).split()
for pkg in pkgs:
d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
}
PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc).*"