diff options
Diffstat (limited to 'recipes-multimedia/imx-codec/imx-codec_4.6.2.bb')
| -rw-r--r-- | recipes-multimedia/imx-codec/imx-codec_4.6.2.bb | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/recipes-multimedia/imx-codec/imx-codec_4.6.2.bb b/recipes-multimedia/imx-codec/imx-codec_4.6.2.bb new file mode 100644 index 000000000..46a1b2253 --- /dev/null +++ b/recipes-multimedia/imx-codec/imx-codec_4.6.2.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) | ||
| 5 | DESCRIPTION = "Freescale Multimedia codec libs" | ||
| 6 | LICENSE = "Proprietary" | ||
| 7 | SECTION = "multimedia" | ||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" | ||
| 9 | |||
| 10 | # Backward compatibility | ||
| 11 | PROVIDES += "libfslcodec" | ||
| 12 | |||
| 13 | SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" | ||
| 14 | SRC_URI[md5sum] = "309cae6f73a777f6e5a89831acf622ee" | ||
| 15 | SRC_URI[sha256sum] = "7b070ab3f1762accee2806e7aba4146ef5242c67a8cd88fb90dacfc1c8b3ef5e" | ||
| 16 | |||
| 17 | inherit fsl-eula-unpack autotools pkgconfig | ||
| 18 | |||
| 19 | # Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point | ||
| 20 | EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \ | ||
| 21 | bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}" | ||
| 22 | |||
| 23 | PACKAGECONFIG ?= "" | ||
| 24 | PACKAGECONFIG:imxvpu = "vpu" | ||
| 25 | |||
| 26 | # We need to ensure we don't have '-src' package overrided | ||
| 27 | PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src' | ||
| 28 | |||
| 29 | PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu" | ||
| 30 | |||
| 31 | do_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 | |||
| 42 | python __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 | |||
| 60 | do_package_qa[prefuncs] += "__set_insane_skip" | ||
| 61 | |||
| 62 | python __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 | |||
| 82 | python __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 | |||
| 91 | PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends" | ||
| 92 | |||
| 93 | PACKAGES_DYNAMIC = "${PN}-*" | ||
| 94 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 95 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
| 96 | |||
| 97 | PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source" | ||
| 98 | |||
| 99 | ALLOW_EMPTY:${PN} = "1" | ||
| 100 | ALLOW_EMPTY:${PN}-meta = "1" | ||
| 101 | |||
| 102 | # Ensure we get warnings if we miss something | ||
| 103 | FILES:${PN} = "" | ||
| 104 | |||
| 105 | FILES:${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \ | ||
| 106 | ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \ | ||
| 107 | ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*" | ||
| 108 | |||
| 109 | FILES:${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin" | ||
| 110 | |||
| 111 | FILES:${PN}-test-source += "${datadir}/imx-mm/*" | ||
| 112 | |||
| 113 | # FIXME: The wrap and lib names does not match | ||
| 114 | FILES:${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*" | ||
| 115 | FILES:${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*" | ||
| 116 | FILES:${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*" | ||
| 117 | |||
| 118 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 119 | COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" | ||
