diff --git a/Formula/libopenmpt.rb b/Formula/libopenmpt.rb new file mode 100644 index 0000000000..4e08e4efdf --- /dev/null +++ b/Formula/libopenmpt.rb @@ -0,0 +1,39 @@ +class Libopenmpt < Formula + desc "Software library to decode tracked music files" + homepage "https://lib.openmpt.org/libopenmpt/" + url "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.4.3+release.autotools.tar.gz" + version "0.4.3" + sha256 "d77443a279003921d6f0c4edb30d1e9dda387983f44113a6d58f623c1e6942ae" + + depends_on "pkg-config" => :build + + depends_on "flac" + depends_on "libogg" + depends_on "libsndfile" + depends_on "libvorbis" + depends_on "mpg123" + depends_on "portaudio" + + resource "mystique.s3m" do + url "https://api.modarchive.org/downloads.php?moduleid=54144#mystique.s3m" + sha256 "e9a3a679e1c513e1d661b3093350ae3e35b065530d6ececc0a96e98d3ffffaf4" + end + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--without-vorbisfile" + + system "make" + system "make", "install" + end + + test do + resource("mystique.s3m").stage do + output = shell_output("#{bin}/openmpt123 --probe mystique.s3m") + assert_match "Success", output + end + end +end