[oe-commits] Benjamin Schieder : mokoeightball: new recipe and patch

git version control git at git.openembedded.org
Wed Dec 2 22:18:51 UTC 2009


Module: openembedded.git
Branch: martin_jansa/srcpv
Commit: 0d7c70004bf85ee59d8ce48d6d83c68b313859bd
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=0d7c70004bf85ee59d8ce48d6d83c68b313859bd

Author: Benjamin Schieder <blindcoder at scavenger.homeip.net>
Date:   Mon Nov 30 15:37:07 2009 +0000

mokoeightball: new recipe and patch

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 recipes/mokoeightball/files/fixpath.patch  |   63 ++++++++++++++++++++++++++++
 recipes/mokoeightball/mokoeightball_svn.bb |   34 +++++++++++++++
 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 0000000..8fd82cf
--- /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 0000000..dde59cb
--- /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
+}





More information about the Openembedded-commits mailing list