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-Sources_Util_fcvt.c145
-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-ah87
-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
-rw-r--r--devel/clanlib-devel/files/patch-configure10
-rw-r--r--devel/clanlib-devel/files/patch-mutex_pthread.cpp23
-rw-r--r--devel/clanlib-devel/files/patch-socket.cpp11
-rw-r--r--devel/clanlib-devel/files/patch-soundoutput_oss.cpp17
17 files changed, 61 insertions, 795 deletions
diff --git a/devel/clanlib-devel/files/patch-Sources_Util_fcvt.c b/devel/clanlib-devel/files/patch-Sources_Util_fcvt.c
deleted file mode 100644
index ed8898b293af..000000000000
--- a/devel/clanlib-devel/files/patch-Sources_Util_fcvt.c
+++ /dev/null
@@ -1,145 +0,0 @@
-
-$FreeBSD$
-
---- /dev/null Wed Jan 10 00:32:20 2001
-+++ Sources/Util/fcvt.c Wed Jan 10 00:31:59 2001
-@@ -0,0 +1,139 @@
-+/* Compatibility functions for floating point formatting, reentrant versions.
-+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Library General Public License as
-+ published by the Free Software Foundation; either version 2 of the
-+ License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with the GNU C Library; see the file COPYING.LIB. If not,
-+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ Boston, MA 02111-1307, USA. */
-+
-+#include <ctype.h>
-+#include <errno.h>
-+#include <float.h>
-+#include <math.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <sys/param.h>
-+
-+extern int errno;
-+
-+#if DBL_MANT_DIG == 53
-+# define NDIGIT_MAX 17
-+#else
-+/*
-+ * See IEEE 854 5.6, table 2 for this formula. Unfortunately we need a
-+ * compile time constant here, so we cannot use it.
-+ */
-+# error "NDIGIT_MAX must be precomputed"
-+# define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * DBL_MANT_DIG + 1.0)))
-+#endif
-+#define MAXDIG (NDIGIT_MAX + 3)
-+#define signbit(x) (((x)<(0))?(1):(0))
-+
-+static char *FCVT_BUFFER[MAXDIG];
-+
-+static int fcvt_r(double value, int ndigit, int *decpt, int *sign, char *buf, \
-+ size_t len)
-+{
-+ int n, i;
-+ int left;
-+
-+ if (buf == NULL)
-+ {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ left = 0;
-+ if (finite(value))
-+ {
-+ *sign = signbit(value) != 0;
-+ if (*sign)
-+ value = -value;
-+
-+ if (ndigit < 0)
-+ {
-+
-+ while (ndigit < 0)
-+ {
-+ double new_value = value * 0.1;
-+
-+ if (new_value < 1.0)
-+ {
-+ ndigit = 0;
-+ break;
-+ }
-+
-+ value = new_value;
-+ ++left;
-+ ++ndigit;
-+ }
-+ }
-+ }
-+ else
-+ *sign = 0;
-+
-+ n = snprintf(buf, len, "%.*f", MIN(ndigit, NDIGIT_MAX), value);
-+
-+ if (n >= len)
-+ return -1;
-+
-+ i = 0;
-+ while (i < n && isdigit(buf[i]))
-+ ++i;
-+ *decpt = i;
-+
-+ if (i == 0)
-+ return 0;
-+
-+ if (i < n)
-+ {
-+ do
-+ ++i;
-+ while (i < n && !isdigit(buf[i]));
-+
-+ if (*decpt == 1 && buf[0] == '0' && value != 0.0)
-+ {
-+ --*decpt;
-+
-+ while (i < n && buf[i] == '0')
-+ {
-+ --*decpt;
-+ ++i;
-+ }
-+ }
-+
-+ memmove(&buf[MAX(*decpt, 0)], &buf[i], n - i);
-+ buf[n - (i - MAX(*decpt, 0))] = '\0';
-+ }
-+
-+ if (left)
-+ {
-+ *decpt += left;
-+ if (--len > n)
-+ {
-+ while (left-- > 0 && n < len)
-+ buf[n++] = '0';
-+ buf[n] = '\0';
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+char *fcvt(double value, int ndigit, int *decpt, int *sign)
-+{
-+ fcvt_r(value, ndigit, decpt, sign, (char *)FCVT_BUFFER, MAXDIG);
-+ return (char *)FCVT_BUFFER;
-+}
-+
diff --git a/devel/clanlib-devel/files/patch-aa b/devel/clanlib-devel/files/patch-aa
deleted file mode 100644
index 60cf5719f259..000000000000
--- a/devel/clanlib-devel/files/patch-aa
+++ /dev/null
@@ -1,21 +0,0 @@
---- 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
deleted file mode 100644
index 0e6d0275dd71..000000000000
--- a/devel/clanlib-devel/files/patch-ab
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644
index f07d49659630..000000000000
--- a/devel/clanlib-devel/files/patch-ac
+++ /dev/null
@@ -1,97 +0,0 @@
---- 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
deleted file mode 100644
index 069a12fa42e6..000000000000
--- a/devel/clanlib-devel/files/patch-ad
+++ /dev/null
@@ -1,42 +0,0 @@
---- 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
deleted file mode 100644
index 198ec890c2ec..000000000000
--- a/devel/clanlib-devel/files/patch-ae
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 4c52580b98a9..000000000000
--- a/devel/clanlib-devel/files/patch-af
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 319498755cd7..000000000000
--- a/devel/clanlib-devel/files/patch-ag
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 33e55013fcde..000000000000
--- a/devel/clanlib-devel/files/patch-ah
+++ /dev/null
@@ -1,87 +0,0 @@
---- Makefile.in.orig Sun Apr 9 15:17:58 2000
-+++ Makefile.in Wed Jan 10 00:20:32 2001
-@@ -35,7 +35,8 @@
- Sources/Lua:\
- Sources/Lua/tolua:\
- Sources/MPEG:\
-- Sources/GUI
-+ Sources/GUI:\
-+ Sources/Util
-
- OBJF_GENERIC = Libs/Intermediate/cliprect.o \
- Libs/Intermediate/res_surface_generic.o \
-@@ -131,7 +132,8 @@
- Libs/Intermediate/appconf.o \
- Libs/Intermediate/thread_pthread.o \
- Libs/Intermediate/mutex_pthread.o \
-- Libs/Intermediate/network_delivery_socket.o
-+ Libs/Intermediate/network_delivery_socket.o \
-+ Libs/Intermediate/fcvt.o
-
- OBJF_NETWORK_UNIX = Libs/Intermediate/network_delivery_unix.o \
- Libs/Intermediate/network_delivery_pipe.o \
-@@ -261,43 +263,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 +308,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
deleted file mode 100644
index d0496d848903..000000000000
--- a/devel/clanlib-devel/files/patch-ai
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index 6eeba9a1d4a1..000000000000
--- a/devel/clanlib-devel/files/patch-aj
+++ /dev/null
@@ -1,304 +0,0 @@
---- 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
deleted file mode 100644
index c5758600b659..000000000000
--- a/devel/clanlib-devel/files/patch-ak
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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
deleted file mode 100644
index 2eed25179a63..000000000000
--- a/devel/clanlib-devel/files/patch-al
+++ /dev/null
@@ -1,19 +0,0 @@
---- 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;
- }
- }
diff --git a/devel/clanlib-devel/files/patch-configure b/devel/clanlib-devel/files/patch-configure
new file mode 100644
index 000000000000..247c45ec6eb1
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-configure
@@ -0,0 +1,10 @@
+--- configure.orig Sun Sep 7 22:30:57 2003
++++ configure Mon Sep 8 02:32:28 2003
+@@ -18545,6 +18545,7 @@
+
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
diff --git a/devel/clanlib-devel/files/patch-mutex_pthread.cpp b/devel/clanlib-devel/files/patch-mutex_pthread.cpp
new file mode 100644
index 000000000000..5eb5d212d541
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-mutex_pthread.cpp
@@ -0,0 +1,23 @@
+--- Sources/Core/System/Unix/mutex_pthread.cpp.orig Sat Sep 6 05:33:06 2003
++++ Sources/Core/System/Unix/mutex_pthread.cpp Mon Sep 8 05:08:56 2003
+@@ -32,11 +32,7 @@
+ // suck:
+ extern "C"
+ {
+-#ifdef __FreeBSD__
+- int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind);
+-#else
+ int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind);
+-#endif
+ }
+
+ CL_Mutex *CL_Mutex::create()
+@@ -59,7 +55,7 @@
+ # define PTHREAD_MUTEX_RECURSIVE_NP
+ #endif
+
+-#ifdef PTHREAD_MUTEX_RECURSIVE_NP
++#ifndef PTHREAD_MUTEX_RECURSIVE_NP
+ // FreeBSD & cygwin
+ pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE);
+ #else
diff --git a/devel/clanlib-devel/files/patch-socket.cpp b/devel/clanlib-devel/files/patch-socket.cpp
new file mode 100644
index 000000000000..6432f6d19b4e
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-socket.cpp
@@ -0,0 +1,11 @@
+--- Sources/Network/Socket/socket.cpp.orig Thu Sep 11 18:42:36 2003
++++ Sources/Network/Socket/socket.cpp Sat Sep 20 12:15:04 2003
+@@ -25,6 +25,8 @@
+ #else
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <netinet/tcp.h>
+ #include <net/if.h> // needed for struct ifreq and struct ifconf
+ #include <sys/ioctl.h> // needed for ioctl ( on linux and bsd )
diff --git a/devel/clanlib-devel/files/patch-soundoutput_oss.cpp b/devel/clanlib-devel/files/patch-soundoutput_oss.cpp
new file mode 100644
index 000000000000..6603e39bd5ac
--- /dev/null
+++ b/devel/clanlib-devel/files/patch-soundoutput_oss.cpp
@@ -0,0 +1,17 @@
+--- Sources/Sound/Unix/soundoutput_oss.cpp.orig Fri Aug 22 19:32:54 2003
++++ Sources/Sound/Unix/soundoutput_oss.cpp Mon Sep 8 01:45:46 2003
+@@ -34,6 +34,14 @@
+ #include <sys/select.h>
+ #endif
+
++#if !defined(AFMT_S16_NE)
++#if defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)
++#define AFMT_S16_NE AFMT_S16_BE
++#else
++#define AFMT_S16_NE AFMT_S16_LE
++#endif
++#endif
++
+ /////////////////////////////////////////////////////////////////////////////
+ // CL_SoundOutput_OSS construction:
+