diff options
author | Christoph Willing <chris.willing@linux.com> | 2018-12-10 10:16:47 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-12-15 20:44:25 +0700 |
commit | a584b9952848cce3ce75f84ad866712e52141887 (patch) | |
tree | eb895697c6742594426f449db09675b1dc864db6 | |
parent | 7db4e5c2800ad9bb851023567e48e352e8679985 (diff) | |
download | slackbuilds-a584b9952848cce3ce75f84ad866712e52141887.tar.gz |
libraries/opencv: Updated for version 4.0.0
Signed-off-by: Christoph Willing <chris.willing@linux.com>
-rw-r--r-- | libraries/opencv/opencv.SlackBuild | 25 | ||||
-rw-r--r-- | libraries/opencv/opencv.info | 10 | ||||
-rw-r--r-- | libraries/opencv/patch_cvdef_h.diff | 0 | ||||
-rw-r--r-- | libraries/opencv/patch_filter_scharr.diff | 13 | ||||
-rw-r--r-- | libraries/opencv/patch_fsh-3.4.4.diff | 43 |
5 files changed, 32 insertions, 59 deletions
diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild index 0b72dcd8e2..e8ac7d4113 100644 --- a/libraries/opencv/opencv.SlackBuild +++ b/libraries/opencv/opencv.SlackBuild @@ -26,7 +26,7 @@ PRGNAM=opencv PRGNAM2=opencv_contrib -VERSION=${VERSION:-3.4.4} +VERSION=${VERSION:-4.0.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -77,11 +77,17 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +echo "Unpacking $CWD/$PRGNAM-$VERSION.tar.gz ..." +tar xf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION +echo "Unpacking $CWD/$PRGNAM2-$VERSION.tar.gz ..." tar xf $CWD/$PRGNAM2-$VERSION.tar.gz -patch -p0 < $CWD/patch_fsh-${VERSION}.diff -patch -p0 < $CWD/patch_cvdef_h.diff + +# Only needed if qt5 has been configured +if [ -d /usr/etc/qt5 ]; then + patch -p0 < $CWD/patch_filter_scharr.diff +fi + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -98,6 +104,7 @@ cd build -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=ON \ + -DOPENCV_GENERATE_PKGCONFIG=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 \ @@ -126,15 +133,11 @@ cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -[ "${CVDOCS:-yes}" = "yes" ] && { - cp -a samples/java* samples/opencl* samples/opengl* $PKG/usr/share/opencv/samples - chmod -R 0755 $PKG/usr/share/opencv/samples -} - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/licenses $PKG/usr/doc/$PRGNAM-$VERSION/ +cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -mv $PKG/usr/share/doc/opencv/html $PKG/usr/doc/$PRGNAM-$VERSION && rm -rf $PKG/usr/share/doc +mv $PKG/usr/share/doc/opencv4/html $PKG/usr/doc/$PRGNAM-$VERSION && rm -rf $PKG/usr/share/doc/ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/libraries/opencv/opencv.info b/libraries/opencv/opencv.info index 6943a7e95a..50a2856693 100644 --- a/libraries/opencv/opencv.info +++ b/libraries/opencv/opencv.info @@ -1,10 +1,10 @@ PRGNAM="opencv" -VERSION="3.4.4" +VERSION="4.0.0" HOMEPAGE="https://opencv.org/" -DOWNLOAD="https://github.com/opencv/opencv/archive/3.4.4/opencv-3.4.4.tar.gz \ - https://github.com/opencv/opencv_contrib/archive/3.4.4/opencv_contrib-3.4.4.tar.gz" -MD5SUM="d4b03579405a69ef765e4c79f42c7c82 \ - 171801354ce8c37c3ed9f795c8c03914" +DOWNLOAD="https://github.com/opencv/opencv/archive/4.0.0/opencv-4.0.0.tar.gz \ + https://github.com/opencv/opencv_contrib/archive/4.0.0/opencv_contrib-4.0.0.tar.gz" +MD5SUM="f051c1ff7b327b60123d71b53801b316 \ + 6fcf0cc6e6313dd9f740555821ac5e23" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="numpy3" diff --git a/libraries/opencv/patch_cvdef_h.diff b/libraries/opencv/patch_cvdef_h.diff deleted file mode 100644 index e69de29bb2..0000000000 --- a/libraries/opencv/patch_cvdef_h.diff +++ /dev/null diff --git a/libraries/opencv/patch_filter_scharr.diff b/libraries/opencv/patch_filter_scharr.diff new file mode 100644 index 0000000000..0f6648a58c --- /dev/null +++ b/libraries/opencv/patch_filter_scharr.diff @@ -0,0 +1,13 @@ +--- opencv_contrib-4.0.0/modules/cvv/src/qtutil/filter/sobelfilterwidget.hpp.orig 2018-11-18 11:36:23.000000000 +1000 ++++ opencv_contrib-4.0.0/modules/cvv/src/qtutil/filter/sobelfilterwidget.hpp 2018-11-28 15:39:14.367000000 +1000 +@@ -11,6 +11,10 @@ + #include "grayfilterwidget.hpp" + #include "channelreorderfilter.hpp" + ++enum SpecialFilter { ++ FILTER_SCHARR = -1 ++}; ++ + namespace cvv + { + namespace qtutil diff --git a/libraries/opencv/patch_fsh-3.4.4.diff b/libraries/opencv/patch_fsh-3.4.4.diff deleted file mode 100644 index a123c97f3c..0000000000 --- a/libraries/opencv/patch_fsh-3.4.4.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- CMakeLists.txt.orig 2018-11-17 20:22:17.000000000 +1000 -+++ CMakeLists.txt 2018-11-27 18:04:17.029000000 +1000 -@@ -383,7 +383,7 @@ - if(ANDROID OR WIN32) - ocv_update(OPENCV_DOC_INSTALL_PATH doc) - else() -- ocv_update(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) -+ ocv_update(OPENCV_DOC_INSTALL_PATH share/opencv/doc) - endif() - - if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) -@@ -424,7 +424,7 @@ - elseif(WIN32) - ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "testdata") - else() -- ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "share/OpenCV/testdata") -+ ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "share/opencv/testdata") - endif() - - if(ANDROID) -@@ -455,17 +455,17 @@ - else() - include(GNUInstallDirs) - 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_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) - - if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH) - math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") - if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) - ocv_update(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/cmake/opencv) - else() -- ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) -+ ocv_update(OPENCV_CONFIG_INSTALL_PATH share/opencv) - endif() - endif() - endif() |