2014-12-04 22:49:12 +00:00
|
|
|
require "formula"
|
2011-08-23 14:36:46 +00:00
|
|
|
|
|
|
|
class Gibbslda < Formula
|
2014-12-04 22:49:12 +00:00
|
|
|
homepage "http://gibbslda.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/gibbslda/GibbsLDA%2B%2B/0.2/GibbsLDA%2B%2B-0.2.tar.gz"
|
|
|
|
sha1 "3264f01ae921b6dcbbe57dd877561271df214cdd"
|
|
|
|
|
2014-12-05 16:50:34 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "0a0861b3c2fd9037a8ec71f43a09115dceaed4a8" => :yosemite
|
|
|
|
sha1 "65dd821a8ce2c7f24001a56218b0c00cdf1d9051" => :mavericks
|
|
|
|
sha1 "7ecc74e2069e864ac26614209a7236215ab4faa0" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2014-12-04 22:49:12 +00:00
|
|
|
# Build fails without including stdlib - https://trac.macports.org/ticket/41915
|
|
|
|
# https://sourceforge.net/p/gibbslda/bugs/4/
|
|
|
|
patch :DATA
|
2011-08-23 14:36:46 +00:00
|
|
|
|
|
|
|
def install
|
2014-12-04 22:49:12 +00:00
|
|
|
system "make", "clean"
|
|
|
|
system "make", "all"
|
2011-08-23 14:36:46 +00:00
|
|
|
bin.install "src/lda"
|
2014-12-04 22:49:12 +00:00
|
|
|
share.install "docs/GibbsLDA++Manual.pdf"
|
2011-08-23 14:36:46 +00:00
|
|
|
end
|
|
|
|
end
|
2014-12-04 22:49:12 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
|
|
|
|
diff --git a/src/utils.cpp b/src/utils.cpp
|
|
|
|
index e2f538b..1df5fb3 100644
|
|
|
|
--- a/src/utils.cpp
|
|
|
|
+++ b/src/utils.cpp
|
|
|
|
@@ -22,6 +22,7 @@
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
+#include <stdlib.h>
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
#include "strtokenizer.h"
|