aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/fish.rb
blob: 4ab0e0e7612dfdbf20b71c416a2cd3da69c2eef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require 'formula'

class Fish < Formula
  homepage 'http://fishshell.com'
  url 'http://fishshell.com/files/2.0.0/fish-2.0.0.tar.gz'
  sha1 '2d28553e2ff975f8e5fed6b266f7a940493b6636'

  head 'https://github.com/fish-shell/fish-shell.git'

  # Indeed, the head build always builds documentation
  depends_on 'doxygen' => :build if build.head?
  depends_on :autoconf

  skip_clean 'share/doc'

  # Don't search extra folders for libiconv
  def patches; DATA; end

  def install
    system "autoconf"
    system "./configure", "--prefix=#{prefix}"
    system "make install"
  end

  test do
    system "fish", "-c", "echo"
  end

  def caveats; <<-EOS.undent
    You will need to add:
      #{HOMEBREW_PREFIX}/bin/fish
    to /etc/shells. Run:
      chsh -s #{HOMEBREW_PREFIX}/bin/fish
    to make fish your default shell.
    EOS
  end
end

__END__
diff --git a/configure.ac b/configure.ac
index 34f25e1..b9afa51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,45 +98,6 @@ AC_PROG_INSTALL
 
 echo "CXXFLAGS: $CXXFLAGS"
 
-#
-# Detect directories which may contain additional headers, libraries
-# and commands. This needs to be done early - before Autoconf starts
-# to mess with CFLAGS and all the other environemnt variables.
-#
-# This mostly helps OS X users, since fink usually installs out of
-# tree and doesn't update CFLAGS.
-#
-# It also helps FreeBSD which puts libiconv in /usr/local/lib
-
-for i in /usr/pkg /sw /opt /opt/local /usr/local; do
-
-  AC_MSG_CHECKING([for $i/include include directory])
-  if test -d $i/include; then
-    AC_MSG_RESULT(yes)
-    CXXFLAGS="$CXXFLAGS -I$i/include/"
-    CFLAGS="$CFLAGS -I$i/include/"
-  else
-  AC_MSG_RESULT(no)
-  fi
-
-  AC_MSG_CHECKING([for $i/lib library directory])
-  if test -d $i/lib; then
-    AC_MSG_RESULT(yes)
-    LDFLAGS="$LDFLAGS -L$i/lib/ -Wl,-rpath,$i/lib/"
-  else
-    AC_MSG_RESULT(no)
-  fi
-
-  AC_MSG_CHECKING([for $i/bin command directory])
-  if test -d $i/bin; then
-    AC_MSG_RESULT(yes)
-    optbindirs="$optbindirs $i/bin"
-  else
-    AC_MSG_RESULT(no)
-  fi
-
-done
-
 
 #
 # Tell autoconf to create config.h header