Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libnsdfile.rb to recent #2049

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ for:
export MACOSX_DEPLOYMENT_TARGET=10.12
sudo ln -s /usr/local /opt/local;

cache_tag=usr_local_1 # this can be modified to rebuild deps
cache_tag=brew_libsndfile_2 # this can be modified to rebuild deps

cdir=$HOME/cache_dir
cache_tar=$cdir/$cache_tag.tar
Expand All @@ -469,6 +469,7 @@ for:
python3 ./treestate.py scan /usr/local usrlocal.json

brew update
brew upgrade
# Build our own versions of these for macOS 10.12 target systems.
brew install --build-from-source ./macos/HomebrewFormulae/berkeley-db.rb
brew install --build-from-source ./macos/HomebrewFormulae/libogg.rb
Expand Down
44 changes: 31 additions & 13 deletions macos/HomebrewFormulae/libsndfile.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Libsndfile < Formula
desc "C library for files containing sampled sound"
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"
url "https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz"
sha256 "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e"
license "LGPL-2.1-or-later"

livecheck do
Expand All @@ -11,26 +11,44 @@ class Libsndfile < Formula
end

bottle do
sha256 cellar: :any, arm64_big_sur: "8e2fc3b0df09a21840f8643f644bd3a0bb3c3551d21f600b344f6b316d3ef44d"
sha256 cellar: :any, big_sur: "a4a734e58220fc8615d86e4563e9a874447d568151b366aa94391dfe07c4e0fb"
sha256 cellar: :any, catalina: "671a3cc9c7dafd89cbaffeccf4de826262c144184bf5779320c236e87e7636cc"
sha256 cellar: :any, mojave: "8b2876610f9188e8125f636e85bcbd525343b216c6d0787954e78b88dfe8f101"
rebuild 2
sha256 cellar: :any, arm64_sequoia: "10ef77f1b249abb5012c6bfa498aae3786894e4c4c475dfd4ac14a14562fe1dd"
sha256 cellar: :any, arm64_sonoma: "0e8ccf402d37e1be344af315c4b06c5faf3fb1307bce6d4a79d198ffbb9d2ad0"
sha256 cellar: :any, arm64_ventura: "a78c706387bf29a9df4ac87f6642334d92191fd641d868a15058e98ebc5d62cf"
sha256 cellar: :any, arm64_monterey: "ff1229550d6d68c6de3258942addae073a9a6ffcfbd350716ada06a2573fb9c0"
sha256 cellar: :any, sonoma: "95febe4d68e594a59a1b2d12e835263dd71bcd62cef9ba822ebc7c38c9142f28"
sha256 cellar: :any, ventura: "0e4063508906f9adbd3cbae4abb6e20aba8b529631300a663d6ab9ef3e3095af"
sha256 cellar: :any, monterey: "608f24002de2227bbc10e170cc4d4d47d077981530185db47a98c25ad9f1bd99"
sha256 cellar: :any_skip_relocation, x86_64_linux: "208e7c63412df3a225c37c7305acf39a1eddac9e0983950051f937ed74960fbc"
end

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "flac"
depends_on "lame"
depends_on "libogg"
depends_on "libvorbis"
depends_on "mpg123"
depends_on "opus"

uses_from_macos "python" => :build, since: :catalina

def install
args = %W[
-DBUILD_PROGRAMS=ON
-DENABLE_PACKAGE_CONFIG=ON
-DINSTALL_PKGCONFIG_MODULE=ON
-DBUILD_EXAMPLES=OFF
-DCMAKE_INSTALL_RPATH=#{rpath}
-DPYTHON_EXECUTABLE=#{which("python3")}
]

ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.12"
system "autoreconf", "-fvi"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON", *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
system "cmake", "-S", ".", "-B", "static", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF", *args
system "cmake", "--build", "static"
lib.install "static/libsndfile.a"
end

test do
Expand Down