47 lines
1.6 KiB
Ruby
47 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"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "a18f70bde76f22ee23ced4ff30f5e03fb4bf6aae041e0fc1bbd653799c10dd81" => :high_sierra
|
|
sha256 "64159caee4e12e31776695bcafc497a9cc449538903632c11ef7c146d6a608e6" => :sierra
|
|
sha256 "7a57232a020ccc409205f0399fb9c9f74598cc156251123010d057626fd73297" => :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
|