aboutsummaryrefslogtreecommitdiff
path: root/libraries/opencv
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@linux.com>2018-07-13 19:00:39 +1000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-14 06:55:52 +0700
commit89a464fcdc4e49debd78104a005c924bb49daf41 (patch)
tree2612f81b2591d8ecb48d95ae3f46d3e66c927ec5 /libraries/opencv
parentfb3065d67c85cad4e95e6f997be3048f8358a662 (diff)
libraries/opencv: Fix library paths
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Diffstat (limited to 'libraries/opencv')
-rw-r--r--libraries/opencv/README4
-rw-r--r--libraries/opencv/opencv.SlackBuild9
-rw-r--r--libraries/opencv/patch_fsh-3.4.2.diff8
3 files changed, 16 insertions, 5 deletions
diff --git a/libraries/opencv/README b/libraries/opencv/README
index 76ff06ab695e4..c249112376625 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 f87aed3064a5c..ff0adfb6d8a69 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 9a865ff73c6dd..79771905bbd8a 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)