]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/detect-stylus/files/nox.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / detect-stylus / files / nox.patch
1 Only in detect-stylus-0.13: .pc
2 diff -ur detect-stylus-0.13.orig/Makefile detect-stylus-0.13/Makefile
3 --- detect-stylus-0.13.orig/Makefile    2004-09-08 17:57:37.000000000 +0200
4 +++ detect-stylus-0.13/Makefile 2006-04-18 21:00:57.000000000 +0200
5 @@ -15,7 +15,11 @@
6  PACKAGE_CFLAGS += -Os -fomit-frame-pointer
7  endif
8  PACKAGE_CPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
9 +ifeq ($(NOX),yes)
10 +PACKAGE_CPPFLAGS += -DNOX
11 +else
12  PACKAGE_LDFLAGS += `pkg-config --libs x11`
13 +endif
14  
15  OBJS = $(patsubst %,%.o,$(MEMBERS))
16  
17 @@ -36,8 +40,7 @@
18         mkdir -p $(DESTDIR)$(PREFIX)/bin/
19         $(STRIP) $(PACKAGE)
20         install $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
21 -       mkdir -p $(DESTDIR)/etc/X11/Xinit.d
22 -       install 70detect-stylus $(DESTDIR)/etc/X11/Xinit.d
23 +       if [ -z $(NOX) ]; then mkdir -p $(DESTDIR)/etc/X11/Xinit.d && install -m 0755 70detect-stylus $(DESTDIR)/etc/X11/Xinit.d; fi
24  
25  clean:
26         rm -f $(PACKAGE) $(OBJS)
27 Only in detect-stylus-0.13: detect-stylus
28 diff -ur detect-stylus-0.13.orig/detect-stylus.c detect-stylus-0.13/detect-stylus.c
29 --- detect-stylus-0.13.orig/detect-stylus.c     2006-04-18 20:22:13.000000000 +0200
30 +++ detect-stylus-0.13/detect-stylus.c  2006-04-19 21:18:09.000000000 +0200
31 @@ -14,8 +14,10 @@
32  #include <dirent.h>
33  #include <string.h>
34  
35 +#ifndef NOX
36  #include <X11/Xlib.h>
37  #include <X11/Xatom.h>
38 +#endif /* NOX */
39  
40  #include <linux/input.h>
41  
42 @@ -42,11 +44,14 @@
43  int
44  main (int argc, char *argv[])
45  {
46 +#ifndef NOX
47    char b = 1;
48 -  char *tsdev;
49    Atom atom;
50    Display *dpy;
51    Window root;
52 +#endif /* NOX */
53 +
54 +  char *tsdev;
55    int fd;
56    int i;
57  
58 @@ -55,6 +60,8 @@
59        if (!strcmp (argv[i], "--device"))
60         flag_device = 1;
61      }
62 +  if (strstr (argv[0], "detect-tsdevice"))
63 +    flag_device = 1;
64  
65    fd = try_open ("/dev/touchscreen/0");
66    
67 @@ -119,6 +126,10 @@
68    if (flag_device)
69      exit (1);          /* Nothing found */
70  
71 +#ifdef NOX
72 +  fprintf (stderr, "This version of detect-stylus was compiled without X support.");
73 +  exit (1);
74 +#else
75    if (fd >= 0)
76      {
77        close (fd);
78 @@ -141,4 +152,5 @@
79      }
80        
81    exit (0);
82 +#endif /* NOX */
83  }
84 Only in detect-stylus-0.13.orig/: detect-stylus.c.orig
85 Only in detect-stylus-0.13: detect-stylus.o
86 Only in detect-stylus-0.13: patches