Skip to content

Commit

Permalink
kew: update formula to add macOS compatibility
Browse files Browse the repository at this point in the history
Removes unnecessary dependencies on Linux, FreeImage and FFmpeg.
  • Loading branch information
ravachol committed Oct 31, 2024
1 parent 1d553c6 commit c16cba6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Formula/k/kew.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,31 @@ class Kew < Formula

depends_on "pkg-config" => :build
depends_on "chafa"
depends_on "ffmpeg"
depends_on "faad2"
depends_on "fftw"
depends_on "freeimage"
depends_on "glib"
depends_on "libnotify"
depends_on "libvorbis"
depends_on :linux
depends_on "opusfile"
depends_on "taglib"
on_linux do
depends_on "libnotify"
end

def install
system "make"
system "make", "install", "PREFIX=#{prefix}"
ENV.prepend_path "PKG_CONFIG_PATH", Formula["glib"].opt_lib/"pkgconfig"

system "make", "PKG_CONFIG_PATH=#{ENV["PKG_CONFIG_PATH"]}"
system "make", "install", "PREFIX=#{prefix}"
man1.install "docs/kew.1"
end

test do
(testpath/".config/kewrc").write ""
ENV["XDG_CONFIG_HOME"] = testpath/".config"

(testpath/".config/kew").mkpath

(testpath/".config/kew/kewrc").write ""

system bin/"kew", "path", testpath

output = shell_output("#{bin}/kew song")
Expand Down

0 comments on commit c16cba6

Please sign in to comment.