Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2022 20:23:43 GMT
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fed282b648c3 - main - =?utf-8?Q?devel/ois:=20update=201.2.0=20=E2=86=92=201.5.1?=
Message-ID:  <202212142023.2BEKNhsc093331@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fed282b648c3a774abb95b9f5f84c67a1d6fec06

commit fed282b648c3a774abb95b9f5f84c67a1d6fec06
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-12-14 16:00:48 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-12-14 20:22:14 +0000

    devel/ois: update 1.2.0 → 1.5.1
    
    - Switch to GitHub
    - Update WWW
    - Add LICENSE_FILE
    - Switch to CMake
    - Optionally install test programs
---
 devel/ois/Makefile                                 | 38 ++++++----
 devel/ois/distinfo                                 |  5 +-
 devel/ois/files/patch-CMakeLists.txt               | 20 +++++
 devel/ois/files/patch-demos-FFConsoleDemo.cpp      | 10 ---
 devel/ois/files/patch-demos-OISConsole.cpp         | 10 ---
 devel/ois/files/patch-src-Makefile.am              | 26 -------
 .../files/patch-src-linux-LinuxInputManager.cpp    | 88 ----------------------
 devel/ois/files/patch-src-linux-LinuxMouse.cpp     | 82 --------------------
 devel/ois/pkg-plist                                | 35 +++++----
 9 files changed, 66 insertions(+), 248 deletions(-)

diff --git a/devel/ois/Makefile b/devel/ois/Makefile
index c51f2781a44c..38e019af3bb3 100644
--- a/devel/ois/Makefile
+++ b/devel/ois/Makefile
@@ -1,28 +1,38 @@
 PORTNAME=	ois
-PORTVERSION=	1.2.0
-PORTREVISION=	5
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.5.1
 CATEGORIES=	devel
-MASTER_SITES=	SF/wgois/Source%20Release/1.2
-DISTNAME=	${PORTNAME}_${PORTVERSION}
 
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	Object Oriented Input System
-WWW=		https://sourceforge.net/projects/wgois/
+WWW=		https://wgois.github.io/OIS/ \
+		https://github.com/wgois/OIS
 
 LICENSE=	ZLIB
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-GNU_CONFIGURE=	yes
-INSTALL_TARGET=	install-strip
-USES=		autoreconf libtool pathfix xorg
-USE_XORG=	x11 xaw
+BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
+
+USES=		cmake xorg
+USE_GITHUB=	yes
+GH_ACCOUNT=	wgois
+GH_PROJECT=	OIS
+USE_XORG=	x11
 USE_LDCONFIG=	yes
 
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
+CXXFLAGS+=	-Wno-unused-value \
+		-D__s16=int16_t \
+		-D__s32=int32_t \
+		-D__u16=uint16_t
+
+OPTIONS_DEFINE=	DEMOS
+OPTIONS_SUB=	yes
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
+DEMOS_DESC=		Build demo applications
+DEMOS_CMAKE_BOOL=	OIS_BUILD_DEMOS
 
-post-install:
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libOIS.so
+post-install-DEMOS-on:
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ConsoleApp ${STAGEDIR}${PREFIX}/bin/OIS-ConsoleDemo
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/FFConsoleApp ${STAGEDIR}${PREFIX}/bin/OIS-FFConsoleDemo
 
 .include <bsd.port.mk>
