libmpeg2: run autoreconf before configure.

A test is also added.

Closes #65627.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Hill Ma 2020-11-24 15:57:31 -08:00 committed by BrewTestBot
parent 2e88af92d2
commit 96f73ddd1d
1 changed files with 10 additions and 1 deletions

View File

@ -3,7 +3,7 @@ class Libmpeg2 < Formula
homepage "https://libmpeg2.sourceforge.io/"
url "https://libmpeg2.sourceforge.io/files/libmpeg2-0.5.1.tar.gz"
sha256 "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4"
license "GPL-2.0"
license "GPL-2.0-or-later"
bottle do
cellar :any
@ -18,14 +18,23 @@ class Libmpeg2 < Formula
sha256 "f6a868beb10fbf84d3eb1af556478ecbfb238d28608a53b99e607c02910e5e49" => :mavericks
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "sdl"
def install
# Otherwise compilation fails in clang with `duplicate symbol ___sputc`
ENV.append_to_cflags "-std=gnu89"
system "autoreconf", "-fiv"
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
pkgshare.install "doc/sample1.c"
end
test do
system ENV.cc, "-I#{include}/mpeg2dec", "-L#{lib}", "-lmpeg2", pkgshare/"sample1.c"
end
end