2011-03-10 05:11:03 +00:00
|
|
|
class Cscope < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Tool for browsing source code"
|
2015-01-08 05:22:53 +00:00
|
|
|
homepage "http://cscope.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/cscope/cscope/15.8a/cscope-15.8a.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "eb736ac40d5abebe8fa46820c7a8eccc8a17966a9a5f70375367b77177874d1e"
|
2009-09-27 00:02:56 +00:00
|
|
|
|
2015-01-08 05:59:32 +00:00
|
|
|
bottle do
|
2015-09-13 19:35:33 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "10c4cd802d68e0c552a99e86b0609b882664583e39b9c3ff44591832e75277e2" => :el_capitan
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "5625a04292cb85ee5ad70417db976aeb167b7b55c011f218d43febd2ee72b5c2" => :yosemite
|
|
|
|
sha256 "c456f77835232efe5e3f9ed52885175266a039fbbc250afd9b6e646292c4b7d7" => :mavericks
|
|
|
|
sha256 "80dbf0043c44a13d525b06096246e6ce493c1171d4b721cfa3828ac446e51831" => :mountain_lion
|
2015-01-08 05:59:32 +00:00
|
|
|
end
|
|
|
|
|
2010-10-21 14:54:17 +00:00
|
|
|
# Patch from http://bugs.gentoo.org/show_bug.cgi?ctype=html&id=111621
|
2014-03-18 17:13:31 +00:00
|
|
|
patch :DATA
|
2009-09-27 00:02:56 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
2009-11-21 06:58:15 +00:00
|
|
|
"--mandir=#{man}"
|
2015-01-08 05:22:53 +00:00
|
|
|
system "make", "install"
|
2009-09-27 00:02:56 +00:00
|
|
|
end
|
2015-01-08 05:31:29 +00:00
|
|
|
|
|
|
|
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
|
2009-09-27 00:02:56 +00:00
|
|
|
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
|
2012-08-07 16:54:31 +00:00
|
|
|
#define FIELDS 10
|
2009-09-27 00:02:56 +00:00
|
|
|
|
|
|
|
-#if (BSD || V9) && !__NetBSD__ && !__FreeBSD__
|
|
|
|
+#if (BSD || V9) && !__NetBSD__ && !__FreeBSD__ && !__MACH__
|
|
|
|
# define TERMINFO 0 /* no terminfo curses */
|
|
|
|
#else
|
|
|
|
# define TERMINFO 1
|
|
|
|
--
|
|
|
|
1.6.4
|
|
|
|
|