diff options
Diffstat (limited to 'recipes-multimedia/libfslcodec/libfslcodec.inc')
-rw-r--r-- | recipes-multimedia/libfslcodec/libfslcodec.inc | 104 |
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) | ||
3 | DESCRIPTION = "Freescale Multimedia codec libs" | ||
4 | LICENSE = "Proprietary" | ||
5 | SECTION = "multimedia" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=acdb807ac7275fe32f9f64992e111241" | ||
7 | |||
8 | inherit fsl-eula-unpack autotools pkgconfig | ||
9 | |||
10 | SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" | ||
11 | |||
12 | # Choose between Soft Float-Point and Hard Float-Point | ||
13 | EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d)}" | ||
14 | |||
15 | PACKAGECONFIG ?= "" | ||
16 | PACKAGECONFIG_mx6q = "vpu" | ||
17 | PACKAGECONFIG_mx6dl = "vpu" | ||
18 | PACKAGECONFIG_mx5 = "vpu" | ||
19 | |||
20 | PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,imx-vpu" | ||
21 | |||
22 | do_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 | |||
34 | do_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 | |||
39 | python __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 | |||
57 | do_package_qa[prefuncs] += "__set_insane_skip" | ||
58 | |||
59 | python __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 | |||
68 | python __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 | |||
77 | PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends" | ||
78 | |||
79 | PACKAGES_DYNAMIC = "${PN}-*" | ||
80 | INHIBIT_PACKAGE_STRIP = "1" | ||
81 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
82 | |||
83 | PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source" | ||
84 | |||
85 | ALLOW_EMPTY_${PN} = "1" | ||
86 | ALLOW_EMPTY_${PN}-meta = "1" | ||
87 | |||
88 | # Ensure we get warnings if we miss something | ||
89 | FILES_${PN} = "" | ||
90 | |||
91 | FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \ | ||
92 | ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \ | ||
93 | ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*" | ||
94 | |||
95 | FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin" | ||
96 | |||
97 | FILES_${PN}-test-source += "${datadir}/imx-mm/*" | ||
98 | |||
99 | # FIXME: The wrap and lib names does not match | ||
100 | FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*" | ||
101 | FILES_${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*" | ||
102 | FILES_${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*" | ||
103 | |||
104 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||