aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mokoeightball
diff options
context:
space:
mode:
authorBenjamin Schieder <blindcoder@scavenger.homeip.net>2009-11-30 15:37:07 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2009-12-02 23:07:49 +0100
commit0d7c70004bf85ee59d8ce48d6d83c68b313859bd (patch)
treef45cace251dacdb9a85fb223a770bfae5a735111 /recipes/mokoeightball
parent835892e3e6da74718036989e80547025b1473203 (diff)
downloadopenembedded-0d7c70004bf85ee59d8ce48d6d83c68b313859bd.tar.gz
mokoeightball: new recipe and patch
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/mokoeightball')
-rw-r--r--recipes/mokoeightball/files/fixpath.patch63
-rw-r--r--recipes/mokoeightball/mokoeightball_svn.bb34
2 files changed, 97 insertions, 0 deletions
diff --git a/recipes/mokoeightball/files/fixpath.patch b/recipes/mokoeightball/files/fixpath.patch
new file mode 100644
index 0000000000..8fd82cf27e
--- /dev/null
+++ b/recipes/mokoeightball/files/fixpath.patch
@@ -0,0 +1,63 @@
+Index: ./python/src/eightball.py
+===================================================================
+--- ./python/src/eightball.py (revision 45)
++++ ./python/src/eightball.py (working copy)
+@@ -47,12 +47,6 @@
+ shakeTimer = None
+
+ def __init__( self, size ):
+- # Check if we can use accelerated rendering
+- if ecore.evas.engine_type_supported_get("software_x11_16"):
+- self.engine = ecore.evas.SoftwareX11_16
+- else:
+- print "warning: x11-16 is not supported, fallback to x11"
+- self.engine = ecore.evas.SoftwareX11
+
+ self.size = size
+
+@@ -63,7 +57,12 @@
+ self.accel.addListener( "shake", self.onShake )
+
+ # Initialize the renderer and set all initial properties
+- self.ee = self.engine( w = size[0], h = size[1] )
++ try:
++ self.engine = ecore.evas.SoftwareX11_16
++ self.ee = self.engine( w = size[0], h = size[1] )
++ except e:
++ self.engine = ecore.evas.SoftwareX11
++ self.ee = self.engine( w = size[0], h = size[1] )
+ self.ee.title = "Moko Eightball"
+ self.ee.name_class = ( "MOKO_EIGHTBALL", "MOKO_EIGHTBALL" )
+ # self.ee.fullscreen = True
+Index: ./python/src/Accelerometer/__init__.py
+===================================================================
+--- ./python/src/Accelerometer/__init__.py (revision 45)
++++ ./python/src/Accelerometer/__init__.py (working copy)
+@@ -30,7 +30,7 @@
+
+ class EventManager(object):
+ movementTolerance = 30
+- shakeTolerance = 2100
++ shakeTolerance = 100
+
+ listeners = dict(
+ shake = [],
+@@ -82,15 +82,15 @@
+ # Inform all listeners
+ self.informListeners()
+ break
+- if ( type == 2 and code == 0 ):
++ if ( type == 3 and code == 0 ):
+ # Update x
+ x = value
+ continue
+- if ( type == 2 and code == 1 ):
++ if ( type == 3 and code == 1 ):
+ # Update y
+ y = value
+ continue
+- if ( type == 2 and code == 2 ):
++ if ( type == 3 and code == 2 ):
+ # Update z
+ z = value
+ continue
diff --git a/recipes/mokoeightball/mokoeightball_svn.bb b/recipes/mokoeightball/mokoeightball_svn.bb
new file mode 100644
index 0000000000..dde59cb018
--- /dev/null
+++ b/recipes/mokoeightball/mokoeightball_svn.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Magic 8 Ball"
+HOMEPAGE = "http://www.opkg.org/package_35.html"
+AUTHOR = "Jakob Westhoff"
+LICENSE = "GPLv2"
+SECTION = "x11/game"
+SRCREV = "45"
+PV = "0.2+svnr${SRCPV}"
+PR = "r0"
+S = "${WORKDIR}/"
+FILES_${PN} += /usr/share/moko_eightball/Accelerometer/__init__.py
+FILES_${PN} += /usr/share/moko_eightball/themes/eightball.edj
+
+SRC_URI = "svn://svn.pureenergy.cc/moko_eightball;module=.;proto=svn \
+ file://files/fixpath.patch;patch=1"
+
+do_compile() {
+ cd python/src/data/themes
+ ./maketheme.sh
+}
+
+do_install() {
+ cd python
+ install -d 0755 ${D}/usr/share/moko_eightball
+ install -d 0755 ${D}/usr/share/moko_eightball/Accelerometer
+ install -d 0755 ${D}/usr/share/moko_eightball/themes
+ install -d 0755 ${D}/usr/share/applications
+ install -d 0755 ${D}/usr/share/pixmaps
+ install -d 0755 ${D}/usr/bin
+ install -m 0755 src/eightball.py ${D}/usr/bin/eightball
+ install -m 0644 src/Accelerometer/__init__.py ${D}/usr/share/moko_eightball/Accelerometer/
+ install -m 0644 src/data/themes/eightball.edj ${D}/usr/share/moko_eightball/themes/eightball.edj
+ install -m 0644 ipk/usr/share/applications/eightball.desktop ${D}/usr/share/applications/eightball.desktop
+ install -m 0644 ipk/usr/share/pixmaps/eightball.png ${D}/usr/share/pixmaps/eightball.png
+}