-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'credits-rework' of https://github.com/Aidoneus/Vangers …
…into credits-rework
- Loading branch information
Showing
6 changed files
with
99 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,75 @@ | ||
class Libogg < Formula | ||
desc "Ogg Bitstream Library" | ||
homepage "https://www.xiph.org/ogg/" | ||
desc "Ogg Bitstream Library" | ||
homepage "https://www.xiph.org/ogg/" | ||
url "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.tar.gz" | ||
sha256 "0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664" | ||
license "BSD-3-Clause" | ||
|
||
stable do | ||
url "https://downloads.xiph.org/releases/ogg/libogg-1.3.4.tar.gz" | ||
sha256 "fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e" | ||
|
||
# os_types: fix unsigned typedefs for MacOS. This is already merged upstream; remove on next version | ||
patch do | ||
url "https://github.com/xiph/ogg/commit/c8fca6b4a02d695b1ceea39b330d4406001c03ed.patch?full_index=1" | ||
sha256 "0f4d289aecb3d5f7329d51f1a72ab10c04c336b25481a40d6d841120721be485" | ||
end | ||
end | ||
|
||
bottle do | ||
cellar :any | ||
rebuild 1 | ||
sha256 "b95bbf935f48878bd96d1c0e6557a017aa18cb17a080bc3ef9308b6415c278ef" => :catalina | ||
sha256 "3cc7656859154f6eb98d3ddbe4b74c810b505e2162af1357b3ed6b70cad35125" => :mojave | ||
sha256 "95f271ec181f6b999674636272a3414db4242eabd0a0b0572cfa0f1f324f5ef8" => :high_sierra | ||
end | ||
|
||
head do | ||
url "https://gitlab.xiph.org/xiph/ogg.git" | ||
|
||
depends_on "autoconf" => :build | ||
depends_on "automake" => :build | ||
depends_on "libtool" => :build | ||
end | ||
|
||
resource("oggfile") do | ||
url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg" | ||
sha256 "379071af4fa77bc7dacf892ad81d3f92040a628367d34a451a2cdcc997ef27b0" | ||
end | ||
|
||
def install | ||
system "./autogen.sh" if build.head? | ||
ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.12" | ||
system "./configure", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}" | ||
system "make" | ||
ENV.deparallelize | ||
system "make", "install" | ||
end | ||
|
||
test do | ||
(testpath/"test.c").write <<~EOS | ||
#include <ogg/ogg.h> | ||
#include <stdio.h> | ||
int main (void) { | ||
ogg_sync_state oy; | ||
ogg_stream_state os; | ||
ogg_page og; | ||
ogg_packet op; | ||
char *buffer; | ||
int bytes; | ||
ogg_sync_init (&oy); | ||
buffer = ogg_sync_buffer (&oy, 4096); | ||
bytes = fread(buffer, 1, 4096, stdin); | ||
ogg_sync_wrote (&oy, bytes); | ||
if (ogg_sync_pageout (&oy, &og) != 1) | ||
return 1; | ||
ogg_stream_init (&os, ogg_page_serialno (&og)); | ||
if (ogg_stream_pagein (&os, &og) < 0) | ||
return 1; | ||
if (ogg_stream_packetout (&os, &op) != 1) | ||
return 1; | ||
return 0; | ||
} | ||
EOS | ||
testpath.install resource("oggfile") | ||
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-logg", | ||
"-o", "test" | ||
# Should work on an OGG file | ||
shell_output("./test < Example.ogg") | ||
# Expected to fail on a non-OGG file | ||
shell_output("./test < #{test_fixtures("test.wav")}", 1) | ||
end | ||
end | ||
bottle do | ||
rebuild 1 | ||
sha256 cellar: :any, arm64_big_sur: "86f7182a3e7ad1a6cbc0520424875fcad195c97ee62db95d7b5e863be95eee95" | ||
sha256 cellar: :any, big_sur: "b28fe3ad76ad6caafbedb2587deac3b4f03f79cb1466e6f76a06724eaae346ee" | ||
sha256 cellar: :any, catalina: "e6c116ef9fa7ebac93b5b22fb1208d1d1f4b000fdfdae4b0ae9ec18fe5a5412c" | ||
sha256 cellar: :any, mojave: "f416f50ef34e470f690e27f3c29f65d6fe5b1aec56f16a2a312ba6011e809720" | ||
end | ||
|
||
head do | ||
url "https://gitlab.xiph.org/xiph/ogg.git" | ||
|
||
depends_on "autoconf" => :build | ||
depends_on "automake" => :build | ||
depends_on "libtool" => :build | ||
end | ||
|
||
resource("oggfile") do | ||
url "https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg" | ||
sha256 "379071af4fa77bc7dacf892ad81d3f92040a628367d34a451a2cdcc997ef27b0" | ||
end | ||
|
||
def install | ||
system "./autogen.sh" if build.head? | ||
ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.12" | ||
system "./configure", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}" | ||
system "make" | ||
ENV.deparallelize | ||
system "make", "install" | ||
end | ||
|
||
test do | ||
(testpath/"test.c").write <<~EOS | ||
#include <ogg/ogg.h> | ||
#include <stdio.h> | ||
int main (void) { | ||
ogg_sync_state oy; | ||
ogg_stream_state os; | ||
ogg_page og; | ||
ogg_packet op; | ||
char *buffer; | ||
int bytes; | ||
ogg_sync_init (&oy); | ||
buffer = ogg_sync_buffer (&oy, 4096); | ||
bytes = fread(buffer, 1, 4096, stdin); | ||
ogg_sync_wrote (&oy, bytes); | ||
if (ogg_sync_pageout (&oy, &og) != 1) | ||
return 1; | ||
ogg_stream_init (&os, ogg_page_serialno (&og)); | ||
if (ogg_stream_pagein (&os, &og) < 0) | ||
return 1; | ||
if (ogg_stream_packetout (&os, &op) != 1) | ||
return 1; | ||
return 0; | ||
} | ||
EOS | ||
testpath.install resource("oggfile") | ||
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-logg", | ||
"-o", "test" | ||
# Should work on an OGG file | ||
shell_output("./test < Example.ogg") | ||
# Expected to fail on a non-OGG file | ||
shell_output("./test < #{test_fixtures("test.wav")}", 1) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters