File opencv-samples.patch of Package opencv

diff -urN OpenCV-2.4.0-orig/CMakeLists.txt OpenCV-2.4.0/CMakeLists.txt
--- OpenCV-2.4.0-orig/CMakeLists.txt	2012-04-30 22:40:29.000000000 +0300
+++ OpenCV-2.4.0/CMakeLists.txt	2012-05-15 13:49:52.764937081 +0300
@@ -626,7 +626,7 @@
 add_subdirectory(apps)
 
 # examples
-if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES)
+if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES)
   add_subdirectory(samples)
 endif()
 
diff -urN OpenCV-2.4.0-orig/samples/CMakeLists.txt OpenCV-2.4.0/samples/CMakeLists.txt
--- OpenCV-2.4.0-orig/samples/CMakeLists.txt	2012-04-01 13:09:19.000000000 +0300
+++ OpenCV-2.4.0/samples/CMakeLists.txt	2012-05-15 13:53:07.883629268 +0300
@@ -3,6 +3,7 @@
 #
 # ----------------------------------------------------------------------------
 
+if(BUILD_EXAMPLES OR INSTALL_C_EXAMPLES)
 add_subdirectory(c)
 add_subdirectory(cpp)
 add_subdirectory(gpu)
@@ -10,3 +11,9 @@
 if(ANDROID AND BUILD_ANDROID_EXAMPLES)
   add_subdirectory(android)
 endif()
+endif()
+
+if(INSTALL_PYTHON_EXAMPLES)
+add_subdirectory(python)
+add_subdirectory(python2)
+endif()
diff -urN OpenCV-2.4.0-orig/samples/gpu/CMakeLists.txt OpenCV-2.4.0/samples/gpu/CMakeLists.txt
--- OpenCV-2.4.0-orig/samples/gpu/CMakeLists.txt	2012-04-09 02:47:22.000000000 +0300
+++ OpenCV-2.4.0/samples/gpu/CMakeLists.txt	2012-05-15 13:53:54.084528733 +0300
@@ -64,7 +64,7 @@
 if (NOT WIN32)
   file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd )
   install(FILES ${install_list}
-          DESTINATION share/opencv/samples/${project}
+          DESTINATION share/opencv/samples/gpu
           PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
 endif()
 
diff -urN OpenCV-2.4.0-orig/samples/python/CMakeLists.txt OpenCV-2.4.0/samples/python/CMakeLists.txt
--- OpenCV-2.4.0-orig/samples/python/CMakeLists.txt	1970-01-01 02:00:00.000000000 +0200
+++ OpenCV-2.4.0/samples/python/CMakeLists.txt	2012-05-15 13:56:12.291362167 +0300
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------------------
+#  CMake file for Python samples. See root CMakeLists.txt
+# -------------------------------------------------------------------------
+
+file(GLOB PYTHON_SAMPLES *.py)
+if(NOT WIN32)
+install(FILES ${PYTHON_SAMPLES}
+        DESTINATION share/opencv/samples/python
+        PERMISSIONS OWNER_READ OWNER_EXECUTE
+                    GROUP_READ GROUP_EXECUTE
+                    WORLD_READ WORLD_EXECUTE)
+endif()
diff -urN OpenCV-2.4.0-orig/samples/python2/CMakeLists.txt OpenCV-2.4.0/samples/python2/CMakeLists.txt
--- OpenCV-2.4.0-orig/samples/python2/CMakeLists.txt	1970-01-01 02:00:00.000000000 +0200
+++ OpenCV-2.4.0/samples/python2/CMakeLists.txt	2012-05-15 13:56:39.387583437 +0300
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------------------
+#  CMake file for Python samples. See root CMakeLists.txt
+# -------------------------------------------------------------------------
+
+file(GLOB PYTHON_SAMPLES *.py)
+if(NOT WIN32)
+install(FILES ${PYTHON_SAMPLES}
+        DESTINATION share/opencv/samples/python2
+        PERMISSIONS OWNER_READ OWNER_EXECUTE
+                    GROUP_READ GROUP_EXECUTE
+                    WORLD_READ WORLD_EXECUTE)
+endif()
openSUSE Build Service is sponsored by