aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-02-03 09:53:56 +0100
committerMike McQuaid2015-02-03 11:08:06 +0000
commit3a6c0f83b179920aa7505d6dd1a0f6dc653d995e (patch)
treead2b67acc1d318b2d2d0f314885b61ecd70761cb /Library/Formula
parentf24dfeff0c33176e6e0c84a74f3cda9bc4910f74 (diff)
downloadhomebrew-3a6c0f83b179920aa7505d6dd1a0f6dc653d995e.tar.bz2
ccextractor: cmake-based install and proper test added
Closes #36491. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ccextractor.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/Library/Formula/ccextractor.rb b/Library/Formula/ccextractor.rb
index 80d38c568..8ccd1bbf3 100644
--- a/Library/Formula/ccextractor.rb
+++ b/Library/Formula/ccextractor.rb
@@ -3,6 +3,10 @@ class Ccextractor < Formula
url "https://downloads.sourceforge.net/project/ccextractor/ccextractor/0.75/ccextractor.src.0.75.zip"
sha1 "c36f8eadb2074d88782d6628e07c762e80e4c31c"
head "https://github.com/ccextractor/ccextractor.git"
+ revision 1
+
+ depends_on "cmake" => :build
+ depends_on "libpng"
bottle do
cellar :any
@@ -12,15 +16,15 @@ class Ccextractor < Formula
end
def install
- cd "mac" do
- system "bash", "./build.command"
- bin.install "ccextractor"
- end
- (share+"examples").install "docs/ccextractor.cnf.sample"
+ system "cmake", "src", *std_cmake_args
+ system "make"
+ system "make", "install"
+ (share/"examples").install "docs/ccextractor.cnf.sample"
end
test do
- # Without a closed captioned file to play with, we're limited here.
- assert_match /outputfilename/, pipe_output("#{bin}/ccextractor 2>&1")
+ touch testpath/"test"
+ system "ccextractor", "test"
+ assert File.exist? "test.srt"
end
end