]> code.ossystems Code Review - meta-freescale.git/commitdiff
fsl-mm-codeclib: move code to a .inc file
authorOtavio Salvador <otavio@ossystems.com.br>
Wed, 23 May 2012 19:04:10 +0000 (16:04 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 4 Jun 2012 13:42:45 +0000 (10:42 -0300)
This easy reuse of code between i.MX5 and i.MX6 SoC families and
avoiding useless code duplication.

We also fixed the LICENSE field as this is Proprietary licensed.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc [new file with mode: 0644]
meta-fsl-arm/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib_2.0.3.bb

diff --git a/meta-fsl-arm/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc b/meta-fsl-arm/recipes-multimedia/fsl-mm-core/fsl-mm-codeclib.inc
new file mode 100644 (file)
index 0000000..f7990b6
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright (C) 2011 Freescale Semiconductor
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Freescale mm codec libs"
+SECTION = "multimedia"
+LICENSE = "Proprietary"
+DEPENDS = "pkgconfig"
+
+LIC_FILES_CHKSUM = "file://docs/EULA.txt;md5=ea4d5c069d7aef0838a110409ea78a01"
+
+INC_PR = "r1"
+
+INSANE_SKIP_${PN} = "ldflags"
+INSANE_SKIP_${PN}-dev = "ldflags"
+
+SRC_URI = "file://${PN}-${PV}.tar.gz"
+
+do_install () {
+    install -d ${D}${libdir}
+    install -d ${D}${libdir}/pkgconfig
+    install -d ${D}${includedir}/mm_ghdr
+
+    cp -r ${S}/release/lib/* ${D}${libdir}
+    cp -r ${S}/ghdr/* ${D}${includedir}/mm_ghdr
+    install -m 0644 ${S}/pkgconfig/fsl-mm-core.pc ${D}${libdir}/pkgconfig
+
+       # Fix file permissions
+       find ${D} -type f -exec chmod a-x '{}' ';'
+}
+
+FILES_${PN} += "${libdir}/${SOLIBS}"
+FILES_${PN}-dev += "${libdir}/${SOLIBSDEV}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
index cda55008edda13f45bde4c88c9eb5f580ca4e3a2..21720f330b085653110f070a9e16d14e723fd7fe 100644 (file)
@@ -1,48 +1,8 @@
-# Copyright (C) 2011 Freescale Semiconductor
-# Released under the MIT license (see COPYING.MIT for the terms)
+include fsl-mm-codeclib.inc
 
-DESCRIPTION = "Freescale mm codec libs"
-LICENSE = "MIT"
-SECTION = "multimedia"
-DEPENDS = "pkgconfig"
-PR = "r0"
+PR = "${INC_PR}.0"
 
-LIC_FILES_CHKSUM = "file://docs/EULA.txt;md5=ea4d5c069d7aef0838a110409ea78a01"
-
-SRC_URI = "file://${PN}-${PV}.tar.gz"
 SRC_URI[md5sum] = "e06bcaae6a7f5162caaa4ae5a56bf067"
 SRC_URI[sha256sum] = "5f1ec8200469d886dfbe82a22a63033914dc690c545c74a27ababb24fd53952a"
 
-do_install () {
-    install -d ${D}${libdir}
-    install -d ${D}${libdir}/pkgconfig
-    install -d ${D}${includedir}/mm_ghdr
-    install -d ${D}${includedir}/mm_ghdr/aac_parser
-    install -d ${D}${includedir}/mm_ghdr/common
-    install -d ${D}${includedir}/mm_ghdr/flac_parser
-    install -d ${D}${includedir}/mm_ghdr/mp3_parser
-    install -d ${D}${includedir}/mm_ghdr/mp3_parser_v2
-    install -d ${D}${includedir}/mm_ghdr/sbc
-    install -d ${D}${includedir}/mm_ghdr/wav_parser
-    install -m 0755 ${S}/release/lib/* ${D}${libdir}
-    install -m 0644 ${S}/pkgconfig/fsl-mm-core.pc ${D}${libdir}/pkgconfig
-    install -m 0644 ${S}/ghdr/*.h ${D}${includedir}/mm_ghdr
-    install -m 0644 ${S}/ghdr/aac_parser/*.h ${D}${includedir}/mm_ghdr/aac_parser
-    install -m 0644 ${S}/ghdr/common/*.h ${D}${includedir}/mm_ghdr/common
-    install -m 0644 ${S}/ghdr/flac_parser/*.h ${D}${includedir}/mm_ghdr/flac_parser
-    install -m 0644 ${S}/ghdr/mp3_parser/*.h ${D}${includedir}/mm_ghdr/mp3_parser
-    install -m 0644 ${S}/ghdr/mp3_parser_v2/*.h ${D}${includedir}/mm_ghdr/mp3_parser_v2
-    install -m 0644 ${S}/ghdr/sbc/*.h ${D}${includedir}/mm_ghdr/sbc
-    install -m 0644 ${S}/ghdr/wav_parser/*.h ${D}${includedir}/mm_ghdr/wav_parser
-}
-
-INSANE_SKIP = "True"
-FILES_${PN} += "${libdir}/*.so ${libdir}/pkgconfig/*.pc"
-FILES_${PN}-dev += "${includedir}/mm_ghdr/*.h \
-    ${includedir}/mm_ghdr/aac_parser/*.h \
-    ${includedir}/mm_ghdr/common/*.h \
-    ${includedir}/mm_ghdr/flac_parser/*.h \
-    ${includedir}/mm_ghdr/mp3_parser/*.h \
-    ${includedir}/mm_ghdr/mp3_parser2/*.h \
-    ${includedir}/mm_ghdr/sbc/*.h \
-    ${includedir}/mm_ghdr/wav_parser/*.h"
+COMPATIBLE_MACHINE = "(mx5)"