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