opencv 4.0.1
parent
e4b533c5d4
commit
fb42060e46
|
@ -1,9 +1,8 @@
|
||||||
class Opencv < Formula
|
class Opencv < Formula
|
||||||
desc "Open source computer vision library"
|
desc "Open source computer vision library"
|
||||||
homepage "https://opencv.org/"
|
homepage "https://opencv.org/"
|
||||||
url "https://github.com/opencv/opencv/archive/3.4.5.tar.gz"
|
url "https://github.com/opencv/opencv/archive/4.0.1.tar.gz"
|
||||||
sha256 "0c57d9dd6d30cbffe68a09b03f4bebe773ee44dc8ff5cd6eaeb7f4d5ef3b428e"
|
sha256 "7b86a0ee804244e0c407321f895b15e4a7162e9c5c0d2efc85f1cadec4011af4"
|
||||||
revision 1
|
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
sha256 "1d5b539888b6163e9e8b5e6944bafdfec126cae714a0f14dc914af6f810975dd" => :mojave
|
sha256 "1d5b539888b6163e9e8b5e6944bafdfec126cae714a0f14dc914af6f810975dd" => :mojave
|
||||||
|
@ -25,8 +24,8 @@ class Opencv < Formula
|
||||||
depends_on "tbb"
|
depends_on "tbb"
|
||||||
|
|
||||||
resource "contrib" do
|
resource "contrib" do
|
||||||
url "https://github.com/opencv/opencv_contrib/archive/3.4.5.tar.gz"
|
url "https://github.com/opencv/opencv_contrib/archive/4.0.1.tar.gz"
|
||||||
sha256 "8f73d029887c726fed89c69a2b0fcb1d098099fcd81c1070e1af3b452669fbe2"
|
sha256 "0d8acbad4b7074cfaafd906a7419c23629179d5e98894714402090b192ef8237"
|
||||||
end
|
end
|
||||||
|
|
||||||
needs :cxx11
|
needs :cxx11
|
||||||
|
@ -62,6 +61,7 @@ class Opencv < Formula
|
||||||
-DBUILD_opencv_text=OFF
|
-DBUILD_opencv_text=OFF
|
||||||
-DOPENCV_ENABLE_NONFREE=ON
|
-DOPENCV_ENABLE_NONFREE=ON
|
||||||
-DOPENCV_EXTRA_MODULES_PATH=#{buildpath}/opencv_contrib/modules
|
-DOPENCV_EXTRA_MODULES_PATH=#{buildpath}/opencv_contrib/modules
|
||||||
|
-DOPENCV_GENERATE_PKGCONFIG=ON
|
||||||
-DWITH_1394=OFF
|
-DWITH_1394=OFF
|
||||||
-DWITH_CUDA=OFF
|
-DWITH_CUDA=OFF
|
||||||
-DWITH_EIGEN=ON
|
-DWITH_EIGEN=ON
|
||||||
|
@ -103,14 +103,15 @@ class Opencv < Formula
|
||||||
|
|
||||||
test do
|
test do
|
||||||
(testpath/"test.cpp").write <<~EOS
|
(testpath/"test.cpp").write <<~EOS
|
||||||
#include <opencv/cv.h>
|
#include <opencv2/opencv.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
int main() {
|
int main() {
|
||||||
std::cout << CV_VERSION << std::endl;
|
std::cout << CV_VERSION << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-o", "test"
|
system ENV.cxx, "-std=c++11", "test.cpp", "-I#{include}/opencv4",
|
||||||
|
"-o", "test"
|
||||||
assert_equal `./test`.strip, version.to_s
|
assert_equal `./test`.strip, version.to_s
|
||||||
|
|
||||||
["python2.7", "python3"].each do |python|
|
["python2.7", "python3"].each do |python|
|
||||||
|
|
Loading…
Reference in New Issue