homebrew-core/Formula/libxmlsec1.rb

53 lines
1.5 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.29.tar.gz"
sha256 "b1d1deba966019930f608d1f2b95c40ca3450f1393bcd3a3c001a8ba1d2839ab"
bottle do
cellar :any
sha256 "a088dc56791af25f57b43c6ef1e95bce4da78793d071d781ce4289ec8e343266" => :catalina
sha256 "d10ed21c6a9abd0fb2b97a29b4c3ff78346faa0bdb3d7b6149f736ac47716fd6" => :mojave
sha256 "f50347e52ba30d4a231af5060c9eda68eef945171306fd4433c5717b4c53e5dd" => :high_sierra
end
depends_on "pkg-config" => :build
depends_on "gnutls" # Yes, it wants both ssl/tls variations
depends_on "libgcrypt"
depends_on "libxml2"
depends_on "openssl@1.1"
# 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",
"--with-openssl=#{Formula["openssl@1.1"].opt_prefix}"]
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,