libraries/opencv: Updated for version 2.4.11.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
M.Dinslage 2015-03-07 09:35:48 +07:00 committed by Willy Sudiarto Raharjo
parent 74a3044c79
commit b2f5d06a90
5 changed files with 24 additions and 52 deletions

View file

@ -37,12 +37,15 @@ diff -Naurp opencv-2.4.9-orig/cmake/templates/opencv_run_all_tests_unix.sh.in op
--- opencv-2.4.9-orig/cmake/templates/opencv_run_all_tests_unix.sh.in 2014-04-11 12:15:26.000000000 +0200
+++ opencv-2.4.9/cmake/templates/opencv_run_all_tests_unix.sh.in 2014-06-26 15:09:21.456025129 +0200
@@ -1,7 +1,7 @@
#!/bin/sh
# Test binaries and data paths
OPENCV_TEST_PATH=@CMAKE_INSTALL_PREFIX@/@OPENCV_TEST_INSTALL_PATH@
OPENCV_PYTHON_TESTS=@OPENCV_PYTHON_TESTS_LIST@
-export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
+export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/opencv/testdata
# Run tests
SUMMARY_STATUS=0
for t in "$OPENCV_TEST_PATH/"opencv_test_* "$OPENCV_TEST_PATH/"opencv_perf_*;
@@ -22,4 +22,4 @@ else
@ -52,21 +55,13 @@ diff -Naurp opencv-2.4.9-orig/cmake/templates/opencv_run_all_tests_unix.sh.in op
-return $SUMMARY_STATUS
\ Manca newline alla fine del file
+return $SUMMARY_STATUS
diff -Naurp opencv-2.4.9-orig/cmake/templates/opencv_testing.sh.in opencv-2.4.9/cmake/templates/opencv_testing.sh.in
--- opencv-2.4.9-orig/cmake/templates/opencv_testing.sh.in 2014-04-11 12:15:26.000000000 +0200
+++ opencv-2.4.9/cmake/templates/opencv_testing.sh.in 2014-06-26 15:09:09.472174948 +0200
@@ -1,2 +1,2 @@
# Environment setup for OpenCV testing
-export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
\ Manca newline alla fine del file
+export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/opencv/testdata
diff -Naurp opencv-2.4.9-orig/data/CMakeLists.txt opencv-2.4.9/data/CMakeLists.txt
--- opencv-2.4.9-orig/data/CMakeLists.txt 2014-04-11 12:15:26.000000000 +0200
+++ opencv-2.4.9/data/CMakeLists.txt 2014-06-26 15:07:54.202115953 +0200
@@ -5,8 +5,8 @@ if(ANDROID)
install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT libs)
install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT libs)
elseif(NOT WIN32)
else()
- install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT libs)
- install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs)
+ install(FILES ${HAAR_CASCADES} DESTINATION share/opencv/haarcascades COMPONENT libs)

View file

@ -0,0 +1,12 @@
diff -baur opencv-2.4.7.orig/cmake/OpenCVGenPkgconfig.cmake opencv-2.4.7/cmake/OpenCVGenPkgconfig.cmake
--- opencv-2.4.7.orig/cmake/OpenCVGenPkgconfig.cmake 2013-11-12 20:31:27.253763202 +0000
+++ opencv-2.4.7/cmake/OpenCVGenPkgconfig.cmake 2013-11-12 20:41:48.936262732 +0000
@@ -10,7 +10,7 @@
# -------------------------------------------------------------------------------------------
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
-set(libdir "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
+set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}")
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
if(CMAKE_BUILD_TYPE MATCHES "Release")

View file

@ -1,35 +0,0 @@
diff -baur opencv-2.4.7.orig/cmake/OpenCVGenPkgconfig.cmake opencv-2.4.7/cmake/OpenCVGenPkgconfig.cmake
--- opencv-2.4.7.orig/cmake/OpenCVGenPkgconfig.cmake 2013-11-12 20:31:27.253763202 +0000
+++ opencv-2.4.7/cmake/OpenCVGenPkgconfig.cmake 2013-11-12 20:41:48.936262732 +0000
@@ -10,7 +10,7 @@
# -------------------------------------------------------------------------------------------
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
-set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
+set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}")
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
if(CMAKE_BUILD_TYPE MATCHES "Release")
@@ -35,10 +35,11 @@
ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
#build the list of components
-set(OpenCV_LIB_COMPONENTS_ "")
+set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}")
foreach(CVLib ${OpenCV_LIB_COMPONENTS})
get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
get_filename_component(libname "${libpath}" NAME)
+ get_filename_component(lname "${libpath}" NAME_WE)
if(INSTALL_TO_MANGLED_PATHS)
set(libname "${libname}.${OPENCV_VERSION}")
@@ -51,7 +52,8 @@
set(installDir "${OPENCV_LIB_INSTALL_PATH}")
endif()
- set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
+ string(REPLACE "libopencv" "-lopencv" lname "${lname}")
+ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${lname}")
endforeach()
# add extra dependencies required for OpenCV

View file

@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=opencv
VERSION=${VERSION:-2.4.9}
VERSION=${VERSION:-2.4.11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
unzip $CWD/$PRGNAM-$VERSION.zip
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@ -70,10 +70,10 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# http://code.opencv.org/issues/2512
patch -p1 < $CWD/opencv-2.4.9-fsh.patch
patch -p1 < $CWD/opencv-2.4.11-fsh.patch
# https://bugzilla.novell.com/show_bug.cgi?id=853036
patch -p1 < $CWD/opencv-2.4.9-pkgconfig.patch
patch -p1 < $CWD/opencv-2.4.11-pkgconfig.patch
mkdir -p build
cd build

View file

@ -1,8 +1,8 @@
PRGNAM="opencv"
VERSION="2.4.9"
VERSION="2.4.11"
HOMEPAGE="http://opencv.willowgarage.com/wiki/"
DOWNLOAD="https://github.com/Itseez/opencv/archive/2.4.9.tar.gz"
MD5SUM="cc0a8307403ff471f554197401ec0eb9"
DOWNLOAD="http://downloads.sourceforge.net/opencvlibrary/opencv-2.4.11.zip"
MD5SUM="32f498451bff1817a60e1aabc2939575"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""