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