omapfbplay*: refactor into .inc
authorKoen Kooi <koen@openembedded.org>
Fri, 21 Jan 2011 09:50:54 +0000 (10:50 +0100)
committerKoen Kooi <koen@openembedded.org>
Fri, 21 Jan 2011 10:58:13 +0000 (11:58 +0100)
Signed-off-by: Koen Kooi <koen@openembedded.org>
recipes/ffmpeg/omapfbplay-cmem_git.bb
recipes/ffmpeg/omapfbplay-dce_git.bb
recipes/ffmpeg/omapfbplay-xv_git.bb
recipes/ffmpeg/omapfbplay.inc [new file with mode: 0644]
recipes/ffmpeg/omapfbplay_git.bb

index 0d1651d..6597add 100644 (file)
@@ -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"
index a9ff44a..e70ac72 100644 (file)
@@ -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"
index 88df08b..cadf6d8 100644 (file)
@@ -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 (file)
index 0000000..5168698
--- /dev/null
@@ -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}
+}
index 876a224..0d3956f 100644 (file)
@@ -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"