From 3c9fe88b226d26238ea5b7740455ecfbcedec578 Mon Sep 17 00:00:00 2001 From: Christian Roessner Date: Mon, 20 Jun 2016 10:33:44 +0200 Subject: [PATCH] mimetic 0.9.8 (new formula) Initial import Closes #2191. Signed-off-by: Mike McQuaid --- Formula/mimetic.rb | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Formula/mimetic.rb diff --git a/Formula/mimetic.rb b/Formula/mimetic.rb new file mode 100644 index 0000000000..c2981b7335 --- /dev/null +++ b/Formula/mimetic.rb @@ -0,0 +1,41 @@ +class Mimetic < Formula + desc "C++ MIME library" + homepage "http://www.codesink.org/mimetic_mime_library.html" + url "http://www.codesink.org/download/mimetic-0.9.8.tar.gz" + sha256 "3a07d68d125f5e132949b078c7275d5eb0078dd649079bd510dd12b969096700" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include + #include + + using namespace std; + using namespace mimetic; + + int main() + { + MimeEntity me; + me.header().from("me "); + me.header().to("you "); + me.header().subject("my first mimetic msg"); + me.body().assign("hello there!"); + cout << me << endl; + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-L/usr/local/lib", "-lmimetic", "-o", "test" + system "./test" + end +end