Skip to content

Commit

Permalink
Import gstreamer 0.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Mar 23, 2013
1 parent 012f1f9 commit ef900c1
Show file tree
Hide file tree
Showing 7 changed files with 301 additions and 0 deletions.
35 changes: 35 additions & 0 deletions gst-plugins-bad010.rb
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions gst-plugins-base010.rb
Original file line number Diff line number Diff line change
@@ -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
41 changes: 41 additions & 0 deletions gst-plugins-good010.rb
Original file line number Diff line number Diff line change
@@ -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
54 changes: 54 additions & 0 deletions gst-plugins-ugly010.rb
Original file line number Diff line number Diff line change
@@ -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
53 changes: 53 additions & 0 deletions gst-python010.rb
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions gst-rtsp010.rb
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions gstreamer010.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ef900c1

Please sign in to comment.