summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@linux.com>2018-05-01 15:29:41 +1000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-05-05 06:46:32 +0700
commit91c73d79f57e84787cef719f78645b8055b66286 (patch)
tree74b630b2ccba48d4d6a0602ef5aa71a864c58786
parentc0ade404cdc60b762c6dd2acb7f9914f83b86163 (diff)
downloadslackbuilds-91c73d79f57e84787cef719f78645b8055b66286.tar.gz
libraries/opencv: Patched to suit ffmpeg
Signed-off-by: Christoph Willing <chris.willing@linux.com>
-rw-r--r--libraries/opencv/opencv.SlackBuild9
-rw-r--r--libraries/opencv/patch_cvdef_h.diff20
2 files changed, 25 insertions, 4 deletions
diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild
index dc4bc9b6dc..63cb0c17b8 100644
--- a/libraries/opencv/opencv.SlackBuild
+++ b/libraries/opencv/opencv.SlackBuild
@@ -27,12 +27,12 @@
PRGNAM=opencv
PRGNAM2=opencv_contrib
VERSION=${VERSION:-3.4.1}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -43,8 +43,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -76,6 +76,7 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
tar xf $CWD/$PRGNAM2-$VERSION.tar.gz
patch -p0 < $CWD/patch_fsh-${VERSION}.diff
+patch -p1 < $CWD/patch_cvdef_h.diff
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff --git a/libraries/opencv/patch_cvdef_h.diff b/libraries/opencv/patch_cvdef_h.diff
new file mode 100644
index 0000000000..463d921b5d
--- /dev/null
+++ b/libraries/opencv/patch_cvdef_h.diff
@@ -0,0 +1,20 @@
+--- opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h.orig 2018-02-28 10:16:45.000320632 +0000
++++ opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h 2018-02-28 10:34:30.852346927 +0000
+@@ -454,6 +454,7 @@ Cv64suf;
+
+
+ // Integer types portatibility
++#if defined __cplusplus
+ #ifdef OPENCV_STDINT_HEADER
+ #include OPENCV_STDINT_HEADER
+ #else
+@@ -494,6 +495,9 @@ typedef ::uint64_t uint64_t;
+ }
+ #endif
+ #endif
++#else
++#include <stdint.h>
++#endif
+
+
+ //! @}