From 5351e58392ddb69fef5f337b30437ef22756201e Mon Sep 17 00:00:00 2001 From: "M.Dinslage" Date: Mon, 31 Aug 2015 15:19:24 +0700 Subject: libraries/opencv: Updated for version 3.0.0. Signed-off-by: Willy Sudiarto Raharjo --- libraries/opencv/fsh.patch | 72 ++++++++++++++++++++ libraries/opencv/opencv-2.4.11-fsh.patch | 94 -------------------------- libraries/opencv/opencv-2.4.11-pkgconfig.patch | 12 ---- libraries/opencv/opencv.SlackBuild | 13 ++-- libraries/opencv/opencv.info | 12 ++-- 5 files changed, 86 insertions(+), 117 deletions(-) create mode 100644 libraries/opencv/fsh.patch delete mode 100644 libraries/opencv/opencv-2.4.11-fsh.patch delete mode 100644 libraries/opencv/opencv-2.4.11-pkgconfig.patch (limited to 'libraries') diff --git a/libraries/opencv/fsh.patch b/libraries/opencv/fsh.patch new file mode 100644 index 0000000000..4d391d4ad0 --- /dev/null +++ b/libraries/opencv/fsh.patch @@ -0,0 +1,72 @@ +From 2bb4ca7cc656969a9e2c655e594428b465edbfed Mon Sep 17 00:00:00 2001 +From: Valentin Churavy +Date: Sat, 28 Mar 2015 01:30:01 +0900 +Subject: [PATCH] fsh.patch + +--- + CMakeLists.txt | 14 +++++++------- + cmake/templates/opencv_run_all_tests_unix.sh.in | 2 +- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d9a17b3..3b4d9ad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -300,7 +300,7 @@ endif() + if(ANDROID OR WIN32) + set(OPENCV_DOC_INSTALL_PATH doc) + else() +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) ++ set(OPENCV_DOC_INSTALL_PATH share/doc/opencv) + endif() + + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) +@@ -342,7 +342,7 @@ if(OPENCV_TEST_DATA_PATH AND NOT OPENCV_TEST_DATA_INSTALL_PATH) + elseif(WIN32) + set(OPENCV_TEST_DATA_INSTALL_PATH "testdata") + else() +- set(OPENCV_TEST_DATA_INSTALL_PATH "share/OpenCV/testdata") ++ set(OPENCV_TEST_DATA_INSTALL_PATH "share/opencv/testdata") + endif() + endif() + +@@ -371,10 +371,10 @@ else() + set(OPENCV_OTHER_INSTALL_PATH etc) + 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_JAR_INSTALL_PATH share/OpenCV/java) +- set(OPENCV_OTHER_INSTALL_PATH share/OpenCV) ++ set(OPENCV_3P_LIB_INSTALL_PATH share/opencv/3rdparty/${OPENCV_LIB_INSTALL_PATH}) ++ set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/opencv/samples) ++ set(OPENCV_JAR_INSTALL_PATH share/opencv/java) ++ set(OPENCV_OTHER_INSTALL_PATH share/opencv) + endif() + set(OPENCV_INCLUDE_INSTALL_PATH "include") + +@@ -382,7 +382,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 --git a/cmake/templates/opencv_run_all_tests_unix.sh.in b/cmake/templates/opencv_run_all_tests_unix.sh.in +index 7b946af..82370dc 100644 +--- a/cmake/templates/opencv_run_all_tests_unix.sh.in ++++ b/cmake/templates/opencv_run_all_tests_unix.sh.in +@@ -53,7 +53,7 @@ fi + + 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 + +-- +2.4.2 + diff --git a/libraries/opencv/opencv-2.4.11-fsh.patch b/libraries/opencv/opencv-2.4.11-fsh.patch deleted file mode 100644 index 832d2c496e..0000000000 --- a/libraries/opencv/opencv-2.4.11-fsh.patch +++ /dev/null @@ -1,94 +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 @@ - # 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 deleted file mode 100644 index facb1474fb..0000000000 --- a/libraries/opencv/opencv-2.4.11-pkgconfig.patch +++ /dev/null @@ -1,12 +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 "\${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.SlackBuild b/libraries/opencv/opencv.SlackBuild index 70e56b1774..32616f8f9a 100644 --- a/libraries/opencv/opencv.SlackBuild +++ b/libraries/opencv/opencv.SlackBuild @@ -23,7 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=opencv -VERSION=${VERSION:-2.4.11} +PRGNAM2=opencv_contrib +VERSION=${VERSION:-3.0.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -60,8 +61,9 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -unzip $CWD/$PRGNAM-$VERSION.zip +tar xvf $CWD/$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION +unzip $CWD/$VERSION.zip || unzip $CWD/$PRGNAM2-$VERSION.zip chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -70,10 +72,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # http://code.opencv.org/issues/2512 -patch -p1 < $CWD/opencv-2.4.11-fsh.patch - -# https://bugzilla.novell.com/show_bug.cgi?id=853036 -patch -p1 < $CWD/opencv-2.4.11-pkgconfig.patch +patch -p1 < $CWD/fsh.patch mkdir -p build cd build @@ -87,8 +86,10 @@ cd build -DBUILD_SHARED_LIBS=ON \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DWITH_QT=ON \ + -DWITH_IPP=OFF \ -DLIB_SUFFIX=$LIBDIRSUFFIX \ -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \ + -DOPENCV_EXTRA_MODULES_PATH=$PRGNAM2-$VERSION/modules .. \ .. make VERBOSE=1 make install DESTDIR=$PKG diff --git a/libraries/opencv/opencv.info b/libraries/opencv/opencv.info index 45ed61f746..184edd7dbe 100644 --- a/libraries/opencv/opencv.info +++ b/libraries/opencv/opencv.info @@ -1,10 +1,12 @@ PRGNAM="opencv" -VERSION="2.4.11" -HOMEPAGE="http://opencv.willowgarage.com/wiki/" -DOWNLOAD="http://downloads.sourceforge.net/opencvlibrary/opencv-2.4.11.zip" -MD5SUM="32f498451bff1817a60e1aabc2939575" +VERSION="3.0.0" +HOMEPAGE="http://opencv.org/" +DOWNLOAD="https://github.com/Itseez/opencv/archive/3.0.0.tar.gz \ + https://github.com/Itseez/opencv_contrib/archive/3.0.0.zip" +MD5SUM="e6c72f54f7127161b371ef798f34d5c9 \ + ad5fc005890f1bda8a2ac899b4209ab9" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="eigen3" MAINTAINER="M.Dinslage" EMAIL="daedra1980@gmail.com" -- cgit v1.2.3