54 lines
1.7 KiB
Ruby
54 lines
1.7 KiB
Ruby
class Libxmlsec1 < Formula
|
|
desc "XML security library"
|
|
homepage "https://www.aleksey.com/xmlsec/"
|
|
url "https://www.aleksey.com/xmlsec/download/xmlsec1-1.2.26.tar.gz"
|
|
sha256 "8d8276c9c720ca42a3b0023df8b7ae41a2d6c5f9aa8d20ed1672d84cc8982d50"
|
|
|
|
bottle do
|
|
sha256 "dbdc3bb085b68e2c59924dba4193bdacbf305d8b91bada24a45b4ed1462febba" => :high_sierra
|
|
sha256 "79f41292bc1d6e890b8840119ffc3be5170690d17faa20e9bca18100e66aecfa" => :sierra
|
|
sha256 "698f1c0e00b8e4d1d98894e0d383f8e7cf9644b03e092213100a76f6e0d5e443" => :el_capitan
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "libxml2" if MacOS.version <= :lion
|
|
# Yes, it wants both ssl/tls variations.
|
|
depends_on "openssl" => :recommended
|
|
depends_on "gnutls" => :recommended
|
|
depends_on "libgcrypt" if build.with? "gnutls"
|
|
|
|
# Add HOMEBREW_PREFIX/lib to dl load path
|
|
patch :DATA
|
|
|
|
def install
|
|
args = ["--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--disable-crypto-dl",
|
|
"--disable-apps-crypto-dl"]
|
|
|
|
args << "--with-openssl=#{Formula["openssl"].opt_prefix}" if build.with? "openssl"
|
|
args << "--with-libxml=#{Formula["libxml2"].opt_prefix}" if build.with? "libxml2"
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/xmlsec1", "--version"
|
|
system "#{bin}/xmlsec1-config", "--version"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/src/dl.c b/src/dl.c
|
|
index 6e8a56a..0e7f06b 100644
|
|
--- a/src/dl.c
|
|
+++ b/src/dl.c
|
|
@@ -141,6 +141,7 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) {
|
|
}
|
|
|
|
#ifdef XMLSEC_DL_LIBLTDL
|
|
+ lt_dlsetsearchpath("HOMEBREW_PREFIX/lib");
|
|
lib->handle = lt_dlopenext((char*)lib->filename);
|
|
if(lib->handle == NULL) {
|
|
xmlSecError(XMLSEC_ERRORS_HERE,
|