homebrew-core/Formula/libxmlsec1.rb
nibbles 2bits 4b819151ba libxmlsec1: fix configure error on ML
libxmlsec1 already has an option thrown on the command line to
`disable-apps-crypte-dl` which stops the build from looking for
`libltdl`.  But that option only applies to the command line app
and another option needs to be thrown otherwise configure will
error on ML when it can't find `libltdl`.

Add a configure flag to `--disable-crypto-dl`

Fixes Homebrew/homebrew#13845

Closes Homebrew/homebrew#14129.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-13 17:27:36 -05:00

39 lines
1.1 KiB
Ruby

require 'formula'
class Libxmlsec1 < Formula
homepage 'http://www.aleksey.com/xmlsec/'
url 'http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.18.tar.gz'
md5 '8694b4609aab647186607f79e1da7f1a'
depends_on 'pkg-config' => :build
depends_on 'libxml2' # Version on 10.6/10.7 is too old
depends_on 'gnutls' => :optional
# Add HOMEBREW_PREFIX/lib to dl load path
def patches; DATA; end
def install
libxml2 = Formula.factory('libxml2')
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-libxml=#{libxml2.prefix}",
"--disable-crypto-dl",
"--disable-apps-crypto-dl"
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,