Commit fa596b0c authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot
Browse files

Merge topic 'add-vrpn-build-options' into release

1d827a92

 vrpn: update to enable HID on Mac and Windows
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !747
parents b11fa7ca 1d827a92
......@@ -14,8 +14,6 @@ superbuild_add_project(vrpn
-DVRPN_BUILD_PYTHON_HANDCODED_2X:BOOL=OFF
-DVRPN_BUILD_PYTHON_HANDCODED_3X:BOOL=OFF
-DVRPN_BUILD_TEST_RPC_GENERATION:BOOL=OFF
-DVRPN_USE_HID:BOOL=ON
-DVRPN_USE_LOCAL_HIDAPI:BOOL=ON
)
# Backported from upstream commit 70d47fec7e3be85f5f05c8ac5be99dacbd8be257.
superbuild_apply_patch(vrpn wait3-removal
"Remove wait3 usage")
diff -u -Nru5 vrpn-a545ef6415f0026aabdbdb1d7fdbefeb91c47d4f/vrpn_Connection.C vrpn-a545ef6415f0026aabdbdb1d7fdbefeb91c47d4f.wait3-removal/vrpn_Connection.C
--- vrpn-a545ef6415f0026aabdbdb1d7fdbefeb91c47d4f/vrpn_Connection.C 2015-06-12 19:19:42.000000000 -0400
+++ vrpn-a545ef6415f0026aabdbdb1d7fdbefeb91c47d4f.wait3-removal/vrpn_Connection.C 2019-10-03 10:47:49.606779378 -0400
@@ -82,11 +82,11 @@
#include <arpa/nameser.h>
#include <resolv.h> // for herror() - but it isn't there?
#endif
#ifndef VRPN_USE_WINSOCK_SOCKETS
-#include <sys/wait.h> // for wait, wait3, WNOHANG
+#include <sys/wait.h> // for waitpid, WNOHANG
#ifndef __CYGWIN__
#include <netinet/tcp.h> // for TCP_NODELAY
#endif /* __CYGWIN__ */
#endif /* VRPN_USE_WINSOCK_SOCKETS */
@@ -213,26 +213,10 @@
const char *vrpn_dropped_last_connection =
"VRPN_Connection_Dropped_Last_Connection";
const char *vrpn_CONTROL = "VRPN Control";
-//**********************************************************************
-//** This section has been pulled from the "SDI" library and had its
-//** functions renamed to vrpn_ from sdi_. This removes our dependence
-//** on libsdi.a for VRPN.
-
-#ifdef sparc
-
-// On capefear and swift, getdtablesize() isn't declared in unistd.h
-// even though the man page says it should be. Similarly, wait3()
-// isn't declared in sys/{wait,time,resource}.h.
-extern "C" {
-extern int getdtablesize(void);
-pid_t wait3(int *statusp, int options, struct rusage *rusage);
-}
-#endif
-
/* On HP's, this defines how many possible open file descriptors can be
* open at once. This is what is returned by the getdtablesize() function
* on other architectures. */
#ifdef hpux
#define getdtablesize() MAXFUPLIM
@@ -2438,11 +2422,11 @@
static int vrpn_start_server(const char *machine, char *server_name, char *args,
const char *IPaddress = NULL)
{
#if defined(VRPN_USE_WINSOCK_SOCKETS) || defined(__CYGWIN__)
fprintf(stderr, "VRPN: vrpn_start_server not ported"
- " for windows winsocks or cygwin!\n");
+ " for windows winsock or cygwin!\n");
IPaddress = IPaddress;
args = args;
server_name = server_name;
machine = machine;
return -1;
@@ -2516,15 +2500,11 @@
* this while waiting for the callback. */
for (waitloop = 0; waitloop < (SERVCOUNT); waitloop++) {
int ret;
pid_t deadkid;
-#if defined(sparc) || defined(FreeBSD) || defined(_AIX) || defined(__ANDROID__)
- int status; // doesn't exist on sparc_solaris or FreeBSD
-#else
- union wait status;
-#endif
+ int status;
/* Check to see if they called back yet. */
ret = vrpn_poll_for_accept(server_sock, &child_socket, SERVWAIT);
if (ret == -1) {
fprintf(stderr, "vrpn_start_server: Accept poll failed\n");
@@ -2533,18 +2513,11 @@
}
if (ret == 1) {
break; // Got it!
}
-/* Check to see if the child is dead yet */
-#if defined(hpux) || defined(sgi) || defined(__hpux) || defined(__CYGWIN__) || \
- defined(__APPLE__)
- /* hpux include files have the wrong declaration */
- deadkid = wait3((int *)&status, WNOHANG, NULL);
-#else
- deadkid = wait3(&status, WNOHANG, NULL);
-#endif
+ deadkid = waitpid(-1, &status, WNOHANG);
if (deadkid == pid) {
fprintf(stderr, "vrpn_start_server: server process exited\n");
vrpn_closeSocket(server_sock);
return (-1);
}
superbuild_add_project(vrpn
CMAKE_ARGS
# GPM support is enabled if GPM is found on the machine. This later ends up
# complaining that it is GPL stuff and needs another flag to work. We never
# want this, so just always disable it.
-DVRPN_USE_GPM_MOUSE:BOOL=OFF
# We want the new parser; without this, some FindJava syntax errors pop up
# with newer CMake binaries. This is easier than a patch.
-DCMAKE_POLICY_DEFAULT_CMP0053:STRING=NEW
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DPYTHON_ENABLE_MODULE_vrpn-python:BOOL=OFF
-DVRPN_BUILD_JAVA:BOOL=OFF
-DVRPN_BUILD_PYTHON_HANDCODED_2X:BOOL=OFF
-DVRPN_BUILD_PYTHON_HANDCODED_3X:BOOL=OFF
-DVRPN_BUILD_TEST_RPC_GENERATION:BOOL=OFF
)
superbuild_add_project(vrpn
CMAKE_ARGS
# GPM support is enabled if GPM is found on the machine. This later ends up
# complaining that it is GPL stuff and needs another flag to work. We never
# want this, so just always disable it.
-DVRPN_USE_GPM_MOUSE:BOOL=OFF
# We want the new parser; without this, some FindJava syntax errors pop up
# with newer CMake binaries. This is easier than a patch.
-DCMAKE_POLICY_DEFAULT_CMP0053:STRING=NEW
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DPYTHON_ENABLE_MODULE_vrpn-python:BOOL=OFF
-DVRPN_BUILD_JAVA:BOOL=OFF
-DVRPN_BUILD_PYTHON_HANDCODED_2X:BOOL=OFF
-DVRPN_BUILD_PYTHON_HANDCODED_3X:BOOL=OFF
-DVRPN_BUILD_TEST_RPC_GENERATION:BOOL=OFF
-DVRPN_USE_HID:BOOL=ON
-DVRPN_USE_LOCAL_HIDAPI:BOOL=ON
)
......@@ -50,8 +50,8 @@ superbuild_set_selectable_source(paraview
superbuild_set_revision(vrpn
# https://github.com/vrpn/vrpn.git
URL "https://www.paraview.org/files/dependencies/vrpn-a545ef6415f0026aabdbdb1d7fdbefeb91c47d4f.tar.bz2"
URL_MD5 e1686f664c00519a251a50d6a8e328d5)
URL "https://www.paraview.org/files/dependencies/vrpn-45375f61de4c1a7bb95fe5a9264ac48a5d395404.tar.bz2"
URL_MD5 bce3ed067ea68c7cc115e3f2dfacc7ca)
superbuild_set_revision(vortexfinder2
# https://github.com/hguo/vortexfinder2.git
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment