aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libgphoto2.rb
blob: 3beb1ec07d183f0e4dca205472573d158374136b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'formula'

class Libgphoto2 < Formula
  homepage 'http://www.gphoto.org/proj/libgphoto2/'
  url 'http://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.2/libgphoto2-2.5.2.tar.bz2'
  sha1 '6b70ff6feec62a955bef1fc9a2b16dd07f0e277a'

  option :universal

  depends_on 'pkg-config' => :build
  depends_on :libltdl # Configure script uses this
  depends_on 'libusb-compat'
  depends_on 'gd'
  depends_on 'libexif' => :optional

  def install
    ENV.libxml2 # https://sourceforge.net/p/gphoto/bugs/957/; check at 2.5.3
    ENV.universal_binary if build.universal?
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "CFLAGS=-D_DARWIN_C_SOURCE"
    system "make install"
  end
end