46 lines
1.6 KiB
Ruby
46 lines
1.6 KiB
Ruby
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"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "b455f234a2baede1ab89b2c6daf9840beeadac0632cdc9dfa1a7edef56c1ad2a" => :high_sierra
|
|
sha256 "8ac011e22bed496f31db66c28c31af7e301690bdeff11596b1b471413f652313" => :sierra
|
|
sha256 "5a8b4e4d73f70fca3b955be7a6d4fd91150ceb068bfd7b5119fb136b5efb2b40" => :el_capitan
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost" => :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 <libfreehand/libfreehand.h>
|
|
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
|