Skip to content
Browse files

New formula: lensfun

  • Loading branch information...
1 parent 6742e43 commit 1cf12b5a5fc0c465f90c7fae42a73e7c0852d7d1 @mistydemeo committed Aug 30, 2012
Showing with 32 additions and 1 deletion.
  1. +7 −1 README.md
  2. +25 −0 lensfun.rb
View
8 README.md
@@ -15,4 +15,10 @@ Formulae available
avi-metaedit
------------
-AVI metadata tool made available from the US National Archives.
+AVI metadata tool made available from the US National Archives.
+
+lensfun
+-------
+
+A library for correcting lens abberations in photos. Added as a
+dependency for Darktable.
View
25 lensfun.rb
@@ -0,0 +1,25 @@
+require 'formula'
+
+class Lensfun < Formula
+ homepage 'http://lensfun.berlios.de/'
+ url 'http://download.berlios.de/lensfun/lensfun-0.2.6.tar.bz2'
+ version '0.2.6'
+ sha1 '0d7ffbae5c54159308114f69a9e2bc5f4d24d836'
+
+ depends_on 'doxygen' => :optional
+ depends_on 'glib'
+ depends_on 'gettext'
+
+ def patches
+ {:p0 => "https://trac.macports.org/export/97200/trunk/dports/graphics/lensfun/files/patch-build-tibs-target-mac-mak.diff"}
+ end
+
+ def install
+ # without this, it tries to pass "@VERSION@" as a literal string
+ # rather than as a variable
+ inreplace "build/tibs/target/mac.mak", "@VERSION@", version
+
+ system "./configure", "--prefix=#{prefix}"
+ system "make", "install", "GCC.LD=#{ENV.cxx}", "GCC.LDFLAGS=#{ENV.ldflags}"
+ end
+end

0 comments on commit 1cf12b5

Please sign in to comment.
Something went wrong with that request. Please try again.