From b2f5d06a90f2d9ab2e4ab8ba535d7cf933a12772 Mon Sep 17 00:00:00 2001 From: "M.Dinslage" Date: Sat, 7 Mar 2015 09:35:48 +0700 Subject: libraries/opencv: Updated for version 2.4.11. Signed-off-by: Willy Sudiarto Raharjo --- libraries/opencv/opencv-2.4.11-fsh.patch | 94 ++++++++++++++++++++++++ libraries/opencv/opencv-2.4.11-pkgconfig.patch | 12 ++++ libraries/opencv/opencv-2.4.9-fsh.patch | 99 -------------------------- libraries/opencv/opencv-2.4.9-pkgconfig.patch | 35 --------- libraries/opencv/opencv.SlackBuild | 8 +-- libraries/opencv/opencv.info | 6 +- 6 files changed, 113 insertions(+), 141 deletions(-) create mode 100644 libraries/opencv/opencv-2.4.11-fsh.patch create mode 100644 libraries/opencv/opencv-2.4.11-pkgconfig.patch delete mode 100644 libraries/opencv/opencv-2.4.9-fsh.patch delete mode 100644 libraries/opencv/opencv-2.4.9-pkgconfig.patch diff --git a/libraries/opencv/opencv-2.4.11-fsh.patch b/libraries/opencv/opencv-2.4.11-fsh.patch new file mode 100644 index 0000000000..832d2c496e --- /dev/null +++ b/libraries/opencv/opencv-2.4.11-fsh.patch @@ -0,0 +1,94 @@ +diff -Naurp opencv-2.4.9-orig/CMakeLists.txt opencv-2.4.9/CMakeLists.txt +--- opencv-2.4.9-orig/CMakeLists.txt 2014-04-11 12:15:26.000000000 +0200 ++++ opencv-2.4.9/CMakeLists.txt 2014-06-26 15:06:18.705309828 +0200 +@@ -258,9 +258,9 @@ endif() + if(ANDROID OR WIN32) + set(OPENCV_DOC_INSTALL_PATH doc) + elseif(INSTALL_TO_MANGLED_PATHS) +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV-${OPENCV_VERSION}/doc) ++ set(OPENCV_DOC_INSTALL_PATH share/doc/opencv-${OPENCV_VERSION}) + else() +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) ++ set(OPENCV_DOC_INSTALL_PATH share/doc/opencv) + endif() + + if(WIN32) +@@ -313,8 +313,8 @@ else() + set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) + else() + set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX}) +- set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) +- set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) ++ set(OPENCV_3P_LIB_INSTALL_PATH share/opencv/3rdparty/${OPENCV_LIB_INSTALL_PATH}) ++ set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/opencv/samples) + endif() + set(OPENCV_INCLUDE_INSTALL_PATH "include") + +@@ -322,7 +322,7 @@ else() + if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) + set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv) + else() +- set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) ++ set(OPENCV_CONFIG_INSTALL_PATH share/opencv) + endif() + endif() + +diff -Naurp opencv-2.4.9-orig/cmake/templates/opencv_run_all_tests_unix.sh.in opencv-2.4.9/cmake/templates/opencv_run_all_tests_unix.sh.in +--- 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 @@ + # 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 + echo "OpenCV tests finished with status $SUMMARY_STATUS" + fi + +-return $SUMMARY_STATUS +\ Manca newline alla fine del file ++return $SUMMARY_STATUS +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) + 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) ++ install(FILES ${LBP_CASCADES} DESTINATION share/opencv/lbpcascades COMPONENT libs) + endif() + + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) +@@ -17,6 +17,6 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PA + install(DIRECTORY ${OPENCV_TEST_DATA_PATH} + DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +- DESTINATION share/OpenCV/testdata COMPONENT tests) ++ DESTINATION share/opencv/testdata COMPONENT tests) + endif() +-endif() +\ Manca newline alla fine del file ++endif() +diff -Naurp opencv-2.4.9-orig/modules/java/CMakeLists.txt opencv-2.4.9/modules/java/CMakeLists.txt +--- opencv-2.4.9-orig/modules/java/CMakeLists.txt 2014-04-11 12:15:26.000000000 +0200 ++++ opencv-2.4.9/modules/java/CMakeLists.txt 2014-06-26 15:08:28.534686737 +0200 +@@ -280,7 +280,7 @@ else(ANDROID) + if(WIN32) + set(JAR_INSTALL_DIR java) + else(WIN32) +- set(JAR_INSTALL_DIR share/OpenCV/java) ++ set(JAR_INSTALL_DIR share/opencv/java) + endif(WIN32) + install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT java) + endif(ANDROID) + diff --git a/libraries/opencv/opencv-2.4.11-pkgconfig.patch b/libraries/opencv/opencv-2.4.11-pkgconfig.patch new file mode 100644 index 0000000000..facb1474fb --- /dev/null +++ b/libraries/opencv/opencv-2.4.11-pkgconfig.patch @@ -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") diff --git a/libraries/opencv/opencv-2.4.9-fsh.patch b/libraries/opencv/opencv-2.4.9-fsh.patch deleted file mode 100644 index 97c4ba2413..0000000000 --- a/libraries/opencv/opencv-2.4.9-fsh.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -Naurp opencv-2.4.9-orig/CMakeLists.txt opencv-2.4.9/CMakeLists.txt ---- opencv-2.4.9-orig/CMakeLists.txt 2014-04-11 12:15:26.000000000 +0200 -+++ opencv-2.4.9/CMakeLists.txt 2014-06-26 15:06:18.705309828 +0200 -@@ -258,9 +258,9 @@ endif() - if(ANDROID OR WIN32) - set(OPENCV_DOC_INSTALL_PATH doc) - elseif(INSTALL_TO_MANGLED_PATHS) -- set(OPENCV_DOC_INSTALL_PATH share/OpenCV-${OPENCV_VERSION}/doc) -+ set(OPENCV_DOC_INSTALL_PATH share/doc/opencv-${OPENCV_VERSION}) - else() -- set(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) -+ set(OPENCV_DOC_INSTALL_PATH share/doc/opencv) - endif() - - if(WIN32) -@@ -313,8 +313,8 @@ else() - set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) - else() - set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX}) -- set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) -- set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) -+ set(OPENCV_3P_LIB_INSTALL_PATH share/opencv/3rdparty/${OPENCV_LIB_INSTALL_PATH}) -+ set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/opencv/samples) - endif() - set(OPENCV_INCLUDE_INSTALL_PATH "include") - -@@ -322,7 +322,7 @@ else() - if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) - set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv) - else() -- set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) -+ set(OPENCV_CONFIG_INSTALL_PATH share/opencv) - endif() - endif() - -diff -Naurp opencv-2.4.9-orig/cmake/templates/opencv_run_all_tests_unix.sh.in opencv-2.4.9/cmake/templates/opencv_run_all_tests_unix.sh.in ---- 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 - - OPENCV_TEST_PATH=@CMAKE_INSTALL_PREFIX@/@OPENCV_TEST_INSTALL_PATH@ --export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata -+export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/opencv/testdata - - SUMMARY_STATUS=0 - for t in "$OPENCV_TEST_PATH/"opencv_test_* "$OPENCV_TEST_PATH/"opencv_perf_*; -@@ -22,4 +22,4 @@ else - echo "OpenCV tests finished with status $SUMMARY_STATUS" - fi - --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) -- 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) -+ install(FILES ${LBP_CASCADES} DESTINATION share/opencv/lbpcascades COMPONENT libs) - endif() - - if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) -@@ -17,6 +17,6 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PA - install(DIRECTORY ${OPENCV_TEST_DATA_PATH} - DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -- DESTINATION share/OpenCV/testdata COMPONENT tests) -+ DESTINATION share/opencv/testdata COMPONENT tests) - endif() --endif() -\ Manca newline alla fine del file -+endif() -diff -Naurp opencv-2.4.9-orig/modules/java/CMakeLists.txt opencv-2.4.9/modules/java/CMakeLists.txt ---- opencv-2.4.9-orig/modules/java/CMakeLists.txt 2014-04-11 12:15:26.000000000 +0200 -+++ opencv-2.4.9/modules/java/CMakeLists.txt 2014-06-26 15:08:28.534686737 +0200 -@@ -280,7 +280,7 @@ else(ANDROID) - if(WIN32) - set(JAR_INSTALL_DIR java) - else(WIN32) -- set(JAR_INSTALL_DIR share/OpenCV/java) -+ set(JAR_INSTALL_DIR share/opencv/java) - endif(WIN32) - install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT java) - endif(ANDROID) - diff --git a/libraries/opencv/opencv-2.4.9-pkgconfig.patch b/libraries/opencv/opencv-2.4.9-pkgconfig.patch deleted file mode 100644 index 5626eb6e02..0000000000 --- a/libraries/opencv/opencv-2.4.9-pkgconfig.patch +++ /dev/null @@ -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 diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild index 5ba0adf481..70e56b1774 100644 --- a/libraries/opencv/opencv.SlackBuild +++ b/libraries/opencv/opencv.SlackBuild @@ -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 diff --git a/libraries/opencv/opencv.info b/libraries/opencv/opencv.info index 8ac981e29f..45ed61f746 100644 --- a/libraries/opencv/opencv.info +++ b/libraries/opencv/opencv.info @@ -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="" -- cgit v1.2.3