summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-08-05 17:47:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-13 23:05:58 +0100
commit4acdab05e980302fe239a229fcf738501147cf9a (patch)
tree8ee3f4df2dff1fa98d911613f6465f91b9c60a03 /meta/recipes-multimedia
parent70711312008eda97ece45af73d68ba86f714a13f (diff)
downloadpoky-4acdab05e980302fe239a229fcf738501147cf9a.tar.gz
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>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/libav/libav-0.8.8/0001-configure-enable-pic-for-AArch64.patch23
-rw-r--r--meta/recipes-multimedia/libav/libav.inc129
-rw-r--r--meta/recipes-multimedia/libav/libav_0.8.8.bb18
-rw-r--r--meta/recipes-multimedia/libav/libav_git.bb16
4 files changed, 186 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libav/libav-0.8.8/0001-configure-enable-pic-for-AArch64.patch b/meta/recipes-multimedia/libav/libav-0.8.8/0001-configure-enable-pic-for-AArch64.patch
new file mode 100644
index 0000000000..d9b22b9b6a
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav-0.8.8/0001-configure-enable-pic-for-AArch64.patch
@@ -0,0 +1,23 @@
1From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
2From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
3Date: Thu, 10 Jan 2013 12:42:19 +0100
4Subject: [PATCH] configure: enable pic for AArch64
5
6Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
7
8Upstream-Status: Backport
9---
10 configure | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13--- git.orig/configure
14+++ git/configure
15@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
16 check_host_cflags -Wall
17
18 case "$arch" in
19- alpha|ia64|mips|parisc|ppc|sparc)
20+ alpha|ia64|mips|parisc|ppc|sparc|aarch64)
21 spic=$shared
22 ;;
23 x86)
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
new file mode 100644
index 0000000000..eae190d6ea
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -0,0 +1,129 @@
1SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
2HOMEPAGE = "http://libav.org/"
3SECTION = "libs"
4LICENSE = "GPLv2+"
5LICENSE_FLAGS = "commercial"
6
7# Provides ffmpeg compat, see http://libav.org/about.html
8PROVIDES = "ffmpeg"
9
10ARM_INSTRUCTION_SET = "arm"
11
12DEPENDS = "virtual/libsdl zlib libogg libvorbis libtheora yasm-native"
13
14INC_PR = "r8"
15
16inherit autotools pkgconfig
17
18B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
19
20FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
21BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
22
23EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
24EXTRA_FFCONF ?= ""
25
26PACKAGECONFIG ??= "bzip2 x264 x11"
27PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
28PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
29PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
30PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
31PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
32PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
33PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
34PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
35PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto"
36
37EXTRA_OECONF = " \
38 --enable-shared \
39 --enable-pthreads \
40 --enable-gpl \
41 --enable-avfilter \
42 \
43 --cross-prefix=${TARGET_PREFIX} \
44 --prefix=${prefix} \
45 \
46 --enable-avserver \
47 --enable-avplay \
48 --enable-libtheora \
49 --enable-libvorbis \
50 --arch=${TARGET_ARCH} \
51 --target-os="linux" \
52 --enable-cross-compile \
53 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
54 --extra-ldflags="${TARGET_LDFLAGS}" \
55 --sysroot="${STAGING_DIR_TARGET}" \
56 --enable-hardcoded-tables \
57 ${EXTRA_FFCONF} \
58"
59
60do_configure() {
61 # We don't have TARGET_PREFIX-pkgconfig
62 sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure
63 mkdir -p ${B}
64 cd ${B}
65 ${S}/configure ${EXTRA_OECONF}
66 sed -i -e s:Os:O4:g ${B}/config.h
67}
68
69do_install_append() {
70 install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
71}
72
73FFMPEG_LIBS = "libavcodec libavdevice libavformat \
74 libavutil libpostproc libswscale libavfilter"
75
76PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
77
78RSUGGESTS_${PN} = "mplayer"
79FILES_${PN} = "${bindir}"
80FILES_${PN}-dev = "${includedir}/${PN}"
81
82FILES_${PN}-vhook = "${libdir}/vhook"
83FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug"
84
85FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset"
86
87LEAD_SONAME = "libavcodec.so"
88
89FILES_${PN}-dev = "${includedir}"
90
91python populate_packages_prepend() {
92 av_libdir = d.expand('${libdir}')
93 av_pkgconfig = d.expand('${libdir}/pkgconfig')
94
95 # Runtime package
96 do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
97 output_pattern='lib%s',
98 description='libav %s library',
99 extra_depends='',
100 prepend=True,
101 allow_links=True)
102
103 # Development packages (-dev, -staticdev)
104 do_split_packages(d, av_libdir, '^lib(.*)\.so$',
105 output_pattern='lib%s-dev',
106 description='libav %s development package',
107 extra_depends='${PN}-dev',
108 prepend=True,
109 allow_links=True)
110 do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
111 output_pattern='lib%s-dev',
112 description='libav %s development package',
113 extra_depends='${PN}-dev',
114 prepend=True)
115 do_split_packages(d, av_libdir, '^lib(.*)\.a$',
116 output_pattern='lib%s-staticdev',
117 description='libav %s development package - static library',
118 extra_depends='${PN}-dev',
119 prepend=True,
120 allow_links=True)
121
122 if d.getVar('TARGET_ARCH', True) == 'i586':
123 # libav can't be build with -fPIC for 32-bit x86
124 pkgs = d.getVar('PACKAGES', True).split()
125 for pkg in pkgs:
126 d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
127}
128
129PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc).*"
diff --git a/meta/recipes-multimedia/libav/libav_0.8.8.bb b/meta/recipes-multimedia/libav/libav_0.8.8.bb
new file mode 100644
index 0000000000..9cb4cf29b0
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav_0.8.8.bb
@@ -0,0 +1,18 @@
1require libav.inc
2
3SRC_URI = "http://libav.org/releases/libav-0.8.8.tar.xz \
4 file://0001-configure-enable-pic-for-AArch64.patch"
5
6SRC_URI[md5sum] = "34b8f1279a04466386ed67731197efe3"
7SRC_URI[sha256sum] = "e95cf618eb6239177a62c46f15e840c37e02e8308baf94912fc5910ff4aacbf2"
8
9LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
11 file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
12 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
13
14EXTRA_OECONF += " \
15 --enable-postproc \
16"
17
18
diff --git a/meta/recipes-multimedia/libav/libav_git.bb b/meta/recipes-multimedia/libav/libav_git.bb
new file mode 100644
index 0000000000..951baa9a3f
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav_git.bb
@@ -0,0 +1,16 @@
1require libav.inc
2
3LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
4 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
5 file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
6 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
7
8PV = "9.8+git${SRCPV}"
9
10DEFAULT_PREFERENCE = "-1"
11
12SRCREV = "9aaca159bd220582c698f13d081a455f398c9975"
13SRC_URI = "git://git.libav.org/libav.git"
14
15S = "${WORKDIR}/git"
16