Compare commits

..

1 commit

Author SHA1 Message Date
Dmitry Mikhirev
00152408ca fix installation of python3 module (#1342509) 2016-06-08 21:52:11 +03:00
13 changed files with 741 additions and 2031 deletions

1
.gitignore vendored
View file

@ -1,2 +1 @@
/vrpn-version_07.33.tar.gz
/vrpn-07.35.tar.gz

View file

@ -1,23 +0,0 @@
From 1b4676b3cf8bbaff2f75c8e41b005401b189b2e2 Mon Sep 17 00:00:00 2001
From: Russ Taylor <russ@reliasolve.com>
Date: Sun, 1 Jan 2023 11:34:16 -0500
Subject: [PATCH] Extending range of Python version search to support two-digit
minor version to include 3.10 and 3.11
---
python/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 8c3870f69..c2ea7707e 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -3,7 +3,7 @@ if(PYTHONLIBS_FOUND AND (VRPN_BUILD_PYTHON_HANDCODED_2X OR VRPN_BUILD_PYTHON_HAN
include_directories(${PYTHON_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}")
set(PYTHONVERSIONDIR python)
- if(PYTHON_LIBRARY MATCHES "python([23].[0-9])")
+ if(PYTHON_LIBRARY MATCHES "python([23].[0-9]+)")
set(PYTHONVERSIONDIR "python${CMAKE_MATCH_1}/")
endif()

View file

@ -1 +1 @@
SHA512 (vrpn-07.35.tar.gz) = 115a37849e7a2d30c1d4cc69b2d9204297497b17591ff19255272b59730388e2c0c157f8e6a7e6f0150cf2469622561c3021964295624833b9da4f6550d4581b
ad1475cdcc2572fcf447f8e88404f753 vrpn-version_07.33.tar.gz

24
vrpn-config_install.patch Normal file
View file

@ -0,0 +1,24 @@
Index: vrpn-version_07.33/server_src/CMakeLists.txt
===================================================================
--- vrpn-version_07.33.orig/server_src/CMakeLists.txt
+++ vrpn-version_07.33/server_src/CMakeLists.txt
@@ -143,13 +143,18 @@ configure_file("${CMAKE_CURRENT_SOURCE_D
@ONLY)
if(VRPN_INSTALL)
+ set(SYSCONF_INSTALL_DIR
+ etc
+ CACHE
+ PATH
+ "Directory to install configuration files")
if(WIN32)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vrpn.cfg"
DESTINATION bin
COMPONENT mainserver)
else()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vrpn.cfg"
- DESTINATION etc
+ DESTINATION ${SYSCONF_INSTALL_DIR}
COMPONENT mainserver)
endif()

View file

@ -1,76 +0,0 @@
diff -Naur a/client_src/CMakeLists.txt b/client_src/CMakeLists.txt
--- a/client_src/CMakeLists.txt 2022-05-30 10:26:37.000000000 -0700
+++ b/client_src/CMakeLists.txt 2023-10-28 09:05:05.727862781 -0700
@@ -76,9 +76,6 @@
target_link_libraries(${APP} ${VRPN_CLIENT_LIBRARY})
set_target_properties(${APP} PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS ${APP} RUNTIME DESTINATION bin COMPONENT tests)
- endif()
endforeach()
add_test(test_imager test_imager)
@@ -98,16 +95,6 @@
${OPENGL_LIBRARIES})
set_target_properties(testimager_client PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS
- testimager_client
- RUNTIME
- DESTINATION
- bin
- COMPONENT
- tests)
- endif()
-
if(VRPN_GLUT_IS_STATIC_FREEGLUT)
set_property(TARGET
testimager_client
@@ -154,17 +141,6 @@
set_target_properties(c_interface_example PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS
- c_interface_example
- RUNTIME
- DESTINATION
- bin
- COMPONENT
- tests)
- endif()
-
-
###
# Clients
###
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2023-10-28 09:03:46.843029423 -0700
+++ b/CMakeLists.txt 2023-10-28 09:05:27.864096634 -0700
@@ -1458,9 +1458,6 @@
add_executable(${APP} ${SOURCE})
target_link_libraries(${APP} vrpnserver)
set_target_properties(${APP} PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS ${APP} RUNTIME DESTINATION bin COMPONENT tests)
- endif()
endforeach()
endif()
diff -Naur a/server_src/CMakeLists.txt b/server_src/CMakeLists.txt
--- a/server_src/CMakeLists.txt 2023-10-28 09:03:46.845029444 -0700
+++ b/server_src/CMakeLists.txt 2023-10-28 09:05:16.033971660 -0700
@@ -217,11 +217,6 @@
add_executable(${APP} ${SOURCE})
target_link_libraries(${APP} ${VRPN_SERVER_LIBRARY})
set_target_properties(${APP} PROPERTIES FOLDER Tests)
-
- if(VRPN_INSTALL)
- install(TARGETS ${APP}
- RUNTIME DESTINATION bin COMPONENT tests)
- endif()
endforeach()
add_test(test_vrpn test_vrpn)
add_test(test_loopback test_loopback)

View file

@ -0,0 +1,103 @@
Index: vrpn-version_07.33/client_src/CMakeLists.txt
===================================================================
--- vrpn-version_07.33.orig/client_src/CMakeLists.txt
+++ vrpn-version_07.33/client_src/CMakeLists.txt
@@ -74,9 +74,9 @@ if(VRPN_BUILD_CLIENTS)
target_link_libraries(${APP} ${VRPN_CLIENT_LIBRARY})
set_target_properties(${APP} PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS ${APP} RUNTIME DESTINATION bin COMPONENT tests)
- endif()
+ #if(VRPN_INSTALL)
+ # install(TARGETS ${APP} RUNTIME DESTINATION bin COMPONENT tests)
+ #endif()
endforeach()
if(GLUT_FOUND AND OPENGL_FOUND)
@@ -89,15 +89,15 @@ if(VRPN_BUILD_CLIENTS)
set_target_properties(testimager_client PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS
- testimager_client
- RUNTIME
- DESTINATION
- bin
- COMPONENT
- tests)
- endif()
+ #if(VRPN_INSTALL)
+ # install(TARGETS
+ # testimager_client
+ # RUNTIME
+ # DESTINATION
+ # bin
+ # COMPONENT
+ # tests)
+ #endif()
option(VRPN_GLUT_IS_STATIC_FREEGLUT
"Is the GLUT used for the imaging test client a static build of FreeGLUT?"
NO)
@@ -121,15 +121,15 @@ if(VRPN_BUILD_CLIENTS)
set_target_properties(c_interface_example PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS
- c_interface_example
- RUNTIME
- DESTINATION
- bin
- COMPONENT
- tests)
- endif()
+ #if(VRPN_INSTALL)
+ # install(TARGETS
+ # c_interface_example
+ # RUNTIME
+ # DESTINATION
+ # bin
+ # COMPONENT
+ # tests)
+ #endif()
###
Index: vrpn-version_07.33/server_src/CMakeLists.txt
===================================================================
--- vrpn-version_07.33.orig/server_src/CMakeLists.txt
+++ vrpn-version_07.33/server_src/CMakeLists.txt
@@ -219,10 +219,10 @@ if(BUILD_TESTING)
target_link_libraries(${APP} ${VRPN_SERVER_LIBRARY})
set_target_properties(${APP} PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS ${APP}
- RUNTIME DESTINATION bin COMPONENT tests)
- endif()
+ #if(VRPN_INSTALL)
+ # install(TARGETS ${APP}
+ # RUNTIME DESTINATION bin COMPONENT tests)
+ #endif()
endforeach()
add_test(test_loopback test_loopback)
add_test(test_vrpn test_vrpn)
Index: vrpn-version_07.33/CMakeLists.txt
===================================================================
--- vrpn-version_07.33.orig/CMakeLists.txt
+++ vrpn-version_07.33/CMakeLists.txt
@@ -1393,9 +1393,9 @@ if(VRPN_BUILD_SERVERS AND VRPN_BUILD_SER
add_executable(${APP} ${SOURCE})
target_link_libraries(${APP} vrpnserver)
set_target_properties(${APP} PROPERTIES FOLDER Tests)
- if(VRPN_INSTALL)
- install(TARGETS ${APP} RUNTIME DESTINATION bin COMPONENT tests)
- endif()
+ #if(VRPN_INSTALL)
+ # install(TARGETS ${APP} RUNTIME DESTINATION bin COMPONENT tests)
+ #endif()
endforeach()
endif()

20
vrpn-find_hidapi.patch Normal file
View file

@ -0,0 +1,20 @@
Index: vrpn-version_07.33/cmake/FindHIDAPI.cmake
===================================================================
--- vrpn-version_07.33.orig/cmake/FindHIDAPI.cmake
+++ vrpn-version_07.33/cmake/FindHIDAPI.cmake
@@ -24,10 +24,13 @@
# http://www.boost.org/LICENSE_1_0.txt)
find_library(HIDAPI_LIBRARY
- NAMES hidapi)
+ NAMES hidapi hidapi-libusb)
find_path(HIDAPI_INCLUDE_DIR
- NAMES hidapi.h)
+ NAMES hidapi.h
+ PATH_SUFFIXES
+ include
+ include/hidapi)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HIDAPI

12
vrpn-find_jsoncpp.patch Normal file
View file

@ -0,0 +1,12 @@
Index: vrpn-version_07.33/cmake/FindJsonCpp.cmake
===================================================================
--- vrpn-version_07.33.orig/cmake/FindJsonCpp.cmake
+++ vrpn-version_07.33/cmake/FindJsonCpp.cmake
@@ -69,6 +69,7 @@ list(APPEND _jsoncppnames
find_library(JSONCPP_LIBRARY
NAMES
+ jsoncpp
${_jsoncppnames}
PATHS
"${JSONCPP_ROOT_DIR}/libs"

View file

@ -1,7 +1,8 @@
diff -Naur a/cmake/FindModbus.cmake b/cmake/FindModbus.cmake
--- a/cmake/FindModbus.cmake 2022-05-30 10:26:37.000000000 -0700
+++ b/cmake/FindModbus.cmake 2023-10-28 08:57:58.065173100 -0700
@@ -47,16 +47,16 @@
Index: vrpn-version_07.33/cmake/FindModbus.cmake
===================================================================
--- vrpn-version_07.33.orig/cmake/FindModbus.cmake
+++ vrpn-version_07.33/cmake/FindModbus.cmake
@@ -46,16 +46,16 @@ find_path(MODBUS_INCLUDE_DIR
"${MODBUS_ROOT_DIR}"
PATH_SUFFIXES
include

View file

@ -0,0 +1,160 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a03978b..0ad0c6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1245,16 +1245,10 @@ if(VRPN_BUILD_SERVER_LIBRARY)
if(VRPN_INSTALL)
install(TARGETS
vrpnserver
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- serversdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- serversdk)
+ RUNTIME DESTINATION bin COMPONENT serversdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ PUBLIC_HEADER DESTINATION include COMPONENT serversdk)
endif()
add_cppcheck(vrpnserver STYLE UNUSED_FUNCTIONS)
endif()
@@ -1292,16 +1286,10 @@ if(VRPN_BUILD_CLIENT_LIBRARY)
if(VRPN_INSTALL)
install(TARGETS
vrpn
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- clientsdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- clientsdk)
+ RUNTIME DESTINATION bin COMPONENT clientsdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT clientsdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT clientsdk
+ PUBLIC_HEADER DESTINATION include COMPONENT clientsdk)
endif()
add_cppcheck(vrpn STYLE UNUSED_FUNCTIONS)
endif()
diff --git a/atmellib/CMakeLists.txt b/atmellib/CMakeLists.txt
index 30d51f1..003785c 100644
--- a/atmellib/CMakeLists.txt
+++ b/atmellib/CMakeLists.txt
@@ -24,14 +24,8 @@ set_property(TARGET
if(VRPN_INSTALL)
install(TARGETS
vrpn_atmel
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- serversdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- serversdk)
+ RUNTIME DESTINATION bin COMPONENT serversdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ PUBLIC_HEADER DESTINATION include COMPONENT serversdk)
endif()
diff --git a/gpsnmealib/CMakeLists.txt b/gpsnmealib/CMakeLists.txt
index fee7b3a..9a34e2d 100644
--- a/gpsnmealib/CMakeLists.txt
+++ b/gpsnmealib/CMakeLists.txt
@@ -25,14 +25,8 @@ set_property(TARGET gpsnmea PROPERTY FOLDER "Library")
if(VRPN_INSTALL)
install(TARGETS
gpsnmea
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- serversdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- serversdk)
-endif()
\ No newline at end of file
+ RUNTIME DESTINATION bin COMPONENT serversdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ PUBLIC_HEADER DESTINATION include COMPONENT serversdk)
+endif()
diff --git a/quat/CMakeLists.txt b/quat/CMakeLists.txt
index 597776e..8d48c94 100644
--- a/quat/CMakeLists.txt
+++ b/quat/CMakeLists.txt
@@ -38,28 +38,16 @@ set_target_properties(quat PROPERTIES FOLDER Library)
if(VRPN_INSTALL)
install(TARGETS
quat
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- serversdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- serversdk)
+ RUNTIME DESTINATION bin COMPONENT serversdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ PUBLIC_HEADER DESTINATION include COMPONENT serversdk)
install(TARGETS
quat
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- clientsdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- clientsdk)
+ RUNTIME DESTINATION bin COMPONENT clientsdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT clientsdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT clientsdk
+ PUBLIC_HEADER DESTINATION include COMPONENT clientsdk)
endif()
add_subdirectory(testapps)
diff --git a/server_src/timecode_generator_server/CMakeLists.txt b/server_src/timecode_generator_server/CMakeLists.txt
index 5f8dce6..925bc44 100644
--- a/server_src/timecode_generator_server/CMakeLists.txt
+++ b/server_src/timecode_generator_server/CMakeLists.txt
@@ -25,14 +25,8 @@ set_target_properties(vrpn_timecode_generator
if(VRPN_INSTALL)
install(TARGETS
vrpn_timecode_generator
- ARCHIVE
- DESTINATION
- lib
- COMPONENT
- serversdk
- PUBLIC_HEADER
- DESTINATION
- include
- COMPONENT
- serversdk)
-endif()
\ No newline at end of file
+ RUNTIME DESTINATION bin COMPONENT serversdk
+ LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT serversdk
+ PUBLIC_HEADER DESTINATION include COMPONENT serversdk)
+endif()

