class Libfreehand < Formula desc "Interpret and import Aldus/Macromedia/Adobe FreeHand documents" homepage "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand" url "https://dev-www.libreoffice.org/src/libfreehand/libfreehand-0.1.2.tar.xz" sha256 "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac" revision 3 bottle do cellar :any sha256 "edc93ba58727c751dab54b7c496c5632db8249156bde7655d9578437ecd3672d" => :mojave sha256 "28c50d6910679e0b0f3dc669fd1d69c339dd6c480a3ebb16804bedb3f1067f69" => :high_sierra sha256 "bc08405897e33b8fc6237e6c0a3c638535c65b568013a037875de87f20c9a451" => :sierra end depends_on "boost" => :build depends_on "pkg-config" => :build depends_on "icu4c" depends_on "librevenge" depends_on "little-cms2" def install system "./configure", "--without-docs", "--disable-dependency-tracking", "--enable-static=no", "--disable-werror", "--disable-tests", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<~EOS #include int main() { libfreehand::FreeHandDocument::isSupported(0); } EOS system ENV.cxx, "test.cpp", "-o", "test", "-I#{Formula["librevenge"].include}/librevenge-0.0", "-I#{include}/libfreehand-0.1", "-L#{Formula["librevenge"].lib}", "-L#{lib}", "-lrevenge-0.0", "-lfreehand-0.1" system "./test" end end