Skip to content

Commit

Permalink
Merge branch 'credits-rework' of https://github.com/Aidoneus/Vangers
Browse files Browse the repository at this point in the history
…into credits-rework
  • Loading branch information
Aidoneus committed Jul 25, 2021
2 parents d7d82bf + 98e89ae commit 69e59ce
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 105 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/vangers_macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
- name: install libs
run: |
brew install ninja yasm dylibbundler
- name: install our libs
run: |
brew reinstall -s ./formulas/libsndfile.rb
brew reinstall -s ./formulas/libogg.rb
brew reinstall -s ./formulas/libvorbis.rb
Expand Down
154 changes: 73 additions & 81 deletions formulas/libogg.rb
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
18 changes: 9 additions & 9 deletions formulas/libsndfile.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class Libsndfile < Formula
desc "C library for files containing sampled sound"
homepage "http://www.mega-nerd.com/libsndfile/"
url "https://github.com/erikd/libsndfile/releases/download/v1.0.30/libsndfile-1.0.30.tar.bz2"
sha256 "9df273302c4fa160567f412e10cc4f76666b66281e7ba48370fb544e87e4611a"
homepage "https://libsndfile.github.io/libsndfile/"
url "https://github.com/libsndfile/libsndfile/releases/download/1.0.31/libsndfile-1.0.31.tar.bz2"
sha256 "a8cfb1c09ea6e90eff4ca87322d4168cdbe5035cb48717b40bf77e751cc02163"
license "LGPL-2.1-or-later"

livecheck do
url :homepage
regex(/href=.*?libsndfile[._-]v?([\d.]+)\.t/i)
url :stable
strategy :github_latest
end

bottle do
cellar :any
sha256 "bf93a0083eecbcadc7eb391b9f429e0f55c4f571b5f4d9104cfaf60f8e5932dc" => :catalina
sha256 "ef1bd6eb6f6d33e22a05116b0893d85422e3ad7fced4252eace97232e523075d" => :mojave
sha256 "9d7d184ccf41eff27b8425a8fd50d60fa8a383338efcd0dcf7121f0ce7e3545c" => :high_sierra
sha256 cellar: :any, arm64_big_sur: "8e2fc3b0df09a21840f8643f644bd3a0bb3c3551d21f600b344f6b316d3ef44d"
sha256 cellar: :any, big_sur: "a4a734e58220fc8615d86e4563e9a874447d568151b366aa94391dfe07c4e0fb"
sha256 cellar: :any, catalina: "671a3cc9c7dafd89cbaffeccf4de826262c144184bf5779320c236e87e7636cc"
sha256 cellar: :any, mojave: "8b2876610f9188e8125f636e85bcbd525343b216c6d0787954e78b88dfe8f101"
end

depends_on "autoconf" => :build
Expand Down
14 changes: 8 additions & 6 deletions formulas/libvorbis.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
class Libvorbis < Formula
desc "Vorbis General Audio Compression Codec"
homepage "https://xiph.org/vorbis/"
url "https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.xz"
sha256 "af00bb5a784e7c9e69f56823de4637c350643deedaf333d0fa86ecdba6fcb415"
url "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.xz"
sha256 "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b"
license "BSD-3-Clause"

bottle do
cellar :any
rebuild 1
sha256 "78dd589f9c2110c204e8762d3ee2899b209cded2bd372603be0fc8c748f52cd4" => :catalina
sha256 "2fdfb811a94b56091aa3175708e92f7371c59a961a798fe8dfb2a82d0241406e" => :mojave
sha256 "434729ebb5c161e3240dde60f752af6bbec324af3b7df87f802d48134db92afb" => :high_sierra
sha256 cellar: :any, arm64_big_sur: "07ab1118fc6d389a8b0506d0b74a3cfc12026a837c8f2609b2133318c8818c81"
sha256 cellar: :any, big_sur: "05e639c274f52924cbf31fb4337888ab51554a66597486aeed8e5942d267c586"
sha256 cellar: :any, catalina: "432eb21045d9dfac3ef879648d845d894cc828862f5498448fe98c0141ef5cd0"
sha256 cellar: :any, mojave: "59509a351e88352f01512b54cc5cb849c2551623f7d6dcd6679d38b5e96032ed"
sha256 cellar: :any, high_sierra: "3e6609520d0ffd7179f721c23c1291f2735b70384d56d1c1dd10185ae355c4b2"
end

head do
Expand Down
1 change: 0 additions & 1 deletion formulas/sdl2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class Sdl2 < Formula
revision 1

bottle do
cellar :any
sha256 cellar: :any, big_sur: "ccde7145d4334d9274f9588e6b841bf3749729682e1d25f590bdcf7994dfdd89"
sha256 cellar: :any, catalina: "d6ae3300160c5bb495b78a5c5c0fc995f9e797e9cdd4b04ef77d59d45d2d694d"
sha256 cellar: :any, mojave: "4f3988fb3af0f370bc1648d6eb1d6573fd37381df0f3b9ee0874a49d6a7dec2e"
Expand Down
15 changes: 7 additions & 8 deletions formulas/sdl2_net.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ class Sdl2Net < Formula
sha256 "15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21"

bottle do
cellar :any
sha256 "920e892ba80cba3a99d4a15473351be5dc23f0d9445c28480c5dae904e8a8271" => :catalina
sha256 "0631754a7016b3e6e175644cc7976cc22843f7b872e8f50662d0cb50a4264901" => :mojave
sha256 "f193c7c2ae1b7f2c82cbbc9b83a16fc72d845c6396ecd33644eea19695a850ee" => :high_sierra
sha256 "dc2b96762f77dd4d42fea1da4d4c2373692dd0a531f686f00de0dd4a6eed8df9" => :sierra
sha256 "46d189ebe1f240381a9e8d99a2cb249e577cec98e6399e741e47275735a3471c" => :el_capitan
sha256 "2e2bcc1e1aac84b37ebb44398e463d9004764aa369489926cd07bb97cb9f60c4" => :yosemite
sha256 "ebabcb8f4df6fdee7855a6e19080aea42d9909205b287312015179bb9b3f472a" => :mavericks
sha256 cellar: :any, catalina: "920e892ba80cba3a99d4a15473351be5dc23f0d9445c28480c5dae904e8a8271"
sha256 cellar: :any, mojave: "0631754a7016b3e6e175644cc7976cc22843f7b872e8f50662d0cb50a4264901"
sha256 cellar: :any, high_sierra: "f193c7c2ae1b7f2c82cbbc9b83a16fc72d845c6396ecd33644eea19695a850ee"
sha256 cellar: :any, sierra: "dc2b96762f77dd4d42fea1da4d4c2373692dd0a531f686f00de0dd4a6eed8df9"
sha256 cellar: :any, el_capitan: "46d189ebe1f240381a9e8d99a2cb249e577cec98e6399e741e47275735a3471c"
sha256 cellar: :any, yosemite: "2e2bcc1e1aac84b37ebb44398e463d9004764aa369489926cd07bb97cb9f60c4"
sha256 cellar: :any, mavericks: "ebabcb8f4df6fdee7855a6e19080aea42d9909205b287312015179bb9b3f472a"
end

depends_on "pkg-config" => :build
Expand Down

0 comments on commit 69e59ce

Please sign in to comment.