2010-07-28 17:09:39 +00:00
|
|
|
# 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
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Multimedia framework for research and academic purposes"
|
2015-06-10 20:35:06 +00:00
|
|
|
homepage "https://gpac.wp.mines-telecom.fr/"
|
|
|
|
head "https://github.com/gpac/gpac.git"
|
2014-09-28 16:18:05 +00:00
|
|
|
|
|
|
|
stable do
|
2015-04-19 16:17:47 +00:00
|
|
|
url "https://github.com/gpac/gpac/archive/v0.5.2.tar.gz"
|
|
|
|
sha256 "14de020482fc0452240f368564baa95a71b729980e4f36d94dd75c43ac4d9d5c"
|
2014-09-28 16:18:05 +00:00
|
|
|
end
|
2015-06-10 20:57:58 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "3feeb23cfe274e9e8e42cc1589ccd45a4b9c9006444bfce9205454c242abe205" => :yosemite
|
|
|
|
sha256 "495e9d51129841da9b135a8112c34ab831f01dfffb5f18db44e59b83813f16c0" => :mavericks
|
|
|
|
sha256 "b6291bcf89fc7ea7232e060ddebc3b5c561009a0923ad54b40ab991875c2fa57" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-04-19 16:17:47 +00:00
|
|
|
depends_on "openssl"
|
|
|
|
depends_on "pkg-config" => :build
|
2015-04-11 17:26:31 +00:00
|
|
|
depends_on :x11 => :optional
|
2015-04-19 16:17:47 +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
|
|
|
|
depends_on "sdl" => :optional
|
|
|
|
depends_on "theora" => :optional
|
|
|
|
depends_on "ffmpeg" => :optional
|
|
|
|
depends_on "openjpeg" => :optional
|
2010-07-28 17:09:39 +00:00
|
|
|
|
|
|
|
def install
|
2011-11-03 17:22:37 +00:00
|
|
|
args = ["--disable-wx",
|
|
|
|
"--prefix=#{prefix}",
|
2013-08-08 20:58:22 +00:00
|
|
|
"--mandir=#{man}"]
|
|
|
|
|
2015-04-19 16:17:47 +00:00
|
|
|
if build.with? "x11"
|
2013-08-08 20:58:22 +00:00
|
|
|
# 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}"
|
2015-04-11 17:26:31 +00:00
|
|
|
else
|
2015-06-10 20:35:06 +00:00
|
|
|
# https://github.com/gpac/gpac/issues/166
|
|
|
|
inreplace "configure", "has_x11=\"yes\"", "has_x11=\"no\""
|
2015-04-11 17:26:31 +00:00
|
|
|
args << "--disable-x11-shm" << "--disable-x11-xv"
|
2013-08-08 20:58:22 +00:00
|
|
|
end
|
2011-11-03 17:22:37 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-07-28 17:09:39 +00:00
|
|
|
system "make"
|
2015-04-19 16:17:47 +00:00
|
|
|
system "make", "install"
|
2010-07-28 17:09:39 +00:00
|
|
|
end
|
2014-01-22 05:01:29 +00:00
|
|
|
|
2015-04-19 16:17:47 +00:00
|
|
|
test do
|
|
|
|
system "MP4Box", "-h"
|
|
|
|
end
|
|
|
|
end
|