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 /libraries/opencv/opencv.SlackBuild | |
parent | 7db4e5c2800ad9bb851023567e48e352e8679985 (diff) |
libraries/opencv: Updated for version 4.0.0
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Diffstat (limited to 'libraries/opencv/opencv.SlackBuild')
-rw-r--r-- | libraries/opencv/opencv.SlackBuild | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild index 0b72dcd8e207..e8ac7d4113da 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 |