ropencv 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1 +1,12 @@
1
1
  build/*
2
+ ext/CMakeFiles
3
+ ext/CMakeCache.txt
4
+ ext/Makefile
5
+ ext/*.rbind
6
+ ext/*.h
7
+ ext/*.hpp
8
+ ext/*.cc
9
+ lib/ropencv/ropencv.rb
10
+ lib/ropencv/ropencv_types.rb
11
+ lib/ropencv/ropencv_types.so
12
+
@@ -1,7 +1,7 @@
1
1
  cmake_minimum_required(VERSION 2.6)
2
2
 
3
+ SET(CMAKE_INSTALL TRUE)
3
4
  add_subdirectory(ext)
4
-
5
5
  FIND_PACKAGE(Ruby)
6
6
  IF(NOT RUBY_INCLUDE_PATH)
7
7
  MESSAGE(STATUS "Ruby library not found. Cannot install OpenCV ruby extensions")
@@ -11,9 +11,9 @@ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
11
11
  FIND_PROGRAM(RDOC_EXECUTABLE NAMES rdoc1.9 rdoc1.8 rdoc)
12
12
  FIND_PROGRAM(YARD_EXECUTABLE NAMES yard)
13
13
 
14
- INSTALL(FILES lib/opencv.rb
14
+ INSTALL(FILES lib/ropencv.rb
15
15
  DESTINATION ${RUBY_LIBRARY_INSTALL_DIR})
16
- INSTALL(DIRECTORY lib/opencv
16
+ INSTALL(DIRECTORY lib/ropencv
17
17
  DESTINATION ${RUBY_LIBRARY_INSTALL_DIR})
18
18
  ENDIF(NOT RUBY_INCLUDE_PATH)
19
19
 
@@ -0,0 +1,10 @@
1
+ require 'opencv'
2
+ include OpenCV
3
+
4
+ scalar = cv::Scalar.new(1,0,0,0)
5
+ scalar[2] = 2
6
+ puts scalar[0]
7
+ puts scalar[1]
8
+ puts scalar[2]
9
+ puts scalar[3]
10
+
@@ -7,26 +7,32 @@ add_definitions(${OPENCV_CFLAGS})
7
7
  include_directories(${OPENCV_INCLUDE_DIRS})
8
8
  link_directories(${OPENCV_LIBRARY_DIRS})
9
9
 
10
-
11
-
12
10
  SET(RBIND_SRC
13
11
  "${CMAKE_CURRENT_SOURCE_DIR}/types.cc"
14
12
  "${CMAKE_CURRENT_SOURCE_DIR}/operations.cc"
15
13
  "${CMAKE_CURRENT_SOURCE_DIR}/conversions.cc")
14
+
15
+ if(CMAKE_INSTALL)
16
+ add_custom_command(OUTPUT ${RBIND_SRC}
17
+ COMMAND ruby "${CMAKE_CURRENT_SOURCE_DIR}/extconf.rb")
18
+ endif()
19
+
16
20
  ADD_LIBRARY(rbind_opencv SHARED ${RBIND_SRC})
17
21
 
18
22
  TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS} )
23
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rbind.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rbind_ropencv.pc @ONLY)
24
+ install(TARGETS rbind_opencv LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../lib/ropencv)
19
25
 
20
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rbind.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc @ONLY)
21
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc DESTINATION lib/pkgconfig)
22
-
23
- install(TARGETS rbind_opencv LIBRARY DESTINATION lib)
24
- install(FILES types.h operations.h conversions.hpp DESTINATION include/${PROJECT_NAME}/${DIR})
26
+ if(CMAKE_INSTALL)
27
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rbind_ropencv.pc DESTINATION lib/pkgconfig)
28
+ install(TARGETS rbind_opencv LIBRARY DESTINATION lib)
29
+ install(FILES types.h operations.h conversions.hpp DESTINATION include/${PROJECT_NAME}/${DIR})
25
30
 
26
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind)
27
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
28
- endif()
31
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind)
32
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
33
+ endif()
29
34
 
30
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind)
31
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
35
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind)
36
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
37
+ endif()
32
38
  endif()
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ropencv'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = '2013-06-30'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Alexander Duda']
metadata CHANGED
@@ -1,53 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ropencv
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
4
5
  prerelease:
5
- version: 0.0.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Alexander Duda
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2013-06-30 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2013-06-30 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: rbind
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
23
21
  version: 0.0.8
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: ffi
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.0.8
30
+ - !ruby/object:Gem::Dependency
31
+ name: ffi
32
+ requirement: !ruby/object:Gem::Requirement
30
33
  none: false
31
- requirements:
34
+ requirements:
32
35
  - - ~>
33
- - !ruby/object:Gem::Version
36
+ - !ruby/object:Gem::Version
34
37
  version: 1.9.0
35
38
  type: :runtime
36
- version_requirements: *id002
37
- description: ""
38
- email:
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.9.0
46
+ description: ''
47
+ email:
39
48
  - Alexander.Duda@dfki.de
40
49
  executables: []
41
-
42
- extensions:
50
+ extensions:
43
51
  - ext/extconf.rb
44
52
  extra_rdoc_files: []
45
-
46
- files:
53
+ files:
47
54
  - .gitignore
48
55
  - CMakeLists.txt
49
56
  - README.md
50
57
  - examples/logo.png
58
+ - examples/scalar.rb
51
59
  - examples/test.rb
52
60
  - ext/CMakeLists.txt
53
61
  - ext/extconf.rb
@@ -57,38 +65,32 @@ files:
57
65
  - ext/post_opencv249.txt
58
66
  - ext/pre_opencv244.txt
59
67
  - ext/rbind.pc.in
60
- - ext/rbind_opencv.pc
61
- - ext/ropencv/CMakeLists.txt
62
68
  - ext/specializing.rb
63
69
  - lib/ropencv.rb
64
70
  - lib/ropencv/ropencv_ruby.rb
65
71
  - ropencv.gemspec
66
72
  homepage: http://github.com/
67
73
  licenses: []
68
-
69
74
  post_install_message:
70
75
  rdoc_options: []
71
-
72
- require_paths:
76
+ require_paths:
73
77
  - lib
74
- required_ruby_version: !ruby/object:Gem::Requirement
78
+ required_ruby_version: !ruby/object:Gem::Requirement
75
79
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: "0"
80
- required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
85
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
85
89
  version: 1.3.6
86
90
  requirements: []
87
-
88
91
  rubyforge_project:
89
92
  rubygems_version: 1.8.23
90
93
  signing_key:
91
94
  specification_version: 3
92
95
  summary: Automated ffi-bindings for opencv 2.4.4 and 2.4.9
93
96
  test_files: []
94
-
@@ -1,11 +0,0 @@
1
- prefix=/usr/local
2
- exec_prefix=/usr/local
3
- libdir=${prefix}/lib
4
- includedir=${prefix}/include
5
-
6
- Name: rbind_opencv
7
- Description:
8
- Version:
9
- Requires: opencv
10
- Libs: -L${libdir} -lrbind_opencv
11
- Cflags: -I${includedir}
@@ -1,30 +0,0 @@
1
- include(FindPkgConfig)
2
- pkg_check_modules(OPENCV REQUIRED opencv)
3
- add_definitions(${OPENCV_CFLAGS})
4
- include_directories(${OPENCV_INCLUDE_DIRS})
5
- link_directories(${OPENCV_LIBRARY_DIRS})
6
-
7
- SET(RBIND_SRC
8
- "${CMAKE_CURRENT_SOURCE_DIR}/types.cc"
9
- "${CMAKE_CURRENT_SOURCE_DIR}/operations.cc"
10
- "${CMAKE_CURRENT_SOURCE_DIR}/conversions.cc")
11
- add_custom_command(OUTPUT ${RBIND_SRC}
12
- COMMAND ruby "${CMAKE_CURRENT_SOURCE_DIR}/../generate.rb")
13
-
14
- ADD_LIBRARY(rbind_opencv SHARED ${RBIND_SRC})
15
- TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS} )
16
-
17
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rbind.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc @ONLY)
18
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc DESTINATION lib/pkgconfig)
19
-
20
- install(TARGETS rbind_opencv LIBRARY DESTINATION lib)
21
- install(FILES types.h operations.h conversions.hpp DESTINATION include/${PROJECT_NAME}/${DIR})
22
-
23
- if (EXISTS ${PROJECT_SOURCE_DIR}/extern.rbind)
24
- install(FILES ${PROJECT_SOURCE_DIR}/extern.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
25
- endif()
26
-
27
- if (EXISTS ${PROJECT_SOURCE_DIR}/config.rbind)
28
- install(FILES ${PROJECT_SOURCE_DIR}/config.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
29
- endif()
30
-