summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libav
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
committerTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-multimedia/libav
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-multimedia/libav')
-rw-r--r--meta/recipes-multimedia/libav/libav.inc144
-rw-r--r--meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch23
-rw-r--r--meta/recipes-multimedia/libav/libav_0.8.15.bb18
-rw-r--r--meta/recipes-multimedia/libav/libav_9.16.bb13
4 files changed, 198 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
new file mode 100644
index 0000000..5c327df
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -0,0 +1,144 @@
1SUMMARY = "Open source audio and video processing tools and librairies"
2DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
3 with a set of portable, functional and high-performance libraries for \
4 dealing with multimedia formats of all sorts. It originates from the \
5 FFmpeg codebase, but goes its own way these days, providing its users \
6 with reliable releases and a clear vision how to go forward."
7HOMEPAGE = "http://libav.org/"
8SECTION = "libs"
9
10LICENSE = "GPLv2+"
11LICENSE_FLAGS = "commercial"
12
13# Provides ffmpeg compat, see http://libav.org/about.html
14PROVIDES = "ffmpeg"
15
16ARM_INSTRUCTION_SET = "arm"
17
18DEPENDS = "zlib libogg yasm-native"
19
20INC_PR = "r8"
21
22inherit autotools pkgconfig
23
24B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
25
26FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
27BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
28
29EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
30EXTRA_FFCONF ?= ""
31
32PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
33PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
34PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
35PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
36PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
37PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
38PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
39PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
40PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
41PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
42PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
43PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
44PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
45PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
46
47# Check codecs that require --enable-nonfree
48USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
49
50EXTRA_OECONF = " \
51 --enable-shared \
52 --enable-pthreads \
53 --enable-gpl \
54 ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
55 --enable-avfilter \
56 \
57 --cross-prefix=${TARGET_PREFIX} \
58 --prefix=${prefix} \
59 \
60 --enable-avserver \
61 --enable-avplay \
62 --ld="${CCLD}" \
63 --arch=${TARGET_ARCH} \
64 --target-os="linux" \
65 --enable-cross-compile \
66 --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
67 --extra-ldflags="${TARGET_LDFLAGS}" \
68 --sysroot="${STAGING_DIR_TARGET}" \
69 --enable-hardcoded-tables \
70 ${EXTRA_FFCONF} \
71 --libdir=${libdir} \
72 --shlibdir=${libdir} \
73"
74
75do_configure() {
76 # We don't have TARGET_PREFIX-pkgconfig
77 sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure
78 mkdir -p ${B}
79 cd ${B}
80 ${S}/configure ${EXTRA_OECONF}
81 sed -i -e s:Os:O4:g ${B}/config.h
82}
83
84do_install_append() {
85 install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
86}
87
88FFMPEG_LIBS = "libavcodec libavdevice libavformat \
89 libavutil libpostproc libswscale libavfilter"
90
91PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
92
93RSUGGESTS_${PN} = "mplayer"
94FILES_${PN} = "${bindir}"
95FILES_${PN}-dev = "${includedir}/${PN}"
96
97FILES_${PN}-vhook = "${libdir}/vhook"
98FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug"
99
100FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset"
101
102LEAD_SONAME = "libavcodec.so"
103
104FILES_${PN}-dev = "${includedir}"
105
106python populate_packages_prepend() {
107 av_libdir = d.expand('${libdir}')
108 av_pkgconfig = d.expand('${libdir}/pkgconfig')
109
110 # Runtime package
111 do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
112 output_pattern='lib%s',
113 description='libav %s library',
114 extra_depends='',
115 prepend=True,
116 allow_links=True)
117
118 # Development packages (-dev, -staticdev)
119 do_split_packages(d, av_libdir, '^lib(.*)\.so$',
120 output_pattern='lib%s-dev',
121 description='libav %s development package',
122 extra_depends='${PN}-dev',
123 prepend=True,
124 allow_links=True)
125 do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
126 output_pattern='lib%s-dev',
127 description='libav %s development package',
128 extra_depends='${PN}-dev',
129 prepend=True)
130 do_split_packages(d, av_libdir, '^lib(.*)\.a$',
131 output_pattern='lib%s-staticdev',
132 description='libav %s development package - static library',
133 extra_depends='${PN}-dev',
134 prepend=True,
135 allow_links=True)
136
137 if d.getVar('TARGET_ARCH', True) == 'i586':
138 # libav can't be build with -fPIC for 32-bit x86
139 pkgs = d.getVar('PACKAGES', True).split()
140 for pkg in pkgs:
141 d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
142}
143
144PACKAGES_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 0000000..d9b22b9
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav/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_0.8.15.bb b/meta/recipes-multimedia/libav/libav_0.8.15.bb
new file mode 100644
index 0000000..18dc49a
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav_0.8.15.bb
@@ -0,0 +1,18 @@
1require libav.inc
2
3SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
4 file://0001-configure-enable-pic-for-AArch64.patch"
5
6SRC_URI[md5sum] = "e483ea8f482b5ecd65ee1d09251b0a5b"
7SRC_URI[sha256sum] = "495789ec547e93632937f0f36b06f4dd3180bc61518181f124af6746c6218710"
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
14PROVIDES += "libpostproc"
15
16EXTRA_OECONF += " \
17 --enable-postproc \
18"
diff --git a/meta/recipes-multimedia/libav/libav_9.16.bb b/meta/recipes-multimedia/libav/libav_9.16.bb
new file mode 100644
index 0000000..d046885
--- /dev/null
+++ b/meta/recipes-multimedia/libav/libav_9.16.bb
@@ -0,0 +1,13 @@
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
8SRC_URI = "http://libav.org/releases/${BP}.tar.xz"
9
10SRC_URI[md5sum] = "7b44b75cec24b8e7545e5029e76917e0"
11SRC_URI[sha256sum] = "ca846473b0b8ed8e3404c52e5e92df6d35cb5fa487eec498525de3ffda4367a0"
12
13DEFAULT_PREFERENCE = "-1"