class Libxslt < Formula desc "C XSLT library for GNOME" homepage "http://xmlsoft.org/XSLT/" url "http://xmlsoft.org/sources/libxslt-1.1.33.tar.gz" sha256 "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8" bottle do cellar :any sha256 "a6c28e88fbe71e5f7abbe82a6bbf32f24521db80681e6e5ee5b81d8b76f1ce68" => :mojave sha256 "8cb68d6240eec4cd125d4fae45cc9cfe10de65c4c7b848424dd815a3a90749e5" => :high_sierra sha256 "8db02fe625d3129ceec2c4e8f9e8972f3307ffee199f6919a5e1af4e50444bec" => :sierra end head do url "https://gitlab.gnome.org/GNOME/libxslt.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end keg_only :provided_by_macos depends_on "libxml2" def install system "autoreconf", "-fiv" if build.head? # https://bugzilla.gnome.org/show_bug.cgi?id=762967 inreplace "configure", /PYTHON_LIBS=.*/, 'PYTHON_LIBS="-undefined dynamic_lookup"' system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}", "--with-libxml-prefix=#{Formula["libxml2"].opt_prefix}" system "make" system "make", "install" end def caveats; <<~EOS To allow the nokogiri gem to link against this libxslt run: gem install nokogiri -- --with-xslt-dir=#{opt_prefix} EOS end test do assert_match version.to_s, shell_output("#{bin}/xslt-config --version") end end