1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

Object Oriented Input System (OIS) is meant to be a cross platform,

simple solution for using all kinds of Input Devices (KeyBoards,
Mice, Joysticks, etc) and feedback devices (e.g. forcefeedback).
Written in C++ using Object Oriented Design patterns.

NOTE: this ports lacks joystick support. For now.

WWW: http://www.wreckedgames.com/

PR:		ports/124711
Approved by:	miwi (mentor)
This commit is contained in:
Dmitry Marakasov 2008-06-20 09:32:19 +00:00
parent 5cab5dee67
commit dd9452cf01
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=215326
7 changed files with 181 additions and 0 deletions

View File

@ -865,6 +865,7 @@
SUBDIR += ocamlweb
SUBDIR += ode
SUBDIR += ode-devel
SUBDIR += ois
SUBDIR += omake
SUBDIR += omniNotify
SUBDIR += omniORB

35
devel/ois/Makefile Normal file
View File

@ -0,0 +1,35 @@
# New ports collection makefile for: ois
# Date created: 16 Jun 2008
# Whom: Dmitry Marakasov <amdmi3@amdmi3.ru>
#
# $FreeBSD$
#
PORTNAME= ois
PORTVERSION= 1.2.0
CATEGORIES= devel
MASTER_SITES= SF
MASTER_SITE_SUBDIR= wgois
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= amdmi3@amdmi3.ru
COMMENT= Object Oriented Input System
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_GNOME= gnomehack
USE_AUTOTOOLS= libtool:15:env aclocal:19:env autoheader:261:env automake:19:env autoconf:261:env
USE_XORG= x11 xaw
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" CPPFLAGS="-I${LOCALBASE}/include"
WRKSRC= ${WRKDIR}/${PORTNAME}
post-patch:
@${REINPLACE_CMD} 's|^pkgconfigdir = .*|pkgconfigdir=$${prefix}/libdata/pkgconfig|' \
${WRKSRC}/Makefile.am
pre-configure:
@cd ${WRKSRC} && ./bootstrap
.include <bsd.port.mk>

3
devel/ois/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (ois_1.2.0.tar.gz) = 6a8cedad04f095127ca1455162fec955
SHA256 (ois_1.2.0.tar.gz) = 175414df5d7b924779fa513ea614081ae55ae708a5e29473e74911297e4be708
SIZE (ois_1.2.0.tar.gz) = 109768

View File

@ -0,0 +1,26 @@
--- src/Makefile.am.orig 2008-02-14 06:33:36.000000000 +0300
+++ src/Makefile.am 2008-06-16 11:10:17.000000000 +0400
@@ -1,4 +1,4 @@
-INCLUDES = $(STLPORT_CFLAGS) -I$(top_srcdir)/includes $(CFLAGS) -I/usr/X11R6/include
+INCLUDES = $(STLPORT_CFLAGS) -I$(top_srcdir)/includes
@@ -10,16 +10,13 @@
OISKeyboard.cpp \
OISForceFeedback.cpp \
OISException.cpp \
- ./linux/EventHelpers.cpp \
./linux/LinuxInputManager.cpp \
- ./linux/LinuxJoyStickEvents.cpp \
- ./linux/LinuxForceFeedback.cpp \
./linux/LinuxKeyboard.cpp \
./linux/LinuxMouse.cpp
libOIS_la_LDFLAGS = -release @PACKAGE_VERSION@
#libOIS_la_LDFLAGS = -version-info $(shell echo "@PACKAGE_VERSION@" | tr '.' ':')
-libOIS_la_LIBADD = $(STLPORT_LIBS) -L/usr/X11R6/lib -lX11
+libOIS_la_LIBADD = $(STLPORT_LIBS) -lX11
#eof "$Id: Makefile.am,v 1.15.2.1 2008/02/14 03:33:36 pjcast Exp $"

View File

@ -0,0 +1,88 @@
--- src/linux/LinuxInputManager.cpp.orig 2008-01-28 00:24:28.000000000 +0300
+++ src/linux/LinuxInputManager.cpp 2008-06-16 11:12:52.000000000 +0400
@@ -22,7 +22,6 @@
*/
#include "linux/LinuxInputManager.h"
#include "linux/LinuxKeyboard.h"
-#include "linux/LinuxJoyStickEvents.h"
#include "linux/LinuxMouse.h"
#include "OISException.h"
#include <cstdlib>
@@ -49,8 +48,6 @@
//--------------------------------------------------------------------------------//
LinuxInputManager::~LinuxInputManager()
{
- //Close all joysticks
- LinuxJoyStick::_clearJoys(unusedJoyStickList);
}
//--------------------------------------------------------------------------------//
@@ -99,8 +96,6 @@
void LinuxInputManager::_enumerateDevices()
{
//Enumerate all attached devices
- unusedJoyStickList = LinuxJoyStick::_scanJoys();
- joySticks = unusedJoyStickList.size();
}
//----------------------------------------------------------------------------//
@@ -114,9 +109,6 @@
if( mouseUsed == false )
ret.insert(std::make_pair(OISMouse, mInputSystemName));
- for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i)
- ret.insert(std::make_pair(OISJoyStick, i->vendor));
-
return ret;
}
@@ -127,7 +119,7 @@
{
case OISKeyboard: return 1;
case OISMouse: return 1;
- case OISJoyStick: return joySticks;
+ case OISJoyStick: return 0;
default: return 0;
}
}
@@ -139,7 +131,7 @@
{
case OISKeyboard: return keyboardUsed ? 0 : 1;
case OISMouse: return mouseUsed ? 0 : 1;
- case OISJoyStick: return (int)unusedJoyStickList.size();
+ case OISJoyStick: return 0;
default: return 0;
}
}
@@ -180,19 +172,6 @@
obj = new LinuxMouse(this, bufferMode, grabMouse, hideMouse);
break;
}
- case OISJoyStick:
- {
- for(JoyStickInfoList::iterator i = unusedJoyStickList.begin(); i != unusedJoyStickList.end(); ++i)
- {
- if(vendor == "" || i->vendor == vendor)
- {
- obj = new LinuxJoyStick(this, bufferMode, *i);
- unusedJoyStickList.erase(i);
- break;
- }
- }
- break;
- }
default:
break;
}
@@ -208,11 +187,6 @@
{
if( obj )
{
- if( obj->type() == OISJoyStick )
- {
- unusedJoyStickList.push_back( ((LinuxJoyStick*)obj)->_getJoyInfo() );
- }
-
delete obj;
}
}

8
devel/ois/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
Object Oriented Input System (OIS) is meant to be a cross platform,
simple solution for using all kinds of Input Devices (KeyBoards,
Mice, Joysticks, etc) and feedback devices (e.g. forcefeedback).
Written in C++ using Object Oriented Design patterns.
NOTE: this ports lacks joystick support. For now.
WWW: http://www.wreckedgames.com/

20
devel/ois/pkg-plist Normal file
View File

@ -0,0 +1,20 @@
include/OIS/OIS.h
include/OIS/OISConfig.h
include/OIS/OISEffect.h
include/OIS/OISEvents.h
include/OIS/OISException.h
include/OIS/OISFactoryCreator.h
include/OIS/OISForceFeedback.h
include/OIS/OISInputManager.h
include/OIS/OISInterface.h
include/OIS/OISJoyStick.h
include/OIS/OISKeyboard.h
include/OIS/OISMouse.h
include/OIS/OISObject.h
include/OIS/OISPrereqs.h
lib/libOIS-1.2.0.so
lib/libOIS.a
lib/libOIS.la
lib/libOIS.so
libdata/pkgconfig/OIS.pc
@dirrm include/OIS