libxml++ 2.38.0
version bump audit --strict compliance Closes Homebrew/homebrew#39578. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
7d88386471
commit
8aee77082b
1 changed files with 47 additions and 5 deletions
|
@ -1,9 +1,7 @@
|
|||
require "formula"
|
||||
|
||||
class Libxmlxx < Formula
|
||||
homepage "http://libxmlplusplus.sourceforge.net"
|
||||
url "http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.36/libxml++-2.36.0.tar.xz"
|
||||
sha256 "bfdf327bf9ebd12946b7aa6a152045f209d5c9fecd06ebfcdf9b3e7c1af6e2e1"
|
||||
url "http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.38/libxml++-2.38.0.tar.xz"
|
||||
sha256 "5698b03f5d320fb8310e30780e328f03debca12c557434ee031aea9baf3b1346"
|
||||
|
||||
bottle do
|
||||
revision 1
|
||||
|
@ -18,6 +16,50 @@ class Libxmlxx < Formula
|
|||
|
||||
def install
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
||||
system "make install"
|
||||
system "make", "install"
|
||||
end
|
||||
test do
|
||||
(testpath/"test.cpp").write <<-EOS.undent
|
||||
#include <libxml++/libxml++.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
xmlpp::Document document;
|
||||
document.set_internal_subset("homebrew", "", "http://www.brew.sh/xml/test.dtd");
|
||||
xmlpp::Element *rootnode = document.create_root_node("homebrew");
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
ENV.libxml2
|
||||
gettext = Formula["gettext"]
|
||||
glib = Formula["glib"]
|
||||
glibmm = Formula["glibmm"]
|
||||
libsigcxx = Formula["libsigc++"]
|
||||
flags = ENV["CPPFLAGS"].split + ENV["LDFLAGS"].split
|
||||
flags += %W[
|
||||
-I#{gettext.opt_include}
|
||||
-I#{glib.opt_include}/glib-2.0
|
||||
-I#{glib.opt_lib}/glib-2.0/include
|
||||
-I#{glibmm.opt_include}/glibmm-2.4
|
||||
-I#{glibmm.opt_lib}/glibmm-2.4/include
|
||||
-I#{include}/libxml++-2.6
|
||||
-I#{libsigcxx.opt_include}/sigc++-2.0
|
||||
-I#{libsigcxx.opt_lib}/sigc++-2.0/include
|
||||
-I#{lib}/libxml++-2.6/include
|
||||
-L#{gettext.opt_lib}
|
||||
-L#{glib.opt_lib}
|
||||
-L#{glibmm.opt_lib}
|
||||
-L#{libsigcxx.opt_lib}
|
||||
-L#{lib}
|
||||
-lglib-2.0
|
||||
-lglibmm-2.4
|
||||
-lgobject-2.0
|
||||
-lintl
|
||||
-lsigc-2.0
|
||||
-lxml++-2.6
|
||||
-lxml2
|
||||
]
|
||||
system ENV.cxx, "test.cpp", "-o", "test", *flags
|
||||
system "./test"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue