diff options
-rw-r--r-- | libraries/opencv/README | 6 | ||||
-rw-r--r-- | libraries/opencv/libopencv-2.3.1a-libdir.patch | 24 | ||||
-rw-r--r-- | libraries/opencv/opencv-2.3.1a-libav-0.7.patch | 11 | ||||
-rw-r--r-- | libraries/opencv/opencv.SlackBuild | 9 | ||||
-rw-r--r-- | libraries/opencv/opencv.info | 2 |
5 files changed, 41 insertions, 11 deletions
diff --git a/libraries/opencv/README b/libraries/opencv/README index 42b7a6e961d98..d26dbcd6e2787 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 21238cc4b7d51..f45e18fef6a24 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 0000000000000..54433e6c986d6 --- /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 dec8489bf5b2a..2a4730b8eb8d4 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 6843ac8c9d769..3131bb7f9ed4b 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" |