class Libraw < Formula desc "Library for reading RAW files from digital photo cameras" homepage "https://www.libraw.org/" url "https://www.libraw.org/data/LibRaw-0.19.3.tar.gz" sha256 "fd96d6188b8539e0724c89cfa9de392eb28ea71db117ef0661846d76cdc24177" bottle do cellar :any sha256 "85274ac527a0892101ee9d678b4d60f2c973e1a55636708913b802351a80aecc" => :mojave sha256 "5fd2e5aa959a90363994397710ca4b271637d966c3250265a44d5245b47a2bcc" => :high_sierra sha256 "859d4b6e1bb5de0b72274b6658b8531be8a90a59b7d61151870aef66fe4d8b66" => :sierra end depends_on "pkg-config" => :build depends_on "jasper" depends_on "jpeg" depends_on "libomp" depends_on "little-cms2" resource "librawtestfile" do url "https://www.rawsamples.ch/raws/nikon/d1/RAW_NIKON_D1.NEF" sha256 "7886d8b0e1257897faa7404b98fe1086ee2d95606531b6285aed83a0939b768f" end def install system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking", "ac_cv_prog_c_openmp=-Xpreprocessor -fopenmp", "ac_cv_prog_cxx_openmp=-Xpreprocessor -fopenmp", "LDFLAGS=-lomp" system "make" system "make", "install" doc.install Dir["doc/*"] prefix.install "samples" end test do resource("librawtestfile").stage do filename = "RAW_NIKON_D1.NEF" system "#{bin}/raw-identify", "-u", filename system "#{bin}/simple_dcraw", "-v", "-T", filename end end end