]> git.pld-linux.org Git - packages/vrpn.git/commitdiff
- added modbus patch (libmodbus detection and usage fixes), enabled modbus support
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Dec 2014 20:55:14 +0000 (21:55 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Dec 2014 20:55:14 +0000 (21:55 +0100)
vrpn-modbus.patch [new file with mode: 0644]
vrpn.spec

diff --git a/vrpn-modbus.patch b/vrpn-modbus.patch
new file mode 100644 (file)
index 0000000..86a5cd0
--- /dev/null
@@ -0,0 +1,40 @@
+--- vrpn/cmake/FindModbus.cmake.orig   2014-11-15 20:29:36.000000000 +0100
++++ vrpn/cmake/FindModbus.cmake        2014-12-27 20:17:25.953165184 +0100
+@@ -46,6 +46,7 @@
+       "${MODBUS_ROOT_DIR}"
+       PATH_SUFFIXES
+       include
++      include/modbus
+       PATHS
+       "${_progfiles}/libmodbus"
+       C:/usr/local
+@@ -54,6 +55,7 @@
+ # Look for the library.
+ find_library(MODBUS_LIBRARY
+       NAMES
++      modbus
+       libmodbus.lib
+       libmodbus.a
+       HINTS
+--- vrpn/vrpn_OmegaTemperature.h.orig  2014-11-15 20:29:37.000000000 +0100
++++ vrpn/vrpn_OmegaTemperature.h       2014-12-27 21:09:49.579699911 +0100
+@@ -31,7 +31,7 @@
+ #     2       Turn temperature control on/off (0 = off, otherwise on)
+ */
+-#if defined(VRPN_USE_MODBUS) && defined(VRPN_USE_WINSOCK2)
++#if defined(VRPN_USE_MODBUS)
+ #include <modbus.h>
+ class VRPN_API vrpn_OmegaTemperature: public vrpn_Serial_Analog,
+--- vrpn/vrpn_OmegaTemperature.C.orig  2014-11-15 20:29:37.000000000 +0100
++++ vrpn/vrpn_OmegaTemperature.C       2014-12-27 21:09:12.179701499 +0100
+@@ -72,7 +72,7 @@
+ VRPN_SUPPRESS_EMPTY_OBJECT_WARNING()
+-#if defined(VRPN_USE_MODBUS) && defined(VRPN_USE_WINSOCK2)
++#if defined(VRPN_USE_MODBUS)
+ #undef VERBOSE
index 46f073baeeec93a3af83860a4b329a0188e2a740..c1fd7b02dfd40e3ca8619dab79abc6700723eb35 100644 (file)
--- a/vrpn.spec
+++ b/vrpn.spec
@@ -1,9 +1,10 @@
-# TODO: modbus, system hidapi, openhaptics, ghost, wiiuse(GPL v3), libnifalcon, intersense, nidaqmx, viewpoint, phasespace, libfreespace
+# TODO: openhaptics, ghost, wiiuse(GPL v3), libnifalcon, intersense, nidaqmx, viewpoint, phasespace, libfreespace
 # NATIONAL_INSTRUMENTS, NIDAQ, USDIGITAL, MICROSCRIBE, MONITONNODE, TRIVISIOCOLIBRI ???
 #
 # Conditional build:
 %bcond_without apidocs         # do not build and package API docs
 %bcond_without gpm             # GPM Linux mouse interface support (GPL v2+)
+%bcond_without modbus          # Modbus support
 %bcond_with    mpi             # MPI support
 %bcond_without java            # Java binding
 #
@@ -20,6 +21,7 @@ Source0:      http://www.cs.unc.edu/Research/vrpn/downloads/%{name}_%{fver}.zip
 # Source0-md5: 6cb32e51e6420385f2006f1aae58b457
 Patch0:                %{name}-install.patch
 Patch1:                %{name}-jsoncpp.patch
+Patch2:                %{name}-modbus.patch
 URL:           http://www.cs.unc.edu/Research/vrpn/
 BuildRequires: cmake >= 2.8.3
 %{?with_apidocs:BuildRequires: doxygen}
@@ -27,6 +29,7 @@ BuildRequires:        cmake >= 2.8.3
 BuildRequires: hidapi-devel >= 0.7.0
 BuildRequires: jdk
 BuildRequires: jsoncpp-devel >= 0.7.0
+%{?with_modbus:BuildRequires:  libmodbus-devel}
 BuildRequires: libstdc++-devel
 BuildRequires: libusb-devel >= 1.0
 %{?with_mpi:BuildRequires:     mpi-devel}
@@ -118,6 +121,7 @@ Wiązania Pythona do bibliotek VRPN.
 %setup -q -n %{name}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 install -d build
@@ -128,6 +132,7 @@ cd build
        -DVRPN_USE_GPM_MOUSE=%{?with_gpm:ON}%{!?with_gpm:OFF} \
        -DVRPN_USE_LOCAL_HIDAPI=OFF \
        -DVRPN_USE_LOCAL_JSONCPP=OFF \
+       %{?with_modbus:-DVRPN_USE_MODBUS=ON} \
        -DVRPN_USE_MPI=%{?with_mpi:ON}%{!?with_mpi:OFF} \
        -DVRPN_BUILD_PYTHON=ON
 
This page took 0.082915 seconds and 4 git commands to generate.