summaryrefslogtreecommitdiffstats
path: root/meta-demoapps/recipes-graphics
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@intel.com>2010-11-22 13:57:13 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-22 13:57:13 +0000
commitcfe12efb5ec9586dab6961f141d52b103bd8b1d1 (patch)
tree7108e22aa7ddf6cfc2f1b6c6b73a811187706ecb /meta-demoapps/recipes-graphics
parent762fd6b7b3b22d7a8cb80ef9e9ba62e7ef21af3e (diff)
downloadpoky-cfe12efb5ec9586dab6961f141d52b103bd8b1d1.tar.gz
Meta: Recipe Reogranization
This is the next stage of recipe reorganization, in this stage many recipes where moved to a new meta-demoapps layer since this is more appropriate for demo usage then the core. Additional some recipes were moved to meta-extras to indicate they may be depercated at a future time. A number of recipes were modified since dependencies need to be corrected. Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Diffstat (limited to 'meta-demoapps/recipes-graphics')
-rw-r--r--meta-demoapps/recipes-graphics/clutter/table/fixes.patch14
-rw-r--r--meta-demoapps/recipes-graphics/libxklavier/libxklavier/pkgconfigfix.patch15
-rw-r--r--meta-demoapps/recipes-graphics/libxklavier/libxklavier_3.9.bb12
-rw-r--r--meta-demoapps/recipes-graphics/pong-clock/pong-clock/pong-clock-no-flicker.c410
-rw-r--r--meta-demoapps/recipes-graphics/pong-clock/pong-clock_1.0.bb16
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xbacklight_1.1.bb4
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xev/diet-x11.patch80
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xev_1.0.3.bb7
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xeyes_1.0.1.bb4
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xrdb/60XDefaults.sh3
-rw-r--r--meta-demoapps/recipes-graphics/xorg-app/xrdb_1.0.5.bb14
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/liblbxutil/mkg3states.patch63
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb11
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/libxaw_1.0.5.bb21
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/libxevie_1.0.2.bb8
-rw-r--r--meta-demoapps/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb8
-rw-r--r--meta-demoapps/recipes-graphics/xorg-proto/xproxymanagementprotocol_1.0.3.bb5
-rw-r--r--meta-demoapps/recipes-graphics/xournal/files/ldflags.patch15
-rw-r--r--meta-demoapps/recipes-graphics/xournal/files/no-printing.diff178
-rw-r--r--meta-demoapps/recipes-graphics/xournal/xournal_0.2.bb12
20 files changed, 900 insertions, 0 deletions
diff --git a/meta-demoapps/recipes-graphics/clutter/table/fixes.patch b/meta-demoapps/recipes-graphics/clutter/table/fixes.patch
new file mode 100644
index 0000000000..a7cdc43713
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/clutter/table/fixes.patch
@@ -0,0 +1,14 @@
1Index: table/Makefile
2===================================================================
3--- table.orig/Makefile 2007-07-10 13:24:18.000000000 +0100
4+++ table/Makefile 2007-07-10 13:28:10.000000000 +0100
5@@ -8,7 +8,7 @@ all: table
6
7
8 table: table.o clutter-dominatrix.o clutter-video-player.o
9- $(CC) -g -Wall $(CFLAGS) -o $@ table.o clutter-dominatrix.o clutter-video-player.o $(LIBS)
10+ $(CC) -g -Wall $(CFLAGS) $(LDFLAGS) -o $@ table.o clutter-dominatrix.o clutter-video-player.o $(LIBS)
11
12 clean:
13 rm -fr *.o table
14\ No newline at end of file
diff --git a/meta-demoapps/recipes-graphics/libxklavier/libxklavier/pkgconfigfix.patch b/meta-demoapps/recipes-graphics/libxklavier/libxklavier/pkgconfigfix.patch
new file mode 100644
index 0000000000..4aaafb2b1e
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/libxklavier/libxklavier/pkgconfigfix.patch
@@ -0,0 +1,15 @@
1Index: libxklavier-3.7/libxklavier.pc.in
2===================================================================
3--- libxklavier-3.7.orig/libxklavier.pc.in 2009-06-10 15:58:46.000000000 +0100
4+++ libxklavier-3.7/libxklavier.pc.in 2009-06-10 16:00:45.000000000 +0100
5@@ -5,7 +5,7 @@
6
7 Name: libxklavier
8 Description: libxklavier library
9-Requires: libxml-2.0
10+Requires: libxml-2.0 glib-2.0
11 Version: @VERSION@
12-Libs: -L${libdir} -lxklavier @GLIB_LIBS@ @XML_LIBS@
13-Cflags: -I${includedir} @GLIB_CFLAGS@
14+Libs: -L${libdir} -lxklavier
15+Cflags: -I${includedir}
diff --git a/meta-demoapps/recipes-graphics/libxklavier/libxklavier_3.9.bb b/meta-demoapps/recipes-graphics/libxklavier/libxklavier_3.9.bb
new file mode 100644
index 0000000000..1d9b6f21a4
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/libxklavier/libxklavier_3.9.bb
@@ -0,0 +1,12 @@
1DESCRIPTION = "Utility library to make using XKB easier"
2SECTION = "x11/libs"
3PRIORITY = "optional"
4DEPENDS = "iso-codes libxml2 glib-2.0 libxkbfile"
5LICENSE = "LGPL"
6PR = "r2"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/gswitchit/libxklavier-${PV}.tar.bz2 \
9 file://pkgconfigfix.patch;patch=1"
10
11inherit autotools
12
diff --git a/meta-demoapps/recipes-graphics/pong-clock/pong-clock/pong-clock-no-flicker.c b/meta-demoapps/recipes-graphics/pong-clock/pong-clock/pong-clock-no-flicker.c
new file mode 100644
index 0000000000..41cebc58a7
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/pong-clock/pong-clock/pong-clock-no-flicker.c
@@ -0,0 +1,410 @@
1/*
2 * Pong Clock - A clock that plays pong.
3 * See http://mocoloco.com/archives/001766.php for the inspiration.
4 *
5 * Copyright (C) 2005 Matthew Allum
6 *
7 * Author: Matthew Allum mallum@openedhand.com
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 *
23 */
24
25#include <stdlib.h>
26#include <time.h>
27#include <sys/time.h>
28#include <sys/types.h>
29#include <string.h>
30#include <stdio.h>
31#include <unistd.h>
32#include <signal.h>
33
34#include <X11/Xlib.h>
35#include <X11/Xutil.h>
36#include <X11/Xatom.h>
37
38/* Tweak values for different hw setups */
39
40#define FPS 50
41#define RESX 40
42#define RESY 40
43#define TO_MISS_SECS 55
44#define BALLDX 16
45#define BALLDY 4
46
47
48typedef struct PongClock
49{
50 Display *xdpy;
51 int xscreen;
52 Window xwin, xwin_root;
53 Pixmap backbuffer;
54 GC xgc;
55 int xwin_width, xwin_height;
56 int pixelw, pixelh;
57
58 int ball_x, ball_y, ball_dx, ball_dy;
59 int bata_y, batb_y;
60 Bool bata_to_miss, batb_to_miss;
61
62}
63PongClock;
64
65void
66get_time(int *hour, int *min, int *sec)
67{
68 struct timeval tv;
69 struct tm *localTime = NULL;
70 time_t actualTime;
71
72 gettimeofday(&tv, 0);
73 actualTime = tv.tv_sec;
74 localTime = localtime(&actualTime);
75
76 if (hour)
77 *hour = localTime->tm_hour;
78
79 if (min)
80 *min = localTime->tm_min;
81
82 if (sec)
83 *sec = localTime->tm_sec;
84}
85
86void
87draw_rect (PongClock *pong_clock,
88 int x,
89 int y,
90 int width,
91 int height)
92{
93 XFillRectangle (pong_clock->xdpy,
94 pong_clock->backbuffer,
95 pong_clock->xgc,
96 x * pong_clock->pixelw,
97 y * pong_clock->pixelh,
98 width * pong_clock->pixelw,
99 height * pong_clock->pixelh);
100}
101
102void
103draw_field (PongClock *pong_clock)
104{
105 int i;
106
107 draw_rect (pong_clock, 0, 0, RESX+1, 1);
108 draw_rect (pong_clock, 0, RESY-1, RESX+1, 1);
109
110 for (i=0; i < RESY/2; i++)
111 draw_rect (pong_clock, (RESX/2)-1, i*2, 2, 1);
112}
113
114void
115draw_digit (PongClock *pong_clock,
116 int x,
117 int y,
118 int digit)
119{
120 int digits[] = { 0x1f8c63f, 0x1f21086, 0x1f0fe1f, 0x1f87e1f, 0x1087e31,
121 0x1f87c3f, 0x1f8fc3f, 0x84421f, 0x1f8fe3f, 0x1087e3f };
122
123 XRectangle rects[5*5];
124 int i,j,k;
125
126 i = 0;
127
128 for (k=0; k<5; k++)
129 for (j=0; j<5; j++)
130 if (digits[digit] & (1 << ((k*5)+j)))
131 {
132 rects[i].x = (x + j) * pong_clock->pixelw;
133 rects[i].y = (y + k) * pong_clock->pixelh;
134 rects[i].width = pong_clock->pixelw;
135 rects[i].height = pong_clock->pixelh;
136 i++;
137 }
138
139 XFillRectangles (pong_clock->xdpy,
140 pong_clock->backbuffer,
141 pong_clock->xgc,
142 rects, i);
143}
144
145void
146draw_time (PongClock *pong_clock)
147{
148 int hour, min;
149
150 get_time(&hour, &min, NULL);
151
152 draw_digit (pong_clock,
153 (RESX/2) - 14,
154 5,
155 hour / 10 );
156
157 draw_digit (pong_clock,
158 (RESX/2) - 8,
159 5,
160 hour % 10 );
161
162 draw_digit (pong_clock,
163 (RESX/2) + 3,
164 5,
165 min / 10 );
166
167 draw_digit (pong_clock,
168 (RESX/2) + 9,
169 5,
170 min % 10 );
171}
172
173void
174draw_bat_and_ball (PongClock *pong_clock)
175{
176 /* ball */
177
178 XFillRectangle (pong_clock->xdpy,
179 pong_clock->backbuffer,
180 pong_clock->xgc,
181 pong_clock->ball_x,
182 pong_clock->ball_y,
183 pong_clock->pixelw,
184 pong_clock->pixelh);
185
186 /* bat a */
187
188 XFillRectangle (pong_clock->xdpy,
189 pong_clock->backbuffer,
190 pong_clock->xgc,
191 0,
192 pong_clock->bata_y - (2 * pong_clock->pixelh),
193 pong_clock->pixelw,
194 pong_clock->pixelh * 5);
195
196 /* bat b */
197
198 XFillRectangle (pong_clock->xdpy,
199 pong_clock->backbuffer,
200 pong_clock->xgc,
201 (pong_clock->xwin_width - pong_clock->pixelw),
202 pong_clock->batb_y - (2 * pong_clock->pixelh),
203 pong_clock->pixelw,
204 pong_clock->pixelh * 5);
205
206}
207
208void
209update_state (PongClock *pong_clock)
210{
211 int sec, min, hour;
212
213 get_time(&hour, &min, &sec);
214
215 /* Check ball is on field and no ones dues to miss a shot.
216 */
217 if ( (pong_clock->ball_x < 0 && !pong_clock->bata_to_miss)
218 || (pong_clock->ball_x > (pong_clock->xwin_width - pong_clock->pixelw)
219 && !pong_clock->batb_to_miss) )
220 pong_clock->ball_dx *= -1;
221
222 if ((pong_clock->ball_y < pong_clock->pixelh)
223 || pong_clock->ball_y > (pong_clock->xwin_height - (2*pong_clock->pixelh)))
224 pong_clock->ball_dy *= -1;
225
226 pong_clock->ball_x += pong_clock->ball_dx;
227 pong_clock->ball_y += pong_clock->ball_dy;
228
229 /* Set up someone to miss if we getting close to an hour or min.
230 */
231 if (sec > TO_MISS_SECS)
232 {
233 if (min == 59)
234 pong_clock->batb_to_miss = True;
235 else
236 pong_clock->bata_to_miss = True;
237 }
238 else
239 {
240 /* Reset the game */
241 if (pong_clock->bata_to_miss)
242 {
243 pong_clock->bata_to_miss = False;
244 pong_clock->ball_y = pong_clock->bata_y;
245 pong_clock->ball_x = pong_clock->pixelw;
246 pong_clock->ball_dx *= -1;
247 }
248
249 if (pong_clock->batb_to_miss)
250 {
251 pong_clock->batb_to_miss = False;
252 pong_clock->ball_y = pong_clock->batb_y;
253 pong_clock->ball_x = pong_clock->xwin_width - pong_clock->pixelw;
254 pong_clock->ball_dx *= -1;
255 }
256 }
257
258 /* Keep bats on field and only move in not setup to miss */
259 if (pong_clock->ball_y >= (3*pong_clock->pixelh)
260 && pong_clock->ball_y <= (pong_clock->xwin_height - (5*pong_clock->pixelh)))
261 {
262 if (!pong_clock->batb_to_miss)
263 pong_clock->batb_y = pong_clock->ball_y;
264
265 if (!pong_clock->bata_to_miss)
266 pong_clock->bata_y = pong_clock->ball_y;
267 }
268}
269
270void
271draw_frame (PongClock *pong_clock)
272{
273 update_state (pong_clock);
274
275 /* Clear playfield */
276 XSetForeground (pong_clock->xdpy,
277 pong_clock->xgc,
278 BlackPixel(pong_clock->xdpy,
279 pong_clock->xscreen));
280
281 XFillRectangle (pong_clock->xdpy,
282 pong_clock->backbuffer,
283 pong_clock->xgc,
284 0, 0,
285 pong_clock->xwin_width,
286 pong_clock->xwin_height);
287
288 XSetForeground (pong_clock->xdpy,
289 pong_clock->xgc,
290 WhitePixel(pong_clock->xdpy,
291 pong_clock->xscreen));
292
293 draw_field (pong_clock);
294
295 draw_time (pong_clock);
296
297 draw_bat_and_ball (pong_clock);
298
299 /* flip 'backbuffer' */
300 XSetWindowBackgroundPixmap (pong_clock->xdpy,
301 pong_clock->xwin,
302 pong_clock->backbuffer);
303 XClearWindow(pong_clock->xdpy, pong_clock->xwin);
304
305 XSync(pong_clock->xdpy, False);
306}
307
308int
309main (int argc, char **argv)
310{
311 XGCValues gcv;
312 Atom atoms_WINDOW_STATE, atoms_WINDOW_STATE_FULLSCREEN;
313 PongClock *pong_clock;
314
315 pong_clock = malloc(sizeof(PongClock));
316 memset(pong_clock, 0, sizeof(PongClock));
317
318 if ((pong_clock->xdpy = XOpenDisplay(getenv("DISPLAY"))) == NULL) {
319 fprintf(stderr, "Cannot connect to X server on display %s.",
320 getenv("DISPLAY"));
321 exit(-1);
322 }
323
324 pong_clock->xscreen = DefaultScreen(pong_clock->xdpy);
325 pong_clock->xwin_root = DefaultRootWindow(pong_clock->xdpy);
326 pong_clock->xwin_width = DisplayWidth(pong_clock->xdpy,
327 pong_clock->xscreen);
328 pong_clock->xwin_height = DisplayHeight(pong_clock->xdpy,
329 pong_clock->xscreen);
330
331 pong_clock->pixelw = pong_clock->xwin_width / RESX;
332 pong_clock->pixelh = pong_clock->xwin_height / RESY;
333
334 pong_clock->ball_x = 0;
335 pong_clock->ball_y = pong_clock->xwin_height / 2;
336
337 pong_clock->ball_dx = BALLDX;
338 pong_clock->ball_dy = BALLDY;
339
340 pong_clock->batb_y = pong_clock->bata_y = pong_clock->ball_y;
341
342 gcv.background = BlackPixel(pong_clock->xdpy,
343 pong_clock->xscreen);
344 gcv.foreground = WhitePixel(pong_clock->xdpy,
345 pong_clock->xscreen);
346 gcv.graphics_exposures = False;
347
348 pong_clock->xgc = XCreateGC (pong_clock->xdpy, pong_clock->xwin_root,
349 GCForeground|GCBackground|GCGraphicsExposures,
350 &gcv);
351
352 atoms_WINDOW_STATE
353 = XInternAtom(pong_clock->xdpy, "_NET_WM_STATE",False);
354 atoms_WINDOW_STATE_FULLSCREEN
355 = XInternAtom(pong_clock->xdpy, "_NET_WM_STATE_FULLSCREEN",False);
356
357 pong_clock->xwin = XCreateSimpleWindow(pong_clock->xdpy,
358 pong_clock->xwin_root,
359 0, 0,
360 pong_clock->xwin_width,
361 pong_clock->xwin_height,
362 0,
363 WhitePixel(pong_clock->xdpy,
364 pong_clock->xscreen),
365 BlackPixel(pong_clock->xdpy,
366 pong_clock->xscreen));
367
368 pong_clock->backbuffer = XCreatePixmap(pong_clock->xdpy,
369 pong_clock->xwin_root,
370 pong_clock->xwin_width,
371 pong_clock->xwin_height,
372 DefaultDepth(pong_clock->xdpy,
373 pong_clock->xscreen));
374
375 XSelectInput(pong_clock->xdpy, pong_clock->xwin, KeyPressMask);
376
377
378 /* Set the hints for fullscreen */
379 XChangeProperty(pong_clock->xdpy,
380 pong_clock->xwin,
381 atoms_WINDOW_STATE,
382 XA_ATOM,
383 32,
384 PropModeReplace,
385 (unsigned char *) &atoms_WINDOW_STATE_FULLSCREEN, 1);
386
387 XMapWindow(pong_clock->xdpy, pong_clock->xwin);
388
389 while (True)
390 {
391 struct timeval timeout;
392 XEvent xev;
393
394 timeout.tv_sec = 0;
395 timeout.tv_usec = 1000000 / FPS;
396 select (0, NULL, NULL, NULL, &timeout);
397
398 draw_frame (pong_clock);
399
400 XFlush(pong_clock->xdpy);
401
402 if (XPending(pong_clock->xdpy))
403 {
404 if (XCheckMaskEvent(pong_clock->xdpy,
405 KeyPressMask,
406 &xev))
407 exit(-1);
408 }
409 }
410}
diff --git a/meta-demoapps/recipes-graphics/pong-clock/pong-clock_1.0.bb b/meta-demoapps/recipes-graphics/pong-clock/pong-clock_1.0.bb
new file mode 100644
index 0000000000..8d3659ff91
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/pong-clock/pong-clock_1.0.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "A clock combined with a game of pong"
2LICENSE = "GPLv2+"
3DEPENDS = "virtual/libx11 xdmcp xau"
4
5SRC_URI = "file://pong-clock-no-flicker.c"
6
7S = "${WORKDIR}"
8
9do_compile () {
10 ${CC} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
11}
12
13do_install () {
14 install -d ${D}${bindir}
15 install -m 0755 pong-clock ${D}${bindir}
16}
diff --git a/meta-demoapps/recipes-graphics/xorg-app/xbacklight_1.1.bb b/meta-demoapps/recipes-graphics/xorg-app/xbacklight_1.1.bb
new file mode 100644
index 0000000000..78804d734e
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-app/xbacklight_1.1.bb
@@ -0,0 +1,4 @@
1require xorg-app-common.inc
2
3DESCRIPTION = "X Backlight Utility"
4DEPENDS += "libxrender libxrandr"
diff --git a/meta-demoapps/recipes-graphics/xorg-app/xev/diet-x11.patch b/meta-demoapps/recipes-graphics/xorg-app/xev/diet-x11.patch
new file mode 100644
index 0000000000..9f515e8c73
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-app/xev/diet-x11.patch
@@ -0,0 +1,80 @@
1---
2 xev.c | 16 ++++++++--------
3 1 file changed, 8 insertions(+), 8 deletions(-)
4
5Index: xev-1.0.2/xev.c
6===================================================================
7--- xev-1.0.2.orig/xev.c 2006-06-02 00:25:44.000000000 +0100
8+++ xev-1.0.2/xev.c 2007-05-10 15:22:07.000000000 +0100
9@@ -109,7 +109,7 @@ do_KeyPress (XEvent *eventp)
10 nbytes = XLookupString (e, str, 256, &ks, NULL);
11
12 /* not supposed to call XmbLookupString on a key release event */
13- if (e->type == KeyPress && xic) {
14+ /*if (e->type == KeyPress && xic) {
15 do {
16 nmbbytes = XmbLookupString (xic, e, buf, bsize - 1, &ks, &status);
17 buf[nmbbytes] = '\0';
18@@ -119,7 +119,7 @@ do_KeyPress (XEvent *eventp)
19 buf = realloc (buf, bsize);
20 }
21 } while (status == XBufferOverflow);
22- }
23+ }*/
24
25 if (ks == NoSymbol)
26 ksname = "NoSymbol";
27@@ -149,7 +149,7 @@ do_KeyPress (XEvent *eventp)
28 }
29
30 /* not supposed to call XmbLookupString on a key release event */
31- if (e->type == KeyPress && xic) {
32+ /*if (e->type == KeyPress && xic) {
33 printf (" XmbLookupString gives %d bytes: ", nmbbytes);
34 if (nmbbytes > 0) {
35 dump (buf, nmbbytes);
36@@ -157,7 +157,7 @@ do_KeyPress (XEvent *eventp)
37 } else {
38 printf ("\n");
39 }
40- }
41+ } */
42
43 printf (" XFilterEvent returns: %s\n",
44 XFilterEvent (eventp, e->window) ? "True" : "False");
45@@ -804,7 +804,7 @@ main (int argc, char **argv)
46 fprintf (stderr, "%s: XSetLocaleModifiers failed\n", ProgramName);
47 }
48
49- xim = XOpenIM (dpy, NULL, NULL, NULL);
50+ /*xim = XOpenIM (dpy, NULL, NULL, NULL);
51 if (xim == NULL) {
52 fprintf (stderr, "%s: XOpenIM failed\n", ProgramName);
53 }
54@@ -831,7 +831,7 @@ main (int argc, char **argv)
55 }
56 XFree (xim_styles);
57 }
58- }
59+ }*/
60
61 screen = DefaultScreen (dpy);
62
63@@ -891,7 +891,7 @@ main (int argc, char **argv)
64 printf ("Outer window is 0x%lx, inner window is 0x%lx\n", w, subw);
65 }
66
67- if (xim && xim_style) {
68+ /*if (xim && xim_style) {
69 xic = XCreateIC (xim,
70 XNInputStyle, xim_style,
71 XNClientWindow, w,
72@@ -901,7 +901,7 @@ main (int argc, char **argv)
73 if (xic == NULL) {
74 fprintf (stderr, "XCreateIC failed\n");
75 }
76- }
77+ }*/
78
79 for (done = 0; !done; ) {
80 XEvent event;
diff --git a/meta-demoapps/recipes-graphics/xorg-app/xev_1.0.3.bb b/meta-demoapps/recipes-graphics/xorg-app/xev_1.0.3.bb
new file mode 100644
index 0000000000..b7a4070a8f
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-app/xev_1.0.3.bb
@@ -0,0 +1,7 @@
1require xorg-app-common.inc
2
3DESCRIPTION = "X Event Viewer"
4LICENSE = "MIT"
5PE = "1"
6
7SRC_URI += "file://diet-x11.patch;patch=1"
diff --git a/meta-demoapps/recipes-graphics/xorg-app/xeyes_1.0.1.bb b/meta-demoapps/recipes-graphics/xorg-app/xeyes_1.0.1.bb
new file mode 100644
index 0000000000..07ce0724fa
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-app/xeyes_1.0.1.bb
@@ -0,0 +1,4 @@
1require xorg-app-common.inc
2PE = "1"
3
4DEPENDS += " virtual/libx11 libxau libxt libxext libxmu"
diff --git a/meta-demoapps/recipes-graphics/xorg-app/xrdb/60XDefaults.sh b/meta-demoapps/recipes-graphics/xorg-app/xrdb/60XDefaults.sh
new file mode 100644
index 0000000000..08d8beca33
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-app/xrdb/60XDefaults.sh
@@ -0,0 +1,3 @@
1if [ -e $HOME/.Xdefaults ]; then
2 xrdb -merge -nocpp < $HOME/.Xdefaults
3fi
diff --git a/meta-demoapps/recipes-graphics/xorg-app/xrdb_1.0.5.bb b/meta-demoapps/recipes-graphics/xorg-app/xrdb_1.0.5.bb
new file mode 100644
index 0000000000..906d7d8527
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-app/xrdb_1.0.5.bb
@@ -0,0 +1,14 @@
1require xorg-app-common.inc
2
3DESCRIPTION = "X server resource database utility"
4LICENSE = "xrdb"
5DEPENDS += "libxmu"
6PE = "1"
7PR = "r2"
8
9SRC_URI += "file://60XDefaults.sh"
10
11do_install_append() {
12 install -d ${D}${sysconfdir}/X11/Xsession.d/
13 install -m 0755 ${WORKDIR}/60XDefaults.sh ${D}${sysconfdir}/X11/Xsession.d/
14}
diff --git a/meta-demoapps/recipes-graphics/xorg-lib/liblbxutil/mkg3states.patch b/meta-demoapps/recipes-graphics/xorg-lib/liblbxutil/mkg3states.patch
new file mode 100644
index 0000000000..029d761d95
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-lib/liblbxutil/mkg3states.patch
@@ -0,0 +1,63 @@
1During the build process the mkg3states binary needs to be run. This patch
2allows it to be built with the build systems gcc allowing this to work.
3
4RP 31/3/10
5
6Index: liblbxutil-1.1.0/configure.ac
7===================================================================
8--- liblbxutil-1.1.0.orig/configure.ac 2009-12-04 22:52:04.000000000 +0000
9+++ liblbxutil-1.1.0/configure.ac 2010-03-31 15:26:33.000000000 +0100
10@@ -50,4 +50,5 @@
11
12 AC_OUTPUT([Makefile
13 src/Makefile
14+ src/image/Makefile
15 lbxutil.pc])
16Index: liblbxutil-1.1.0/src/Makefile.am
17===================================================================
18--- liblbxutil-1.1.0.orig/src/Makefile.am 2009-12-04 23:03:17.000000000 +0000
19+++ liblbxutil-1.1.0/src/Makefile.am 2010-03-31 15:27:25.000000000 +0100
20@@ -3,10 +3,7 @@
21 AM_CFLAGS = $(CWARNFLAGS) $(LBXUTIL_CFLAGS)
22 INCLUDES = -I$(top_srcdir)/include
23
24-noinst_PROGRAMS = mkg3states
25-
26-mkg3states_SOURCES = \
27- $(srcdir)/image/mkg3states.c
28+SUBDIRS = image
29
30 liblbxutil_la_SOURCES = \
31 $(srcdir)/lbx_zlib/reqstats.h \
32@@ -38,9 +35,8 @@
33
34 $(srcdir)/image/dfaxg42d.c: g3states.h
35
36-g3states.h: mkg3states
37- -rm -f g3states.h
38- $(AM_V_GEN) ./mkg3states -c > g3states.h_ && mv g3states.h_ g3states.h
39+g3states.h: image/mkg3states
40+ ./image/mkg3states -c > g3states.h_ && mv g3states.h_ g3states.h
41
42 liblbxutil_la_LDFLAGS = -version-number 1:0:0 -no-undefined
43
44Index: liblbxutil-1.1.0/src/image/Makefile.am
45===================================================================
46--- /dev/null 1970-01-01 00:00:00.000000000 +0000
47+++ liblbxutil-1.1.0/src/image/Makefile.am 2010-03-31 15:26:33.000000000 +0100
48@@ -0,0 +1,15 @@
49+# evil hack
50+CFLAGS=$(CFLAGS_FOR_BUILD)
51+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
52+LDFLAGS=$(LDFLAGS_FOR_BUILD)
53+
54+CC=$(CC_FOR_BUILD)
55+LIBTOOL = @LIBTOOL@ --tag=CC
56+
57+noinst_PROGRAMS = mkg3states
58+
59+mkg3states_SOURCES = \
60+ mkg3states.c
61+
62+mkg3states_CFLAGS=$(CFLAGS_FOR_BUILD)
63+mkg3states_LDFLAGS=$(LDFLAGS_FOR_BUILD)
diff --git a/meta-demoapps/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb b/meta-demoapps/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb
new file mode 100644
index 0000000000..cdf3509246
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb
@@ -0,0 +1,11 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "XFIXES Extension"
4DEPENDS += " libxext xextproto xproto zlib"
5PROVIDES = "lbxutil"
6PE = "1"
7PR = "r1"
8
9SRC_URI += "file://mkg3states.patch;patch=1"
10
11export CC_FOR_BUILD = "gcc"
diff --git a/meta-demoapps/recipes-graphics/xorg-lib/libxaw_1.0.5.bb b/meta-demoapps/recipes-graphics/xorg-lib/libxaw_1.0.5.bb
new file mode 100644
index 0000000000..489f456647
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-lib/libxaw_1.0.5.bb
@@ -0,0 +1,21 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "X Athena Widget Set"
4DEPENDS += "xproto virtual/libx11 libxext xextproto libxt libxmu libxpm libxp printproto libxau"
5PROVIDES = "xaw"
6PR = "r1"
7PE = "1"
8
9XORG_PN = "libXaw"
10
11do_install_append () {
12 ln -sf libXaw6.so.6 ${D}${libdir}/libXaw.so.6
13 ln -sf libXaw7.so.7 ${D}${libdir}/libXaw.so.7
14 ln -sf libXaw7.so.7 ${D}${libdir}/libXaw.so
15}
16
17PACKAGES =+ "libxaw6 libxaw7 libxaw8"
18
19FILES_libxaw6 = "${libdir}/libXaw6.so.6*"
20FILES_libxaw7 = "${libdir}/libXaw7.so.7*"
21FILES_libxaw8 = "${libdir}/libXaw8.so.8*"
diff --git a/meta-demoapps/recipes-graphics/xorg-lib/libxevie_1.0.2.bb b/meta-demoapps/recipes-graphics/xorg-lib/libxevie_1.0.2.bb
new file mode 100644
index 0000000000..6c6b4595aa
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-lib/libxevie_1.0.2.bb
@@ -0,0 +1,8 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "X11 EvIE extension library"
4DEPENDS += "libxext evieext"
5PR = "r1"
6PE = "1"
7
8XORG_PN = "libXevie"
diff --git a/meta-demoapps/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb b/meta-demoapps/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb
new file mode 100644
index 0000000000..9a3f5f1327
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb
@@ -0,0 +1,8 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "X11 keyboard UI presentation library"
4LICENSE= "GPL"
5DEPENDS += "virtual/libx11 libxt libxkbfile"
6PROVIDES = "xkbui"
7PR = "r1"
8PE = "1"
diff --git a/meta-demoapps/recipes-graphics/xorg-proto/xproxymanagementprotocol_1.0.3.bb b/meta-demoapps/recipes-graphics/xorg-proto/xproxymanagementprotocol_1.0.3.bb
new file mode 100644
index 0000000000..9c3d9efa71
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xorg-proto/xproxymanagementprotocol_1.0.3.bb
@@ -0,0 +1,5 @@
1require xorg-proto-common.inc
2
3PROVIDES="xproxymngproto"
4PR = "r1"
5PE = "1"
diff --git a/meta-demoapps/recipes-graphics/xournal/files/ldflags.patch b/meta-demoapps/recipes-graphics/xournal/files/ldflags.patch
new file mode 100644
index 0000000000..7f6585befb
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xournal/files/ldflags.patch
@@ -0,0 +1,15 @@
1---
2 src/Makefile.am | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5Index: xournal-0.2/src/Makefile.am
6===================================================================
7--- xournal-0.2.orig/src/Makefile.am 2007-05-09 15:06:26.000000000 +0100
8+++ xournal-0.2/src/Makefile.am 2007-05-09 15:06:35.000000000 +0100
9@@ -21,5 +21,5 @@ xournal_SOURCES = \
10 xo-interface.c xo-interface.h \
11 xo-callbacks.c xo-callbacks.h
12
13-xournal_LDADD = @PACKAGE_LIBS@
14+xournal_LDADD = @PACKAGE_LIBS@ -lz
15
diff --git a/meta-demoapps/recipes-graphics/xournal/files/no-printing.diff b/meta-demoapps/recipes-graphics/xournal/files/no-printing.diff
new file mode 100644
index 0000000000..7a4724e696
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xournal/files/no-printing.diff
@@ -0,0 +1,178 @@
1diff -ru xournal-0.2/configure.in xournal-0.2.noprint/configure.in
2--- xournal-0.2/configure.in 2006-01-29 22:25:10.000000000 +0000
3+++ xournal-0.2.noprint/configure.in 2006-03-17 13:08:01.000000000 +0000
4@@ -10,11 +10,16 @@
5 AM_PROG_CC_STDC
6 AC_HEADER_STDC
7
8-pkg_modules="gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0 libgnomeprintui-2.2 >= 2.0.0"
9+pkg_modules="gtk+-2.0 >= 2.4.0 libgnomecanvas-2.0 >= 2.4.0"
10 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
11 AC_SUBST(PACKAGE_CFLAGS)
12 AC_SUBST(PACKAGE_LIBS)
13
14+#PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprintui-2.2 >= 2.0.0
15+#AC_SUBST(GNOMEPRINT_CFLAGS)
16+#AC_SUBST(GNOMEPRINT_LIBS)
17+AM_CONDITIONAL(ENABLE_PRINTING, false)
18+
19 AC_OUTPUT([
20 Makefile
21 src/Makefile
22diff -ru xournal-0.2/src/main.c xournal-0.2.noprint/src/main.c
23--- xournal-0.2/src/main.c 2006-01-29 22:22:52.000000000 +0000
24+++ xournal-0.2.noprint/src/main.c 2006-03-17 13:14:50.000000000 +0000
25@@ -28,7 +28,9 @@
26
27 void hide_unimplemented(void)
28 {
29+#if ENABLE_PRINTING
30 gtk_widget_hide(GET_COMPONENT("filePrintOptions"));
31+#endif
32 gtk_widget_hide(GET_COMPONENT("journalFlatten"));
33 gtk_widget_hide(GET_COMPONENT("papercolorOther"));
34 gtk_widget_hide(GET_COMPONENT("journalApplyAllPages"));
35diff -ru xournal-0.2/src/Makefile.am xournal-0.2.noprint/src/Makefile.am
36--- xournal-0.2/src/Makefile.am 2005-12-14 20:54:42.000000000 +0000
37+++ xournal-0.2.noprint/src/Makefile.am 2006-03-17 13:07:47.000000000 +0000
38@@ -7,12 +7,16 @@
39
40 bin_PROGRAMS = xournal
41
42+if ENABLE_PRINTING
43+PRINT_SOURCE = xo-print.c xo-print.h
44+endif
45+
46 xournal_SOURCES = \
47 main.c xournal.h \
48 xo-misc.c xo-misc.h \
49 xo-file.c xo-file.h \
50 xo-paint.c xo-paint.h \
51- xo-print.c xo-print.h \
52+ $(PRINT_SOURCE) \
53 xo-support.c xo-support.h \
54 xo-interface.c xo-interface.h \
55 xo-callbacks.c xo-callbacks.h
56diff -ru xournal-0.2/src/xo-callbacks.c xournal-0.2.noprint/src/xo-callbacks.c
57--- xournal-0.2/src/xo-callbacks.c 2006-01-29 19:39:22.000000000 +0000
58+++ xournal-0.2.noprint/src/xo-callbacks.c 2006-03-17 13:12:01.000000000 +0000
59@@ -7,7 +7,9 @@
60 #include <gtk/gtk.h>
61 #include <libgnomecanvas/libgnomecanvas.h>
62 #include <time.h>
63+#if ENABLE_PRINTING
64 #include <libgnomeprintui/gnome-print-dialog.h>
65+#endif
66 #include <glib/gstdio.h>
67
68 #include "xournal.h"
69@@ -17,7 +19,9 @@
70 #include "xo-misc.h"
71 #include "xo-file.h"
72 #include "xo-paint.h"
73+#if ENABLE_PRINTING
74 #include "xo-print.h"
75+#endif
76
77 void
78 on_fileNew_activate (GtkMenuItem *menuitem,
79@@ -261,7 +265,7 @@
80
81 }
82
83-
84+#if ENABLE_PRINTING
85 void
86 on_filePrint_activate (GtkMenuItem *menuitem,
87 gpointer user_data)
88@@ -407,7 +411,7 @@
89
90 g_free(filename);
91 }
92-
93+#endif
94
95 void
96 on_fileQuit_activate (GtkMenuItem *menuitem,
97diff -ru xournal-0.2/src/xo-callbacks.h xournal-0.2.noprint/src/xo-callbacks.h
98--- xournal-0.2/src/xo-callbacks.h 2006-01-26 20:47:00.000000000 +0000
99+++ xournal-0.2.noprint/src/xo-callbacks.h 2006-03-17 13:08:45.000000000 +0000
100@@ -24,6 +24,7 @@
101 on_filePrintOptions_activate (GtkMenuItem *menuitem,
102 gpointer user_data);
103
104+#if ENABLE_PRINTING
105 void
106 on_filePrint_activate (GtkMenuItem *menuitem,
107 gpointer user_data);
108@@ -32,6 +33,8 @@
109 on_filePrintPDF_activate (GtkMenuItem *menuitem,
110 gpointer user_data);
111
112+#endif
113+
114 void
115 on_fileQuit_activate (GtkMenuItem *menuitem,
116 gpointer user_data);
117diff -ru xournal-0.2/src/xo-interface.c xournal-0.2.noprint/src/xo-interface.c
118--- xournal-0.2/src/xo-interface.c 2006-01-29 18:58:25.000000000 +0000
119+++ xournal-0.2.noprint/src/xo-interface.c 2006-03-17 13:11:31.000000000 +0000
120@@ -41,10 +41,12 @@
121 GtkWidget *fileSave;
122 GtkWidget *fileSaveAs;
123 GtkWidget *separator1;
124+#if ENABLE_PRINTING
125 GtkWidget *filePrintOptions;
126 GtkWidget *image501;
127 GtkWidget *filePrint;
128 GtkWidget *filePrintPDF;
129+#endif
130 GtkWidget *separator2;
131 GtkWidget *fileQuit;
132 GtkWidget *menuEdit;
133@@ -327,6 +329,7 @@
134 gtk_container_add (GTK_CONTAINER (menuFile_menu), separator1);
135 gtk_widget_set_sensitive (separator1, FALSE);
136
137+#if ENABLE_PRINTING
138 filePrintOptions = gtk_image_menu_item_new_with_mnemonic ("Print Options");
139 gtk_widget_show (filePrintOptions);
140 gtk_container_add (GTK_CONTAINER (menuFile_menu), filePrintOptions);
141@@ -347,6 +350,7 @@
142 gtk_widget_show (separator2);
143 gtk_container_add (GTK_CONTAINER (menuFile_menu), separator2);
144 gtk_widget_set_sensitive (separator2, FALSE);
145+#endif
146
147 fileQuit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
148 gtk_widget_show (fileQuit);
149@@ -1522,6 +1526,7 @@
150 g_signal_connect ((gpointer) fileSaveAs, "activate",
151 G_CALLBACK (on_fileSaveAs_activate),
152 NULL);
153+#if ENABLE_PRINTING
154 g_signal_connect ((gpointer) filePrintOptions, "activate",
155 G_CALLBACK (on_filePrintOptions_activate),
156 NULL);
157@@ -1531,6 +1536,7 @@
158 g_signal_connect ((gpointer) filePrintPDF, "activate",
159 G_CALLBACK (on_filePrintPDF_activate),
160 NULL);
161+#endif
162 g_signal_connect ((gpointer) fileQuit, "activate",
163 G_CALLBACK (on_fileQuit_activate),
164 NULL);
165@@ -1941,11 +1947,13 @@
166 GLADE_HOOKUP_OBJECT (winMain, fileSave, "fileSave");
167 GLADE_HOOKUP_OBJECT (winMain, fileSaveAs, "fileSaveAs");
168 GLADE_HOOKUP_OBJECT (winMain, separator1, "separator1");
169+#if ENABLE_PRINTING
170 GLADE_HOOKUP_OBJECT (winMain, filePrintOptions, "filePrintOptions");
171 GLADE_HOOKUP_OBJECT (winMain, image501, "image501");
172 GLADE_HOOKUP_OBJECT (winMain, filePrint, "filePrint");
173 GLADE_HOOKUP_OBJECT (winMain, filePrintPDF, "filePrintPDF");
174 GLADE_HOOKUP_OBJECT (winMain, separator2, "separator2");
175+#endif
176 GLADE_HOOKUP_OBJECT (winMain, fileQuit, "fileQuit");
177 GLADE_HOOKUP_OBJECT (winMain, menuEdit, "menuEdit");
178 GLADE_HOOKUP_OBJECT (winMain, menuEdit_menu, "menuEdit_menu");
diff --git a/meta-demoapps/recipes-graphics/xournal/xournal_0.2.bb b/meta-demoapps/recipes-graphics/xournal/xournal_0.2.bb
new file mode 100644
index 0000000000..1ca6e1ed7c
--- /dev/null
+++ b/meta-demoapps/recipes-graphics/xournal/xournal_0.2.bb
@@ -0,0 +1,12 @@
1HOMEPAGE = "http://www-math.mit.edu/~auroux/software/xournal/"
2DESCRIPTION = "Xournal is an application for notetaking, sketching, keeping a journal using a stylus."
3DEPENDS = "gtk+ libgnomecanvas zlib"
4SECTION = "x11"
5LICENSE = "GPL"
6PR = "r2"
7
8SRC_URI = "http://math.mit.edu/~auroux/software/xournal/xournal-0.2.tar.gz \
9 file://ldflags.patch;patch=1 \
10 file://no-printing.diff;patch=1"
11
12inherit autotools pkgconfig