diff options
| author | Jack Nagel | 2013-03-23 17:12:11 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-03-23 17:17:31 -0500 |
| commit | a9c24547f149a556977ade24f5cc41569e27b87a (patch) | |
| tree | 589628a2e4111c77a9d1bb967529c80889b5eea0 /Library/Formula | |
| parent | 50790f56f9e520d7f4ea1bddece92c600e50056e (diff) | |
| download | homebrew-a9c24547f149a556977ade24f5cc41569e27b87a.tar.bz2 | |
gst-plugins-ugly: opencore-amr flags are optional
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/gst-plugins-ugly.rb | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/Library/Formula/gst-plugins-ugly.rb b/Library/Formula/gst-plugins-ugly.rb index 9854bc5a2..77129a065 100644 --- a/Library/Formula/gst-plugins-ugly.rb +++ b/Library/Formula/gst-plugins-ugly.rb @@ -38,16 +38,25 @@ class GstPluginsUgly < Formula def install ENV.append "CFLAGS", "-no-cpp-precomp -funroll-loops -fstrict-aliasing" - # Fixes build error, missing includes. - # https://github.com/mxcl/homebrew/issues/14078 - nbcflags = `pkg-config --cflags opencore-amrnb`.chomp - wbcflags = `pkg-config --cflags opencore-amrwb`.chomp - ENV['AMRNB_CFLAGS'] = nbcflags + "-I#{HOMEBREW_PREFIX}/include/opencore-amrnb" - ENV['AMRWB_CFLAGS'] = wbcflags + "-I#{HOMEBREW_PREFIX}/include/opencore-amrwb" + args = %W[ + --disable-debug + --disable-dependency-tracking + --prefix=#{prefix} + --mandir=#{man} + ] - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--mandir=#{man}" + if build.with? "opencore-amr" + # Fixes build error, missing includes. + # https://github.com/mxcl/homebrew/issues/14078 + nbcflags = `pkg-config --cflags opencore-amrnb`.chomp + wbcflags = `pkg-config --cflags opencore-amrwb`.chomp + ENV['AMRNB_CFLAGS'] = nbcflags + "-I#{HOMEBREW_PREFIX}/include/opencore-amrnb" + ENV['AMRWB_CFLAGS'] = wbcflags + "-I#{HOMEBREW_PREFIX}/include/opencore-amrwb" + else + args << "--disable-amrnb" << "--disable-amrwb" + end + + system "./configure", *args system "make" system "make install" end |
