diff options
-rw-r--r-- | libraries/opencv/README | 4 | ||||
-rw-r--r-- | libraries/opencv/opencv.SlackBuild | 9 | ||||
-rw-r--r-- | libraries/opencv/patch_fsh-3.4.2.diff | 8 |
3 files changed, 16 insertions, 5 deletions
diff --git a/libraries/opencv/README b/libraries/opencv/README index 76ff06ab695e..c24911237662 100644 --- a/libraries/opencv/README +++ b/libraries/opencv/README @@ -40,6 +40,10 @@ VTK support will be disabled unless it was built with qt5 support (which is possible but not its default). Conversely, if VTK has been built with qt5, it will be disabled in OpenCV unless it too is being built with qt5. +This package is configured to generate python bindings for Python 3 (via +dependency on the numpy3 package). If bindings for Python 2 are required, +the numpy package is required when building opencv. + The Deep Neural Network module and Extra 2D Features Framework from OpenCV's "extra modules" section are disabled by default. They may be enabled by setting the DNN and/or XF2D environment variables as required diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild index f87aed3064a5..ff0adfb6d8a6 100644 --- a/libraries/opencv/opencv.SlackBuild +++ b/libraries/opencv/opencv.SlackBuild @@ -27,9 +27,13 @@ PRGNAM=opencv PRGNAM2=opencv_contrib VERSION=${VERSION:-3.4.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PY2VERSION=${PY2VERSION:-2.7} +PY3VERSION=${PY3VERSION:-3.6} + + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -93,8 +97,9 @@ cd build -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX=$LIBDIRSUFFIX \ -DBUILD_SHARED_LIBS=ON \ + -DPYTHON2_PACKAGES_PATH=/usr/lib${LIBDIRSUFFIX}/python${PY2VERSION}/site-packages \ + -DPYTHON3_PACKAGES_PATH=/usr/lib${LIBDIRSUFFIX}/python${PY3VERSION}/site-packages \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DWITH_IPP=OFF \ -DWITH_QT=ON \ diff --git a/libraries/opencv/patch_fsh-3.4.2.diff b/libraries/opencv/patch_fsh-3.4.2.diff index 9a865ff73c6d..79771905bbd8 100644 --- a/libraries/opencv/patch_fsh-3.4.2.diff +++ b/libraries/opencv/patch_fsh-3.4.2.diff @@ -1,5 +1,5 @@ --- CMakeLists.txt.orig 2018-07-04 21:05:47.000000000 +1000 -+++ CMakeLists.txt 2018-07-06 08:04:47.804000000 +1000 ++++ CMakeLists.txt 2018-07-12 21:54:32.406498966 +1000 @@ -374,7 +374,7 @@ if(ANDROID OR WIN32) ocv_update(OPENCV_DOC_INSTALL_PATH doc) @@ -18,14 +18,16 @@ endif() if(ANDROID) -@@ -446,17 +446,17 @@ +@@ -445,18 +445,18 @@ + ocv_update(OPENCV_CONFIG_INSTALL_PATH ".") else() include(GNUInstallDirs) - ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}) +- ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}) - ocv_update(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) - ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) - ocv_update(OPENCV_JAR_INSTALL_PATH share/OpenCV/java) - ocv_update(OPENCV_OTHER_INSTALL_PATH share/OpenCV) ++ ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}) + ocv_update(OPENCV_3P_LIB_INSTALL_PATH share/opencv/3rdparty/${OPENCV_LIB_INSTALL_PATH}) + ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH share/opencv/samples) + ocv_update(OPENCV_JAR_INSTALL_PATH share/opencv/java) |