diff options
Diffstat (limited to 'meta/recipes-multimedia/libav')
-rw-r--r-- | meta/recipes-multimedia/libav/libav.inc | 132 | ||||
-rw-r--r-- | meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch | 23 | ||||
-rw-r--r-- | meta/recipes-multimedia/libav/libav_0.8.9.bb | 18 | ||||
-rw-r--r-- | meta/recipes-multimedia/libav/libav_9.10.bb | 13 |
4 files changed, 186 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc new file mode 100644 index 0000000000..5e675be3ca --- /dev/null +++ b/meta/recipes-multimedia/libav/libav.inc | |||
@@ -0,0 +1,132 @@ | |||
1 | SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video" | ||
2 | HOMEPAGE = "http://libav.org/" | ||
3 | SECTION = "libs" | ||
4 | LICENSE = "GPLv2+" | ||
5 | LICENSE_FLAGS = "commercial" | ||
6 | |||
7 | # Provides ffmpeg compat, see http://libav.org/about.html | ||
8 | PROVIDES = "ffmpeg" | ||
9 | |||
10 | ARM_INSTRUCTION_SET = "arm" | ||
11 | |||
12 | DEPENDS = "virtual/libsdl zlib libogg libvorbis libtheora yasm-native" | ||
13 | |||
14 | INC_PR = "r8" | ||
15 | |||
16 | inherit autotools pkgconfig | ||
17 | |||
18 | B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" | ||
19 | |||
20 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
21 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" | ||
22 | |||
23 | EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" | ||
24 | EXTRA_FFCONF ?= "" | ||
25 | |||
26 | PACKAGECONFIG ??= "bzip2 x264 ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
27 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
28 | PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
29 | PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" | ||
30 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
31 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
32 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
33 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
34 | PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" | ||
35 | PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto" | ||
36 | |||
37 | EXTRA_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 | --ld="${CCLD}" \ | ||
49 | --enable-libtheora \ | ||
50 | --enable-libvorbis \ | ||
51 | --arch=${TARGET_ARCH} \ | ||
52 | --target-os="linux" \ | ||
53 | --enable-cross-compile \ | ||
54 | --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | ||
55 | --extra-ldflags="${TARGET_LDFLAGS}" \ | ||
56 | --sysroot="${STAGING_DIR_TARGET}" \ | ||
57 | --enable-hardcoded-tables \ | ||
58 | ${EXTRA_FFCONF} \ | ||
59 | --libdir=${libdir} \ | ||
60 | --shlibdir=${libdir} \ | ||
61 | " | ||
62 | |||
63 | do_configure() { | ||
64 | # We don't have TARGET_PREFIX-pkgconfig | ||
65 | sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure | ||
66 | mkdir -p ${B} | ||
67 | cd ${B} | ||
68 | ${S}/configure ${EXTRA_OECONF} | ||
69 | sed -i -e s:Os:O4:g ${B}/config.h | ||
70 | } | ||
71 | |||
72 | do_install_append() { | ||
73 | install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/ | ||
74 | } | ||
75 | |||
76 | FFMPEG_LIBS = "libavcodec libavdevice libavformat \ | ||
77 | libavutil libpostproc libswscale libavfilter" | ||
78 | |||
79 | PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets" | ||
80 | |||
81 | RSUGGESTS_${PN} = "mplayer" | ||
82 | FILES_${PN} = "${bindir}" | ||
83 | FILES_${PN}-dev = "${includedir}/${PN}" | ||
84 | |||
85 | FILES_${PN}-vhook = "${libdir}/vhook" | ||
86 | FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug" | ||
87 | |||
88 | FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset" | ||
89 | |||
90 | LEAD_SONAME = "libavcodec.so" | ||
91 | |||
92 | FILES_${PN}-dev = "${includedir}" | ||
93 | |||
94 | python populate_packages_prepend() { | ||
95 | av_libdir = d.expand('${libdir}') | ||
96 | av_pkgconfig = d.expand('${libdir}/pkgconfig') | ||
97 | |||
98 | # Runtime package | ||
99 | do_split_packages(d, av_libdir, '^lib(.*)\.so\..*', | ||
100 | output_pattern='lib%s', | ||
101 | description='libav %s library', | ||
102 | extra_depends='', | ||
103 | prepend=True, | ||
104 | allow_links=True) | ||
105 | |||
106 | # Development packages (-dev, -staticdev) | ||
107 | do_split_packages(d, av_libdir, '^lib(.*)\.so$', | ||
108 | output_pattern='lib%s-dev', | ||
109 | description='libav %s development package', | ||
110 | extra_depends='${PN}-dev', | ||
111 | prepend=True, | ||
112 | allow_links=True) | ||
113 | do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$', | ||
114 | output_pattern='lib%s-dev', | ||
115 | description='libav %s development package', | ||
116 | extra_depends='${PN}-dev', | ||
117 | prepend=True) | ||
118 | do_split_packages(d, av_libdir, '^lib(.*)\.a$', | ||
119 | output_pattern='lib%s-staticdev', | ||
120 | description='libav %s development package - static library', | ||
121 | extra_depends='${PN}-dev', | ||
122 | prepend=True, | ||
123 | allow_links=True) | ||
124 | |||
125 | if d.getVar('TARGET_ARCH', True) == 'i586': | ||
126 | # libav can't be build with -fPIC for 32-bit x86 | ||
127 | pkgs = d.getVar('PACKAGES', True).split() | ||
128 | for pkg in pkgs: | ||
129 | d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel') | ||
130 | } | ||
131 | |||
132 | PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc|swscale).*" | ||
diff --git a/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch new file mode 100644 index 0000000000..d9b22b9b6a --- /dev/null +++ b/meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
3 | Date: Thu, 10 Jan 2013 12:42:19 +0100 | ||
4 | Subject: [PATCH] configure: enable pic for AArch64 | ||
5 | |||
6 | Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
7 | |||
8 | Upstream-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_0.8.9.bb b/meta/recipes-multimedia/libav/libav_0.8.9.bb new file mode 100644 index 0000000000..7c807e887e --- /dev/null +++ b/meta/recipes-multimedia/libav/libav_0.8.9.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | require libav.inc | ||
2 | |||
3 | SRC_URI = "http://libav.org/releases/${BP}.tar.xz \ | ||
4 | file://0001-configure-enable-pic-for-AArch64.patch" | ||
5 | |||
6 | SRC_URI[md5sum] = "7c0e5743cd5c4d4b1bcafd02a2e82e09" | ||
7 | SRC_URI[sha256sum] = "4f5181164e4007d5b0013bb3cc5e3b7393ab71ac286319c714b7697e2784f77f" | ||
8 | |||
9 | LIC_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 | |||
14 | PROVIDES += "libpostproc" | ||
15 | |||
16 | EXTRA_OECONF += " \ | ||
17 | --enable-postproc \ | ||
18 | " | ||
diff --git a/meta/recipes-multimedia/libav/libav_9.10.bb b/meta/recipes-multimedia/libav/libav_9.10.bb new file mode 100644 index 0000000000..48bab7d018 --- /dev/null +++ b/meta/recipes-multimedia/libav/libav_9.10.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require libav.inc | ||
2 | |||
3 | LIC_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 | |||
8 | SRC_URI = "http://libav.org/releases/${BP}.tar.xz" | ||
9 | |||
10 | SRC_URI[md5sum] = "4b49d1d8734815ca095bb0600d41c5cb" | ||
11 | SRC_URI[sha256sum] = "83dbe640779da1c1e8d8836c99575f57f749d18407494ebca451578afee9300d" | ||
12 | |||
13 | DEFAULT_PREFERENCE = "-1" | ||