61 lines
2.1 KiB
Ruby
61 lines
2.1 KiB
Ruby
class Libetonyek < Formula
|
|
desc "Interpret and import Apple Keynote presentations"
|
|
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek"
|
|
url "https://dev-www.libreoffice.org/src/libetonyek/libetonyek-0.1.9.tar.xz"
|
|
sha256 "e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "c646035faf6b7213d1aa15a2e37478607f30ec3743b9af7fc4a83190f40b1941" => :catalina
|
|
sha256 "833ea6922b7e7eadd5446a9a1c8b6fe73fe49e4025703a63a90b8c4be966cb71" => :mojave
|
|
sha256 "7fdf62c11f4874c487d132fb24307e7a3ede2b03cfb231afff8872ae9c230c06" => :high_sierra
|
|
end
|
|
|
|
depends_on "boost" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "glm"
|
|
depends_on "librevenge"
|
|
depends_on "mdds"
|
|
|
|
resource "liblangtag" do
|
|
url "https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-0.6.2.tar.bz2"
|
|
sha256 "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e"
|
|
end
|
|
|
|
def install
|
|
resource("liblangtag").stage do
|
|
system "./configure", "--prefix=#{libexec}", "--enable-modules=no"
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
ENV["LANGTAG_CFLAGS"] = "-I#{libexec}/include"
|
|
ENV["LANGTAG_LIBS"] = "-L#{libexec}/lib -llangtag -lxml2"
|
|
system "./configure", "--without-docs",
|
|
"--disable-dependency-tracking",
|
|
"--enable-static=no",
|
|
"--disable-werror",
|
|
"--disable-tests",
|
|
"--prefix=#{prefix}",
|
|
"--with-mdds=1.5"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include <libetonyek/EtonyekDocument.h>
|
|
int main() {
|
|
return libetonyek::EtonyekDocument::RESULT_OK;
|
|
}
|
|
EOS
|
|
system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test",
|
|
"-I#{Formula["librevenge"].include}/librevenge-0.0",
|
|
"-I#{include}/libetonyek-0.1",
|
|
"-L#{Formula["librevenge"].lib}",
|
|
"-L#{lib}",
|
|
"-lrevenge-0.0",
|
|
"-letonyek-0.1"
|
|
system "./test"
|
|
end
|
|
end
|