summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/imx-codec/imx-codec_4.5.5.bb')
-rw-r--r--recipes-multimedia/imx-codec/imx-codec_4.5.5.bb119
1 files changed, 119 insertions, 0 deletions
diff --git a/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb b/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb
new file mode 100644
index 00000000..8f5caff0
--- /dev/null
+++ b/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb
@@ -0,0 +1,119 @@
1# Copyright (C) 2012-2016 Freescale Semiconductor
2# Copyright 2017 NXP
3# Copyright 2018 (C) O.S. Systems Software LTDA.
4# Released under the MIT license (see COPYING.MIT for the terms)
5DESCRIPTION = "Freescale Multimedia codec libs"
6LICENSE = "Proprietary"
7SECTION = "multimedia"
8LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
9
10# Backward compatibility
11PROVIDES += "libfslcodec"
12
13SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
14SRC_URI[md5sum] = "5472ae7b57a8390224761d151632a2a6"
15SRC_URI[sha256sum] = "b0d5a6f847df99ee213cc79dae4f5e7194f567859c43d68d7c7c794a97f90294"
16
17inherit fsl-eula-unpack autotools pkgconfig
18
19# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point
20EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \
21 bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}"
22
23PACKAGECONFIG ?= ""
24PACKAGECONFIG_imxvpu = "vpu"
25
26# We need to ensure we don't have '-src' package overrided
27PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src'
28
29PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu"
30
31do_install_append() {
32 # LTIB move the files around or gst-fsl-plugin won't find them
33 for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do
34 mv $p ${D}${libdir}
35 done
36 rmdir ${D}${libdir}/imx-mm/video-codec
37
38 # Fixup ownership of files
39 chown -R root:root ${D}
40}
41
42python __set_insane_skip() {
43 # Ensure we have PACKAGES expanded
44 bb.build.exec_func("read_subpackage_metadata", d)
45
46 for p in d.getVar('PACKAGES').split():
47 # Even though we are packaging libraries those are plugins so we
48 # shouldn't rename the packages to follow its sonames.
49 d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1")
50
51 # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
52 # the source we cannot fix it. Disable the insane check for now.
53 if p == 'imx-codec-test-bin':
54 # FIXME: includes the DUT .so files so we need to deploy those
55 d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir file-rdeps")
56 else:
57 d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel")
58}
59
60do_package_qa[prefuncs] += "__set_insane_skip"
61
62python __split_libfslcodec_plugins() {
63 codecdir = bb.data.expand('${libdir}', d)
64 do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*',
65 aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*',
66 output_pattern='imx-codec-%s',
67 description='Freescale i.MX Codec (%s)',
68 extra_depends='')
69 pkgs = d.getVar('PACKAGES').split()
70 for pkg in pkgs:
71 meta = pkg[10:]
72 if meta != '':
73 d.setVar('RREPLACES_%s' % pkg, ' libfslcodec-%s' % meta)
74 d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec-%s' % meta)
75 d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec-%s' % meta)
76 else :
77 d.setVar('RREPLACES_%s' % pkg, ' libfslcodec')
78 d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec')
79 d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec')
80}
81
82python __set_metapkg_rdepends() {
83 # Allow addition of all codecs in a image; useful specially for
84 # debugging.
85 codec_pkgs = oe.utils.packages_filter_out_system(d)
86 codec_pkgs = filter(lambda x: x not in ['imx-codec-test-bin', 'imx-codec-test-source'],
87 codec_pkgs)
88 d.appendVar('RDEPENDS_imx-codec-meta', ' ' + ' '.join(codec_pkgs))
89}
90
91PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends"
92
93PACKAGES_DYNAMIC = "${PN}-*"
94INHIBIT_PACKAGE_STRIP = "1"
95INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
96
97PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source"
98
99ALLOW_EMPTY_${PN} = "1"
100ALLOW_EMPTY_${PN}-meta = "1"
101
102# Ensure we get warnings if we miss something
103FILES_${PN} = ""
104
105FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
106 ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \
107 ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*"
108
109FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
110
111FILES_${PN}-test-source += "${datadir}/imx-mm/*"
112
113# FIXME: The wrap and lib names does not match
114FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"
115FILES_${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*"
116FILES_${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*"
117
118PACKAGE_ARCH = "${MACHINE_ARCH}"
119COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"