diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2009-11-18 09:27:49 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2009-11-18 09:57:51 +0100 |
commit | 359c5a669adc3c2820cdf658875b5462cf46f2b7 (patch) | |
tree | 5c6c1cffe2b7da7ba5268034bf2112056211b2d9 /recipes/omnewrotate | |
parent | 111c79f388e2fde3de44dd8c74ef89f012375888 (diff) |
omnewrotate: new recipe from SHR
Diffstat (limited to 'recipes/omnewrotate')
-rw-r--r-- | recipes/omnewrotate/files/correct-sysfs-bl-path.patch | 53 | ||||
-rw-r--r-- | recipes/omnewrotate/omnewrotate_0.5.4.bb | 15 |
2 files changed, 68 insertions, 0 deletions
diff --git a/recipes/omnewrotate/files/correct-sysfs-bl-path.patch b/recipes/omnewrotate/files/correct-sysfs-bl-path.patch new file mode 100644 index 0000000000..6d381649a8 --- /dev/null +++ b/recipes/omnewrotate/files/correct-sysfs-bl-path.patch @@ -0,0 +1,53 @@ +diff -uri omnewrotate.org/src/omnewrotate.c omnewrotate/src/omnewrotate.c +--- omnewrotate.org/src/omnewrotate.c 2009-05-03 20:23:56.000000000 +0200 ++++ omnewrotate/src/omnewrotate.c 2009-05-07 17:46:07.000000000 +0200 +@@ -95,8 +95,8 @@ + #define LONG_TIME 0 + + #define EVENT_PATH "/dev/input/event3" +-#define GET_BRIGHTNESS_PATH "/sys/class/backlight/pcf50633-bl/actual_brightness" +-#define SET_BRIGHTNESS_PATH "/sys/class/backlight/pcf50633-bl/brightness" ++#define GET_BRIGHTNESS_PATH "/sys/class/backlight/gta02-bl/actual_brightness" ++#define SET_BRIGHTNESS_PATH "/sys/class/backlight/gta02-bl/brightness" + + #define NUM_THREADS 1 + +@@ -197,8 +197,8 @@ + #endif + + if (change_brightness && !use_dbus) { +- set_brightness_file = open(SET_BRIGHTNESS_PATH, O_RDWR); +- get_brightness_file = open(GET_BRIGHTNESS_PATH, O_RDWR); ++ set_brightness_file = open(SET_BRIGHTNESS_PATH, O_WRONLY); ++ get_brightness_file = open(GET_BRIGHTNESS_PATH, O_RDONLY); + + if (set_brightness_file < 0 || get_brightness_file < 0) + { +@@ -273,7 +273,7 @@ + rootWindow = RootWindow(display, screen); + XRRRotations(display, screen, &r); + +- char current_brightness[3] = "63\n"; ++ char current_brightness[4] = "255\n"; + char brightness_off[2] = "0\n"; + + +@@ -317,7 +317,7 @@ + else + { + lseek(get_brightness_file, 0, SEEK_SET); +- read(get_brightness_file, ¤t_brightness, 2); ++ read(get_brightness_file, ¤t_brightness, 3); + lseek(set_brightness_file, 0, SEEK_SET); + write(set_brightness_file, &brightness_off, 2); + } +@@ -333,7 +333,7 @@ + if(debug) printf("Recovering screen brightness for nifty effect\n"); + usleep(500000); + lseek(set_brightness_file, 0, SEEK_SET); +- write(set_brightness_file, ¤t_brightness, 3); ++ write(set_brightness_file, ¤t_brightness, 4); + } + + } +Nur in omnewrotate.org/src: .omnewrotate.c.swp. diff --git a/recipes/omnewrotate/omnewrotate_0.5.4.bb b/recipes/omnewrotate/omnewrotate_0.5.4.bb new file mode 100644 index 0000000000..c712efaba0 --- /dev/null +++ b/recipes/omnewrotate/omnewrotate_0.5.4.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "OpenMoko New Rotate is a screen rotation program" +HOMEPAGE = "http://code.google.com/p/omnewrotate/" +AUTHOR = "Rui Seabra" +LICENSE = "GPLv3" +SECTION = "console/network" +DEPENDS = "libframeworkd-glib xrandr" +PV = "0.5.4" +PR = "r4" + +SRC_URI = "svn://omnewrotate.googlecode.com/svn/trunk;module=.;proto=http;rev=HEAD \ +file://correct-sysfs-bl-path.patch;patch=1 \ +" +S = "${WORKDIR}" + +inherit autotools |