summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/libfslcodec/libfslcodec.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/libfslcodec/libfslcodec.inc')
-rw-r--r--recipes-multimedia/libfslcodec/libfslcodec.inc104
1 files changed, 104 insertions, 0 deletions
diff --git a/recipes-multimedia/libfslcodec/libfslcodec.inc b/recipes-multimedia/libfslcodec/libfslcodec.inc
new file mode 100644
index 00000000..ed07774b
--- /dev/null
+++ b/recipes-multimedia/libfslcodec/libfslcodec.inc
@@ -0,0 +1,104 @@
1# Copyright (C) 2012-2014 Freescale Semiconductor
2# Released under the MIT license (see COPYING.MIT for the terms)
3DESCRIPTION = "Freescale Multimedia codec libs"
4LICENSE = "Proprietary"
5SECTION = "multimedia"
6LIC_FILES_CHKSUM = "file://COPYING;md5=acdb807ac7275fe32f9f64992e111241"
7
8inherit fsl-eula-unpack autotools pkgconfig
9
10SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
11
12# Choose between Soft Float-Point and Hard Float-Point
13EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d)}"
14
15PACKAGECONFIG ?= ""
16PACKAGECONFIG_mx6q = "vpu"
17PACKAGECONFIG_mx6dl = "vpu"
18PACKAGECONFIG_mx5 = "vpu"
19
20PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,imx-vpu"
21
22do_install_append() {
23 # FIXME: This link points to nowhere
24 rm ${D}${libdir}/imx-mm/audio-codec/lib_src_ppp_arm11_elinux.so
25
26 # LTIB move the files around or gst-fsl-plugin won't find them
27 for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do
28 mv $p ${D}${libdir}
29 done
30 rmdir ${D}${libdir}/imx-mm/video-codec
31
32}
33
34do_install_append_mx5() {
35 # FIXME: The binary files depends on libvpu.so.4 which is i.MX6 only
36 rm -r ${D}${datadir}/imx-mm/*/examples/*/bin
37}
38
39python __set_insane_skip() {
40 # Ensure we have PACKAGES expanded
41 bb.build.exec_func("read_subpackage_metadata", d)
42
43 for p in d.getVar('PACKAGES', True).split():
44 # Even though we are packaging libraries those are plugins so we
45 # shouldn't rename the packages to follow its sonames.
46 d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1")
47
48 # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
49 # the source we cannot fix it. Disable the insane check for now.
50 if p == 'libfslcodec-test-bin':
51 # FIXME: includes the DUT .so files so we need to deploy those
52 d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir")
53 else:
54 d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel")
55}
56
57do_package_qa[prefuncs] += "__set_insane_skip"
58
59python __split_libfslcodec_plugins() {
60 codecdir = bb.data.expand('${libdir}', d)
61 do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*',
62 aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*',
63 output_pattern='libfslcodec-%s',
64 description='Freescale i.MX Codec (%s)',
65 extra_depends='')
66}
67
68python __set_metapkg_rdepends() {
69 # Allow addition of all codecs in a image; useful specially for
70 # debugging.
71 codec_pkgs = oe.utils.packages_filter_out_system(d)
72 codec_pkgs = filter(lambda x: x not in ['libfslcodec-test-bin', 'libfslcodec-test-source'],
73 codec_pkgs)
74 d.appendVar('RDEPENDS_libfslcodec-meta', ' ' + ' '.join(codec_pkgs))
75}
76
77PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends"
78
79PACKAGES_DYNAMIC = "${PN}-*"
80INHIBIT_PACKAGE_STRIP = "1"
81INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
82
83PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source"
84
85ALLOW_EMPTY_${PN} = "1"
86ALLOW_EMPTY_${PN}-meta = "1"
87
88# Ensure we get warnings if we miss something
89FILES_${PN} = ""
90
91FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
92 ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \
93 ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*"
94
95FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
96
97FILES_${PN}-test-source += "${datadir}/imx-mm/*"
98
99# FIXME: The wrap and lib names does not match
100FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"
101FILES_${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*"
102FILES_${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*"
103
104PACKAGE_ARCH = "${MACHINE_ARCH}"