diff options
author | Mike Frysinger <vapier@gentoo.org> | 2003-01-18 04:47:22 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2003-01-18 04:47:22 +0000 |
commit | 0603134385635d7abb39e23c4ef0ec733a299018 (patch) | |
tree | e61590673d602916bd26bdaf7078b4fdbeaba31c /net-misc/directvnc | |
parent | version bump (diff) | |
download | gentoo-2-0603134385635d7abb39e23c4ef0ec733a299018.tar.gz gentoo-2-0603134385635d7abb39e23c4ef0ec733a299018.tar.bz2 gentoo-2-0603134385635d7abb39e23c4ef0ec733a299018.zip |
move dfb.c to a patch and add a small patch for 0.7
Diffstat (limited to 'net-misc/directvnc')
-rw-r--r-- | net-misc/directvnc/ChangeLog | 34 | ||||
-rw-r--r-- | net-misc/directvnc/directvnc-0.6.1.ebuild | 8 | ||||
-rw-r--r-- | net-misc/directvnc/directvnc-0.7.ebuild | 10 | ||||
-rw-r--r-- | net-misc/directvnc/files/dfb.c | 245 | ||||
-rw-r--r-- | net-misc/directvnc/files/directvnc-0.6.1-api-fix.patch | 143 | ||||
-rw-r--r-- | net-misc/directvnc/files/directvnc-0.7-api-fix.patch | 11 |
6 files changed, 173 insertions, 278 deletions
diff --git a/net-misc/directvnc/ChangeLog b/net-misc/directvnc/ChangeLog index 876fc0859a2d..f629d133a4d2 100644 --- a/net-misc/directvnc/ChangeLog +++ b/net-misc/directvnc/ChangeLog @@ -1,25 +1,26 @@ # ChangeLog for net-misc/directvnc # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/net-misc/directvnc/ChangeLog,v 1.8 2002/12/13 11:00:11 blizzy Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/directvnc/ChangeLog,v 1.9 2003/01/18 04:47:15 vapier Exp $ - 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords - -*directvnc-0.7 (07 Nov 2002) +*directvnc-0.7 (17 Jan 2003) + + 17 Jan 2003; Mike Frysinger <vapier@gentoo.org> : + Added a small patch to fix dfb.c. 07 Nov 2002; Seemant Kulleen <seemant@gentoo.org> directvnc-0.7.ebuild files/digest-directvnc-0.7 : - Version bump, thanks to: andreh@lddd.org (Andre Heidemann) in bug #9521. *directvnc-0.6.1 (06 Jul 2002) - 08 Aug 2002; Seemant Kulleen <seemant@gentoo.org> directvnc-0.6.1.ebuild : + 17 Jan 2003; Mike Frysinger <vapier@gentoo.org> : + Added a small patch to fix dfb.c. + 08 Aug 2002; Seemant Kulleen <seemant@gentoo.org> directvnc-0.6.1.ebuild : FHS compliance. 06 Jul 2002; Seemant Kulleen <seemant@gentoo.org> directvnc-0.6.1.ebuild files/digest-directvnc-0.6.1 files/dfb.c : - Version bump, and the dfb.c from directvnc's CVS, where the API changes for DirectFB since 0.9.10 have been implemented. Now, this will compile against portage's version of DirectFB. @@ -27,9 +28,7 @@ *directvnc-0.6-r1 (03 Jul 2002) 03 Jul 2002; Grant Goodyear <g2boojum@gentoo.org> ChangeLog : - Fixed DirectFB dep to be ~0.9.10 -# ChangeLog for net-misc/directvnc *directvnc-0.6 (31 May 2002) @@ -37,20 +36,3 @@ New import. Note that the stuff in src_unpack (and the automake/ autoconf dependencies) should go away in the next release, since they're only there to fix the author's mistake. - --- Explanation of ChangeLog format: - - Every new version or revision of the package should be marked by a '*' - seperator line as above. Changes since the last revision have to be added to - the top of the file, underneath the initial copyright and cvs header - comments, in exactly the same format as this comment. - - This means that you start with header line that has the following format, - indented two spaces: - - DD MMM YYYY; your_name <your_email> changed_file1, changed_file2: Your - explanation should follow. It should be indented and wrapped at a line width - of 80 characters. The changed_files can be omitted if they are obvious; for - example, if you are only modifying the .ebuild file and committing a new rev - of a package. Any details about what exactly changed in the code should be - added as a message when the changes are committed to cvs, not in this file. diff --git a/net-misc/directvnc/directvnc-0.6.1.ebuild b/net-misc/directvnc/directvnc-0.6.1.ebuild index d8d68131e9ad..3740b118fffe 100644 --- a/net-misc/directvnc/directvnc-0.6.1.ebuild +++ b/net-misc/directvnc/directvnc-0.6.1.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/directvnc/directvnc-0.6.1.ebuild,v 1.5 2003/01/05 18:42:26 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/directvnc/directvnc-0.6.1.ebuild,v 1.6 2003/01/18 04:47:15 vapier Exp $ + +inherit eutils DESCRIPTION="Very thin VNC client for unix framebuffer systems" HOMEPAGE="http://adam-lilienthal.de/directvnc" @@ -19,8 +21,8 @@ src_unpack() { unpack ${A} cd ${S}/src - #fix src/dfb.c to handle the new API changes in DirectFB - cp ${FILESDIR}/dfb.c . + # fix src/dfb.c to handle the new API changes in DirectFB + epatch ${FILESDIR}/${P}-api-fix.patch #fix broken Makefile.am mv Makefile.am Makefile.am.orig diff --git a/net-misc/directvnc/directvnc-0.7.ebuild b/net-misc/directvnc/directvnc-0.7.ebuild index 5e8290534890..d9d7c07590f2 100644 --- a/net-misc/directvnc/directvnc-0.7.ebuild +++ b/net-misc/directvnc/directvnc-0.7.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/directvnc/directvnc-0.7.ebuild,v 1.3 2003/01/05 18:42:26 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/directvnc/directvnc-0.7.ebuild,v 1.4 2003/01/18 04:47:16 vapier Exp $ + +inherit eutils DESCRIPTION="Very thin VNC client for unix framebuffer systems" HOMEPAGE="http://adam-lilienthal.de/directvnc" @@ -19,9 +21,9 @@ src_unpack() { unpack ${A} cd ${S}/src - #fix src/dfb.c to handle the new API changes in DirectFB -# cp ${FILESDIR}/dfb.c . - + # fix src/dfb.c to handle the new API changes in DirectFB + epatch ${FILESDIR}/${P}-api-fix.patch + #fix broken Makefile.am mv Makefile.am Makefile.am.orig sed -e 's/-$(DIRECTFB_LIBS)/$(DIRECTFB_LIBS)/' \ diff --git a/net-misc/directvnc/files/dfb.c b/net-misc/directvnc/files/dfb.c deleted file mode 100644 index a8728be89bea..000000000000 --- a/net-misc/directvnc/files/dfb.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (C) 2001 Till Adam - * Authors: Till Adam <till@adam-lilienthal.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "directvnc.h" -#include <math.h> - -/* DirectFB interfaces needed */ -IDirectFB *dfb = NULL; -IDirectFBSurface *primary; -IDirectFBDisplayLayer *layer; -IDirectFBInputDevice *keyboard; -IDirectFBInputDevice *mouse; -IDirectFBEventBuffer *input_buffer; -DFBResult err; -DFBSurfaceDescription dsc; -DFBCardCapabilities caps; -DFBDisplayLayerConfig layer_config; -DFBRegion rect; -DFBRectangle scratch_rect; - -void -dfb_init(int argc, char *argv[]) -{ - DFBCHECK(DirectFBInit( &argc, &argv )); - DFBCHECK(DirectFBSetOption ("quiet", "")); - - /* create the super interface */ - DFBCHECK(DirectFBCreate( &dfb )); - - dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN); - - DFBCHECK(dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer )); - layer->GetConfiguration (layer, &layer_config); - - /* get the primary surface, i.e. the surface of the primary layer we have - exclusive access to */ - memset( &dsc, 0, sizeof(DFBSurfaceDescription) ); - dsc.flags = - DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; - dsc.width = layer_config.width; - dsc.height = layer_config.height; - - dsc.caps = DSCAPS_PRIMARY | DSCAPS_SYSTEMONLY /*| DSCAPS_FLIPPING */; - /* FIXME */ - dsc.pixelformat = DSPF_RGB16; - - DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary )); - primary->GetSize (primary, &opt.client.width, &opt.client.height); - - DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard )); - DFBCHECK(dfb->GetInputDevice( dfb, DIDID_MOUSE, &mouse )); - DFBCHECK(keyboard->CreateEventBuffer(keyboard, &input_buffer)); - DFBCHECK(mouse->AttachEventBuffer(mouse, input_buffer)); -} - - -/* - * deinitializes resources and DirectFB - */ -void -dfb_deinit() -{ - primary->Release( primary ); - input_buffer->Release(input_buffer); - keyboard->Release( keyboard ); - mouse->Release(mouse); - layer->Release( layer ); - dfb->Release( dfb ); -} - -void -dfb_flip() -{ - primary->Flip(primary, NULL, DSFLIP_WAITFORSYNC); -} - -void -dfb_flip_rect(x, y, w, h) -{ - rect.x1 = x+opt.h_offset; - rect.y1 = y+opt.v_offset; - rect.x2 = x+w; - rect.y2 = y+h; - primary->Flip(primary, &rect, DSFLIP_WAITFORSYNC); -} - -int -dfb_write_data_to_screen(int x, int y, int w, int h, void *data) -{ - - char *dst; - int pitch; /* number of bytes per row */ - int src_pitch; - - src_pitch = w * opt.client.bpp/8; - - if(primary->Lock(primary, DSLF_WRITE, (void**)(&dst), &pitch) ==DFB_OK) - { - int i; - dst += opt.v_offset * pitch; - dst += (y*pitch + ( (x+opt.h_offset) * opt.client.bpp/8) ); - for (i=0;i<h;i++) - { - memcpy (dst, data, src_pitch); - data += src_pitch; - dst += pitch ; - } - primary->Unlock (primary); - } - dfb_flip (x,y,w,h); - return 1; -} - -int -dfb_copy_rect(int src_x, int src_y, int dest_x, int dest_y, int w, int h) -{ - scratch_rect.x = src_x+opt.h_offset; - scratch_rect.y = src_y+opt.v_offset; - scratch_rect.w = w; - scratch_rect.h = h; - - primary->Blit(primary, primary, &scratch_rect, - dest_x+opt.h_offset, dest_y+opt.v_offset); - dfb_flip (src_x,src_y,w,h); - return 1; -} - -int -dfb_process_events() -{ - DFBInputEvent evt; - - /* we need to check whether the dfb ressources have been set up because - * this might be called during handshaking when dfb_init has not been - * called yet. This is the disadvantage of processing client events - * whenever the socket would block. The other option would be to initialize - * the dfb ressources (input input_buffer) before everything else, but then the - * screen gets blanked for every unsuccessful connect (wrong password) - * which is not pretty either. I think I prefer checking here for the time - * being. */ - if (!dfb) - return 0; - while(input_buffer->GetEvent(input_buffer, DFB_EVENT(&evt)) == DFB_OK) - { - switch (evt.type) - { - case DIET_KEYPRESS: - /* quit on ctrl-q FIXME make this configurable*/ - if (evt.key_id == DIKI_Q && evt.modifiers & DIMM_CONTROL) - { - dfb_deinit(); - exit(1); - } - rfb_send_key_event(evt.key_symbol, 1); - break; - case DIET_KEYRELEASE: - rfb_send_key_event(evt.key_symbol, 0); - break; - case DIET_AXISMOTION: - if (evt.flags & DIEF_AXISREL) - { - switch (evt.axis) - { - case DIAI_X: - mousestate.x += evt.axisrel; - break; - case DIAI_Y: - mousestate.y += evt.axisrel; - break; - default: - break; - } - rfb_update_mouse(); - } - break; - case DIET_BUTTONPRESS: - switch (evt.button) - { - case DIBI_LEFT: - mousestate.buttonmask |= rfbButton1Mask; - break; - case DIBI_MIDDLE: - mousestate.buttonmask |= rfbButton2Mask; - break; - case DIBI_RIGHT: - mousestate.buttonmask |= rfbButton3Mask; - break; - default: - break; - } - rfb_update_mouse(); - break; - case DIET_BUTTONRELEASE: - switch (evt.button) - { - case DIBI_LEFT: - mousestate.buttonmask &= ~rfbButton1Mask; - break; - case DIBI_MIDDLE: - mousestate.buttonmask &= ~rfbButton2Mask; - break; - case DIBI_RIGHT: - mousestate.buttonmask &= ~rfbButton3Mask; - break; - default: - break; - } - rfb_update_mouse(); - break; - - case DIET_UNKNOWN: /* fallthrough */ - default: - fprintf(stderr, "Unknown event: %d\n", evt.type); - break; - } - } - return 1; - -} - -int -dfb_draw_rect_with_rgb(int x, int y, int w, int h, int r, int g, int b) -{ - primary->SetColor(primary, r,g,b,0xFF); - primary->FillRectangle(primary, x+opt.h_offset,y+opt.v_offset,w,h); - dfb_flip (x,y,w,h); - return 1; -} - diff --git a/net-misc/directvnc/files/directvnc-0.6.1-api-fix.patch b/net-misc/directvnc/files/directvnc-0.6.1-api-fix.patch new file mode 100644 index 000000000000..f49f4e55d73a --- /dev/null +++ b/net-misc/directvnc/files/directvnc-0.6.1-api-fix.patch @@ -0,0 +1,143 @@ +--- dfb.c 2002-05-25 04:12:15.000000000 -0400 ++++ ../../dfb.c 2002-07-06 10:20:21.000000000 -0400 +@@ -18,7 +18,6 @@ + */ + + #include "directvnc.h" +-#include "keysymdef.h" + #include <math.h> + + /* DirectFB interfaces needed */ +@@ -61,14 +60,13 @@ + /* FIXME */ + dsc.pixelformat = DSPF_RGB16; + +- dfb->CreateSurface(dfb, &dsc, &primary ); ++ DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary )); + primary->GetSize (primary, &opt.client.width, &opt.client.height); + + DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard )); + DFBCHECK(dfb->GetInputDevice( dfb, DIDID_MOUSE, &mouse )); + DFBCHECK(keyboard->CreateEventBuffer(keyboard, &input_buffer)); + DFBCHECK(mouse->AttachEventBuffer(mouse, input_buffer)); +- + } + + +@@ -156,36 +154,23 @@ + * screen gets blanked for every unsuccessful connect (wrong password) + * which is not pretty either. I think I prefer checking here for the time + * being. */ +- + if (!dfb) + return 0; +- + while(input_buffer->GetEvent(input_buffer, DFB_EVENT(&evt)) == DFB_OK) + { + switch (evt.type) + { + case DIET_KEYPRESS: +- /* quit on ctrl-q */ +- if (evt.key_ascii && evt.key_ascii == 113 +- && evt.modifiers & DIMK_CTRL) ++ /* quit on ctrl-q FIXME make this configurable*/ ++ if (evt.key_id == DIKI_Q && evt.modifiers & DIMM_CONTROL) + { + dfb_deinit(); + exit(1); + } +- /* ascii 13 is CR. We want XK_Return, so dont send the ascii but +- * translate into keysym */ +- if (evt.key_ascii && evt.key_ascii != 13) +- { +- rfb_send_key_event(evt.key_ascii, 1); +- } +- else +- rfb_send_key_event(dfb_get_keysym_from_keycode(evt.keycode, evt.modifiers), 1); ++ rfb_send_key_event(evt.key_symbol, 1); + break; + case DIET_KEYRELEASE: +- if (evt.key_ascii && evt.key_ascii != 13) +- rfb_send_key_event(evt.key_ascii, 0); +- else +- rfb_send_key_event(dfb_get_keysym_from_keycode(evt.keycode, evt.modifiers), 0); ++ rfb_send_key_event(evt.key_symbol, 0); + break; + case DIET_AXISMOTION: + if (evt.flags & DIEF_AXISREL) +@@ -250,75 +235,6 @@ + } + + int +-dfb_get_keysym_from_keycode(int keycode, int modifiers) +-{ +- +- switch (keycode) +- { +- case DIKC_BACKSPACE: return XK_BackSpace; +- case DIKC_ENTER: return XK_Return; +- case DIKC_PAUSE: return XK_Pause; +- case DIKC_SCRLOCK: return XK_Scroll_Lock; +- case DIKC_CAPSLOCK: return XK_Caps_Lock; +- case DIKC_NUMLOCK: return XK_Num_Lock; +- +- +- case DIKC_ALT: return XK_Alt_L; +- case DIKC_ALTGR: return XK_Super_R; +- case DIKC_SHIFT: return XK_Shift_R; +- case DIKC_CTRL: return XK_Control_R; +- case DIKC_INSERT: return XK_Insert; +- case DIKC_DELETE: return XK_Delete; +- +- case DIKC_HOME: return XK_Home; +- case DIKC_LEFT: return XK_Left; +- case DIKC_RIGHT: return XK_Right; +- case DIKC_UP: return XK_Up; +- case DIKC_DOWN: return XK_Down; +- case DIKC_PAGEUP: return XK_Page_Up; +- case DIKC_PAGEDOWN: return XK_Page_Down; +- case DIKC_END: return XK_End; +- +- /* Keypad Keys */ +- case DIKC_KP_PLUS: return XK_KP_Add; +- case DIKC_KP_MULT: return XK_KP_Multiply; +- case DIKC_KP_MINUS: return XK_KP_Subtract; +- case DIKC_KP_DIV: return XK_KP_Divide; +- case DIKC_KP_ENTER: return XK_KP_Enter; +- case DIKC_KP_SPACE: return XK_KP_Space; +- case DIKC_KP_TAB: return XK_KP_Tab; +- +- case DIKC_KP_0: return XK_KP_0; +- case DIKC_KP_1: return XK_KP_1; +- case DIKC_KP_2: return XK_KP_2; +- case DIKC_KP_3: return XK_KP_3; +- case DIKC_KP_4: return XK_KP_4; +- case DIKC_KP_5: return XK_KP_5; +- case DIKC_KP_6: return XK_KP_6; +- case DIKC_KP_7: return XK_KP_7; +- case DIKC_KP_8: return XK_KP_8; +- case DIKC_KP_9: return XK_KP_9; +- +- case DIKC_KP_DELETE: return XK_KP_Delete; +- case DIKC_KP_INSERT: return XK_KP_Insert; +- case DIKC_KP_END: return XK_KP_End; +- case DIKC_KP_DOWN: return XK_KP_Down; +- case DIKC_KP_PAGE_DOWN: return XK_KP_Page_Down; +- case DIKC_KP_LEFT: return XK_KP_Left; +- case DIKC_KP_BEGIN: return XK_KP_Begin; +- case DIKC_KP_RIGHT: return XK_KP_Right; +- case DIKC_KP_HOME: return XK_KP_Home; +- case DIKC_KP_UP: return XK_KP_Up; +- case DIKC_KP_PAGE_UP: return XK_KP_Page_Up; +- +- case DIKC_UNKNOWN: +- fprintf(stderr, "Unknown key pressed\n"); +- } +- +- return -1; +-} +- +-int + dfb_draw_rect_with_rgb(int x, int y, int w, int h, int r, int g, int b) + { + primary->SetColor(primary, r,g,b,0xFF); diff --git a/net-misc/directvnc/files/directvnc-0.7-api-fix.patch b/net-misc/directvnc/files/directvnc-0.7-api-fix.patch new file mode 100644 index 000000000000..8e6e7449509e --- /dev/null +++ b/net-misc/directvnc/files/directvnc-0.7-api-fix.patch @@ -0,0 +1,11 @@ +--- src/dfb.c.orig 2003-01-17 23:17:26.000000000 -0500 ++++ src/dfb.c 2003-01-17 23:28:03.000000000 -0500 +@@ -66,7 +66,7 @@ + + + DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard )); +- DFBCHECK (dfb->CreateEventBuffer (dfb, DICAPS_ALL, &input_buffer)); ++ DFBCHECK (dfb->CreateEventBuffer (dfb, &input_buffer)); + } + + |