mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
libraries/opencv: Included patch for newer ffmpeg (0.8.x)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
b8d05bdb81
commit
fbd96a400c
5 changed files with 41 additions and 11 deletions
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
11
libraries/opencv/opencv-2.3.1a-libav-0.7.patch
Normal file
11
libraries/opencv/opencv-2.3.1a-libav-0.7.patch
Normal file
|
@ -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>
|
|
@ -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
|
||||
|
|
|
@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
|
|||
MD5SUM_x86_64=""
|
||||
MAINTAINER="M.Dinslage"
|
||||
EMAIL="daedra1980@gmail.com"
|
||||
APPROVED="Erik Hanson"
|
||||
APPROVED="rworkman"
|
||||
|
|
Loading…
Reference in a new issue