Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Commit

Permalink
Added gemspec to be able to bundle install from git.
Browse files Browse the repository at this point in the history
Added IplImage#smoothness that returns :smooth, :messy, or :blank.
Rake compile will now compile the C extension code.
  • Loading branch information
pcting committed Apr 14, 2011
1 parent 9f80104 commit 08a9655
Show file tree
Hide file tree
Showing 127 changed files with 826 additions and 540 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.project
examples/data
*.o
*.so
Expand All @@ -11,3 +12,5 @@ GSYMS
GTAGS
OpenCV-2.2.0
ruby-1.9.2-p136
ext/opencv/test.txt
pkg/
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source :gemcutter

gem "hoe"
gem "hoe-gemspec"
gem "rspec"
239 changes: 144 additions & 95 deletions Manifest.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
History.txt
Manifest.txt
README.txt
License.txt
Manifest.txt
README.rdoc
Rakefile
examples/convexhull.rb
examples/face_detect.rb
Expand All @@ -11,99 +11,99 @@ examples/inpaint.rb
examples/paint.rb
examples/snake.rb
examples/stuff.jpg
ext/curve.cpp
ext/curve.h
ext/cvavgcomp.cpp
ext/cvavgcomp.h
ext/cvbox2d.cpp
ext/cvbox2d.h
ext/cvcapture.cpp
ext/cvcapture.h
ext/cvchain.cpp
ext/cvchain.h
ext/cvchaincode.cpp
ext/cvchaincode.h
ext/cvcircle32f.cpp
ext/cvcircle32f.h
ext/cvcondensation.cpp
ext/cvcondensation.h
ext/cvconnectedcomp.cpp
ext/cvconnectedcomp.h
ext/cvcontour.cpp
ext/cvcontour.h
ext/cvcontourtree.cpp
ext/cvcontourtree.h
ext/cvconvexitydefect.cpp
ext/cvconvexitydefect.h
ext/cverror.cpp
ext/cverror.h
ext/cvfont.cpp
ext/cvfont.h
ext/cvhaarclassifiercascade.cpp
ext/cvhaarclassifiercascade.h
ext/cvhistogram.cpp
ext/cvhistogram.h
ext/cvindex.cpp
ext/cvindex.h
ext/cvline.cpp
ext/cvline.h
ext/cvmat.cpp
ext/cvmat.h
ext/cvmatnd.cpp
ext/cvmatnd.h
ext/cvmemstorage.cpp
ext/cvmemstorage.h
ext/cvmoments.cpp
ext/cvmoments.h
ext/cvpoint.cpp
ext/cvpoint.h
ext/cvpoint2d32f.cpp
ext/cvpoint2d32f.h
ext/cvpoint3d32f.cpp
ext/cvpoint3d32f.h
ext/cvrect.cpp
ext/cvrect.h
ext/cvscalar.cpp
ext/cvscalar.h
ext/cvseq.cpp
ext/cvseq.h
ext/cvset.cpp
ext/cvset.h
ext/cvsize.cpp
ext/cvsize.h
ext/cvsize2d32f.cpp
ext/cvsize2d32f.h
ext/cvslice.cpp
ext/cvslice.h
ext/cvsparsemat.cpp
ext/cvsparsemat.h
ext/cvtermcriteria.cpp
ext/cvtermcriteria.h
ext/cvtwopoints.cpp
ext/cvtwopoints.h
ext/cvvector.cpp
ext/cvvector.h
ext/cvvideowriter.cpp
ext/cvvideowriter.h
ext/extconf.rb
ext/gui.cpp
ext/gui.h
ext/iplconvkernel.cpp
ext/iplconvkernel.h
ext/iplimage.cpp
ext/iplimage.h
ext/mouseevent.cpp
ext/mouseevent.h
ext/opencv.cpp
ext/opencv.h
ext/point3dset.cpp
ext/point3dset.h
ext/pointset.cpp
ext/pointset.h
ext/trackbar.cpp
ext/trackbar.h
ext/window.cpp
ext/window.h
ext/opencv/curve.cpp
ext/opencv/curve.h
ext/opencv/cvavgcomp.cpp
ext/opencv/cvavgcomp.h
ext/opencv/cvbox2d.cpp
ext/opencv/cvbox2d.h
ext/opencv/cvcapture.cpp
ext/opencv/cvcapture.h
ext/opencv/cvchain.cpp
ext/opencv/cvchain.h
ext/opencv/cvchaincode.cpp
ext/opencv/cvchaincode.h
ext/opencv/cvcircle32f.cpp
ext/opencv/cvcircle32f.h
ext/opencv/cvcondensation.cpp
ext/opencv/cvcondensation.h
ext/opencv/cvconnectedcomp.cpp
ext/opencv/cvconnectedcomp.h
ext/opencv/cvcontour.cpp
ext/opencv/cvcontour.h
ext/opencv/cvcontourtree.cpp
ext/opencv/cvcontourtree.h
ext/opencv/cvconvexitydefect.cpp
ext/opencv/cvconvexitydefect.h
ext/opencv/cverror.cpp
ext/opencv/cverror.h
ext/opencv/cvfont.cpp
ext/opencv/cvfont.h
ext/opencv/cvhaarclassifiercascade.cpp
ext/opencv/cvhaarclassifiercascade.h
ext/opencv/cvhistogram.cpp
ext/opencv/cvhistogram.h
ext/opencv/cvhumoments.cpp
ext/opencv/cvhumoments.h
ext/opencv/cvindex.cpp
ext/opencv/cvindex.h
ext/opencv/cvline.cpp
ext/opencv/cvline.h
ext/opencv/cvmat.cpp
ext/opencv/cvmat.h
ext/opencv/cvmatnd.cpp
ext/opencv/cvmatnd.h
ext/opencv/cvmemstorage.cpp
ext/opencv/cvmemstorage.h
ext/opencv/cvmoments.cpp
ext/opencv/cvmoments.h
ext/opencv/cvpoint.cpp
ext/opencv/cvpoint.h
ext/opencv/cvpoint2d32f.cpp
ext/opencv/cvpoint2d32f.h
ext/opencv/cvpoint3d32f.cpp
ext/opencv/cvpoint3d32f.h
ext/opencv/cvrect.cpp
ext/opencv/cvrect.h
ext/opencv/cvscalar.cpp
ext/opencv/cvscalar.h
ext/opencv/cvseq.cpp
ext/opencv/cvseq.h
ext/opencv/cvset.cpp
ext/opencv/cvset.h
ext/opencv/cvsize.cpp
ext/opencv/cvsize.h
ext/opencv/cvsize2d32f.cpp
ext/opencv/cvsize2d32f.h
ext/opencv/cvslice.cpp
ext/opencv/cvslice.h
ext/opencv/cvsparsemat.cpp
ext/opencv/cvsparsemat.h
ext/opencv/cvtermcriteria.cpp
ext/opencv/cvtermcriteria.h
ext/opencv/cvtwopoints.cpp
ext/opencv/cvtwopoints.h
ext/opencv/cvvideowriter.cpp
ext/opencv/cvvideowriter.h
ext/opencv/extconf.rb
ext/opencv/gui.cpp
ext/opencv/gui.h
ext/opencv/iplconvkernel.cpp
ext/opencv/iplconvkernel.h
ext/opencv/iplimage.cpp
ext/opencv/iplimage.h
ext/opencv/mouseevent.cpp
ext/opencv/mouseevent.h
ext/opencv/opencv.cpp
ext/opencv/opencv.h
ext/opencv/point3dset.cpp
ext/opencv/point3dset.h
ext/opencv/pointset.cpp
ext/opencv/pointset.h
ext/opencv/trackbar.cpp
ext/opencv/trackbar.h
ext/opencv/window.cpp
ext/opencv/window.h
images/CvMat_sobel.png
images/CvMat_sub_rect.png
images/CvSeq_relationmap.png
Expand All @@ -113,3 +113,52 @@ lib/version.rb
setup/setup.cygwin.rb
setup/setup.mingw.rb
setup/setup.mswin32.rb
test/helper.rb
test/runner.rb
test/samples/airplane.jpg
test/samples/baboon.jpg
test/samples/baboon200.jpg
test/samples/baboon200_rotated.jpg
test/samples/cat.jpg
test/samples/contours.jpg
test/samples/fruits.jpg
test/samples/inpaint-mask.bmp
test/samples/lena-256x256.jpg
test/samples/lena-32x32.jpg
test/samples/lena-eyes.jpg
test/samples/lena-inpaint.jpg
test/samples/lena.jpg
test/samples/lines.jpg
test/samples/one_way_train_0000.jpg
test/samples/one_way_train_0001.jpg
test/samples/str-cv-rotated.jpg
test/samples/str-cv.jpg
test/samples/str-ov.jpg
test/samples/stuff.jpg
test/test_cvbox2d.rb
test/test_cvchain.rb
test/test_cvcircle32f.rb
test/test_cvconnectedcomp.rb
test/test_cvcontour.rb
test/test_cvfont.rb
test/test_cvhumoments.rb
test/test_cvline.rb
test/test_cvmat.rb
test/test_cvmat_drawing.rb
test/test_cvmat_dxt.rb
test/test_cvmat_imageprocessing.rb
test/test_cvmoments.rb
test/test_cvpoint.rb
test/test_cvpoint2d32f.rb
test/test_cvpoint3d32f.rb
test/test_cvrect.rb
test/test_cvscalar.rb
test/test_cvseq.rb
test/test_cvsize.rb
test/test_cvsize2d32f.rb
test/test_cvtermcriteria.rb
test/test_cvtwopoints.rb
test/test_iplconvkernel.rb
test/test_iplimage.rb
test/test_opencv.rb
test/test_preliminary.rb
9 changes: 6 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ You can install by cloning this repository:

