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.30.tar.gz"
sha256 "2d84360b03042178def1d9ff538acacaed2b3a27411db7b2874f1612ed71abc8"
bottle do
cellar :any
sha256 "4214643458e159a5de8d558ac93c0f9a96c862cde71bc4f14a794d797304bd31" => :catalina
sha256 "75031c634f924e22948121de02ad29408bc961cb7589f908bd02f67bfa576f69" => :mojave
sha256 "50aab4085561db3c215d0020117f2585cf078125c58fa24174904cf1d001cd21" => :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,