aboutsummaryrefslogtreecommitdiff
path: root/devel/clanlib-devel/files
diff options
context:
space:
mode:
Diffstat (limited to 'devel/clanlib-devel/files')
-rw-r--r--devel/clanlib-devel/files/patch-aa21
-rw-r--r--devel/clanlib-devel/files/patch-ab10
-rw-r--r--devel/clanlib-devel/files/patch-ac97
-rw-r--r--devel/clanlib-devel/files/patch-ad42
-rw-r--r--devel/clanlib-devel/files/patch-ae11
-rw-r--r--devel/clanlib-devel/files/patch-af11
-rw-r--r--devel/clanlib-devel/files/patch-ag11
-rw-r--r--devel/clanlib-devel/files/patch-ah67
-rw-r--r--devel/clanlib-devel/files/patch-ai11
-rw-r--r--devel/clanlib-devel/files/patch-aj304
-rw-r--r--devel/clanlib-devel/files/patch-ak26
-rw-r--r--devel/clanlib-devel/files/patch-al19
12 files changed, 630 insertions, 0 deletions
diff --git a/devel/clanlib-devel/files/patch-aa b/devel/clanlib-devel/files/patch-aa
new file mode 100644
index 000000000000..60cf5719f259
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-aa
@@ -0,0 +1,21 @@
+--- Makefile.conf.in.orig Sun Apr 9 15:17:58 2000
++++ Makefile.conf.in Sun Sep 24 15:52:59 2000
+@@ -13,15 +13,15 @@
+ BIN_PREFIX = @bindir@
+ TARGET_PREFIX = @libdir@/ClanLib
+
+-INCLUDE_DIRS = -I Sources @x_includes@
++INCLUDE_DIRS = -I Sources @x_includes@ -I ${LOCALBASE}/include
+
+ COMP_OPTIONS = -Wall $(INCLUDE_DIRS) -fPIC -DNOCONTROLS @DEFS@ @comp_mode@
+
+-LINK_CORE = @libs@
++LINK_CORE = -L${LOCALBASE}/lib @libs@
+
+ OBJF_NONDYN = @objf_nondyn@
+
+-LINK_COMMAND = $(CXX) -shared -fPIC -Wl,-rpath,$(TARGET_PREFIX)
++LINK_COMMAND = $(CXX) -shared -fPIC -Wl,-rpath,$(TARGET_PREFIX) -L${LOCALBASE}/lib
+
+ Libs/Intermediate/%.o : %.cpp
+ @echo "Compiling $<"
diff --git a/devel/clanlib-devel/files/patch-ab b/devel/clanlib-devel/files/patch-ab
new file mode 100644
index 000000000000..0e6d0275dd71
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ab
@@ -0,0 +1,10 @@
+--- Sources/Core/Network/Generic/network_generic.cpp.orig Wed May 10 15:44:12 2000
++++ Sources/Core/Network/Generic/network_generic.cpp Wed May 10 15:44:41 2000
+@@ -13,6 +13,7 @@
+ #include <Core/Network/Generic/network_generic.h>
+
+ #ifndef WIN32
++ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
diff --git a/devel/clanlib-devel/files/patch-ac b/devel/clanlib-devel/files/patch-ac
new file mode 100644
index 000000000000..f07d49659630
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ac
@@ -0,0 +1,97 @@
+--- Sources/Core/Input/X11/joystick_linux.cpp.orig Wed May 10 15:54:52 2000
++++ Sources/Core/Input/X11/joystick_linux.cpp Wed May 10 15:56:52 2000
+@@ -24,33 +24,33 @@
+ #include <API/Core/Input/inputbutton.h>
+ #include <Core/Input/X11/joystick_linux.h>
+
+-#include "joystick_linux.h"
++/*#include "joystick_linux.h"*/
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
++#if 1
+
+ CL_LinuxJoystick::CL_LinuxJoystick()
+ {
+- fd = -1;
++/* fd = -1;
+ num_buttons = 0;
+ num_axes = 0;
+ axes = NULL;
+- buttons = NULL;
++ buttons = NULL;*/
+ }
+
+ CL_LinuxJoystick::~CL_LinuxJoystick()
+ {
+- if (fd != -1)
++/* if (fd != -1)
+ {
+ close(fd);
+ }
+
+ delete[] axes;
+- delete[] buttons;
++ delete[] buttons;*/
+ }
+
+ bool CL_LinuxJoystick::init(int number)
+ {
+- cl_assert(fd == -1); // do not call init twice!
++/* cl_assert(fd == -1); // do not call init twice!
+
+ char devname[10];
+ sprintf( devname, "/dev/js%d", number );
+@@ -58,20 +58,20 @@
+ if (fd == -1) return false; // no joystick available
+
+ ioctl( fd, JSIOCGBUTTONS, &num_buttons );
+- ioctl( fd, JSIOCGAXES, &num_axes );
++ ioctl( fd, JSIOCGAXES, &num_axes );*/
+ /*
+ cout << "Number of axes: " << num_axes << endl;
+ cout << "Number of buttons: " << num_buttons << endl;
+ */
+- axes = new CL_LinuxJoystick_Axis[num_axes];
+- buttons = new CL_LinuxJoystick_Button[num_buttons];
++/* axes = new CL_LinuxJoystick_Axis[num_axes];
++ buttons = new CL_LinuxJoystick_Button[num_buttons];*/
+
+ return true;
+ }
+
+ void CL_LinuxJoystick::keep_alive()
+ {
+- cl_assert(fd != -1); // init _MUST_ be called before update!
++/* cl_assert(fd != -1); // init _MUST_ be called before update!
+
+ while (read( fd, &jev, sizeof(js_event) ) != -1)
+ {
+@@ -85,23 +85,23 @@
+ buttons[jev.number].set_value(jev.value);
+ break;
+ }
+- }
++ }*/
+ }
+
+ CL_InputAxis *CL_LinuxJoystick::get_axis(int num)
+ {
+- cl_assert(num >= 0); // disallow negative values
++/* cl_assert(num >= 0); // disallow negative values
+
+ if (num >= num_axes) return NULL;
+- return &axes[num];
++ return &axes[num];*/
+ }
+
+ CL_InputButton *CL_LinuxJoystick::get_button(int num)
+ {
+- cl_assert(num >= 0); // disallow negative values
++/* cl_assert(num >= 0); // disallow negative values
+
+ if (num >= num_buttons) return NULL;
+- return &buttons[num];
++ return &buttons[num];*/
+ }
+
+ #endif
diff --git a/devel/clanlib-devel/files/patch-ad b/devel/clanlib-devel/files/patch-ad
new file mode 100644
index 000000000000..069a12fa42e6
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ad
@@ -0,0 +1,42 @@
+--- Sources/Core/Input/X11/joystick_linux.h.orig Wed May 10 15:48:28 2000
++++ Sources/Core/Input/X11/joystick_linux.h Wed May 10 15:58:32 2000
+@@ -22,17 +22,17 @@
+
+ // TODO: ifdef this out if it isn't a linux system.
+
+-#include <linux/version.h>
++/*#include <linux/version.h>*/
+
+ #ifndef KERNEL_VERSION
+ #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+ #endif
+
+-#ifndef LINUX_VERSION_CODE
++/*#ifndef LINUX_VERSION_CODE
+ #error "You need to use at least 2.0 Linux kernel."
+-#endif
++#endif*/
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
++#if 1
+
+
+ #include "API/Core/Input/inputdevice.h"
+@@ -40,7 +40,7 @@
+ #include "API/Core/System/keep_alive.h"
+ #include "Core/System/Unix/init_linux.h"
+
+-#include <linux/joystick.h>
++/*#include <linux/joystick.h>*/
+
+ class CL_LinuxJoystick_Axis;
+ class CL_LinuxJoystick_Button;
+@@ -82,7 +82,7 @@
+ int num_buttons;
+ int num_axes;
+
+- js_event jev;
++/* js_event jev;*/
+
+ CL_LinuxJoystick_Axis *axes;
+ CL_LinuxJoystick_Button *buttons;
diff --git a/devel/clanlib-devel/files/patch-ae b/devel/clanlib-devel/files/patch-ae
new file mode 100644
index 000000000000..198ec890c2ec
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ae
@@ -0,0 +1,11 @@
+--- Sources/Core/System/Unix/init_linux.cpp.orig Wed May 10 16:02:01 2000
++++ Sources/Core/System/Unix/init_linux.cpp Wed May 10 16:02:12 2000
+@@ -551,7 +551,7 @@
+ break;
+ millis -= elapsed;
+ tv.tv_sec = millis/1000;
+- tv.tv_ysec = (millis%1000)*1000;
++ tv.tv_usec = (millis%1000)*1000;
+ #endif
+ was_error = select(0, NULL, NULL, NULL, &tv);
+ }
diff --git a/devel/clanlib-devel/files/patch-af b/devel/clanlib-devel/files/patch-af
new file mode 100644
index 000000000000..4c52580b98a9
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-af
@@ -0,0 +1,11 @@
+--- Sources/Core/System/Unix/mutex_pthread.cpp.orig Wed May 10 16:07:43 2000
++++ Sources/Core/System/Unix/mutex_pthread.cpp Wed May 10 16:07:55 2000
+@@ -33,7 +33,7 @@
+ {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+- pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
++ pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&mutex, &attr);
+ pthread_mutexattr_destroy(&attr);
+
diff --git a/devel/clanlib-devel/files/patch-ag b/devel/clanlib-devel/files/patch-ag
new file mode 100644
index 000000000000..319498755cd7
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ag
@@ -0,0 +1,11 @@
+--- configure.orig Wed May 10 00:46:48 2000
++++ configure Sun Sep 24 15:22:16 2000
+@@ -2199,7 +2199,7 @@
+
+
+
+-libs="-ldl -lz -lHermes -lpthread"
++libs="-lz -lHermes -pthread"
+
+ objf_nondyn=""
+ flag_tty=""
diff --git a/devel/clanlib-devel/files/patch-ah b/devel/clanlib-devel/files/patch-ah
new file mode 100644
index 000000000000..5b00b0fe629e
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ah
@@ -0,0 +1,67 @@
+--- Makefile.in.orig Sun Apr 9 15:17:58 2000
++++ Makefile.in Sun Sep 24 15:01:31 2000
+@@ -261,43 +264,43 @@
+ @install -d $(BIN_PREFIX)
+ @install -d $(LIB_PREFIX)
+ @for i in `find Sources/API/* -type d | grep -v CVS | sed "s/Sources\/API\///;"`; do install -d $(INC_PREFIX)/ClanLib/$$i; done
+- @for i in `find Sources/API/* -type f | grep -v CVS | sed "s/Sources\/API\///;"`; do install -m 0644 Sources/API/$$i $(INC_PREFIX)/ClanLib/$$i; done
++ @for i in `find Sources/API/* -type f | grep -v CVS | sed "s/Sources\/API\///;"`; do install -c -m 0644 Sources/API/$$i $(INC_PREFIX)/ClanLib/$$i; done
+ @echo "Libraries are being installed in $(LIB_PREFIX)."
+ @install Libs/libclanCore.so.$(D_VERSION_MINOR) $(LIB_PREFIX)
+ @ln -s -f libclanCore.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanCore.so.$(D_VERSION_MAJOR)
+ @ln -s -f libclanCore.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanCore.so
+ @if [ -f Libs/libclanGL.so ]; then \
+- install Libs/libclanGL.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanGL.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanGL.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanGL.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanGL.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanGL.so; \
+ fi
+ @if [ -f Libs/libclanMagick.so ]; then \
+- install Libs/libclanMagick.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanMagick.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanMagick.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanMagick.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanMagick.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanMagick.so; \
+ fi
+ @if [ -f Libs/libclanMPEG.so ]; then \
+- install Libs/libclanMPEG.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanMPEG.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanMPEG.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanMPEG.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanMPEG.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanMPEG.so; \
+ fi
+ @if [ -f Libs/libclanLua.so ]; then \
+- install Libs/libclanLua.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanLua.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanLua.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanLua.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanLua.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanLua.so; \
+ fi
+ @if [ -f Libs/libclanGUI.so ]; then \
+- install Libs/libclanGUI.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanGUI.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanGUI.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanGUI.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanGUI.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanGUI.so; \
+ fi
+ @if [ -f Libs/libclanMikMod.so ]; then \
+- install Libs/libclanMikMod.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanMikMod.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanMikMod.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanMikMod.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanMikMod.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanMikMod.so; \
+ fi
+ @if [ -f Libs/libclanPNG.so ]; then \
+- install Libs/libclanPNG.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
++ install -c Libs/libclanPNG.so.$(D_VERSION_MINOR) $(LIB_PREFIX); \
+ ln -s -f libclanPNG.so.$(D_VERSION_MINOR) $(LIB_PREFIX)/libclanPNG.so.$(D_VERSION_MAJOR); \
+ ln -s -f libclanPNG.so.$(D_VERSION_MAJOR) $(LIB_PREFIX)/libclanPNG.so; \
+ fi
+@@ -306,10 +309,10 @@
+ install -d $(TARGET_PREFIX); \
+ all_targets_var="$(ALL_TARGETS)"; \
+ for curtarget in $$all_targets_var; do \
+- install $$curtarget $(TARGET_PREFIX); \
++ install -c $$curtarget $(TARGET_PREFIX); \
+ done; \
+ fi
+- @install clanlib-config $(BIN_PREFIX)
++ @install -c clanlib-config $(BIN_PREFIX)
+
+ @echo ""
+ @echo "Installation complete, now run 'ldconfig' as root or point the"
diff --git a/devel/clanlib-devel/files/patch-ai b/devel/clanlib-devel/files/patch-ai
new file mode 100644
index 000000000000..d0496d848903
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ai
@@ -0,0 +1,11 @@
+--- Sources/API/Core/System/clanstring.h.orig Fri May 19 13:15:12 2000
++++ Sources/API/Core/System/clanstring.h Fri May 19 13:15:16 2000
+@@ -27,7 +27,7 @@
+ #include <cctype>
+ #endif
+
+-#ifdef __BEOS__
++#if defined(__BEOS__) || defined(__FreeBSD__)
+ extern char *fcvt (double, int, int *, int *);
+ #endif
+
diff --git a/devel/clanlib-devel/files/patch-aj b/devel/clanlib-devel/files/patch-aj
new file mode 100644
index 000000000000..6eeba9a1d4a1
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-aj
@@ -0,0 +1,304 @@
+--- Sources/Core/Input/TTY/keyboard_tty.cpp.orig Wed Apr 26 00:40:16 2000
++++ Sources/Core/Input/TTY/keyboard_tty.cpp Mon Sep 25 00:44:59 2000
+@@ -40,8 +40,9 @@
+ #endif
+ #ifdef HAVE_SYS_VT_H
+ #include <sys/vt.h>
+-#else
+-#include <linux/vt.h>
++#else /* FreeBSD :-P */
++#include <vgakeyboard.h>
++#include <sys/consio.h>
+ #endif
+
+ #include <linux/keyboard.h>
+@@ -72,56 +73,14 @@
+ // CL_System_Generic::keep_alives.add(this);
+
+ /* open the tty */
+- fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
++ fd = keyboard_init_return_fd();
+
+ if (fd < 0)
+ {
+ throw CL_Error("Couldn't open /dev/tty.");
+ }
+
+- /* put tty into "straight through" mode. */
+- struct termios newterm;
+-
+- if (tcgetattr(fd, &old_termios) < 0)
+- {
+- perror("tcgetattr failed");
+- }
+-
+- memcpy ( &newterm, &old_termios, sizeof(termios) );
+-
+- newterm.c_lflag &= ~(ICANON | ECHO | ISIG);
+- newterm.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON);
+- newterm.c_iflag |= IGNBRK;
+- newterm.c_cc[VMIN] = 0;
+- newterm.c_cc[VTIME] = 0;
+-
+- if (tcsetattr(fd, TCSANOW, &newterm) < 0)
+- {
+- perror("tcsetattr failed");
+- }
+-
+- /* save old mode and set to mediumraw */
+- if (ioctl(fd, KDGKBMODE, &old_mode) < 0)
+- {
+- perror("Couldn't get keyboard mode");
+- old_mode = K_XLATE;
+- }
+- if (ioctl(fd, KDSKBMODE, K_MEDIUMRAW) < 0)
+- {
+- perror("Couldn't set keyboard mode to K_MEDIUMRAW");
+- }
+-
+- /* save old kd mode and set to graphics */
+- if (ioctl(fd, KDGETMODE, &old_kd) < 0)
+- {
+- perror("Couldn't get kd mode");
+- old_kd = KD_TEXT;
+- }
+- if (ioctl(fd, KDSETMODE, KD_GRAPHICS) < 0)
+- {
+- perror("Couldn't set kd mode to KD_GRAPHICS");
+- }
+-
++ ioctl(fd, GIO_KEYMAP, &vga_keymap);
+ buttons = new CL_InputButton_TTYKeyboard*[CL_NUM_KEYS];
+ for (int i=0; i<CL_NUM_KEYS; i++) buttons[i] = NULL;
+ }
+@@ -144,13 +103,7 @@
+ {
+ if (fd>=0)
+ {
+- ioctl(fd, KDSKBMODE, old_mode);
+- ioctl(fd, KDSETMODE, old_kd);
+- if (tcsetattr(fd, TCSANOW, &old_termios) < 0)
+- {
+- std::cerr << "Could not restore old terminal input settings! Please run 'reset'!" << std::endl;
+- perror( "System error message" );
+- }
++ keyboard_close();
+ close(fd);
+ }
+ }
+@@ -172,8 +125,8 @@
+ void CL_TTYKeyboard::handle_code(char code)
+ {
+ bool keydown;
+- kbentry entry;
+-
++ struct keyent_t entry;
++
+ if (code & 0x80)
+ {
+ code &= 0x7f;
+@@ -183,109 +136,115 @@
+ keydown = true;
+ }
+
++ // Simple belt against out-of-range codes
++ if (code >= vga_keymap.n_keys)
++ return;
++
+ //fetch the keycode
+- entry.kb_table = 0;
+- entry.kb_index = code;
+- ioctl(fd,KDGKBENT,&entry);
++ entry = vga_keymap.key[code];
+
+ CL_Key key;
+- key.id = translate(entry.kb_value);
++ key.id = translate(entry);
+ key.ascii = -1;
+ key.state = keydown ? CL_Key::Pressed : CL_Key::Released;
+
+ if (keydown) CL_Input::chain_button_press.on_button_press(this, key);
+ else CL_Input::chain_button_release.on_button_release(this, key);
+
+- keymap[translate(entry.kb_value)] = keydown;
++ keymap[translate(entry)] = keydown;
+ }
+
+-char CL_TTYKeyboard::translate(int kb_value)
++char CL_TTYKeyboard::translate(struct keyent_t kb_value)
+ {
+- switch (kb_value)
+- {
+- case K_F1: return CL_KEY_F1;
+- case K_F2: return CL_KEY_F2;
+- case K_F3: return CL_KEY_F3;
+- case K_F4: return CL_KEY_F4;
+- case K_F5: return CL_KEY_F5;
+- case K_F6: return CL_KEY_F6;
+- case K_F7: return CL_KEY_F7;
+- case K_F8: return CL_KEY_F8;
+- case K_F9: return CL_KEY_F9;
+- case K_F10: return CL_KEY_F10;
+- case K_F11: return CL_KEY_F11;
+- case K_F12: return CL_KEY_F12;
+-
+- case 2816+'a': return CL_KEY_A;
+- case 2816+'b': return CL_KEY_B;
+- case 2816+'c': return CL_KEY_C;
+- case 2816+'d': return CL_KEY_D;
+- case 2816+'e': return CL_KEY_E;
+- case 2816+'f': return CL_KEY_F;
+- case 2816+'g': return CL_KEY_G;
+- case 2816+'h': return CL_KEY_H;
+- case 2816+'i': return CL_KEY_I;
+- case 2816+'j': return CL_KEY_J;
+- case 2816+'k': return CL_KEY_K;
+- case 2816+'l': return CL_KEY_L;
+- case 2816+'m': return CL_KEY_M;
+- case 2816+'n': return CL_KEY_N;
+- case 2816+'o': return CL_KEY_O;
+- case 2816+'p': return CL_KEY_P;
+- case 2816+'q': return CL_KEY_Q;
+- case 2816+'r': return CL_KEY_R;
+- case 2816+'s': return CL_KEY_S;
+- case 2816+'t': return CL_KEY_T;
+- case 2816+'u': return CL_KEY_U;
+- case 2816+'v': return CL_KEY_V;
+- case 2816+'w': return CL_KEY_W;
+- case 2816+'x': return CL_KEY_X;
+- case 2816+'y': return CL_KEY_Y;
+- case 2816+'z': return CL_KEY_Z;
++ if (kb_value.spcl & 0x80)
++ switch (kb_value.map[0])
++ {
++ case F(1): return CL_KEY_F1;
++ case F(2): return CL_KEY_F2;
++ case F(3): return CL_KEY_F3;
++ case F(4): return CL_KEY_F4;
++ case F(5): return CL_KEY_F5;
++ case F(6): return CL_KEY_F6;
++ case F(7): return CL_KEY_F7;
++ case F(8): return CL_KEY_F8;
++ case F(9): return CL_KEY_F9;
++ case F(10): return CL_KEY_F10;
++ case F(11): return CL_KEY_F11;
++ case F(12): return CL_KEY_F12;
++
++ case RCTR: return CL_KEY_LCTRL;
++ case LCTR: return CL_KEY_RCTRL;
++ case LSH: return CL_KEY_LSHIFT;
++ case RSH: return CL_KEY_RSHIFT;
++ case LALT: return CL_KEY_ALT;
++ case RALT: return CL_KEY_ALTGR;
++
++ case CLK: return CL_KEY_CAPSLOCK;
++ case NLK: return CL_KEY_NUMLOCK;
++ case SLK: return CL_KEY_SCRLOCK;
++
++ case F(49): return CL_KEY_HOME;
++ case F(50): return CL_KEY_UP;
++ case F(51): return CL_KEY_PAGEUP;
++ case F(53): return CL_KEY_LEFT;
++ case F(55): return CL_KEY_RIGHT;
++ case F(57): return CL_KEY_END;
++ case F(58): return CL_KEY_DOWN;
++ case F(59): return CL_KEY_PAGEDOWN;
++ case F(60): return CL_KEY_INSERT;
++ case F(61): return CL_KEY_DELETE;
++
++ case NEXT: return CL_KEY_PRINT;
++ }
++ else switch (kb_value.map[0])
++ {
++ case 'a': return CL_KEY_A;
++ case 'b': return CL_KEY_B;
++ case 'c': return CL_KEY_C;
++ case 'd': return CL_KEY_D;
++ case 'e': return CL_KEY_E;
++ case 'f': return CL_KEY_F;
++ case 'g': return CL_KEY_G;
++ case 'h': return CL_KEY_H;
++ case 'i': return CL_KEY_I;
++ case 'j': return CL_KEY_J;
++ case 'k': return CL_KEY_K;
++ case 'l': return CL_KEY_L;
++ case 'm': return CL_KEY_M;
++ case 'n': return CL_KEY_N;
++ case 'o': return CL_KEY_O;
++ case 'p': return CL_KEY_P;
++ case 'q': return CL_KEY_Q;
++ case 'r': return CL_KEY_R;
++ case 's': return CL_KEY_S;
++ case 't': return CL_KEY_T;
++ case 'u': return CL_KEY_U;
++ case 'v': return CL_KEY_V;
++ case 'w': return CL_KEY_W;
++ case 'x': return CL_KEY_X;
++ case 'y': return CL_KEY_Y;
++ case 'z': return CL_KEY_Z;
++ case ' ': return CL_KEY_SPACE;
+
+- case 48: return CL_KEY_0;
+- case 49: return CL_KEY_1;
+- case 50: return CL_KEY_2;
+- case 51: return CL_KEY_3;
+- case 52: return CL_KEY_4;
+- case 53: return CL_KEY_5;
+- case 54: return CL_KEY_6;
+- case 55: return CL_KEY_7;
+- case 56: return CL_KEY_8;
+- case 57: return CL_KEY_9;
++ case '0': return CL_KEY_0;
++ case '1': return CL_KEY_1;
++ case '2': return CL_KEY_2;
++ case '3': return CL_KEY_3;
++ case '4': return CL_KEY_4;
++ case '5': return CL_KEY_5;
++ case '6': return CL_KEY_6;
++ case '7': return CL_KEY_7;
++ case '8': return CL_KEY_8;
++ case '9': return CL_KEY_9;
+
+- case 27: return CL_KEY_ESCAPE;
+- case K_LEFT: return CL_KEY_LEFT;
+- case K_RIGHT: return CL_KEY_RIGHT;
+- case K_UP: return CL_KEY_UP;
+- case K_DOWN: return CL_KEY_DOWN;
+- case K_ENTER: return CL_KEY_ENTER;
+-
+- case K_CTRLL: return CL_KEY_LCTRL;
+- case K_CTRLR: return CL_KEY_RCTRL;
+- case K_SHIFTL: return CL_KEY_LSHIFT;
+- case K_SHIFTR: return CL_KEY_RSHIFT;
+- case K_ALT: return CL_KEY_ALT;
+- case K_ALTGR: return CL_KEY_ALTGR;
+- case 9: return CL_KEY_TAB;
+- case 32: return CL_KEY_SPACE;
+- case 127: return CL_KEY_BACKSPACE;
+- case K_INSERT: return CL_KEY_INSERT;
+- case K_REMOVE: return CL_KEY_DELETE;
+- case K_FIND: return CL_KEY_HOME;
+- case K_SELECT: return CL_KEY_END;
+- case K_PGUP: return CL_KEY_PAGEUP;
+- case K_PGDN: return CL_KEY_PAGEDOWN;
+- case K_CAPS: return CL_KEY_CAPSLOCK;
+- case K_NUM: return CL_KEY_NUMLOCK;
+- case K_HOLD: return CL_KEY_SCRLOCK;
+- case 28: return CL_KEY_PRINT;
+- case K(1,29): return CL_KEY_PAUSE;
+- case K_PSLASH: return CL_KEY_KP_DIV;
+- case K_PSTAR: return CL_KEY_KP_MULT;
+- case K_PMINUS: return CL_KEY_KP_MINUS;
+- case K_PPLUS: return CL_KEY_KP_PLUS;
+- case K_PENTER: return CL_KEY_KP_ENTER;
++ case 27: return CL_KEY_ESCAPE;
++ case 13: return CL_KEY_ENTER;
++ case 9: return CL_KEY_TAB;
++ case 8: return CL_KEY_BACKSPACE;
++ case '/': return CL_KEY_KP_DIV;
++ case '*': return CL_KEY_KP_MULT;
++ case '-': return CL_KEY_KP_MINUS;
++ case '+': return CL_KEY_KP_PLUS;
+ }
+
+ return CL_KEY_NONE_OF_THE_ABOVE;
diff --git a/devel/clanlib-devel/files/patch-ak b/devel/clanlib-devel/files/patch-ak
new file mode 100644
index 000000000000..c5758600b659
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-ak
@@ -0,0 +1,26 @@
+--- Sources/Core/Input/TTY/keyboard_tty.h.orig Sun Apr 9 15:18:01 2000
++++ Sources/Core/Input/TTY/keyboard_tty.h Mon Sep 25 00:46:07 2000
+@@ -32,6 +32,8 @@
+ #include "Core/System/Unix/init_linux.h"
+ #include "API/Core/System/keep_alive.h"
+ #include <termios.h>
++#include <stdio.h>
++#include <sys/kbio.h>
+
+ class CL_InputButton_TTYKeyboard : public CL_InputButton
+ {
+@@ -71,12 +73,13 @@
+
+ char keymap[128];
+
++ keymap_t vga_keymap;
+ int fd;
+ int old_mode;
+ int old_kd;
+ struct termios old_termios;
+ void handle_code(char code);
+- char translate(int kb_value);
++ char translate(struct keyent_t kb_value);
+
+ CL_InputButton_TTYKeyboard **buttons;
+ };
diff --git a/devel/clanlib-devel/files/patch-al b/devel/clanlib-devel/files/patch-al
new file mode 100644
index 000000000000..2eed25179a63
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-al
@@ -0,0 +1,19 @@
+--- Sources/Core/Display/Svgalib/displaycard_svgalib.cpp 2000/09/24 19:46:24 1.1
++++ Sources/Core/Display/Svgalib/displaycard_svgalib.cpp 2000/09/24 19:58:09
+@@ -13,6 +13,8 @@
+ */
+
+ #include "Core/precomp.h"
++#include "API/Core/Input/input.h"
++#include "Core/Input/TTY/keyboard_tty.h"
+
+ #ifdef USE_SVGALIB
+
+@@ -172,6 +174,7 @@
+ blue_mask,
+ 0); // alpha mask
+
++ CL_Input::keyboards.push_back(new CL_TTYKeyboard());
+ return;
+ }
+ }