blob: e49c72152038474fe058c522f6095c5eb746f58e [file] [log] [blame]
class LibplistFlutter < Formula
desc "Library for Apple Binary- and XML-Property Lists"
homepage "https://www.libimobiledevice.org/"
revision 1
head do
url "https://flutter-mirrors.googlesource.com/libplist.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
def install
ENV.deparallelize
args = %W[
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--without-cython
]
if build.head?
ENV["NOCONFIGURE"] = "TRUE"
system "./autogen.sh"
end
system "./configure", *args
system "make", "install", "PYTHON_LDFLAGS=-undefined dynamic_lookup"
end
test do
(testpath/"test.plist").write <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>test</string>
<key>ProgramArguments</key>
<array>
<string>/bin/echo</string>
</array>
</dict>
</plist>
EOS
system bin/"plistutil", "-i", "test.plist", "-o", "test_binary.plist"
assert_predicate testpath/"test_binary.plist", :exist?,
"Failed to create converted plist!"
end
end