diff options
Diffstat (limited to 'meta/recipes-multimedia/libav/libav.inc')
-rw-r--r-- | meta/recipes-multimedia/libav/libav.inc | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc deleted file mode 100644 index 371e0664cf..0000000000 --- a/meta/recipes-multimedia/libav/libav.inc +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | SUMMARY = "Open source audio and video processing tools and librairies" | ||
2 | DESCRIPTION = "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." | ||
7 | HOMEPAGE = "http://libav.org/" | ||
8 | SECTION = "libs" | ||
9 | |||
10 | LICENSE = "GPLv2+" | ||
11 | LICENSE_FLAGS = "commercial" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
14 | file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
15 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ | ||
16 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" | ||
17 | |||
18 | SRC_URI = "http://libav.org/releases/${BP}.tar.xz" | ||
19 | |||
20 | # Provides ffmpeg compat, see http://libav.org/about.html | ||
21 | PROVIDES = "ffmpeg" | ||
22 | |||
23 | ARM_INSTRUCTION_SET = "arm" | ||
24 | |||
25 | DEPENDS = "alsa-lib zlib libogg yasm-native" | ||
26 | |||
27 | inherit autotools pkgconfig | ||
28 | |||
29 | B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" | ||
30 | |||
31 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
32 | FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
33 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" | ||
34 | |||
35 | EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" | ||
36 | EXTRA_FFCONF_armv7ve = "--cpu=cortex-a8" | ||
37 | EXTRA_FFCONF ?= "" | ||
38 | |||
39 | PACKAGECONFIG ??= "avdevice avfilter avplay bzip2 gpl theora x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
40 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | ||
41 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
42 | PACKAGECONFIG[avplay] = "--enable-avplay,--disable-avplay" | ||
43 | PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
44 | PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" | ||
45 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
46 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
47 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
48 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
49 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
50 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
51 | PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger" | ||
52 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
53 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" | ||
54 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
55 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
56 | PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl" | ||
57 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
58 | |||
59 | # Check codecs that require --enable-nonfree | ||
60 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}" | ||
61 | |||
62 | # libav will install in /usr/local if prefix is empty. Luckily, | ||
63 | # passing just "/" instead does the right thing. | ||
64 | nonempty_prefix = "${@bb.data.getVar('prefix', d, True) or '/'}" | ||
65 | |||
66 | EXTRA_OECONF = " \ | ||
67 | --enable-shared \ | ||
68 | --enable-pthreads \ | ||
69 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | ||
70 | \ | ||
71 | --cross-prefix=${TARGET_PREFIX} \ | ||
72 | --prefix=${nonempty_prefix} \ | ||
73 | \ | ||
74 | --ld="${CCLD}" \ | ||
75 | --arch=${TARGET_ARCH} \ | ||
76 | --target-os="linux" \ | ||
77 | --enable-cross-compile \ | ||
78 | --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | ||
79 | --extra-ldflags="${TARGET_LDFLAGS}" \ | ||
80 | --sysroot="${STAGING_DIR_TARGET}" \ | ||
81 | --enable-hardcoded-tables \ | ||
82 | ${EXTRA_FFCONF} \ | ||
83 | --libdir=${libdir} \ | ||
84 | --shlibdir=${libdir} \ | ||
85 | " | ||
86 | |||
87 | do_configure() { | ||
88 | # We don't have TARGET_PREFIX-pkgconfig | ||
89 | sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure | ||
90 | mkdir -p ${B} | ||
91 | cd ${B} | ||
92 | ${S}/configure ${EXTRA_OECONF} | ||
93 | sed -i -e s:Os:O4:g ${B}/config.h | ||
94 | } | ||
95 | |||
96 | do_install_append() { | ||
97 | if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'avfilter', 'yes', '', d)}" ]; then | ||
98 | install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/ | ||
99 | fi | ||
100 | } | ||
101 | |||
102 | PACKAGES += "${PN}-vhook ffmpeg-x264-presets" | ||
103 | PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*" | ||
104 | |||
105 | RSUGGESTS_${PN} = "mplayer" | ||
106 | FILES_${PN} = "${bindir}" | ||
107 | FILES_${PN}-dev = "${includedir}/${PN}" | ||
108 | |||
109 | FILES_${PN}-vhook = "${libdir}/vhook" | ||
110 | |||
111 | FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset" | ||
112 | |||
113 | LEAD_SONAME = "libavcodec.so" | ||
114 | |||
115 | FILES_${PN}-dev = "${includedir}" | ||
116 | |||
117 | python populate_packages_prepend() { | ||
118 | av_libdir = d.expand('${libdir}') | ||
119 | av_pkgconfig = d.expand('${libdir}/pkgconfig') | ||
120 | |||
121 | # Runtime package | ||
122 | do_split_packages(d, av_libdir, '^lib(.*)\.so\..*', | ||
123 | output_pattern='lib%s', | ||
124 | description='libav %s library', | ||
125 | extra_depends='', | ||
126 | prepend=True, | ||
127 | allow_links=True) | ||
128 | |||
129 | # Development packages (-dev, -staticdev) | ||
130 | do_split_packages(d, av_libdir, '^lib(.*)\.so$', | ||
131 | output_pattern='lib%s-dev', | ||
132 | description='libav %s development package', | ||
133 | extra_depends='${PN}-dev', | ||
134 | prepend=True, | ||
135 | allow_links=True) | ||
136 | do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$', | ||
137 | output_pattern='lib%s-dev', | ||
138 | description='libav %s development package', | ||
139 | extra_depends='${PN}-dev', | ||
140 | prepend=True) | ||
141 | do_split_packages(d, av_libdir, '^lib(.*)\.a$', | ||
142 | output_pattern='lib%s-staticdev', | ||
143 | description='libav %s development package - static library', | ||
144 | extra_depends='${PN}-dev', | ||
145 | prepend=True, | ||
146 | allow_links=True) | ||
147 | |||
148 | if d.getVar('TARGET_ARCH', True) in [ 'i586', 'i686' ]: | ||
149 | # libav can't be build with -fPIC for 32-bit x86 | ||
150 | pkgs = d.getVar('PACKAGES', True).split() | ||
151 | for pkg in pkgs: | ||
152 | d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel') | ||
153 | } | ||