Permalink
Browse files

libimobiledevice: add --head

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
1 parent cd50713 commit 3125e781260c7f211f02185905f9c2854357bff3 @ingorichter ingorichter committed with adamv Jan 25, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 Library/Formula/libimobiledevice.rb
@@ -1,10 +1,12 @@
require 'formula'
class Libimobiledevice < Formula
- url 'http://www.libimobiledevice.org/downloads/libimobiledevice-1.1.1.tar.bz2'
homepage 'http://www.libimobiledevice.org/'
+ url 'http://www.libimobiledevice.org/downloads/libimobiledevice-1.1.1.tar.bz2'
md5 'cdc13037e822d9ac2e109536701d153a'
+ head 'http://cgit.sukimashita.com/libimobiledevice.git', :using => :git
+
depends_on 'pkg-config' => :build
depends_on 'libtasn1'
depends_on 'glib'
@@ -13,7 +15,17 @@ class Libimobiledevice < Formula
depends_on 'gnutls'
def install
- ENV.prepend "CFLAGS", "-I#{HOMEBREW_PREFIX}/include"
+ if ARGV.build_head?
+ # fix the m4 problem with the missing pkg.m4
+ ENV['LIBTOOLIZE'] = "/usr/bin/glibtoolize"
+ ENV['ACLOCAL'] = "/usr/bin/aclocal -I m4 -I #{HOMEBREW_PREFIX}/share/aclocal"
+ ENV.prepend "CFLAGS", "-I#{HOMEBREW_PREFIX}/include"
+
+ system "autoreconf -ivf"
+ end
+
+ ENV.append_to_cflags "-std=gnu89" if ENV.compiler == :clang
+
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--without-swig"

0 comments on commit 3125e78

Please sign in to comment.