Then inside the ruby-opencv folder run:

ruby ext/extconf.rb
make
sudo make install
rake install_gem

You can also add ruby-opencv in your Gemfile:

echo -e "\n"'gem "opencv", :git => "https://github.com/pcting/ruby-opencv"' >> Gemfile
bundle install # or bundle update

== SYNOPSIS:

Expand Down
42 changes: 29 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,49 @@

require 'rubygems'
require 'hoe'

require 'rake/extensiontask'
require './lib/version'

Hoe.new('opencv', OpenCV::VERSION) do |p|
p.author = ['Masakazu Yonekura']
Hoe.plugin :gemspec

hoespec = Hoe.spec 'opencv' do |p|
p.version = OpenCV::VERSION
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
p.description = <<EOF
OpenCV wrapper for Ruby
EOF
p.rubyforge_name = 'opencv'
p.developer('lsxi', '[email protected]')
p.email = ['masakazu.yonekura@gmail.com']
p.developer('pcting', 'pcting@gmail.com')

p.need_tar = false
p.need_zip = false
# p.rdoc_pattern =
# p.remote_rdoc_dir =
# p.rsync =
p.readme_file = 'README.rdoc'
p.history_file = 'History.txt'
p.spec_extras = {
:extensions => %w{ext/extconf.rb}
:extensions => %w{ext/opencv/extconf.rb}
}
p.summary = 'OpenCV wrapper for Ruby.'
# p.test_globs = 'spec/**/*_spec.rb'
p.clean_globs |= ['*.o']
p.test_globs = ['test/test_*.rb']
p.clean_globs << 'lib/*.so' << 'tmp'

p.url = 'http://blueruby.mydns.jp/opencv'

p.extra_deps << ['hoe']

p.extra_dev_deps << ['rake-compiler', '>= 0'] << ['hoe-gemspec'] << ['rspec']

Rake::ExtensionTask.new('opencv', spec) do |ext|
ext.lib_dir = File.join('lib', 'opencv')
end

end

hoespec.spec.files.delete('.gemtest')
hoespec.spec.files.delete('ruby-opencv.gemspec')
hoespec.spec.files.delete('opencv.gemspec')
hoespec.spec.cert_chain = []
hoespec.spec.signing_key = nil

Rake::Task[:test].prerequisites << :compile

# vim: syntax=Ruby
Loading

0 comments on commit 08a9655

Please sign in to comment.