Browse files

Import gstreamer 0.10.x

  • Loading branch information...
1 parent 012f1f9 commit ef900c196fd7dfdbf407b9fe381ebe92e6c40e75 @jacknagel jacknagel committed Mar 23, 2013
Showing with 301 additions and 0 deletions.
  1. +35 −0 gst-plugins-bad010.rb
  2. +42 −0 gst-plugins-base010.rb
  3. +41 −0 gst-plugins-good010.rb
  4. +54 −0 gst-plugins-ugly010.rb
  5. +53 −0 gst-python010.rb
  6. +25 −0 gst-rtsp010.rb
  7. +51 −0 gstreamer010.rb
View
35 gst-plugins-bad010.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+class GstPluginsBad010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.23.tar.bz2'
+ sha256 '0eae7d1a1357ae8377fded6a1b42e663887beabe0e6cc336e2ef9ada42e11491'
+
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'homebrew/versions/gst-plugins-base010'
+
+ # These optional dependencies are based on the intersection of
+ # gst-plugins-bad-0.10.21/REQUIREMENTS and Homebrew formulae
+ depends_on 'dirac' => :optional
+ depends_on 'libdvdread' => :optional
+ depends_on 'libmms' => :optional
+
+ # These are not mentioned in REQUIREMENTS, but configure look for them
+ depends_on 'libexif' => :optional
+ depends_on 'faac' => :optional
+ depends_on 'faad2' => :optional
+ depends_on 'libsndfile' => :optional
+ depends_on 'schroedinger' => :optional
+ depends_on 'rtmpdump' => :optional
+
+ def install
+ ENV.append "CFLAGS", "-no-cpp-precomp -funroll-loops -fstrict-aliasing"
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--disable-sdl"
+ system "make"
+ system "make install"
+ end
+end
View
42 gst-plugins-base010.rb
@@ -0,0 +1,42 @@
+require 'formula'
+
+class GstPluginsBase010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.bz2'
+ sha256 '2cd3b0fa8e9b595db8f514ef7c2bdbcd639a0d63d154c00f8c9b609321f49976'
+
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'homebrew/versions/gstreamer010'
+
+ # The set of optional dependencies is based on the intersection of
+ # gst-plugins-base-0.10.35/REQUIREMENTS and Homebrew formulae
+ depends_on 'orc' => :optional
+ depends_on 'gtk+' => :optional
+ depends_on 'libogg' => :optional
+ depends_on 'pango' => :optional
+ depends_on 'theora' => :optional
+ depends_on 'libvorbis' => :optional
+
+ def install
+ # gnome-vfs turned off due to lack of formula for it.
+ args = %W[
+ --prefix=#{prefix}
+ --disable-debug
+ --disable-dependency-tracking
+ --enable-introspection=no
+ --enable-experimental
+ --disable-libvisual
+ --disable-alsa
+ --disable-cdparanoia
+ --without-x
+ --disable-x
+ --disable-xvideo
+ --disable-xshm
+ --disable-gnome_vfs
+ ]
+ system "./configure", *args
+ system "make"
+ system "make install"
+ end
+end
View
41 gst-plugins-good010.rb
@@ -0,0 +1,41 @@
+require 'formula'
+
+class GstPluginsGood010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.bz2'
+ sha256 '7e27840e40a7932ef2dc032d7201f9f41afcaf0b437daf5d1d44dc96d9e35ac6'
+
+ depends_on :x11
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'homebrew/versions/gst-plugins-base010'
+
+ # The set of optional dependencies is based on the intersection of
+ # gst-plugins-good-0.10.30/REQUIREMENTS and Homebrew formulae
+ depends_on 'orc' => :optional
+ depends_on 'gtk+' => :optional
+ depends_on 'check' => :optional
+ depends_on 'aalib' => :optional
+ depends_on 'libcdio' => :optional
+ depends_on 'esound' => :optional
+ depends_on 'flac' => :optional
+ depends_on 'jpeg' => :optional
+ depends_on 'libcaca' => :optional
+ depends_on 'libdv' => :optional
+ depends_on 'libshout' => :optional
+ depends_on 'speex' => :optional
+ depends_on 'taglib' => :optional
+ depends_on 'libsoup' => :optional
+
+ def install
+ system "./configure", "--disable-debug",
+ "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--disable-schemas-install",
+ "--disable-gtk-doc",
+ "--disable-goom",
+ "--with-default-videosink=ximagesink"
+ system "make"
+ system "make install"
+ end
+end
View
54 gst-plugins-ugly010.rb
@@ -0,0 +1,54 @@
+require 'formula'
+
+class GstPluginsUgly010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-0.10.19.tar.bz2'
+ sha256 '1ca90059275c0f5dca71d4d1601a8f429b7852baed0723e820703b977e2c8df0'
+
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'homebrew/versions/gst-plugins-base010'
+
+ # The set of optional dependencies is based on the intersection of
+ # gst-plugins-ugly-0.10.17/REQUIREMENTS and Homebrew formulae
+ depends_on 'dirac' => :optional
+ depends_on 'mad' => :optional
+ depends_on 'jpeg' => :optional
+ depends_on 'libvorbis' => :optional
+ depends_on 'cdparanoia' => :optional
+ depends_on 'lame' => :optional
+ depends_on 'two-lame' => :optional
+ depends_on 'libshout' => :optional
+ depends_on 'aalib' => :optional
+ depends_on 'libcaca' => :optional
+ depends_on 'libdvdread' => :optional
+ depends_on 'sdl' => :optional
+ depends_on 'libmpeg2' => :optional
+ depends_on 'a52dec' => :optional
+ depends_on 'liboil' => :optional
+ depends_on 'flac' => :optional
+ depends_on 'gtk+' => :optional
+ depends_on 'pango' => :optional
+ depends_on 'theora' => :optional
+ depends_on 'libmms' => :optional
+ depends_on 'x264' => :optional
+ depends_on 'opencore-amr' => :optional
+ # Does not work with libcdio 0.9
+
+ 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"
+
+ system "./configure", "--disable-debug", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--mandir=#{man}"
+ system "make"
+ system "make install"
+ end
+end
View
53 gst-python010.rb
@@ -0,0 +1,53 @@
+require 'formula'
+
+class GstPython010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.bz2'
+ sha1 '7012445d921ae1b325c162500750c9b0e777201f'
+
+ depends_on 'pkg-config' => :build
+ depends_on 'homebrew/versions/gst-plugins-base010'
+ depends_on 'pygtk'
+
+ def install
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}"
+ system "make install"
+ end
+
+ def caveats; <<-EOS.undent
+ For non-Homebrew Python, you need to amend your PYTHONPATH like so:
+ export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH
+ EOS
+ end
+
+ def which_python
+ "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
+ end
+
+ test do
+ (testpath/'test.py').write <<-EOS.undent
+ #!/usr/bin/env python
+
+ import time
+
+ import pygst
+ pygst.require('0.10')
+ import gst
+
+ import gobject
+ gobject.threads_init()
+
+ def main():
+ pipeline = gst.parse_launch(
+ 'audiotestsrc ! audioresample ! fakesink')
+ pipeline.set_state(gst.STATE_PLAYING)
+ time.sleep(3)
+
+ if __name__ == "__main__":
+ main()
+ EOS
+ system "chmod +x test.py"
+ system "./test.py"
+ end
+end
View
25 gst-rtsp010.rb
@@ -0,0 +1,25 @@
+require 'formula'
+
+class GstRtsp010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-0.10.8.tar.bz2'
+ sha256 '9915887cf8515bda87462c69738646afb715b597613edc7340477ccab63a6617'
+
+ depends_on :automake
+ depends_on :libtool
+
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'homebrew/versions/gst-plugins-base010'
+
+ def install
+ # Compatibility with Automake 1.13 and newer.
+ inreplace 'configure.ac', 'AM_CONFIG_HEADER', 'AC_CONFIG_HEADERS'
+ system "./autogen.sh", "--disable-debug", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--disable-schemas-install",
+ "--disable-gtk-doc"
+ system "make"
+ system "make install"
+ end
+end
View
51 gstreamer010.rb
@@ -0,0 +1,51 @@
+require 'formula'
+
+class Gstreamer010 < Formula
+ homepage 'http://gstreamer.freedesktop.org/'
+ url 'http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.bz2'
+ sha256 'e556a529e0a8cf1cd0afd0cab2af5488c9524e7c3f409de29b5d82bb41ae7a30'
+
+ depends_on 'pkg-config' => :build
+ depends_on 'gettext'
+ depends_on 'glib'
+
+ # Fix sed version detection for 10.8
+ # Reported and fixed upstream:
+ # https://bugzilla.gnome.org/show_bug.cgi?id=680428
+ def patches
+ DATA
+ end
+
+ def install
+ # Look for plugins in HOMEBREW_PREFIX/lib/gstreamer-0.10 instead of
+ # HOMEBREW_PREFIX/Cellar/gstreamer/0.10/lib/gstreamer-0.10, so we'll find
+ # plugins installed by other packages without setting GST_PLUGIN_PATH in
+ # the environment.
+ inreplace "configure", 'PLUGINDIR="$full_var"',
+ "PLUGINDIR=\"#{HOMEBREW_PREFIX}/lib/gstreamer-0.10\""
+
+ ENV.append "CFLAGS", "-funroll-loops -fstrict-aliasing -fno-common"
+
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--enable-introspection=no"
+ system "make"
+ system "make install"
+ end
+end
+
+__END__
+diff --git a/configure b/configure
+index 0af896d..20e6576 100755
+--- a/configure
++++ b/configure
+@@ -21304,7 +21304,7 @@ fi
+ fi
+
+ flex_min_version=2.5.31
+- flex_version=`$FLEX_PATH --version | head -n 1 | sed 's/^.* //' | sed 's/[a-zA-Z]*$//' | cut -d' ' -f1`
++ flex_version=`$FLEX_PATH --version | head -n 1 | awk '{print $2'}`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking flex version $flex_version >= $flex_min_version" >&5
+ $as_echo_n "checking flex version $flex_version >= $flex_min_version... " >&6; }
+ if perl -w <<EOF

1 comment on commit ef900c1

@hanxue

gst-plugins-good010 does not work with the following error:

  CCLD   libgstspeex.la
  CCLD   libgstjpeg.la
  CCLD   libgstannodex.la
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

The log files are located at https://gist.github.com/8517078

Some observations:
1. gstreamer010 and gst-plugins-base010 installed without any problems
2. Manually compiling the sources works fine, but no .dylibs are generated. Instead, libtool objects are created, e.g. libgstmatroska_la-matroska-demux.lo, though these are directly usable by apps on OS X.

Please sign in to comment.