2011-07-17 02:04:40 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libxmlsec1 < Formula
|
|
|
|
homepage 'http://www.aleksey.com/xmlsec/'
|
2012-03-17 19:32:17 +00:00
|
|
|
url 'http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.18.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '740c3c791be838bf638651a3fe0e80c624c2ae0e'
|
2011-07-17 02:04:40 +00:00
|
|
|
|
2012-11-15 18:27:17 +00:00
|
|
|
option 'without-gnutls', 'Disable GnuTLS'
|
|
|
|
|
2011-10-16 14:23:51 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-03-17 19:32:17 +00:00
|
|
|
depends_on 'libxml2' # Version on 10.6/10.7 is too old
|
2012-11-15 18:27:17 +00:00
|
|
|
depends_on 'gnutls' => :recommended unless build.include? 'without-gnutls'
|
|
|
|
depends_on 'libgcrypt' unless build.include? 'without-gnutls'
|
2011-07-17 02:04:40 +00:00
|
|
|
|
2012-03-17 19:32:17 +00:00
|
|
|
# Add HOMEBREW_PREFIX/lib to dl load path
|
2012-04-03 16:47:00 +00:00
|
|
|
def patches; DATA; end
|
2011-10-16 14:23:51 +00:00
|
|
|
|
2011-07-17 02:04:40 +00:00
|
|
|
def install
|
|
|
|
libxml2 = Formula.factory('libxml2')
|
|
|
|
|
2011-10-16 14:23:51 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2011-07-17 02:04:40 +00:00
|
|
|
"--prefix=#{prefix}",
|
2011-10-17 01:24:39 +00:00
|
|
|
"--with-libxml=#{libxml2.prefix}",
|
2012-08-11 19:18:47 +00:00
|
|
|
"--disable-crypto-dl",
|
2011-10-17 01:24:39 +00:00
|
|
|
"--disable-apps-crypto-dl"
|
2011-07-17 02:04:40 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2011-10-16 14:23:51 +00:00
|
|
|
|
|
|
|
__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
|
2012-04-03 16:47:00 +00:00
|
|
|
+ lt_dlsetsearchpath("HOMEBREW_PREFIX/lib");
|
2011-10-16 14:23:51 +00:00
|
|
|
lib->handle = lt_dlopenext((char*)lib->filename);
|
|
|
|
if(lib->handle == NULL) {
|
|
|
|
xmlSecError(XMLSEC_ERRORS_HERE,
|