summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorM.Dinslage <daedra1980@gmail.com>2011-12-28 23:10:09 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-12-28 23:10:09 -0600
commitfbd96a400c607c185805f3db12153bb071db6d9c (patch)
tree9479561a702548dc1ebc30e203afb3d6a3a11660 /libraries
parentb8d05bdb81804df04039c2c53c2a464f77d4b4ce (diff)
downloadslackbuilds-fbd96a400c607c185805f3db12153bb071db6d9c.tar.gz
libraries/opencv: Included patch for newer ffmpeg (0.8.x)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/opencv/README6
-rw-r--r--libraries/opencv/libopencv-2.3.1a-libdir.patch24
-rw-r--r--libraries/opencv/opencv-2.3.1a-libav-0.7.patch11
-rw-r--r--libraries/opencv/opencv.SlackBuild9
-rw-r--r--libraries/opencv/opencv.info2
5 files changed, 41 insertions, 11 deletions
diff --git a/libraries/opencv/README b/libraries/opencv/README
index 42b7a6e961..d26dbcd6e2 100644
--- a/libraries/opencv/README
+++ b/libraries/opencv/README
@@ -1,6 +1,6 @@
OpenCV (Open Source Computer Vision)
-OpenCV is a library of programming functions mainly aimed at real
-time computer vision.
+OpenCV is a library of programming functions mainly
+aimed at real-time computer vision.
-FFmpeg and Numpy are optional runtime dependencies (available here at SBo)
+FFmpeg and Numpy are optional runtime dependencies.
diff --git a/libraries/opencv/libopencv-2.3.1a-libdir.patch b/libraries/opencv/libopencv-2.3.1a-libdir.patch
index 21238cc4b7..f45e18fef6 100644
--- a/libraries/opencv/libopencv-2.3.1a-libdir.patch
+++ b/libraries/opencv/libopencv-2.3.1a-libdir.patch
@@ -1,6 +1,24 @@
diff -up OpenCV-2.3.1/CMakeLists.txt.00 OpenCV-2.3.1/CMakeLists.txt
---- OpenCV-2.3.1/CMakeLists.txt.00 2011-10-04 23:10:12.177001665 -0500
-+++ OpenCV-2.3.1/CMakeLists.txt 2011-10-04 23:11:39.808001668 -0500
+--- OpenCV-2.3.1/CMakeLists.txt.00 2011-12-28 14:46:28.825000098 -0600
++++ OpenCV-2.3.1/CMakeLists.txt 2011-12-28 14:48:31.277000108 -0600
+@@ -18,7 +18,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE)
+ # Add these standard paths to the search paths for FIND_LIBRARY
+ # to find libraries from these locations first
+ if(UNIX)
+- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib /usr/lib)
++ set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib${LIB_SUFFIX} /usr/lib${LIB_SUFFIX})
+ endif()
+
+ # it _must_ go before PROJECT(OpenCV) in order to work
+@@ -117,7 +117,7 @@ endif()
+
+ # SUBDIRECTORIES:
+ # Save libs and executables in the same place
+-set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib" CACHE PATH "Output directory for libraries" )
++set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}" CACHE PATH "Output directory for libraries" )
+ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin" CACHE PATH "Output directory for applications" )
+
+ if(ANDROID OR WIN32)
@@ -665,9 +665,9 @@ if(CMAKE_HOST_UNIX)
OUTPUT_VARIABLE PYTHON_STD_PACKAGES_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -9,7 +27,7 @@ diff -up OpenCV-2.3.1/CMakeLists.txt.00 OpenCV-2.3.1/CMakeLists.txt
+ set(PYTHON_PACKAGES_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages CACHE PATH "Where to install the python packages.")
else() #debian based assumed, install to the dist-packages.
- set(PYTHON_PACKAGES_PATH lib/python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages CACHE PATH "Where to install the python packages.")
-+ set(PYTHON_PACKAGES_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/dist-packages CACHE PATH "Where to install the python packages.")
++ set(PYTHON_PACKAGES_PATH lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR_MINOR}/site-packages CACHE PATH "Where to install the python packages.")
endif()
endif()
if(CMAKE_HOST_WIN32)
diff --git a/libraries/opencv/opencv-2.3.1a-libav-0.7.patch b/libraries/opencv/opencv-2.3.1a-libav-0.7.patch
new file mode 100644
index 0000000000..54433e6c98
--- /dev/null
+++ b/libraries/opencv/opencv-2.3.1a-libav-0.7.patch
@@ -0,0 +1,11 @@
+diff -up OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp.00 OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp
+--- OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp.00 2011-12-28 14:50:07.038000125 -0600
++++ OpenCV-2.3.1/modules/highgui/src/cap_ffmpeg_impl.hpp 2011-12-28 14:51:11.687000116 -0600
+@@ -104,6 +104,7 @@ extern "C" {
+ #endif
+ #if defined(HAVE_LIBAVCODEC_AVCODEC_H)
+ #include <libavcodec/avcodec.h>
++ #include <libavutil/mathematics.h>
+ #endif
+ #if defined(HAVE_LIBSWSCALE_SWSCALE_H)
+ #include <libswscale/swscale.h>
diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild
index dec8489bf5..2a4730b8eb 100644
--- a/libraries/opencv/opencv.SlackBuild
+++ b/libraries/opencv/opencv.SlackBuild
@@ -7,7 +7,7 @@
PRGNAM=opencv
SRCNAM=OpenCV
VERSION=${VERSION:-2.3.1a}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -53,9 +53,11 @@ find . \
-exec chmod 644 {} \;
# Honor LIB_SUFFIX
-# rewritten for slackware
patch -p1 < $CWD/libopencv-2.3.1a-libdir.patch
+# Fix building with ffmmpeg 0.6/0.8
+patch -p1 < $CWD/opencv-2.3.1a-libav-0.7.patch
+
mkdir -p build
cd build
cmake \
@@ -71,8 +73,7 @@ cd build
..
make VERBOSE=1
make install DESTDIR=$PKG
-
-cd -
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/libraries/opencv/opencv.info b/libraries/opencv/opencv.info
index 6843ac8c9d..3131bb7f9e 100644
--- a/libraries/opencv/opencv.info
+++ b/libraries/opencv/opencv.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="M.Dinslage"
EMAIL="daedra1980@gmail.com"
-APPROVED="Erik Hanson"
+APPROVED="rworkman"