From b3ea3ae80ae80570b1b7177246b0cac1789e14ee Mon Sep 17 00:00:00 2001 From: Michiel Beijen Date: Tue, 19 Mar 2019 10:00:03 +0100 Subject: [PATCH] libheif: depend on shared-mime-info Prior to this, libheif installed its `heif.xml` mime package file in `/usr/local/share/mime` which conflicted with shared-mime-info if you later wanted to install that package. Closes #38047. Signed-off-by: FX Coudert --- Formula/libheif.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Formula/libheif.rb b/Formula/libheif.rb index b4020391f2..f3fef69246 100644 --- a/Formula/libheif.rb +++ b/Formula/libheif.rb @@ -15,6 +15,7 @@ class Libheif < Formula depends_on "jpeg" depends_on "libde265" depends_on "libpng" + depends_on "shared-mime-info" depends_on "x265" def install @@ -25,6 +26,10 @@ class Libheif < Formula pkgshare.install "examples/example.heic" end + def post_install + system Formula["shared-mime-info"].opt_bin/"update-mime-database", "#{HOMEBREW_PREFIX}/share/mime" + end + test do output = "File contains 2 images" example = pkgshare/"example.heic"