aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDavid Christenson2015-03-25 04:38:19 -0600
committerMike McQuaid2015-04-19 15:31:45 +0100
commit796999630497389cec07b6d03aaf15cff5e05926 (patch)
tree01894cd8a38ad6576523baf14bacfa6f844e952c /Library
parentc08021c8c42b603662d3cae3c68ead1647017714 (diff)
downloadhomebrew-796999630497389cec07b6d03aaf15cff5e05926.tar.bz2
avidemux: fix build
- Add upstream patch to remove ffmpeg cmake target since ffmpeg binary building is disabled. - Remove unused dependencies: theora, rtmpdump, libvo-aacenc, openjpeg, speex, schroedinger, fdk-aac, opus, frei0r, libcaca - Specify that xvid, libvpx, and libass are only dependencies for building as they are statically linked. - Add aften and libdca as recommended dependencies - Add jack, two-lame, and fribidi as optional dependencies - Add SDL2 as an optional dependency and a patch to fix the use of a deprecated function (NSQuickDrawView). - Use patch from upstream's commit diff instead of inline, expand SDL patch explanation, use `if` block for SDL patch. Closes #38054. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/avidemux.rb55
1 files changed, 34 insertions, 21 deletions
diff --git a/Library/Formula/avidemux.rb b/Library/Formula/avidemux.rb
index e61d691f9..0060b0b17 100644
--- a/Library/Formula/avidemux.rb
+++ b/Library/Formula/avidemux.rb
@@ -1,15 +1,25 @@
-# Help! Wanted: someone who can get Avidemux working with SDL.
class Avidemux < Formula
homepage "http://fixounet.free.fr/avidemux/"
- url "https://downloads.sourceforge.net/avidemux/avidemux_2.6.8.tar.gz"
- sha256 "02998c235a89894d184d745c94cac37b78bc20e9eb44b318ee2bb83f2507e682"
- revision 1
+
+ stable do
+ url "https://downloads.sourceforge.net/avidemux/avidemux_2.6.8.tar.gz"
+ sha256 "02998c235a89894d184d745c94cac37b78bc20e9eb44b318ee2bb83f2507e682"
+
+ # remove ffmpeg binary from targets (fixed upstream)
+ # http://avidemux.org/smuf/index.php/topic,16379.15.html
+ patch do
+ url "https://github.com/mean00/avidemux2/commit/bf0185.diff"
+ sha256 "3ca5b4f1b5b3ec407a3daa5c811862ea6ed7ef6cdaaf187045e6e1c77c193800"
+ end
+ end
head do
url "https://github.com/mean00/avidemux2.git"
depends_on "x265"
end
+ revision 1
+
bottle do
sha256 "35f7e570a81d8b1fbeb406e04de695952eccb353ee2fad49ff1cf523b7fc86ac" => :yosemite
sha256 "ad6d67da1aaddd09b8dec534fa75d25ebc2d16f1ae6cba0653590274f0e3ff5c" => :mavericks
@@ -21,29 +31,34 @@ class Avidemux < Formula
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "yasm" => :build
+ depends_on "xvid" => [:build, :recommended]
+ depends_on "libvpx" => [:build, :recommended]
+ depends_on "libass" => [:build, :recommended]
depends_on "fontconfig"
depends_on "gettext"
depends_on "x264" => :recommended
depends_on "faac" => :recommended
depends_on "faad2" => :recommended
depends_on "lame" => :recommended
- depends_on "xvid" => :recommended
depends_on "freetype" => :recommended
- depends_on "theora" => :recommended
depends_on "libvorbis" => :recommended
- depends_on "libvpx" => :recommended
- depends_on "rtmpdump" => :recommended
depends_on "opencore-amr" => :recommended
- depends_on "libvo-aacenc" => :recommended
- depends_on "libass" => :recommended
- depends_on "openjpeg" => :recommended
- depends_on "speex" => :recommended
- depends_on "schroedinger" => :recommended
- depends_on "fdk-aac" => :recommended
- depends_on "opus" => :recommended
- depends_on "frei0r" => :recommended
- depends_on "libcaca" => :recommended
+ depends_on "aften" => :recommended
+ depends_on "libdca" => :recommended
depends_on "qt" => :recommended
+ depends_on "jack" => :optional
+ depends_on "two-lame" => :optional
+ depends_on "fribidi" => :optional
+ depends_on "sdl2" => :optional
+
+ if build.with? "sdl2"
+ # fix compilation against SDL, change deprecated NSQuickDrawView to NSView
+ # (submitted patch to developer via email)
+ patch do
+ url "https://gist.githubusercontent.com/Noctem/2c03f24daf6705964347/raw/dd6d27374e5ed44678f25b84da159ea57a9d8857/avidemux-sdl.patch"
+ sha256 "17cb0181fbe503e84ad9b2762eb182ad4ec3ef8df8a90741e4f3c0e4d0a8f1ff"
+ end
+ end
def install
ENV["REV"] = version.to_s
@@ -61,9 +76,7 @@ class Avidemux < Formula
args = std_cmake_args
args << "-DAVIDEMUX_SOURCE_DIR=#{buildpath}"
args << "-DGETTEXT_INCLUDE_DIR=#{Formula["gettext"].opt_include}"
- # TODO: We could depend on SDL and then remove the `-DSDL=OFF` arguments
- # but I got build errors about NSview.
- args << "-DSDL=OFF"
+ args << "-DSDL=OFF" if build.without? "sdl2"
if build.with? "debug"
ENV.O2
@@ -94,7 +107,7 @@ class Avidemux < Formula
args = std_cmake_args
args << "-DAVIDEMUX_SOURCE_DIR=#{buildpath}"
args << "-DAVIDEMUX_LIB_DIR=#{lib}"
- args << "-DSDL=OFF"
+ args << "-DSDL=OFF" if build.without? "sdl2"
args << "../avidemux/#{interface}"
system "cmake", *args
system "make"