class Libxmlsec1 < Formula desc "XML security library" homepage "https://www.aleksey.com/xmlsec/" url "https://www.aleksey.com/xmlsec/download/xmlsec1-1.2.28.tar.gz" sha256 "13eec4811ea30e3f0e16a734d1dbf7f9d246a71d540b48d143a07b489f6222d4" bottle do cellar :any sha256 "c5894adb31925cc79a1632f0123dae9ee7155ac0c2b6666a6afa068284611ef8" => :mojave sha256 "2aa79d5b42e74146c3c53aa33a19142ac3cb832e7194ebb6edf5fbb1fc5e9ab7" => :high_sierra sha256 "a98e9523ebc87e22cd08d0fa42dbcd6ed9c26d78043b0fc6615c9f109e27fb22" => :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" # 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"].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,