diff --git a/devel/ois/distinfo b/devel/ois/distinfo
index 82f77e6ad727..b02604872fa7 100644
--- a/devel/ois/distinfo
+++ b/devel/ois/distinfo
@@ -1,2 +1,3 @@
-SHA256 (ois_1.2.0.tar.gz) = 175414df5d7b924779fa513ea614081ae55ae708a5e29473e74911297e4be708
-SIZE (ois_1.2.0.tar.gz) = 109768
+TIMESTAMP = 1671026636
+SHA256 (wgois-OIS-v1.5.1_GH0.tar.gz) = 614f6ef6d69cf6d84f1b50efff46a6c1acce426933e5f0dcf29862ea8332af73
+SIZE (wgois-OIS-v1.5.1_GH0.tar.gz) = 554124
diff --git a/devel/ois/files/patch-CMakeLists.txt b/devel/ois/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..9a6ddc77e19b
--- /dev/null
+++ b/devel/ois/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig	2021-05-13 19:09:42 UTC
++++ CMakeLists.txt
+@@ -56,7 +56,6 @@ set(BUILD_SHARED_LIBS ${OIS_BUILD_SHARED_LIBS})
+ if (UNIX AND NOT APPLE)
+ 
+     find_package(X11 REQUIRED)
+-    include_directories(SYSTEM ${X11_INCLUDE_DIR})
+ 
+     set(ois_source
+         ${ois_source}
+@@ -188,8 +187,7 @@ endif()
+ if(UNIX)
+ 
+     if (NOT APPLE)
+-        add_dependencies(OIS X11)
+-        target_link_libraries(OIS X11)
++        target_link_libraries(OIS X11::X11)
+     endif()
+ 
+     set_target_properties(OIS PROPERTIES
diff --git a/devel/ois/files/patch-demos-FFConsoleDemo.cpp b/devel/ois/files/patch-demos-FFConsoleDemo.cpp
deleted file mode 100644
index 10dd07c6bfeb..000000000000
--- a/devel/ois/files/patch-demos-FFConsoleDemo.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- demos/FFConsoleDemo.cpp.orig	2007-01-01 02:31:15.000000000 +0300
-+++ demos/FFConsoleDemo.cpp	2013-09-14 02:48:25.886226363 +0400
-@@ -18,6 +18,7 @@
- ////////////////////////////////////Needed Linux Headers//////////////
- #elif defined OIS_LINUX_PLATFORM
- #  include <X11/Xlib.h>
-+#  include <unistd.h> // for usleep()
-    void checkX11Events();
- #endif
- //////////////////////////////////////////////////////////////////////
diff --git a/devel/ois/files/patch-demos-OISConsole.cpp b/devel/ois/files/patch-demos-OISConsole.cpp
deleted file mode 100644
index 7408e78e5f53..000000000000
--- a/devel/ois/files/patch-demos-OISConsole.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- demos/OISConsole.cpp.orig	2008-02-29 06:50:09.000000000 +0300
-+++ demos/OISConsole.cpp	2013-09-14 02:48:43.934225837 +0400
-@@ -26,6 +26,7 @@
- ////////////////////////////////////Needed Linux Headers//////////////
- #elif defined OIS_LINUX_PLATFORM
- #  include <X11/Xlib.h>
-+#  include <unistd.h> // for usleep()
-    void checkX11Events();
- //////////////////////////////////////////////////////////////////////
- ////////////////////////////////////Needed Mac Headers//////////////
diff --git a/devel/ois/files/patch-src-Makefile.am b/devel/ois/files/patch-src-Makefile.am
deleted file mode 100644
index 4770437d8eeb..000000000000
--- a/devel/ois/files/patch-src-Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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 $"
diff --git a/devel/ois/files/patch-src-linux-LinuxInputManager.cpp b/devel/ois/files/patch-src-linux-LinuxInputManager.cpp
deleted file mode 100644
index 9f902b77e08d..000000000000
--- a/devel/ois/files/patch-src-linux-LinuxInputManager.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
---- 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;
- 	}
- }
diff --git a/devel/ois/files/patch-src-linux-LinuxMouse.cpp b/devel/ois/files/patch-src-linux-LinuxMouse.cpp
deleted file mode 100644
index 5a6a551d2731..000000000000
--- a/devel/ois/files/patch-src-linux-LinuxMouse.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
---- src/linux/LinuxMouse.cpp	(revision 1090)
-+++ src/linux/LinuxMouse.cpp	(working copy)
-@@ -156,29 +156,28 @@
- 	char mask[4] = {0,1,4,2};
- 	XEvent event;
- 
--	//Poll x11 for events mouse events
--	while( XPending(display) > 0 ) 
-+	Window u1; int u2;
-+	Window current_win;
-+	int x, y;
-+	unsigned int mmask;
-+
-+	if (XQueryPointer(display, window, &u1, &current_win, &u2, &u2, &x, &y, &mmask))
- 	{
--		XNextEvent(display, &event);
--
--		if( event.type == MotionNotify )
--		{	//Mouse moved
--			//Ignore out of bounds mouse if we just warped
--			if( mWarped )
--			{
--				if(event.xmotion.x < 5 || event.xmotion.x > mState.width - 5 ||
--				   event.xmotion.y < 5 || event.xmotion.y > mState.height - 5)
--					continue;
--			}
--
-+		//Ignore out of bounds mouse if we just warped
-+		if(mWarped && (x < 5 || x > mState.width - 5 || y < 5 || y > mState.height - 5))
-+		{
-+			// ignored
-+ 		}
-+		else if (!(oldXMouseX == x && oldXMouseY == y))
-+		{
- 			//Compute this frames Relative X & Y motion
--			mState.X.rel = event.xmotion.x - oldXMouseX;
--			mState.Y.rel = event.xmotion.y - oldXMouseY;
--		
-+			mState.X.rel = x - oldXMouseX;
-+			mState.Y.rel = y - oldXMouseY;
-+			
- 			//Store old values for next time to compute relative motion
--			oldXMouseX = event.xmotion.x;
--			oldXMouseY = event.xmotion.y;
--
-+			oldXMouseX = x;
-+			oldXMouseY = y;
-+			
- 			mState.X.abs += mState.X.rel;
- 			mState.Y.abs += mState.Y.rel;
- 
-@@ -198,8 +197,8 @@
- 				if( mouseFocusLost == false )
- 				{
- 					//Keep mouse in window (fudge factor)
--					if(event.xmotion.x < 5 || event.xmotion.x > mState.width - 5 ||
--					   event.xmotion.y < 5 || event.xmotion.y > mState.height - 5 )
-+					if(x < 5 || x > mState.width - 5 ||
-+					   y < 5 || y > mState.height - 5 )
- 					{
- 						oldXMouseX = mState.width >> 1;  //center x
- 						oldXMouseY = mState.height >> 1; //center y
-@@ -210,8 +209,16 @@
- 			}
- 			mMoved = true;
- 		}
--		else if( event.type == ButtonPress )
--		{	//Button down
-+	}
-+
-+
-+	//Poll x11 for events mouse events
-+	while( XPending(display) > 0 )
-+	{
-+		XNextEvent(display, &event);
-+
-+		if( event.type == ButtonPress )
-+		{   //Button down
- 			static_cast<LinuxInputManager*>(mCreator)->_setGrabState(true);
- 
- 			if( event.xbutton.button < 4 )
- 	  	 
diff --git a/devel/ois/pkg-plist b/devel/ois/pkg-plist
index 7f8ac8c148f1..a9e4e90ad5e7 100644
--- a/devel/ois/pkg-plist
+++ b/devel/ois/pkg-plist
@@ -1,18 +1,21 @@
-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
+%%DEMOS%%bin/OIS-ConsoleDemo
+%%DEMOS%%bin/OIS-FFConsoleDemo
+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/OISMultiTouch.h
+include/ois/OISObject.h
+include/ois/OISPrereqs.h
 lib/libOIS.so
+lib/libOIS.so.1.5.0
+lib/libOIS.so.1.5.1
 libdata/pkgconfig/OIS.pc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212142023.2BEKNhsc093331>