[oe-commits] Koen Kooi : omapfbplay*: refactor into .inc

git version control git at git.openembedded.org
Fri Jan 21 11:26:14 UTC 2011


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 52efb729823a40cee8706abf9786af537f529bd5
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=52efb729823a40cee8706abf9786af537f529bd5

Author: Koen Kooi <koen at openembedded.org>
Date:   Fri Jan 21 10:50:54 2011 +0100

omapfbplay*: refactor into .inc

Signed-off-by: Koen Kooi <koen at openembedded.org>

---

 recipes/ffmpeg/omapfbplay-cmem_git.bb |   25 +++----------------------
 recipes/ffmpeg/omapfbplay-dce_git.bb  |   29 +++--------------------------
 recipes/ffmpeg/omapfbplay-xv_git.bb   |   30 ++----------------------------
 recipes/ffmpeg/omapfbplay.inc         |   32 ++++++++++++++++++++++++++++++++
 recipes/ffmpeg/omapfbplay_git.bb      |   31 ++-----------------------------
 5 files changed, 42 insertions(+), 105 deletions(-)

diff --git a/recipes/ffmpeg/omapfbplay-cmem_git.bb b/recipes/ffmpeg/omapfbplay-cmem_git.bb
index 0d1651d..6597add 100644
--- a/recipes/ffmpeg/omapfbplay-cmem_git.bb
+++ b/recipes/ffmpeg/omapfbplay-cmem_git.bb
@@ -1,15 +1,6 @@
-DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays"
-DEPENDS = "ti-linuxutils bzip2 lame ffmpeg virtual/kernel"
-LICENSE = "MIT"
+require omapfbplay.inc
 
-PR = "r1"
-PV = "0.0+${PR}+gitr${SRCREV}"
-
-SRCREV = "2d27708a21d8dcc12ff7182099f352182d925003"
-SRC_URI = "git://git.mansr.com/omapfbplay;protocol=git \
-"
-
-S = "${WORKDIR}/git"
+DEPENDS += "ti-linuxutils"
 
 require ../ti/ti-paths.inc
 
@@ -22,14 +13,4 @@ CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include ${SDMA_CFLAGS} ${CMEM_CFLAGS}"
 export SDMA_LIBS = "-L${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/sdma/lib -l:sdma.a470MV"
 export CMEM_LIBS = "-L${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/cmem/lib -l:cmem.a470MV"
 
-do_compile() {
-	cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S} || true
-	oe_runmake arm=y OMAPFB=y NETSYNC=y CMEM=y SDMA=y -e
-}
-
-do_install() {
-	install -d ${D}/${bindir}
-	install -m 0755 ${S}/omapfbplay ${D}/${bindir}/${PN}
-}
+OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y CMEM=y SDMA=y"
diff --git a/recipes/ffmpeg/omapfbplay-dce_git.bb b/recipes/ffmpeg/omapfbplay-dce_git.bb
index a9ff44a..e70ac72 100644
--- a/recipes/ffmpeg/omapfbplay-dce_git.bb
+++ b/recipes/ffmpeg/omapfbplay-dce_git.bb
@@ -1,30 +1,7 @@
-DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays"
-DEPENDS = "libdce bzip2 lame ffmpeg virtual/kernel"
-LICENSE = "MIT"
+require omapfbplay.inc
 
-PR = "r1"
-
-PV = "0.0+${PR}+gitr${SRCREV}"
-
-SRCREV = "1d217676ba71e8740524e9814c47da39880ed3bc"
-SRC_URI = "git://git.mansr.com/omapfbplay;protocol=git \
-"
-
-S = "${WORKDIR}/git"
-
-# We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
-STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
+DEPENDS += "libdce"
 
 CFLAGS += " -I. -I${STAGING_INCDIR}/dce -I${STAGING_KERNEL_DIR}/include "
 
