2011-09-17 05:58:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-05-08 04:39:50 +00:00
|
|
|
class LibrawTestFile < Formula
|
|
|
|
url 'http://www.rawsamples.ch/raws/nikon/d1/RAW_NIKON_D1.NEF',
|
2012-05-08 04:52:38 +00:00
|
|
|
:using => :nounzip
|
2012-05-08 04:39:50 +00:00
|
|
|
sha1 'd84d47caeb8275576b1c7c4550263de21855cf42'
|
|
|
|
end
|
|
|
|
|
2011-09-17 05:58:13 +00:00
|
|
|
class Libraw < Formula
|
|
|
|
homepage 'http://www.libraw.org/'
|
2012-06-30 07:25:05 +00:00
|
|
|
url 'http://www.libraw.org/data/LibRaw-0.14.7.tar.gz'
|
|
|
|
sha1 'e924527bed3d72ee4756da0c9383dc74c584799f'
|
2011-09-17 05:58:13 +00:00
|
|
|
|
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-08-07 03:53:43 +00:00
|
|
|
resource 'gpl2' do
|
|
|
|
url 'http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-0.14.7.tar.gz'
|
|
|
|
sha1 '9a95d5be316c6efe91228ab696eb39c565922cad'
|
|
|
|
end
|
|
|
|
|
|
|
|
resource 'gpl3' do
|
|
|
|
url 'http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-0.14.7.tar.gz'
|
|
|
|
sha1 '63b1e4899c7aa1a9023e6f4516b91c9c9aa3893e'
|
|
|
|
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
|
|
|
|
|
|
|
|
def test
|
2012-05-08 04:39:50 +00:00
|
|
|
LibrawTestFile.new.brew do
|
|
|
|
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
|