Magellan Linux

Annotation of /trunk/vnc/patches/vnc-use-fb.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 7410 byte(s)
-import

1 niro 153 --- vnc-4_1-unixsrc/unix/xc/config/cf/vnc.def.use-fb 2005-02-28 12:59:09.000000000 +0000
2     +++ vnc-4_1-unixsrc/unix/xc/config/cf/vnc.def 2005-03-04 16:13:19.000000000 +0000
3     @@ -1,35 +0,0 @@
4     -#define BuildServersOnly YES
5     -#define BuildFonts NO
6     -#define BuildClients NO
7     -#define BuildDocs NO
8     -#define BuildPexExt NO
9     -#define BuildNls NO
10     -#define BuildXIE NO
11     -#define BuildGlxExt NO
12     -#define XnestServer NO
13     -#define XprtServer NO
14     -
15     -#ifdef SunArchitecture
16     -#define ProjectRoot /usr/openwin
17     -#define HasGcc2 YES
18     -#define BuildXKB NO
19     -#endif
20     -
21     -#define HasFreetype2 NO
22     -#define BuildVNCExt YES
23     -#define VNCExtDefines -DVNCEXT
24     -#define SiteExtensionDefines VNCExtDefines
25     -#define SiteExtensionDirs vnc
26     -
27     -#define VncUnixDir $(TOP)/..
28     -#define VncCommonDir VncUnixDir/../common
29     -#define VncExtLibs VncCommonDir/rfb/librfb.a \
30     - VncCommonDir/Xregion/libXregion.a \
31     - VncCommonDir/network/libnetwork.a \
32     - VncCommonDir/rdr/librdr.a
33     -
34     -#define SiteExtensionLibs vnc/LibraryTargetName(vnc) VncExtLibs
35     -
36     -#define ServerTarget(server,subdirs,objects,libs,syslibs) @@\
37     -CCLINK = $(CXXENVSETUP) $(CXX) @@\
38     -ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(_NOOP_))
39     --- /dev/null 2005-02-24 13:02:34.848875488 +0000
40     +++ vnc-4_1-unixsrc/unix/xc/config/cf/vnc.def.in 2005-03-04 16:13:19.000000000 +0000
41     @@ -0,0 +1,37 @@
42     +#define BuildServersOnly YES
43     +#define BuildFonts NO
44     +#define BuildClients NO
45     +#define BuildDocs NO
46     +#define BuildPexExt NO
47     +#define BuildNls NO
48     +#define BuildXIE NO
49     +#define BuildGlxExt NO
50     +#define XnestServer NO
51     +#define XprtServer NO
52     +
53     +#ifdef SunArchitecture
54     +#define ProjectRoot /usr/openwin
55     +#define HasGcc2 YES
56     +#define BuildXKB NO
57     +#endif
58     +
59     +#define HasFreetype2 NO
60     +#define BuildVNCExt YES
61     +#define VNCExtDefines -DVNCEXT
62     +#define SiteExtensionDefines VNCExtDefines
63     +#define SiteExtensionDirs vnc
64     +
65     +#define VncUseFb @USE_FB@
66     +
67     +#define VncUnixDir $(TOP)/..
68     +#define VncCommonDir VncUnixDir/../common
69     +#define VncExtLibs VncCommonDir/rfb/librfb.a \
70     + VncCommonDir/Xregion/libXregion.a \
71     + VncCommonDir/network/libnetwork.a \
72     + VncCommonDir/rdr/librdr.a
73     +
74     +#define SiteExtensionLibs vnc/LibraryTargetName(vnc) VncExtLibs
75     +
76     +#define ServerTarget(server,subdirs,objects,libs,syslibs) @@\
77     +CCLINK = $(CXXENVSETUP) $(CXX) @@\
78     +ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(_NOOP_))
79     --- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile.use-fb 2004-12-01 17:27:58.000000000 +0000
80     +++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile 2005-03-04 16:13:19.000000000 +0000
81     @@ -31,12 +31,19 @@
82     OBJS1 = os2_stubs.o
83     #endif
84    
85     +#ifdef VncUseFb
86     +FB_DEFINES = -DVNC_USE_FB
87     + FBINCLUDE = -I../../fb
88     +#else
89     + FBINCLUDE = -I../../cfb
90     +#endif
91     +
92     SRCSA = xvnc.cc stubs.c $(SRCS1) miinitext.c $(SRCS2)
93    
94     OBJSA = xvnc.o stubs.o $(OBJS1) miinitext.o $(OBJS2)
95    
96     -INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
97     - -I../../cfb -I../../mfb -I../../mi -I../../include -I../../os \
98     +INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) $(FB_DEFINES) \
99     + $(FBINCLUDE) -I../../mfb -I../../mi -I../../include -I../../os \
100     -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/render $(VNCINCLUDE)
101    
102     DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) \
103     --- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2005-02-28 12:59:09.000000000 +0000
104     +++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2005-03-04 16:13:19.000000000 +0000
105     @@ -48,8 +48,12 @@
106     #include "X11/Xos.h"
107     #include "scrnintstr.h"
108     #include "servermd.h"
109     +#ifdef VNC_USE_FB
110     +#include "fb.h"
111     +#else
112     #define PSZ 8
113     #include "cfb.h"
114     +#endif
115     #include "mi.h"
116     #include "mibstore.h"
117     #include "colormapst.h"
118     @@ -73,6 +77,7 @@
119     #undef public
120     #undef xor
121     #undef and
122     +#ifndef VNC_USE_FB
123     extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
124     extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
125     extern Bool cfb16CreateGC(GCPtr);
126     @@ -83,6 +88,7 @@
127     unsigned long, char*);
128     extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
129     unsigned long, char*);
130     +#endif
131     }
132    
133     #define XVNCVERSION "Free Edition 4.1"
134     @@ -482,7 +488,7 @@
135     }
136     #endif
137    
138     -
139     +#ifndef VNC_USE_FB
140     static Bool vfbMultiDepthCreateGC(GCPtr pGC)
141     {
142     switch (vfbBitsPerPixel(pGC->depth))
143     @@ -541,6 +547,7 @@
144     break;
145     }
146     }
147     +#endif
148    
149     static ColormapPtr InstalledMaps[MAXSCREENS];
150    
151     @@ -811,6 +818,11 @@
152     defaultColorVisualClass
153     = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
154    
155     +#ifdef VNC_USE_FB
156     + if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
157     + dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
158     + return FALSE;
159     +#else
160     switch (pvfb->bitsPerPixel)
161     {
162     case 1:
163     @@ -838,6 +850,7 @@
164     pScreen->CreateGC = vfbMultiDepthCreateGC;
165     pScreen->GetImage = vfbMultiDepthGetImage;
166     pScreen->GetSpans = vfbMultiDepthGetSpans;
167     +#endif
168    
169     pScreen->InstallColormap = vfbInstallColormap;
170     pScreen->UninstallColormap = vfbUninstallColormap;
171     @@ -883,6 +896,9 @@
172     }
173     }
174    
175     +#ifdef VNC_USE_FB
176     + ret = fbCreateDefColormap(pScreen);
177     +#else
178     if (pvfb->bitsPerPixel == 1)
179     {
180     ret = mfbCreateDefColormap(pScreen);
181     @@ -891,6 +907,7 @@
182     {
183     ret = cfbCreateDefColormap(pScreen);
184     }
185     +#endif
186    
187     miSetZeroLineBias(pScreen, pvfb->lineBias);
188    
189     --- vnc-4_1-unixsrc/unix/configure.in.use-fb 2005-01-11 16:37:17.000000000 +0000
190     +++ vnc-4_1-unixsrc/unix/configure.in 2005-03-04 16:13:19.000000000 +0000
191     @@ -65,6 +65,18 @@
192     AC_SUBST(ZLIB_INCLUDE)
193     AC_SUBST(ZLIB_LIB)
194    
195     +AC_ARG_WITH(fb,
196     +[ --with-fb use the new 'fb' framebuffer implementation])
197     +if test "$with_installed_zlib" = yes; then
198     + echo "using 'fb' framebuffer"
199     + USE_FB=YES
200     +else
201     + echo "using 'mfb' and 'cfb' framebuffer"
202     + USE_FB=NO
203     +fi
204     +
205     +AC_SUBST(USE_FB)
206     +
207     BOILERPLATE=boilerplate.mk
208    
209     if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then
210     @@ -79,4 +91,5 @@
211     vncviewer/Makefile:common.mk:vncviewer/Makefile.in:$BOILERPLATE \
212     vncconfig/Makefile:common.mk:vncconfig/Makefile.in:$BOILERPLATE \
213     vncpasswd/Makefile:common.mk:vncpasswd/Makefile.in:$BOILERPLATE \
214     + xc/config/cf/vnc.def \
215     )
216     --- vnc-4_1-unixsrc/unix/xc.patch.use-fb 2004-12-01 11:33:15.000000000 +0000
217     +++ vnc-4_1-unixsrc/unix/xc.patch 2005-03-04 16:19:31.000000000 +0000
218     @@ -2,7 +2,7 @@
219     --- xc/programs/Xserver/Imakefile Fri Jun 6 11:14:39 2003
220     ***************
221     *** 409,412 ****
222     ---- 409,429 ----
223     +--- 409,435 ----
224     #endif
225     #endif /* XsunServer */
226     + XCOMM
227     @@ -13,12 +13,18 @@
228     + CFB16DIR = cfb16
229     + CFB24DIR = cfb24
230     + CFB32DIR = cfb32
231     ++ FBDIR = fb
232     + XVNCDDXDIR = vnc/Xvnc
233     ++ #if VncUseFb
234     ++ XVNCDIRS = $(STDDIRS) $(FBDIR) $(XVNCDDXDIR) $(DEPDIRS)
235     ++ XVNCLIBS = PreFbLibs vnc/Xvnc/LibraryTargetName(xvnc) FbPostFbLibs
236     ++ #else
237     + XVNCDIRS = $(STDDIRS) $(MFBDIR) \
238     + $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \
239     + $(XVNCDDXDIR) $(DEPDIRS)
240     -+ XVNCOBJS = $(XVNCDDXDIR)/stubs.o $(XVNCDDXDIR)/miinitext.o
241     + XVNCLIBS = PreFbLibs vnc/Xvnc/LibraryTargetName(xvnc) CFBLibs PostFbLibs
242     ++ #endif
243     ++ XVNCOBJS = $(XVNCDDXDIR)/stubs.o $(XVNCDDXDIR)/miinitext.o
244     + XVNCSYSLIBS = $(FONTLIBS) $(SYSLIBS)
245     + ServerTarget(Xvnc,$(XVNCDIRS),$(XVNCOBJS), \
246     + $(LIBCWRAPPER) $(XVNCLIBS) $(LOADABLEEXTS),$(XVNCSYSLIBS))