diff options
| author | Jack Nagel | 2013-06-26 19:01:47 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-06-26 19:02:49 -0500 |
| commit | c9b82819d29b0ded0b47e686d0fbd5065a786b76 (patch) | |
| tree | 835cb5ccc3099ed7475d33881387adf0e5f3d567 /Library/Formula | |
| parent | be38b92d68c43519ca09abd3daee84f60e89c2b5 (diff) | |
| download | homebrew-c9b82819d29b0ded0b47e686d0fbd5065a786b76.tar.bz2 | |
avidemux: style
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/avidemux.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Library/Formula/avidemux.rb b/Library/Formula/avidemux.rb index e7ee01587..4ae6e612c 100644 --- a/Library/Formula/avidemux.rb +++ b/Library/Formula/avidemux.rb @@ -44,7 +44,7 @@ class Avidemux < Formula # 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 build.head? then + if build.head? inreplace 'CMakeLists.txt', 'admGetRevision(${PROJECT_SOURCE_DIR} ADM_SUBVERSION)', "admGetRevision(\"#{cached_download}\" ADM_SUBVERSION)" @@ -77,14 +77,20 @@ class Avidemux < Formula -DGTK=OFF -DSDL=OFF ] - if build.include? 'with-debug' then - (ENV.compiler == :clang) ? ENV.Og : ENV.O2 + + if build.with? 'debug' ENV.deparallelize - ENV.remove_from_cflags '-w' + ENV.enable_warnings 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 + ENV.Og + else + ENV.O2 + args << '-DCMAKE_C_FLAGS_DEBUG=-ggdb3' + args << '-DCMAKE_CXX_FLAGS_DEBUG=-ggdb3' + end end args << buildpath system "cmake", *args @@ -125,7 +131,8 @@ class Avidemux < Formula -DAVIDEMUX_INSTALL_PREFIX=#{prefix} -DAVIDEMUX_CORECONFIG_DIR=#{buildpath}/corebuild/config ] - if build.include? 'with-debug' then + + if build.with? 'debug' args << '-DCMAKE_BUILD_TYPE=Debug' args << '-DCMAKE_VERBOSE_MAKEFILE=true' if ENV.compiler != :clang @@ -161,7 +168,7 @@ class Avidemux < Formula # 3. and copy all the plugins we made to it, # 4. but omit any plugins that are for the CLI only. # 5. CLI only files end in cli.dylib. - if File.exists? prefix+'avidemux2.app' then + if File.exists? prefix+'avidemux2.app' app_lib_path = prefix+'avidemux2.app/Contents/lib' app_plug_path = prefix+'avidemux2.app/Contents/lib/ADM_plugins' cellar_plug_path = lib+'ADM_plugins' |
