2011-09-17 05:58:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libraw < Formula
|
|
|
|
homepage 'http://www.libraw.org/'
|
2013-12-07 20:35:01 +00:00
|
|
|
url 'http://www.libraw.org/data/LibRaw-0.15.4.tar.gz'
|
|
|
|
sha1 '1561e1ac12df6eed999d5be3146d66176c050b76'
|
2011-09-17 05:58:13 +00:00
|
|
|
|
2014-07-03 21:00:25 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "e9f82236c16db31ce392eba28bc8cdcfb7e36dc0" => :mavericks
|
|
|
|
sha1 "6576ac9a95edfd4e13397a043a2ae1059519da97" => :mountain_lion
|
|
|
|
sha1 "addbaf9c45f13e9a2732b81bc2d8ad960908cf2d" => :lion
|
|
|
|
end
|
|
|
|
|
2013-08-09 21:36:14 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'jasper'
|
2012-04-05 08:08:55 +00:00
|
|
|
depends_on 'little-cms2'
|
2011-09-17 05:58:13 +00:00
|
|
|
|
2013-12-07 20:35:01 +00:00
|
|
|
resource 'librawtestfile' do
|
|
|
|
url 'http://www.rawsamples.ch/raws/nikon/d1/RAW_NIKON_D1.NEF',
|
|
|
|
:using => :nounzip
|
|
|
|
sha1 'd84d47caeb8275576b1c7c4550263de21855cf42'
|
|
|
|
end
|
|
|
|
|
2013-08-07 03:53:43 +00:00
|
|
|
resource 'gpl2' do
|
2013-12-07 20:35:01 +00:00
|
|
|
url 'http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-0.15.4.tar.gz'
|
|
|
|
sha1 '9eaa33b53e15053937a1ac081227713cae7f25fb'
|
2013-08-07 03:53:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource 'gpl3' do
|
2013-12-07 20:35:01 +00:00
|
|
|
url 'http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-0.15.4.tar.gz'
|
|
|
|
sha1 'd9ce308bccae75f26fa56ab6c2ad705ef0eaa761'
|
2013-08-07 03:53:43 +00:00
|
|
|
end
|
2011-09-17 05:58:13 +00:00
|
|
|
|
2013-08-07 03:53:43 +00:00
|
|
|
def install
|
|
|
|
%w(gpl2 gpl3).each {|f| (buildpath/f).install resource(f)}
|
2011-09-17 05:58:13 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--disable-dependency-tracking",
|
2013-08-09 21:38:24 +00:00
|
|
|
"--enable-demosaic-pack-gpl2=#{buildpath}/gpl2",
|
|
|
|
"--enable-demosaic-pack-gpl3=#{buildpath}/gpl3"
|
2011-09-17 05:58:13 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
doc.install Dir['doc/*']
|
2013-08-09 20:59:57 +00:00
|
|
|
prefix.install 'samples'
|
2011-09-17 05:58:13 +00:00
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2013-12-07 20:35:01 +00:00
|
|
|
resource('librawtestfile').stage do
|
2012-05-08 04:39:50 +00:00
|
|
|
filename = 'RAW_NIKON_D1.NEF'
|
|
|
|
system "#{bin}/raw-identify", "-u", filename
|
|
|
|
system "#{bin}/simple_dcraw", "-v", "-T", filename
|
2011-09-17 05:58:13 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|