-do_compile() {
-	cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S} || true
-	oe_runmake ${TARGET_ARCH}=y V4L2=y OMAPFB=y NETSYNC=y DCE=y -e
-}
-
-do_install() {
-	install -d ${D}/${bindir}
-	install -m 0755 ${S}/omapfbplay ${D}/${bindir}/omapfbplay-dce
-}
+OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y DCE=y"
diff --git a/recipes/ffmpeg/omapfbplay-xv_git.bb b/recipes/ffmpeg/omapfbplay-xv_git.bb
index 88df08b..cadf6d8 100644
--- a/recipes/ffmpeg/omapfbplay-xv_git.bb
+++ b/recipes/ffmpeg/omapfbplay-xv_git.bb
@@ -1,29 +1,3 @@
-DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays"
-DEPENDS = "libxv bzip2 lame ffmpeg virtual/kernel"
-LICENSE = "MIT"
+require omapfbplay.inc
 
-PR = "r2"
-PV = "0.0+${PR}+gitr${SRCREV}"
-
-SRCREV = "2d27708a21d8dcc12ff7182099f352182d925003"
-SRC_URI = "git://git.mansr.com/omapfbplay;protocol=git \
-"
-
-S = "${WORKDIR}/git"
-
-# We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
-STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
-
-CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include "
-
-do_compile() {
-	cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S} || true
-	oe_runmake OMAPFB=y XV=y NETSYNC=y -e
-}
-
-do_install() {
-	install -d ${D}/${bindir}
-	install -m 0755 ${S}/omapfbplay ${D}/${bindir}/omapfbplay-xv
-}
+OMAPFBPLAYOPTS = "V4L2=y NETSYNC=y XV=y"
diff --git a/recipes/ffmpeg/omapfbplay.inc b/recipes/ffmpeg/omapfbplay.inc
new file mode 100644
index 0000000..5168698
--- /dev/null
+++ b/recipes/ffmpeg/omapfbplay.inc
@@ -0,0 +1,32 @@
+DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays"
+DEPENDS = "bzip2 lame ffmpeg virtual/kernel"
+LICENSE = "MIT"
+
+PR = "r27"
+
+PV = "0.0+${PR}+gitr${SRCREV}"
+
+SRCREV = "1d217676ba71e8740524e9814c47da39880ed3bc"
+SRC_URI = "git://git.mansr.com/omapfbplay;protocol=git \
+"
+
+S = "${WORKDIR}/git"
+
+# We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
+STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
+CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include "
+
+OMAPFBPLAYVARIANT ?= "${PN}"
+OMAPFBPLAYOPTS ?= "V4L2=y NETSYNC=y"
+
+do_compile() {
+	cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S} || true
+	cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S} || true
+	cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S} || true
+	oe_runmake ${TARGET_ARCH}=y ${OMAPFBPLAYOPTS} -e
+}
+
+do_install() {
+	install -d ${D}/${bindir}
+	install -m 0755 ${S}/omapfbplay ${D}/${bindir}/${OMAPFBPLAYVARIANT}
+}
diff --git a/recipes/ffmpeg/omapfbplay_git.bb b/recipes/ffmpeg/omapfbplay_git.bb
index 876a224..0d3956f 100644
--- a/recipes/ffmpeg/omapfbplay_git.bb
+++ b/recipes/ffmpeg/omapfbplay_git.bb
@@ -1,30 +1,3 @@
-DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays"
-DEPENDS = "bzip2 lame ffmpeg virtual/kernel"
-LICENSE = "MIT"
+require omapfbplay.inc
 
-PR = "r26"
-
-PV = "0.0+${PR}+gitr${SRCREV}"
-
-SRCREV = "1d217676ba71e8740524e9814c47da39880ed3bc"
-SRC_URI = "git://git.mansr.com/${PN};protocol=git \
-"
-
-S = "${WORKDIR}/git"
-
-# We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
-STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
-
-CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include "
-
-do_compile() {
-	cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S} || true
-	cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S} || true
-	oe_runmake ${TARGET_ARCH}=y V4L2=y OMAPFB=y NETSYNC=y -e
-}
-
-do_install() {
-	install -d ${D}/${bindir}
-	install -m 0755 ${S}/omapfbplay ${D}/${bindir}/
-}
+OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y"





More information about the Openembedded-commits mailing list