52 lines
1.5 KiB
Ruby
52 lines
1.5 KiB
Ruby
require "formula"
|
|
|
|
class Libxmlsec1 < Formula
|
|
desc "XML security library"
|
|
homepage "https://www.aleksey.com/xmlsec/"
|
|
url "https://www.aleksey.com/xmlsec/download/xmlsec1-1.2.20.tar.gz"
|
|
sha1 "40117ab0f788e43deef6eaf028c88f6abc3a30d0"
|
|
|
|
bottle do
|
|
sha1 "7cfecf66f3608695321bc195b35957f2dddeb354" => :yosemite
|
|
sha1 "ff35feb04a9f18af8cf96aacc340e25e60adb542" => :mavericks
|
|
sha1 "9b4df5db57f11d86d63fc7dcaa51939d9b874c23" => :mountain_lion
|
|
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
|
|
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,
|