summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch')
-rw-r--r--net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch b/net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch
new file mode 100644
index 000000000000..66d41ed4f47e
--- /dev/null
+++ b/net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch
@@ -0,0 +1,37 @@
+--- a/aux/broker/bindings/python/CMakeLists.txt 2016-03-17 23:26:42.707456012 +0100
++++ b/aux/broker/bindings/python/CMakeLists.txt 2016-03-17 23:28:27.714453166 +0100
+@@ -52,19 +52,21 @@
+ swig_add_module(pybroker python pybroker.i)
+ swig_link_libraries(pybroker ${libbroker} ${PYTHON_LIBRARIES})
+
+-if ( BROKER_PYTHON_PREFIX )
+- set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+- set(PY_MOD_INSTALL_DIR
+- ${BROKER_PYTHON_PREFIX}/lib/python${pyver}/site-packages)
+-elseif ( BROKER_PYTHON_HOME )
+- set(PY_MOD_INSTALL_DIR ${BROKER_PYTHON_HOME}/lib/python)
+-else ()
+- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
+- "from distutils.sysconfig import get_python_lib; print get_python_lib()"
+- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+- set(PY_MOD_INSTALL_DIR ${PYTHON_SITE_PACKAGES})
+-endif ()
++if ( NOT PY_MOD_INSTALL_DIR )
++ if ( BROKER_PYTHON_PREFIX )
++ set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
++ set(PY_MOD_INSTALL_DIR
++ ${BROKER_PYTHON_PREFIX}/lib/python${pyver}/site-packages)
++ elseif ( BROKER_PYTHON_HOME )
++ set(PY_MOD_INSTALL_DIR ${BROKER_PYTHON_HOME}/lib/python)
++ else ()
++ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
++ "from distutils.sysconfig import get_python_lib; print get_python_lib()"
++ OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ set(PY_MOD_INSTALL_DIR ${PYTHON_SITE_PACKAGES})
++ endif ( BROKER_PYTHON_PREFIX )
++endif ( NOT PY_MOD_INSTALL_DIR )
+
+ message(STATUS "Python bindings will be built and installed to: "
+ ${PY_MOD_INSTALL_DIR})