177
vrpn-java_install.patch Normal file
View file

@ -0,0 +1,177 @@
Index: vrpn-version_07.33/java_vrpn/CMakeLists.txt
===================================================================
--- vrpn-version_07.33.orig/java_vrpn/CMakeLists.txt
+++ vrpn-version_07.33/java_vrpn/CMakeLists.txt
@@ -6,6 +6,29 @@
if(JAVA_FOUND AND JNI_FOUND AND JAVAH_EXECUTABLE AND VRPN_BUILD_JAVA)
+ set(JAVA_INSTALL_LIBDIR
+ lib
+ CACHE PATH
+ "Where to install java shared objects")
+ set(JAVA_INSTALL_JNIDIR
+ share/java
+ CACHE PATH
+ "Where to install JNI jar files")
+
+ if("${JAVA_INSTALL_LIBDIR}" STREQUAL lib)
+ set(JAVA_LOAD_VRPN
+ "System.loadLibrary(\"java_vrpn\")")
+ else()
+ if(IS_ABSOLUTE "${JAVA_INSTALL_LIBDIR}")
+ set(JAVA_LOAD_VRPN
+ "System.load(\"${JAVA_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}java_vrpn${CMAKE_SHARED_LIBRARY_SUFFIX}\")")
+ else()
+ set(JAVA_LOAD_VRPN
+ "System.load(\"${CMAKE_INSTALL_PREFIX}/${JAVA_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}java_vrpn${CMAKE_SHARED_LIBRARY_SUFFIX}\")")
+ endif()
+ endif()
+ configure_file("vrpn/VRPN.java.in" "vrpn/VRPN.java")
+
# Set up file lists
set(JAVA_CLASSES
AnalogOutputRemote
@@ -22,7 +45,6 @@ if(JAVA_FOUND AND JNI_FOUND AND JAVAH_EX
TextSender
TrackerRemote
TrackerRemoteListener
- VRPN
VRPNDevice)
set(JAVAC_OUTPUT)
set(JAVAC_INPUT)
@@ -38,6 +60,15 @@ if(JAVA_FOUND AND JNI_FOUND AND JAVAH_EX
JAVA_JNI_HEADERS
"${CMAKE_CURRENT_BINARY_DIR}/vrpn_${class}.h")
endforeach()
+ list(APPEND
+ JAVAC_OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/vrpn/VRPN.class")
+ list(APPEND
+ JAVAC_INPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/vrpn/VRPN.java")
+ list(APPEND
+ JAVA_JNI_HEADERS
+ "${CMAKE_CURRENT_BINARY_DIR}/vrpn_VRPN.h")
# *.java -> *.class
add_custom_command(OUTPUT
@@ -87,6 +118,20 @@ if(JAVA_FOUND AND JNI_FOUND AND JAVAH_EX
COMMENT
"Generating JNI header file for vrpn.${in}")
endforeach()
+ add_custom_command(OUTPUT
+ "${CMAKE_CURRENT_BINARY_DIR}/vrpn_VRPN.h"
+ DEPENDS
+ "${CMAKE_CURRENT_BINARY_DIR}/vrpn/VRPN.class"
+ COMMAND
+ "${JAVAH_EXECUTABLE}"
+ -d
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ -jni
+ -classpath
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ vrpn.VRPN
+ COMMENT
+ "Generating JNI header file for vrpn.${in}")
# target for vrpn.jar
add_custom_target(java_vrpn_jar
@@ -120,12 +165,15 @@ if(JAVA_FOUND AND JNI_FOUND AND JAVAH_EX
if(VRPN_INSTALL)
install(TARGETS java_vrpn
- ARCHIVE DESTINATION lib COMPONENT java
- LIBRARY DESTINATION lib COMPONENT java
- RUNTIME DESTINATION lib COMPONENT java)
+ ARCHIVE DESTINATION "${JAVA_INSTALL_LIBDIR}"
+ COMPONENT java
+ LIBRARY DESTINATION "${JAVA_INSTALL_LIBDIR}"
+ COMPONENT java
+ RUNTIME DESTINATION "${JAVA_INSTALL_LIBDIR}"
+ COMPONENT java)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vrpn.jar"
- DESTINATION share/java
+ DESTINATION "${JAVA_INSTALL_JNIDIR}"
COMPONENT java
RENAME vrpn-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.jar)
endif()
Index: vrpn-version_07.33/java_vrpn/vrpn/VRPN.java
===================================================================
--- vrpn-version_07.33.orig/java_vrpn/vrpn/VRPN.java
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-package vrpn;
-
-public class VRPN
-{
-
- /**
- * All VRPN objects must assert this lock before making any calls
- * into native code. A corollary of this is that no native methods
- * may be public; all native methods must be wrapped by other methods
- * that first synchronize on this lock before calling the native
- * method.
- */
- protected final static Object downInVrpnLock = new Object( );
-
- static
- {
- try { System.loadLibrary( "java_vrpn" ); }
- catch( UnsatisfiedLinkError e )
- {
- System.out.println( e.getMessage( ) );
- System.out.println( "Error initializing java_vrpn." );
- System.out.println( " -- Unable to find native library." );
- }
- catch( SecurityException e )
- {
- System.out.println( e.getMessage( ) );
- System.out.println( "Security exception: you couldn't load the native vrpn dll." );
- }
- } // end static initializer block
-
-
-} // end class VRPN
Index: vrpn-version_07.33/java_vrpn/vrpn/VRPN.java.in
===================================================================
--- /dev/null
+++ vrpn-version_07.33/java_vrpn/vrpn/VRPN.java.in
@@ -0,0 +1,34 @@
+
+
+package vrpn;
+
+public class VRPN
+{
+
+ /**
+ * All VRPN objects must assert this lock before making any calls
+ * into native code. A corollary of this is that no native methods
+ * may be public; all native methods must be wrapped by other methods
+ * that first synchronize on this lock before calling the native
+ * method.
+ */
+ protected final static Object downInVrpnLock = new Object( );
+
+ static
+ {
+ try { @JAVA_LOAD_VRPN@; }
+ catch( UnsatisfiedLinkError e )
+ {
+ System.out.println( e.getMessage( ) );
+ System.out.println( "Error initializing java_vrpn." );
+ System.out.println( " -- Unable to find native library." );
+ }
+ catch( SecurityException e )
+ {
+ System.out.println( e.getMessage( ) );
+ System.out.println( "Security exception: you couldn't load the native vrpn dll." );
+ }
+ } // end static initializer block
+
+
+} // end class VRPN

File diff suppressed because it is too large Load diff

422
vrpn.spec
View file

@ -1,84 +1,55 @@
# Some of the tests randomly hang, others attempt to spin up various network
# services that don't work properly in mock
%bcond_with tests
Name: vrpn
Version: 07.33
Release: 2%{?dist}
Summary: The Virtual-Reality Peripheral Network
# Python bindings fail to build with Python 3.13 (RHBZ#2247291)
%if 0%{?fedora} > 40
%bcond_with python
%else
%bcond_without python
%endif
# linking to wiiuse (GPLv3+) and gpm (GPLv2+) libraries makes the vrpn server
# (libvrpnserver.so and vrpn_server binary, as well as python and java modules)
# GPLv3+-licensed. The rest of files is supplied under the Boost license.
License: Boost and GPLv3+
URL: https://github.com/vrpn/vrpn/
Source0: https://github.com/vrpn/vrpn/archive/version_%{version}.tar.gz#/%{name}-version_%{version}.tar.gz
Source1: vrpn.service
Patch0: vrpn-find_modbus.patch
Patch1: vrpn-find_hidapi.patch
Patch2: vrpn-find_jsoncpp.patch
# patch3 from upstream commit 7f961a3
Patch3: vrpn-fix_library_install_rules.patch
Patch4: vrpn-java_install.patch
Patch5: vrpn-python_install.patch
Patch6: vrpn-soversion.patch
Patch7: vrpn-config_install.patch
Patch8: vrpn-dont_install_garbage.patch
%global common_description %{expand:
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc
BuildRequires: glut-devel
BuildRequires: gpm-devel
BuildRequires: graphviz
BuildRequires: help2man
BuildRequires: hidapi-devel
BuildRequires: java-devel
BuildRequires: jsoncpp-devel
BuildRequires: libGL-devel
BuildRequires: libmodbus-devel
BuildRequires: libudev-devel
BuildRequires: libusb-devel
BuildRequires: perl-Parse-RecDescent
BuildRequires: python2-devel
BuildRequires: python3-devel
BuildRequires: systemd
BuildRequires: swig
BuildRequires: wiiuse-devel
%{?systemd_requires}
%description
The Virtual-Reality Peripheral Network (VRPN) is a set of classes within a
library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set of
physical devices (tracker, etc.) used in a virtual-reality (VR) system.}
Name: vrpn
Version: 07.35
Release: 11%{?dist}
Summary: Virtual-Reality Peripheral Network
# According to upstream, linking to the wiiuse (GPLv3+) and gpm (GPLv2+)
# libraries makes the vrpn server (libvrpnserver.so and vrpn_server binary, as
# well as the language bindings) GPLv3+. See
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/384#note_1606303642
# for the other licenses.
License: BSL-1.0 AND LicenseRef-Fedora-Public-Domain AND GPL-3.0-or-later
URL: https://github.com/vrpn/vrpn
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: vrpn.service
# Extending range of Python version search to support two-digit minor versions
Patch: %{url}/commit/1b4676b3cf8bbaff2f75c8e41b005401b189b2e2.patch
# Fix modbus libraries detection
Patch: vrpn-find_modbus.patch
%if %{with python}
# Fix Python modules installation
Patch: vrpn-python_install.patch
%endif
# Add soversion to all libraries
Patch: vrpn-soversion.patch
# Do not install binaries only used for unit tests
Patch: vrpn-dont-install-tests.patch
%if %{with python}
BuildRequires: chrpath
%endif
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: perl
BuildRequires: perl-Parse-RecDescent
BuildRequires: sed
BuildRequires: systemd-rpm-macros
BuildRequires: swig
BuildRequires: glut-devel
BuildRequires: gpm-devel
BuildRequires: hidapi-devel
BuildRequires: jsoncpp-devel
BuildRequires: libGL-devel
%ifnarch s390x
BuildRequires: libi2c-devel
%endif
BuildRequires: libmodbus-devel
BuildRequires: libudev-devel
BuildRequires: libusb1-devel
%if %{with python}
BuildRequires: python3-devel
%else
# Drop once f40 is EOL
Provides: python3-vrpn = %{version}-%{release}
Obsoletes: python3-vrpn < 07.35-5
%endif
BuildRequires: wiiuse-devel
%description %{common_description}
The idea is to have a PC or other host at each VR station that controls the
physical devices (tracker, etc.) used in a virtual-reality (VR) system. The
idea is to have a PC or other host at each VR station that controls the
peripherals (tracker, button device, haptic device, analog inputs, sound, etc).
VRPN provides connections between the application and all of the devices using
the appropriate class-of-service for each type of device sharing this link. The
@ -87,237 +58,182 @@ to use VRPN with devices that are directly connected to the machine that the
application is running on, either using separate control programs or running
all as a single program.
%package devel
Summary: Development files for the Virtual-Reality Peripheral Network
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: gpm-devel
Requires: hidapi-devel
Requires: jsoncpp-devel
Requires: libudev-devel
Requires: libusb1-devel
Requires: wiiuse-devel
Summary: Development files for the Virtual-Reality Peripheral Network
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel %{common_description}
%description devel
The Virtual-Reality Peripheral Network (VRPN) is a set of classes within a
library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set of
physical devices (tracker, etc.) used in a virtual-reality (VR) system.
This package contains development files for VRPN libraries.
This package contains development files for the VRPN libraries.
%package doc
Summary: Developer's documentation for VRPN
BuildArch: noarch
Summary: Developer's documentation for VRPN
BuildArch: noarch
%description doc %{common_description}
%description doc
The Virtual-Reality Peripheral Network (VRPN) is a set of classes within a
library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set of
physical devices (tracker, etc.) used in a virtual-reality (VR) system.
This package contains generated VRPN source code documentation.
%if %{with python}
%package java
Summary: Java bindings for the Virtual-Reality Peripheral Network
License: GPLv3+
Requires: java-headless
Requires: javapackages-tools
%description java
The Virtual-Reality Peripheral Network (VRPN) is a set of classes within a
library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set of
physical devices (tracker, etc.) used in a virtual-reality (VR) system.
This package contains Java bindings for VRPN libraries.
%package -n python2-%{name}
Summary: Python 2 bindings for the Virtual-Reality Peripheral Network
License: GPLv3+
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
The Virtual-Reality Peripheral Network (VRPN) is a set of classes within a
library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set of
physical devices (tracker, etc.) used in a virtual-reality (VR) system.
This package contains Python 2 bindings for VRPN libraries.
%package -n python3-%{name}
Summary: Python 3 bindings for the Virtual-Reality Peripheral Network
Summary: Python 3 bindings for the Virtual-Reality Peripheral Network
License: GPLv3+
%description -n python3-%{name} %{common_description}
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name}
The Virtual-Reality Peripheral Network (VRPN) is a set of classes within a
library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set of
physical devices (tracker, etc.) used in a virtual-reality (VR) system.
This package contains Python 3 bindings for VRPN libraries.
This package contains Python 3 bindings for the VRPN libraries.
%endif
%prep
%autosetup -p1
%autosetup -n %{name}-version_%{version} -p1
# Fix binaries path
sed -i 's:/usr/local/bin:%{_bindir}:g' vrpn_Connection.C
%build
mkdir build
pushd build
%cmake \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DOpenGL_GL_PREFERENCE=GLVND \
-DVRPN_GPL_SERVER=ON \
-DBUILD_TESTING=ON \
%if %{with python}
-DVRPN_BUILD_PYTHON_HANDCODED_3X=ON \
-DVRPN_PYTHON_INSTALL_DIR=%{python3_sitearch} \
%endif
%{nil}
%cmake_build
%cmake_build --target doc
-DJAVA_INSTALL_LIBDIR=%{_libdir}/%{name} \
-DJAVA_INSTALL_JNIDIR=%{_jnidir} \
..
%make_build all doc
# now build modules for python2
mv python python3
%cmake \
-DVRPN_BUILD_PYTHON_HANDCODED_3X=OFF \
-DVRPN_BUILD_PYTHON=ON \
-DVRPN_BUILD_PYTHON_HANDCODED_2X=ON \
-DVRPN_PYTHON_INSTALL_DIR=%{python2_sitearch} \
..
%make_build
popd
%install
%cmake_install
%make_install -C build
install -D build/python3/vrpn.so %{buildroot}%{python3_sitearch}/vrpn.so
install -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%if %{with python}
# Install Python module and strip broken rpath
chrpath -d %{_vpath_builddir}/python/vrpn.so
install -Dpm0755 -t %{buildroot}%{python3_sitearch} %{_vpath_builddir}/python/vrpn.so
%endif
# generate man pages
mkdir -p %{buildroot}%{_mandir}/man1
for prog in ./build/server_src/vrpn_server \
./build/client_src/run_auxiliary_logger \
./build/client_src/vrpn_print_{devices,messages,performance}
do
progname=$(basename "$prog")
help2man \
--version-string=%{version} \
--no-info \
--no-discard-stderr \
--output="%{buildroot}%{_mandir}/man1/$progname.1" \
"$prog"
done
# Install systemd service
install -Dpm644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
# Move sample config out of the way
mv %{buildroot}/%{_datadir}/%{name}-%{version}/%{name}.cfg.sample .
%if %{with tests}
%check
%ctest
%endif
pushd build
ctest -VV
popd
%post
/sbin/ldconfig
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart %{name}.service
%files
%doc ChangeLog %{name}.cfg.sample
%doc ChangeLog Format
%license README.Legal
%{_libdir}/lib%{name}*.so.07{,.*}
%{_libdir}/libgpsnmea.so.07{,.*}
%{_libdir}/libquat.so.07{,.*}
%{_bindir}/%{name}*
%{_bindir}/run_auxiliary_logger
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%{_libdir}/*.so.*
%{_bindir}/*
%{_datadir}/%{name}-%{version}
%config(noreplace) %{_sysconfdir}/vrpn.cfg
%{_unitdir}/%{name}.service
%{_mandir}/man1/*
%files devel
%{_includedir}/latLonCoord.h
%{_includedir}/nmeaParser.h
%{_includedir}/quat.h
%{_includedir}/utmCoord.h
%{_includedir}/%{name}*
%{_libdir}/lib%{name}*.so
%{_libdir}/libgpsnmea.so
%{_libdir}/libquat.so
%{_includedir}/*
%{_libdir}/*.so
%files doc
%doc Format_Of_Protocol.txt
%doc %{_docdir}/%{name}-%{version}
%exclude %{_docdir}/%{name}-%{version}/source-docs/html/*.map
%exclude %{_docdir}/%{name}-%{version}/source-docs/html/*.md5
%if %{with python}
%files java
%{_libdir}/%{name}/libjava_%{name}.so
%{_jnidir}/*.jar
%files -n python2-%{name}
%{python2_sitearch}/*.so
%{python2_sitearch}/*.py*
%files -n python3-%{name}
%{python3_sitearch}/*.so
%endif
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 07.35-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sun Mar 22 2026 Björn Esser <besser82@fedoraproject.org> - 07.35-10
- Rebuild (jsoncpp)
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 07.35-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 07.35-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Feb 27 2025 Björn Esser <besser82@fedoraproject.org> - 07.35-7
- Rebuild (jsoncpp)
- Explicitly set CMAKE_POLICY_VERSION_MINIMUM=3.5
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 07.35-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Aug 12 2024 Davide Cavalca <dcavalca@fedoraproject.org> - 07.35-5
- Disable Python bindings on f41 and later; Fixes: RHBZ#2247291
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 07.35-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 07.35-3
- Rebuilt for Python 3.13
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 07.35-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Oct 28 2023 Davide Cavalca <dcavalca@fedoraproject.org> - 07.35-1
- Unretire and update to 07.35; Fixes: RHBZ#2246766
- Rework specfile to comply with the latest packaging guidelines
- Update license tag and convert to SPDX
- Rework package descriptions
- Preserve timestamps when installing files
- Refresh patches and backport and upstream Python fix
- Drop manpage generation because it hangs the build
- Disable tests by default due to flakiness
- Drop the Java bindings, nothing uses them and they don't install properly
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-26
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 07.33-24
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Sat May 30 2020 Björn Esser <besser82@fedoraproject.org> - 07.33-23
- Rebuild (jsoncpp)
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 07.33-22
- Rebuilt for Python 3.9
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Nov 14 2019 Björn Esser <besser82@fedoraproject.org> - 07.33-20
- Rebuild (jsoncpp)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 07.33-19
- Rebuilt for Python 3.8
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 03 2019 Björn Esser <besser82@fedoraproject.org> - 07.33-17
- Rebuild (jsoncpp)
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 07.33-15
- Subpackage python2-vrpn has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 07.33-13
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Dec 26 2017 Björn Esser <besser82@fedoraproject.org> - 07.33-11
- Rebuilt for jsoncpp.so.20
* Sat Sep 02 2017 Björn Esser <besser82@fedoraproject.org> - 07.33-10
- Fix problems with finding JNI on %%arm
* Fri Sep 01 2017 Björn Esser <besser82@fedoraproject.org> - 07.33-9
- Rebuilt for jsoncpp-1.8.3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 07.33-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 07.33-5
- Rebuild for Python 3.6
* Mon Oct 03 2016 Björn Esser <fedora@besser82.io> - 07.33-4
- Rebuilt for libjsoncpp.so.11
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 07.33-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Jun 8 2016 Dmitry Mikhirev <mikhirev@gmail.com> 07.33-2
- Fix build for fc25 (#1341988)
- Fix installation of python 3 module (#1342509)
* Wed Feb 24 2016 Dmitry Mikhirev <mikhirev@gmail.com> 07.33-1