aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/avidemux.rb36
1 files changed, 17 insertions, 19 deletions
diff --git a/Library/Formula/avidemux.rb b/Library/Formula/avidemux.rb
index f3ae7166e..606ca688c 100644
--- a/Library/Formula/avidemux.rb
+++ b/Library/Formula/avidemux.rb
@@ -8,6 +8,8 @@ class Avidemux < Formula
head 'http://svn.berlios.de/svnroot/repos/avidemux/branches/avidemux_2.5_branch_gruntster'
+ option 'with-debug', 'Enable debug build.'
+
depends_on 'pkg-config' => :build
depends_on 'cmake' => :build
depends_on 'yasm' => :build
@@ -31,22 +33,18 @@ class Avidemux < Formula
fails_with :clang do
build 318
cause "error in backend: Couldn't allocate input reg for constraint"
- end unless ARGV.include? '--with-debug'
-
- def options
- [[ '--with-debug', 'Enable debug build.' ]]
- end
+ end unless build.include? '--with-debug'
def patches
# Symbols undefined due to optimization. Fixed in head. Remove @ 2.5.7.
- DATA if Hardware.is_32_bit? and not ARGV.build_head?
+ DATA if Hardware.is_32_bit? and not build.head?
end
def install
# Avidemux is coded to use the .svn or .git directory to find its revision,
# but neither vcs copies those during clone from the cache to the stagedir.
# Modify cmake/admMainChecks.cmake to look in the Homebrew cache.
- if ARGV.build_head? then
+ if build.head? then
inreplace 'CMakeLists.txt',
'admGetRevision(${PROJECT_SOURCE_DIR} ADM_SUBVERSION)',
"admGetRevision(\"#{cached_download}\" ADM_SUBVERSION)"
@@ -70,7 +68,6 @@ class Avidemux < Formula
'${CMAKE_INSTALL_PREFIX} --extra-cflags=-mdynamic-no-pic)'
end
-
# Build the core.
gettext = Formula.factory('gettext')
mkdir 'corebuild' do
@@ -80,7 +77,7 @@ class Avidemux < Formula
-DGTK=OFF
-DSDL=OFF
]
- if ARGV.include? '--with-debug' then
+ if build.include? '--with-debug' then
(ENV.compiler == :clang) ? ENV.Og : ENV.O2
ENV.deparallelize
ENV.remove_from_cflags '-w'
@@ -128,11 +125,13 @@ class Avidemux < Formula
-DAVIDEMUX_INSTALL_PREFIX=#{prefix}
-DAVIDEMUX_CORECONFIG_DIR=#{buildpath}/corebuild/config
]
- if ARGV.include? '--with-debug' then
+ if build.include? '--with-debug' then
args << '-DCMAKE_BUILD_TYPE=Debug'
args << '-DCMAKE_VERBOSE_MAKEFILE=true'
- args << '-DCMAKE_C_FLAGS_DEBUG=-ggdb3' if ENV.compiler != :clang
- args << '-DCMAKE_CXX_FLAGS_DEBUG=-ggdb3' if ENV.compiler != :clang
+ if ENV.compiler != :clang
+ args << '-DCMAKE_C_FLAGS_DEBUG=-ggdb3'
+ args << '-DCMAKE_CXX_FLAGS_DEBUG=-ggdb3'
+ end
end
args << "#{buildpath}/plugins"
system "cmake", *args
@@ -175,13 +174,12 @@ class Avidemux < Formula
end # of plugbuild
end
- def caveats
- <<-EOS.undent
- The command line program avidemux2_cli gets installed in your PATH.
- The Qt gui is installed if you have Qt4, and its location is
- #{prefix}/avidemux2.app
- You can double-click it in Finder or link it into ~/Applications with
- brew linkapps
+ def caveats; <<-EOS.undent
+ The command line program avidemux2_cli gets installed in your PATH.
+ The Qt gui is installed if you have Qt4, and its location is
+ #{prefix}/avidemux2.app
+ You can double-click it in Finder or link it into ~/Applications with
+ brew linkapps
EOS
end
end