@@ -10,6 +10,8 @@ class FfmpegMa < Formula
10
10
regex ( /href=.*?ffmpeg[._-]v?(\d +(?:\. \d +)+)\. t/i )
11
11
end
12
12
13
+ option "with-iec61883" , "Enable DV device (Linux)" if OS . linux?
14
+
13
15
depends_on "pkgconf" => :build
14
16
depends_on "freetype"
15
17
depends_on "harfbuzz"
@@ -68,8 +70,6 @@ def install
68
70
--disable-shared
69
71
--enable-static
70
72
--enable-pthreads
71
- --enable-videotoolbox
72
- --enable-audiotoolbox
73
73
--enable-libfreetype
74
74
--enable-libharfbuzz
75
75
--enable-libopenh264
@@ -79,13 +79,18 @@ def install
79
79
--enable-zlib
80
80
--enable-sdl2
81
81
--enable-ffplay
82
- --extra-cflags=-IDeckLinkSDK/Mac/include
83
82
]
84
83
85
84
args << "--enable-neon" if Hardware ::CPU . arm?
85
+ args << "--enable-videotoolbox" if OS . mac?
86
+ args << "--enable-audiotoolbox" if OS . mac?
87
+ args << "--extra-cflags=-IDeckLinkSDK/Mac/include" if OS . mac?
88
+ args << "--extra-cflags=-IDeckLinkSDK/Linux/include" if OS . linux?
89
+ args << "--enable-libiec61883" if ( build . with? "iec61883" ) && OS . linux?
86
90
87
91
system "./configure" , *args
88
- rm "version" # Remove this file, CFLAGS contains -I. and its confused with the C++ <version> standard header
92
+ # Remove this file, CFLAGS contains -I. and its confused with the C++ <version> standard header
93
+ rm "version" if File . file? ( "version" )
89
94
system "make"
90
95
91
96
bin . install buildpath . children . select { |f | f . file? && f . executable? && f . basename . to_s . end_with? ( "-ma" ) }
@@ -94,7 +99,7 @@ def install
94
99
test do
95
100
# Create an example mp4 file
96
101
mp4out = testpath /"video.mp4"
97
- system bin /"ffmpeg" , "-filter_complex" , "testsrc=rate=1:duration=1" , mp4out
102
+ system bin /"ffmpeg-ma " , "-filter_complex" , "testsrc=rate=1:duration=1" , mp4out
98
103
assert_path_exists mp4out
99
104
end
100
105
end
0 commit comments