aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBooboule2014-01-08 16:21:27 +0100
committerAdam Vandenberg2014-03-01 13:50:07 -0800
commit61e890b96eb2cd0f298d8392312284af8586c461 (patch)
treecb3fe279e9218d68ed109b8ab0628bcfe0f0b98c /Library/Formula
parent15c2cee6b77cca61aa85cb744c8a02d08176406a (diff)
downloadhomebrew-61e890b96eb2cd0f298d8392312284af8586c461.tar.bz2
afflib: add osxfuse support
Closes #25737. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/afflib.rb57
1 files changed, 55 insertions, 2 deletions
diff --git a/Library/Formula/afflib.rb b/Library/Formula/afflib.rb
index e4e2d2bb0..4cff65d48 100644
--- a/Library/Formula/afflib.rb
+++ b/Library/Formula/afflib.rb
@@ -9,11 +9,64 @@ class Afflib < Formula
depends_on :automake
depends_on :libtool
depends_on 'expat' => :optional
+ depends_on 'osxfuse' => :optional
+
+ def patches
+ # This patch fixes a bug reported upstream over there
+ # https://github.com/simsong/AFFLIBv3/issues/4
+ DATA
+ end
def install
system "sh bootstrap.sh"
- system "./configure", "--disable-debug", "--disable-dependency-tracking",
- "--prefix=#{prefix}"
+
+ args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
+
+ if build.with? 'osxfuse'
+ ENV['CPPFLAGS'] = "-I#{Formula.factory('osxfuse').include}/osxfuse"
+ args << "--enable-fuse"
+ end
+
+ system "./configure", *args
system "make install"
end
end
+
+__END__
+diff --git a/bootstrap.sh b/bootstrap.sh
+index 3a7af59..7510933 100755
+--- a/bootstrap.sh
++++ b/bootstrap.sh
+@@ -6,7 +6,7 @@
+ echo Bootstrap script to create configure script using autoconf
+ echo
+ # use the installed ones first, not matter what the path says.
+-export PATH=/usr/bin:/usr/sbin:/bin:$PATH
++#export PATH=/usr/bin:/usr/sbin:/bin:$PATH
+ touch NEWS README AUTHORS ChangeLog stamp-h
+ aclocal
+ LIBTOOLIZE=glibtoolize
+diff --git a/configure.ac b/configure.ac
+index 47a3e4c..845235b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -244,10 +244,6 @@ AC_ARG_ENABLE(fuse,
+ if test "x${enable_fuse}" = "xyes" ; then
+ AC_MSG_NOTICE([FUSE requested])
+ CPPFLAGS="-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 $CPPFLAGS"
+- if test `uname -s` = Darwin ; then
+- AC_MSG_NOTICE([FUSE IS NOT SUPPORTED ON MACOS])
+- enable_fuse=no
+- fi
+ AC_CHECK_HEADER([fuse.h],,
+ AC_MSG_NOTICE([fuse.h not found; Disabling FUSE support.])
+ enable_fuse=no)
+@@ -258,7 +254,7 @@ AFFUSE_BIN=
+ if test "${enable_fuse}" = "yes"; then
+ AC_DEFINE([USE_FUSE],1,[Use FUSE to mount AFF images])
+ AFFUSE_BIN='affuse$(EXEEXT)'
+- FUSE_LIBS=-lfuse
++ FUSE_LIBS=-losxfuse
+ fi
+ AC_SUBST(AFFUSE_BIN)
+ AM_PROG_CC_C_O dnl for affuse