2010-07-28 17:09:39 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
# Installs a relatively minimalist version of the GPAC tools. The
|
|
|
|
# most commonly used tool in this package is the MP4Box metadata
|
|
|
|
# interleaver, which has relatively few dependencies.
|
|
|
|
#
|
|
|
|
# The challenge with building everything is that Gpac depends on
|
|
|
|
# a much older version of FFMpeg and WxWidgets than the version
|
|
|
|
# that Brew installs
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gpac < Formula
|
2013-10-08 23:42:31 +00:00
|
|
|
homepage 'http://gpac.wp.mines-telecom.fr/'
|
2012-06-08 20:01:14 +00:00
|
|
|
url 'http://downloads.sourceforge.net/gpac/gpac-0.5.0.tar.gz'
|
|
|
|
sha1 '48ba16272bfa153abb281ff8ed31b5dddf60cf20'
|
|
|
|
|
2013-05-28 05:32:27 +00:00
|
|
|
head 'https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac'
|
2010-07-28 17:09:39 +00:00
|
|
|
|
2013-08-08 20:58:22 +00:00
|
|
|
depends_on :x11 => MacOS::X11.installed? ? :recommended : :optional
|
2012-06-07 01:35:12 +00:00
|
|
|
|
2013-04-29 17:17:32 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2011-11-03 17:22:37 +00:00
|
|
|
depends_on 'a52dec' => :optional
|
|
|
|
depends_on 'jpeg' => :optional
|
|
|
|
depends_on 'faad2' => :optional
|
|
|
|
depends_on 'libogg' => :optional
|
|
|
|
depends_on 'libvorbis' => :optional
|
|
|
|
depends_on 'mad' => :optional
|
2010-07-28 17:09:39 +00:00
|
|
|
depends_on 'sdl' => :optional
|
2011-11-03 17:22:37 +00:00
|
|
|
depends_on 'theora' => :optional
|
2012-06-08 20:01:14 +00:00
|
|
|
depends_on 'ffmpeg' => :optional
|
|
|
|
depends_on 'openjpeg' => :optional
|
2010-07-28 17:09:39 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
2012-02-26 14:28:48 +00:00
|
|
|
|
2011-11-03 17:22:37 +00:00
|
|
|
args = ["--disable-wx",
|
|
|
|
"--prefix=#{prefix}",
|
2013-08-08 20:58:22 +00:00
|
|
|
"--mandir=#{man}"]
|
|
|
|
|
|
|
|
if build.with? 'x11'
|
|
|
|
# gpac build system is barely functional
|
2013-08-08 21:16:55 +00:00
|
|
|
args << "--extra-cflags=-I#{MacOS::X11.include}"
|
2013-08-08 20:58:22 +00:00
|
|
|
# Force detection of X libs on 64-bit kernel
|
|
|
|
args << "--extra-ldflags=-L#{MacOS::X11.lib}"
|
|
|
|
end
|
2011-11-03 17:22:37 +00:00
|
|
|
|
2012-09-13 16:10:01 +00:00
|
|
|
chmod 0700, "configure"
|
2011-11-03 17:22:37 +00:00
|
|
|
system "./configure", *args
|
2010-07-28 17:09:39 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|