diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2000-09-25 06:58:43 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2000-09-25 06:58:43 +0000 |
commit | 78d89936e265334c337c4a9858e8b4a26bf93b2b (patch) | |
tree | 6afe93024e33a60e5ce7d599152e7d61dca663f2 /devel/clanlib-devel | |
parent | ad82bf983f0713dbffc1f90aac9ab03938f49ed0 (diff) | |
download | ports-78d89936e265334c337c4a9858e8b4a26bf93b2b.tar.gz ports-78d89936e265334c337c4a9858e8b4a26bf93b2b.zip |
Notes
Diffstat (limited to 'devel/clanlib-devel')
-rw-r--r-- | devel/clanlib-devel/Makefile | 41 | ||||
-rw-r--r-- | devel/clanlib-devel/distinfo | 1 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-aa | 21 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ab | 10 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ac | 97 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ad | 42 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ae | 11 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-af | 11 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ag | 11 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ah | 67 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ai | 11 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-aj | 304 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-ak | 26 | ||||
-rw-r--r-- | devel/clanlib-devel/files/patch-al | 19 | ||||
-rw-r--r-- | devel/clanlib-devel/pkg-comment | 1 | ||||
-rw-r--r-- | devel/clanlib-devel/pkg-descr | 12 | ||||
-rw-r--r-- | devel/clanlib-devel/pkg-plist | 178 | ||||
-rw-r--r-- | devel/clanlib-devel/pkg-plist.glx | 1 |
18 files changed, 864 insertions, 0 deletions
diff --git a/devel/clanlib-devel/Makefile b/devel/clanlib-devel/Makefile new file mode 100644 index 000000000000..e626bc708733 --- /dev/null +++ b/devel/clanlib-devel/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: clanlib +# Date created: 10 May 2000 +# Whom: Maxim Sobolev <sobomax@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= clanlib +PORTVERSION= 0.4.4 +CATEGORIES= devel +MASTER_SITES= http://dark.x.dtu.dk/~mbn/clanlib/download/ +DISTNAME= ClanLib-${PORTVERSION} + +MAINTAINER= sobomax@FreeBSD.org + +LIB_DEPENDS= Hermes.1:${PORTSDIR}/graphics/Hermes \ + png.4:${PORTSDIR}/graphics/png \ + vga.1:${PORTSDIR}/graphics/svgalib + +.if defined(WITHOUT_GL) +CONFIGURE_ARGS+= --disable-opengl +.else +USE_MESA= yes +CONFIGURE_ARGS+= --enable-opengl +PLIST= ${WRKDIR}/PLIST +.endif + +USE_GMAKE= yes +USE_XLIB= yes +GNU_CONFIGURE= yes +CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib" \ + CPPFLAGS="-I${LOCALBASE}/include" +CFLAGS+= -fpermissive +ALL_TARGET+= clanPNG clanGL + +.if !defined(WITHOUT_GL) +pre-install: + @cat ${PKGDIR}/PLIST.glx ${PKGDIR}/PLIST > ${PLIST} +.endif + +.include <bsd.port.mk> diff --git a/devel/clanlib-devel/distinfo b/devel/clanlib-devel/distinfo new file mode 100644 index 000000000000..1d89290833b1 --- /dev/null +++ b/devel/clanlib-devel/distinfo @@ -0,0 +1 @@ +MD5 (ClanLib-0.4.4.tar.gz) = 13d52e35b0fa17c658a5980bbf576a1b 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; + } + } diff --git a/devel/clanlib-devel/pkg-comment b/devel/clanlib-devel/pkg-comment new file mode 100644 index 000000000000..72c6c3c7d100 --- /dev/null +++ b/devel/clanlib-devel/pkg-comment @@ -0,0 +1 @@ +Cross-platform game SDK diff --git a/devel/clanlib-devel/pkg-descr b/devel/clanlib-devel/pkg-descr new file mode 100644 index 000000000000..437361f16f31 --- /dev/null +++ b/devel/clanlib-devel/pkg-descr @@ -0,0 +1,12 @@ +ClanLib delivers a platform independent interface to write games with. If a +game is written with ClanLib, it should be possible to compile the game under +any platform (supported by ClanLib, that is) without changes in the application +sourcecode. + +But ClanLib is not just a wrapper library, providing an common interface to +lowlevel libraries such as DirectX, Svgalib, X11, GGI, etc. While platform +independency is ClanLib's primary goal, it also tries to be a service-minded +game sdk. In other words, authors have put great effort in to designing the API, +to ensure ClanLib's easy of use - while maintaining it's power. + +WWW: http://www.clanlib.org/ diff --git a/devel/clanlib-devel/pkg-plist b/devel/clanlib-devel/pkg-plist new file mode 100644 index 000000000000..f8411a44176c --- /dev/null +++ b/devel/clanlib-devel/pkg-plist @@ -0,0 +1,178 @@ +bin/clanlib-config +include/ClanLib/Core/Display/cliprect.h +include/ClanLib/Core/Display/display.h +include/ClanLib/Core/Display/display_events.h +include/ClanLib/Core/Display/displaycard.h +include/ClanLib/Core/Display/mousecursor.h +include/ClanLib/Core/Display/mousecursor_provider.h +include/ClanLib/Core/Display/palette.h +include/ClanLib/Core/Display/pixelformat.h +include/ClanLib/Core/Display/res_surface.h +include/ClanLib/Core/Display/surface.h +include/ClanLib/Core/Display/surfacepriority.h +include/ClanLib/Core/Display/surfaceprovider.h +include/ClanLib/Core/Display/target.h +include/ClanLib/Core/Display/vidmode.h +include/ClanLib/Core/Font/font.h +include/ClanLib/Core/Font/font_description.h +include/ClanLib/Core/IOData/cl_endian.h +include/ClanLib/Core/IOData/inputsource.h +include/ClanLib/Core/IOData/inputsource_memory.h +include/ClanLib/Core/IOData/inputsource_provider.h +include/ClanLib/Core/IOData/outputsource.h +include/ClanLib/Core/IOData/outputsource_memory.h +include/ClanLib/Core/IOData/outputsource_provider.h +include/ClanLib/Core/Input/input.h +include/ClanLib/Core/Input/input_events.h +include/ClanLib/Core/Input/inputaxis.h +include/ClanLib/Core/Input/inputaxis_basic.h +include/ClanLib/Core/Input/inputaxis_group.h +include/ClanLib/Core/Input/inputbuffer.h +include/ClanLib/Core/Input/inputbutton.h +include/ClanLib/Core/Input/inputbutton_basic.h +include/ClanLib/Core/Input/inputbutton_group.h +include/ClanLib/Core/Input/inputbutton_to_axis_analog.h +include/ClanLib/Core/Input/inputbutton_to_axis_digital.h +include/ClanLib/Core/Input/inputcursor.h +include/ClanLib/Core/Input/inputdevice.h +include/ClanLib/Core/Input/inputhat.h +include/ClanLib/Core/Input/key.h +include/ClanLib/Core/Input/keyboard.h +include/ClanLib/Core/Input/mouse.h +include/ClanLib/Core/Math/bezier.h +include/ClanLib/Core/Math/cl_vector.h +include/ClanLib/Core/Math/math.h +include/ClanLib/Core/Math/matrix.h +include/ClanLib/Core/NetObjects/netdata_controller.h +include/ClanLib/Core/NetObjects/netobject.h +include/ClanLib/Core/NetObjects/netobject_controller.h +include/ClanLib/Core/NetObjects/netobject_creator.h +include/ClanLib/Core/Network/netcomputer.h +include/ClanLib/Core/Network/netgame.h +include/ClanLib/Core/Network/netgroup.h +include/ClanLib/Core/Network/netmessage.h +include/ClanLib/Core/Network/network.h +include/ClanLib/Core/Resources/resource.h +include/ClanLib/Core/Resources/resource_manager.h +include/ClanLib/Core/Resources/resource_manager_net.h +include/ClanLib/Core/Resources/resourceoption.h +include/ClanLib/Core/Resources/resourceoptions.h +include/ClanLib/Core/Resources/resourcetype.h +include/ClanLib/Core/Resources/resourcetype_boolean.h +include/ClanLib/Core/Resources/resourcetype_integer.h +include/ClanLib/Core/Resources/resourcetype_string.h +include/ClanLib/Core/Sound/cd_audio.h +include/ClanLib/Core/Sound/sound.h +include/ClanLib/Core/Sound/soundbuffer.h +include/ClanLib/Core/Sound/soundbuffer_session.h +include/ClanLib/Core/Sound/soundformat.h +include/ClanLib/Core/Sound/static_soundprovider.h +include/ClanLib/Core/Sound/stream_soundprovider.h +include/ClanLib/Core/SoundProviders/static_provider_raw.h +include/ClanLib/Core/SoundProviders/static_provider_wave.h +include/ClanLib/Core/SoundProviders/stream_provider_raw.h +include/ClanLib/Core/SoundProviders/stream_provider_wave.h +include/ClanLib/Core/SurfaceProviders/canvas.h +include/ClanLib/Core/SurfaceProviders/generic_surfaceprovider.h +include/ClanLib/Core/SurfaceProviders/provider_bmp.h +include/ClanLib/Core/SurfaceProviders/provider_convpoly.h +include/ClanLib/Core/SurfaceProviders/provider_convpoly_basics.h +include/ClanLib/Core/SurfaceProviders/provider_dynamic.h +include/ClanLib/Core/SurfaceProviders/provider_empty.h +include/ClanLib/Core/SurfaceProviders/provider_fli.h +include/ClanLib/Core/SurfaceProviders/provider_mpeg.h +include/ClanLib/Core/SurfaceProviders/provider_pcx.h +include/ClanLib/Core/SurfaceProviders/provider_ppm.h +include/ClanLib/Core/SurfaceProviders/provider_targa.h +include/ClanLib/Core/SurfaceProviders/sprite.h +include/ClanLib/Core/SurfaceProviders/sprite2.h +include/ClanLib/Core/SurfaceProviders/sprite_subarray_provider.h +include/ClanLib/Core/SurfaceProviders/sprite_subsection_provider.h +include/ClanLib/Core/SurfaceProviders/surface_manager.h +include/ClanLib/Core/System/cl_assert.h +include/ClanLib/Core/System/clanapp.h +include/ClanLib/Core/System/clanstring.h +include/ClanLib/Core/System/clanstring.h.orig +include/ClanLib/Core/System/error.h +include/ClanLib/Core/System/eventchain.h +include/ClanLib/Core/System/keep_alive.h +include/ClanLib/Core/System/mutex.h +include/ClanLib/Core/System/setupcore.h +include/ClanLib/Core/System/system.h +include/ClanLib/Core/System/thread.h +include/ClanLib/Core/System/types.h +include/ClanLib/GL/bsp.h +include/ClanLib/GL/opengl.h +include/ClanLib/GL/setupgl.h +include/ClanLib/GL/texture.h +include/ClanLib/GUI/cl_gapplication.h +include/ClanLib/GUI/cl_gbutton.h +include/ClanLib/GUI/cl_gconnection.h +include/ClanLib/GUI/cl_gevent.h +include/ClanLib/GUI/cl_glabel.h +include/ClanLib/GUI/cl_gmultifield.h +include/ClanLib/GUI/cl_gobject.h +include/ClanLib/GUI/cl_gpoint.h +include/ClanLib/GUI/cl_gpushbutton.h +include/ClanLib/GUI/cl_grect.h +include/ClanLib/GUI/cl_grootwindow.h +include/ClanLib/GUI/cl_gsldef.h +include/ClanLib/GUI/cl_gtextfield.h +include/ClanLib/GUI/cl_gtogglebutton.h +include/ClanLib/GUI/cl_gwidget.h +include/ClanLib/GUI/trace.h +include/ClanLib/Lua/lua.h +include/ClanLib/MIDI/cl_midi.h +include/ClanLib/MPEG/mpeg.h +include/ClanLib/MPEG/mpeg_soundprovider.h +include/ClanLib/Magick/provider_magick.h +include/ClanLib/MikMod/streamed_mikmod_sample.h +include/ClanLib/PNG/provider_png.h +include/ClanLib/core.h +include/ClanLib/efence.h +include/ClanLib/gl.h +include/ClanLib/gui.h +include/ClanLib/lua.h +include/ClanLib/magick.h +include/ClanLib/midi.h +include/ClanLib/mikmod.h +include/ClanLib/mpeg.h +include/ClanLib/png.h +include/ClanLib/stl.h +lib/ClanLib/libclan-display-svgalib.so.0.4.4 +lib/ClanLib/libclan-display-x11.so.0.4.4 +lib/ClanLib/libclan-input-tty.so.0.4.4 +lib/ClanLib/libclan-network.so.0.4.4 +lib/ClanLib/libclan-sound.so.0.4.4 +lib/libclanCore.so +lib/libclanCore.so.0 +lib/libclanCore.so.0.4.4 +lib/libclanGL.so +lib/libclanGL.so.0 +lib/libclanGL.so.0.4.4 +lib/libclanPNG.so +lib/libclanPNG.so.0 +lib/libclanPNG.so.0.4.4 +@dirrm lib/ClanLib +@dirrm include/ClanLib/PNG +@dirrm include/ClanLib/MikMod +@dirrm include/ClanLib/Magick +@dirrm include/ClanLib/MPEG +@dirrm include/ClanLib/MIDI +@dirrm include/ClanLib/Lua +@dirrm include/ClanLib/GUI +@dirrm include/ClanLib/GL +@dirrm include/ClanLib/Core/System +@dirrm include/ClanLib/Core/SurfaceProviders +@dirrm include/ClanLib/Core/SoundProviders +@dirrm include/ClanLib/Core/Sound +@dirrm include/ClanLib/Core/Resources +@dirrm include/ClanLib/Core/Network +@dirrm include/ClanLib/Core/NetObjects +@dirrm include/ClanLib/Core/Math +@dirrm include/ClanLib/Core/Input +@dirrm include/ClanLib/Core/IOData +@dirrm include/ClanLib/Core/Font +@dirrm include/ClanLib/Core/Display +@dirrm include/ClanLib/Core +@dirrm include/ClanLib diff --git a/devel/clanlib-devel/pkg-plist.glx b/devel/clanlib-devel/pkg-plist.glx new file mode 100644 index 000000000000..b2b2cc849498 --- /dev/null +++ b/devel/clanlib-devel/pkg-plist.glx @@ -0,0 +1 @@ +lib/ClanLib/libclan-display-glx.so.0.4.4 |