From 9413c7b3871955f2bbd0b92a4979a2f1049c2011 Mon Sep 17 00:00:00 2001 From: Christoph Willing Date: Thu, 8 Feb 2018 07:39:08 +1000 Subject: libraries/opencv: Updated for version 3.4.0 Signed-off-by: Christoph Willing --- libraries/opencv/opencv.SlackBuild | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'libraries/opencv/opencv.SlackBuild') diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild index 8aef68edb5..956423eb16 100644 --- a/libraries/opencv/opencv.SlackBuild +++ b/libraries/opencv/opencv.SlackBuild @@ -4,7 +4,7 @@ # Copyright 2012-2015 Matt Dinslage, Springfield, MO USA # All rights reserved. -# Copyright 2016 Christoph Willing, Brisbane, Australia +# Copyright 2016-2018 Christoph Willing, Brisbane, Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,8 +26,8 @@ PRGNAM=opencv PRGNAM2=opencv_contrib -VERSION=${VERSION:-3.1.0} -BUILD=${BUILD:-3} +VERSION=${VERSION:-3.4.0} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -61,10 +61,10 @@ cv1394="" ; [ "${CV1394:-yes}" = "no" ] && cv1394="-DWITH_1394=OFF" cvffmpeg="" ; [ "${CVFFMPEG:-yes}" = "no" ] && cvffmpeg="-DWITH_FFMPEG=OFF" cvvtk="" ; [ "${CVVTK:-yes}" = "no" ] && cvvtk="-DWITH_VTK=OFF" cvgdal="" ; [ "${CVGDAL:-no}" = "yes" ] && cvgdal="-DWITH_GDAL=ON" +dnn="-DBUILD_opencv_dnn_modern=OFF" ; [ "${DNN:-no}" = "yes" ] && dnn="" +xf2d="-DBUILD_opencv_xfeatures2d=OFF" ; [ "${XF2D:-no}" = "yes" ] && xf2d="" cvdocs="-DBUILD_DOCS=ON -DBUILD_EXAMPLES=ON -DINSTALL_C_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON " ; [ "${CVDOCS:-yes}" = "no" ] && cvdocs="" -# Only enable PlantUML if java is available -cvplantuml="" ; [ $(which java 2>/dev/null ) ] && cvplantuml="-DPLANTUML_JAR=$CWD/plantuml.jar" set -e @@ -72,9 +72,10 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION -unzip $CWD/$PRGNAM2-$VERSION.zip || unzip $CWD/$VERSION.zip +tar xf $CWD/$PRGNAM2-$VERSION.tar.gz +patch -p0 < $CWD/patch_fsh-${VERSION}.diff chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -82,9 +83,11 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# http://code.opencv.org/issues/2512 -patch -p1 < $CWD/fsh.patch -patch -p0 < $CWD/patch_vtk7.diff + +[ "${DNN:-no}" = "no" ] && { + sed -i '2s/^/ocv_module_disable(dnn_modern) \n/' $PRGNAM2-$VERSION/modules/dnn_modern/CMakeLists.txt + rm -rf $PRGNAM2-$VERSION/modules/face +} mkdir -p build cd build @@ -107,9 +110,11 @@ cd build $cvffmpeg \ $cvvtk \ $cvgdal \ - $cvplantuml \ + $dnn \ + $xf2d \ $cvdocs \ -DOPENCV_EXTRA_MODULES_PATH=../$PRGNAM2-$VERSION/modules .. + make VERBOSE=1 [ "${CVDOCS:-yes}" = "yes" ] && make doxygen make install DESTDIR=$PKG -- cgit v1.2.3