matrix-gui_svn: X11 version of matrix GUI
authorChase Maupin <chase.maupin@ti.com>
Thu, 27 May 2010 15:57:15 +0000 (10:57 -0500)
committerKoen Kooi <koen@openembedded.org>
Fri, 28 May 2010 07:21:14 +0000 (09:21 +0200)
* Added recipe to build matrix GUI application with Qt X11
  libraries.
* Changed init script to not place an entry in the /etc/rc5.d
  directory.  Init script is still used for starting the
  matrix_gui application.
* Added patch to enable the cursor for X11

Acked-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Chase Maupin <chase.maupin@ti.com>
Signed-off-by: Koen Kooi <k-kooi@ti.com>
recipes/ti/matrix-gui/0001-Disable-cursor-override-for-X11.patch [new file with mode: 0644]
recipes/ti/matrix-gui/dm365-evm/init [new file with mode: 0644]
recipes/ti/matrix-gui/init [new file with mode: 0644]
recipes/ti/matrix-gui_svn.bb [new file with mode: 0644]

diff --git a/recipes/ti/matrix-gui/0001-Disable-cursor-override-for-X11.patch b/recipes/ti/matrix-gui/0001-Disable-cursor-override-for-X11.patch
new file mode 100644 (file)
index 0000000..61eba44
--- /dev/null
@@ -0,0 +1,27 @@
+From b0e91f703ffdcc73f854a672ec16ebbf21293c9c Mon Sep 17 00:00:00 2001
+From: Chase Maupin <chase.maupin@ti.com>
+Date: Mon, 24 May 2010 12:51:49 -0500
+Subject: [PATCH] Disable cursor override for X11
+
+* Disable the cursor override option for using the matrix_gui
+  program with X11.
+---
+ main.cpp |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/main.cpp b/main.cpp
+index 978e327..1f55e94 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -43,7 +43,7 @@ int main(int argc, char * argv[])
+ {
+     QApplication matrix(argc, argv);
+     QApplication::setStyle(new CustomStyle);
+-    QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
++//    QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
+     // Create a new window to display a web page.
+     MainWindow * pWindow = new MainWindow(0, QString(argv[1]), true);
+-- 
+1.6.0.4
+
diff --git a/recipes/ti/matrix-gui/dm365-evm/init b/recipes/ti/matrix-gui/dm365-evm/init
new file mode 100644 (file)
index 0000000..3aadc1e
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh
+matrixgui="/usr/bin/matrix_gui"
+GUI_OPTS="-geometry 720x480+0+10 -display transformed:Rot0 /usr/share/matrix/html/menu_main.html"
+
+test -x "$matrixgui" || exit 0
+
+case "$1" in
+  start)
+    # switch to component 480p mode
+    echo 480P-60 > /sys/class/davinci_display/ch0/mode
+    echo COMPONENT > /sys/class/davinci_display/ch0/output
+    echo -n "Starting Matrix GUI application"
+    start-stop-daemon --start --quiet --background --pidfile /var/run/matrix-gui.pid --exec $matrixgui -- $GUI_OPTS
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping Matrix GUI application"
+    start-stop-daemon --stop --quiet --pidfile /var/run/matrix-gui.pid
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/matrix-gui {start|stop}"
+    exit 1
+esac
+
+exit 0
diff --git a/recipes/ti/matrix-gui/init b/recipes/ti/matrix-gui/init
new file mode 100644 (file)
index 0000000..40b6512
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+matrixgui="/usr/bin/matrix_gui"
+GUI_OPTS="/usr/share/matrix/html/menu_main.html"
+
+test -x "$matrixgui" || exit 0
+
+case "$1" in
+  start)
+    echo -n "Starting Matrix GUI application"
+    start-stop-daemon --start --quiet --background --pidfile /var/run/matrix-gui.pid --exec $matrixgui -- $GUI_OPTS
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping Matrix GUI application"
+    start-stop-daemon --stop --quiet --pidfile /var/run/matrix-gui.pid
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/matrix-gui {start|stop}"
+    exit 1
+esac
+
+exit 0
diff --git a/recipes/ti/matrix-gui_svn.bb b/recipes/ti/matrix-gui_svn.bb
new file mode 100644 (file)
index 0000000..39c80de
--- /dev/null
@@ -0,0 +1,50 @@
+DESCRIPTION = "Matrix GUI for Qt X11"
+HOMEPAGE = "https://gforge.ti.com/gf/project/matrix_gui/"
+LICENSE = "BSD"
+SECTION = "multimedia"
+PRIORITY = "optional"
+
+SRCREV = "58"
+PV = "1.0"
+PR = "r12+svnr${SRCPV}"
+
+SRC_URI = "svn://gforge.ti.com/svn/matrix_gui/;module=trunk;proto=https;user=anonymous;pswd='' \
+    file://0001-Disable-cursor-override-for-X11.patch;patch=1 \
+       file://init \
+"
+
+S = "${WORKDIR}/trunk"
+
+inherit qt4x11
+
+MATRIX_EXTRA_BINS = " \
+       memInfo \
+       networkSettings \
+       runOGLES2Coverflow \
+       runOGLES2Shaders \
+       runOGLESChameleonMan \
+       runOGLESVase \
+       setopp1 \
+       setopp2 \
+       setopp3 \
+       setopp4 \
+       standby \
+       sysSettings \
+       taskInfo \
+"
+
+do_install() {
+       install -d ${D}/${bindir}
+       install -m 0755 ${S}/matrix_gui ${D}/${bindir}
+       for i in ${MATRIX_EXTRA_BINS}; do
+               install -m 0755 ${S}/bin/${i} ${D}/${bindir}
+       done
+       install -d ${D}/${datadir}/matrix/html
+       install -m 0644 ${S}/*.html ${D}/${datadir}/matrix/html/
+       install -d ${D}/${datadir}/matrix/images
+       install -m 0644 ${S}/images/*.png ${D}/${datadir}/matrix/images/
+       install -d ${D}${sysconfdir}/init.d/
+       install -c -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui
+}
+
+FILES_${PN} += "${datadir}/matrix/*"