blob: 91f844a7a1a12504e0d99da398f5924c0415d2f3 (
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
 | class Cscope < Formula
  homepage "http://cscope.sourceforge.net/"
  url "https://downloads.sourceforge.net/project/cscope/cscope/15.8a/cscope-15.8a.tar.gz"
  sha1 "00f76825791b895532778f720c509cd13b9d6846"
  bottle do
    cellar :any
    sha1 "75d73fea51fa5e4072134848a07c7c2f49308e35" => :yosemite
    sha1 "64cb7e095386c2119155b0be51b242860681e2ab" => :mavericks
    sha1 "bbccd86980669360c5085429a462166d8f238a15" => :mountain_lion
  end
  # Patch from http://bugs.gentoo.org/show_bug.cgi?ctype=html&id=111621
  patch :DATA
  def install
    system "./configure", "--prefix=#{prefix}",
                          "--mandir=#{man}"
    system "make", "install"
  end
  test do
    (testpath/"test.c").write <<-EOS.undent
      #include <stdio.h>
      #include <stdlib.h>
      void func()
      {
        printf("Hello World!");
      }
      int main()
      {
        func();
        return 0;
      }
    EOS
    (testpath/"cscope.files").write ("./test.c\n")
    system "#{bin}/cscope", "-b", "-k"
    assert_match /test\.c.*func/, shell_output("#{bin}/cscope -L1func")
  end
end
__END__
diff --git a/src/constants.h b/src/constants.h
index 7ad8005..844836e 100644
--- a/src/constants.h
+++ b/src/constants.h
@@ -103,7 +103,7 @@
 #define INCLUDES	8
 #define	FIELDS		10
 
-#if (BSD || V9) && !__NetBSD__ && !__FreeBSD__
+#if (BSD || V9) && !__NetBSD__ && !__FreeBSD__ && !__MACH__
 # define TERMINFO	0	/* no terminfo curses */
 #else
 # define TERMINFO	1
-- 
1.6.4
 |